graview 0.1.64 → 0.1.66
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/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/preview/chunk.2KFZHUAC.js +1 -0
- package/dist/preview/chunk.2MHNPBHC.js +1 -0
- package/dist/preview/{chunk.77JI5T4F.js → chunk.2VR7YEJ6.js} +1 -1
- package/dist/preview/chunk.32SHA3EY.js +1 -0
- package/dist/preview/chunk.3L4JMM3P.js +1 -0
- package/dist/preview/chunk.3PBTN7RO.js +1 -0
- package/dist/preview/chunk.45JP6VGJ.js +5 -0
- package/dist/preview/{chunk.DUP2CGVH.js → chunk.4AC2QM7T.js} +1 -1
- package/dist/preview/chunk.4FCFNAA4.js +1 -0
- package/dist/preview/chunk.4FDVINRJ.js +1 -0
- package/dist/preview/chunk.4JULYKGD.js +1 -0
- package/dist/preview/chunk.4U4D7WOI.js +1 -0
- package/dist/preview/chunk.4WGYUYWU.js +2 -0
- package/dist/preview/chunk.5B5SRTUK.js +1 -0
- package/dist/preview/chunk.5BX66FBP.js +1 -0
- package/dist/preview/chunk.5CXIEYHY.js +2 -0
- package/dist/preview/chunk.5EMIWORS.js +1 -0
- package/dist/preview/{chunk.D2XLECMP.js → chunk.5FNFRVTL.js} +1 -1
- package/dist/preview/chunk.5LJVOLKR.js +1 -0
- package/dist/preview/{chunk.APUQIELA.js → chunk.6EHHMWPP.js} +1 -1
- package/dist/preview/chunk.6EVMXBNB.js +1 -0
- package/dist/preview/chunk.6FQW6FNL.js +1 -0
- package/dist/preview/chunk.6HY6ZGEE.js +5 -0
- package/dist/preview/{chunk.K5YFUMRS.js → chunk.6LXIEM6B.js} +1 -1
- package/dist/preview/chunk.6MQ5NT7S.js +1 -0
- package/dist/preview/chunk.6P6NGZ6D.js +1 -0
- package/dist/preview/{chunk.XIVELWAM.js → chunk.6TLXFMX2.js} +1 -1
- package/dist/preview/chunk.72XP2ARZ.js +1 -0
- package/dist/preview/{chunk.2V7QTIAV.js → chunk.72ZCLEQC.js} +1 -1
- package/dist/preview/{chunk.ITBG37WJ.js → chunk.7BIPZTJB.js} +1 -1
- package/dist/preview/chunk.7VADSNPZ.js +1 -0
- package/dist/preview/{chunk.2VYGDY5Z.js → chunk.7VP6Y6D2.js} +1 -1
- package/dist/preview/{chunk.S7SHWDPR.js → chunk.7ZKBYXUM.js} +1 -1
- package/dist/preview/chunk.AK7NGFEX.js +6 -0
- package/dist/preview/{chunk.2VIS2NAT.js → chunk.ANS2IEEV.js} +1 -1
- package/dist/preview/{chunk.UDYFGYJP.js → chunk.B6JRTW3A.js} +1 -1
- package/dist/preview/chunk.BCQWAFGD.js +1 -0
- package/dist/preview/{chunk.7SRSE5IS.js → chunk.BFAFCVL4.js} +1 -1
- package/dist/preview/chunk.BGAC3B7X.js +1 -0
- package/dist/preview/chunk.BMENTGDC.js +21 -0
- package/dist/preview/chunk.BOCVLC7X.js +1 -0
- package/dist/preview/{chunk.7VAHHEDX.js → chunk.BUVTUAB5.js} +1 -1
- package/dist/preview/chunk.BXBEGMPO.js +22 -0
- package/dist/preview/{chunk.4XCYZRZ3.js → chunk.BZ7QWHAE.js} +1 -1
- package/dist/preview/chunk.C2C3AXGI.js +1141 -0
- package/dist/preview/chunk.CBXS23YH.js +23 -0
- package/dist/preview/chunk.CEQQIW7Z.js +1 -0
- package/dist/preview/chunk.CEVGND3Y.js +6 -0
- package/dist/preview/{chunk.WHX47OJM.js → chunk.CTASTRQN.js} +1 -1
- package/dist/preview/chunk.CU2WCYMK.js +1 -0
- package/dist/preview/{chunk.7CLKGKSF.js → chunk.CVPMSPCH.js} +1 -1
- package/dist/preview/chunk.DEHIR4EG.js +1 -0
- package/dist/preview/chunk.DPJNGFEZ.js +4 -0
- package/dist/preview/chunk.DQFHIJFN.js +1 -0
- package/dist/preview/chunk.DSYP43NN.js +1 -0
- package/dist/preview/chunk.DTCAUPLC.js +1 -0
- package/dist/preview/{chunk.4U45EY5M.js → chunk.DZFM6GSY.js} +1 -1
- package/dist/preview/chunk.E3UL4MCD.js +35 -0
- package/dist/preview/chunk.E4VRRWFP.js +1 -0
- package/dist/preview/chunk.E7EWNWAN.js +1 -0
- package/dist/preview/chunk.EG7OOJH5.js +1 -0
- package/dist/preview/{chunk.TQ2G4AM4.js → chunk.EMFOMSMI.js} +1 -1
- package/dist/preview/{chunk.5B7NG6WH.js → chunk.EQ4OODGO.js} +1 -1
- package/dist/preview/{chunk.CJHYGRWV.js → chunk.ES63XSIM.js} +1 -1
- package/dist/preview/chunk.EUAO4QNV.js +1 -0
- package/dist/preview/{chunk.47N2G7A5.js → chunk.EXYCN4WI.js} +1 -1
- package/dist/preview/chunk.F4VB6Q2W.js +1 -0
- package/dist/preview/chunk.F7672TKJ.js +1 -0
- package/dist/preview/chunk.FA42HCPW.js +1 -0
- package/dist/preview/{chunk.DLWFULWE.js → chunk.FBILPNGH.js} +1 -1
- package/dist/preview/chunk.FBJAQPZ6.js +1 -0
- package/dist/preview/{chunk.2DH42I7L.js → chunk.FDZE5LTJ.js} +2 -2
- package/dist/preview/chunk.FFOD5B4B.js +2 -0
- package/dist/preview/{chunk.TA2JTUNX.js → chunk.FIFUMX5X.js} +1 -1
- package/dist/preview/{chunk.T4TRJDBF.js → chunk.FK722SHI.js} +1 -1
- package/dist/preview/chunk.FV72U33M.js +1 -0
- package/dist/preview/chunk.FXT5CN32.js +19 -0
- package/dist/preview/chunk.GAFMWOME.js +1 -0
- package/dist/preview/{chunk.OXFDB5BB.js → chunk.GEFXU4VO.js} +1 -1
- package/dist/preview/chunk.GG47EIKO.js +1 -0
- package/dist/preview/chunk.GME63ZHI.js +1 -0
- package/dist/preview/{chunk.PVDDSBRG.js → chunk.GNEOSHQ6.js} +1 -1
- package/dist/preview/chunk.HOCD7KIR.js +1 -0
- package/dist/preview/chunk.HSSIMVVM.js +1 -0
- package/dist/preview/{chunk.ZA5TDCBC.js → chunk.I2737CPF.js} +1 -1
- package/dist/preview/chunk.I4Z7HVRT.js +1 -0
- package/dist/preview/chunk.IAEHUSQQ.js +1 -0
- package/dist/preview/chunk.IGK7EZCX.js +1 -0
- package/dist/preview/chunk.INHS3KTK.js +1 -0
- package/dist/preview/{chunk.JHUCKEJS.js → chunk.IWYMKGZZ.js} +1 -1
- package/dist/preview/chunk.J2MM6BUW.js +1 -0
- package/dist/preview/{chunk.JOM6MFVE.js → chunk.J7W2OFHY.js} +1 -1
- package/dist/preview/chunk.JMXXA4YG.js +1 -0
- package/dist/preview/chunk.JMYUQNXN.js +6 -0
- package/dist/preview/chunk.JO2X52D4.js +1 -0
- package/dist/preview/{chunk.YEXFVDRA.js → chunk.JXNVNFV4.js} +1 -1
- package/dist/preview/chunk.K6DFXDPZ.js +1 -0
- package/dist/preview/{chunk.WPQP54FM.js → chunk.KACSYPEV.js} +1 -1
- package/dist/preview/{chunk.R5MLRKAO.js → chunk.KBPJ7X7W.js} +1 -1
- package/dist/preview/chunk.KF27ME27.js +1 -0
- package/dist/preview/{chunk.WX23K7ZU.js → chunk.KSIEO5W7.js} +1 -1
- package/dist/preview/chunk.L25DCT5S.js +1 -0
- package/dist/preview/{chunk.UDU545CL.js → chunk.LETAQTLJ.js} +1 -1
- package/dist/preview/{chunk.VZAF3452.js → chunk.LGRVEHXT.js} +2 -2
- package/dist/preview/chunk.LINSO5PN.js +1 -0
- package/dist/preview/{chunk.XJWKIXPV.js → chunk.LLIURXFP.js} +1 -1
- package/dist/preview/{chunk.BVIJXL4J.js → chunk.LSN2IPAI.js} +1 -1
- package/dist/preview/chunk.M2JCFNHJ.js +1 -0
- package/dist/preview/{chunk.B3WVCSW5.js → chunk.M5FP4Y4Q.js} +1 -1
- package/dist/preview/{chunk.YSBTE3PX.js → chunk.M6ZN2KUO.js} +1 -1
- package/dist/preview/chunk.MODLZJD4.js +25 -0
- package/dist/preview/chunk.MWGZKZD6.js +1 -0
- package/dist/preview/{chunk.2JEN2RCB.js → chunk.NJRLJEJY.js} +1 -1
- package/dist/preview/chunk.NYLKG25K.js +4 -0
- package/dist/preview/{chunk.YMXWS4XN.js → chunk.OEIWIZCP.js} +1 -1
- package/dist/preview/{chunk.DQAMVVE6.js → chunk.OJY7VJ7D.js} +1 -1
- package/dist/preview/chunk.OMT4QUZY.js +23 -0
- package/dist/preview/{chunk.Z26T5E76.js → chunk.ONYBW45K.js} +1 -1
- package/dist/preview/chunk.OO2OP76C.js +1 -0
- package/dist/preview/{chunk.UJNLT3L6.js → chunk.OOSIKCOS.js} +1 -1
- package/dist/preview/{chunk.B6JR7EQO.js → chunk.OPTYYIGC.js} +1 -1
- package/dist/preview/{chunk.TMHVYI5R.js → chunk.OTV5XTBB.js} +1 -1
- package/dist/preview/{chunk.F6BNFLQM.js → chunk.OWFS2YDQ.js} +1 -1
- package/dist/preview/{chunk.CXDGE5ZS.js → chunk.OWO3OV62.js} +1 -1
- package/dist/preview/{chunk.4VRX7FCO.js → chunk.PAGEGBUD.js} +1 -1
- package/dist/preview/{chunk.NGRL3QOI.js → chunk.PDDIQ6PK.js} +1 -1
- package/dist/preview/{chunk.OW3M4OBN.js → chunk.PFQBCHQA.js} +1 -1
- package/dist/preview/{chunk.LDMBJC3B.js → chunk.PPSYUOH7.js} +1 -1
- package/dist/preview/{chunk.GH5UBSQI.js → chunk.PSQYDCVM.js} +1 -1
- package/dist/preview/chunk.QDVGHI7R.js +1 -0
- package/dist/preview/chunk.QFHWG4LN.js +1 -0
- package/dist/preview/chunk.QGIM2WAY.js +1 -0
- package/dist/preview/chunk.QHMHUL6B.js +3 -0
- package/dist/preview/chunk.QOS5T46W.js +1 -0
- package/dist/preview/{chunk.E4TXLT25.js → chunk.QPF4KSAW.js} +1 -1
- package/dist/preview/chunk.QQAZQDRW.js +1 -0
- package/dist/preview/chunk.QU52E5RG.js +3 -0
- package/dist/preview/{chunk.REXU6ARY.js → chunk.QWNSHISU.js} +2 -2
- package/dist/preview/chunk.RSMCTI2N.js +1 -0
- package/dist/preview/chunk.RWIN3POV.js +1 -0
- package/dist/preview/chunk.SSF47GUY.js +1 -0
- package/dist/preview/chunk.T6DPWW2K.js +3 -0
- package/dist/preview/chunk.TA36WBHK.js +1 -0
- package/dist/preview/chunk.TBY5IR7C.js +1 -0
- package/dist/preview/chunk.TGEL6EUA.js +1 -0
- package/dist/preview/chunk.TTGKX7LT.js +1 -0
- package/dist/preview/chunk.TXHYGFIZ.js +1 -0
- package/dist/preview/chunk.U3ED7W2U.js +1 -0
- package/dist/preview/chunk.U3HERHAI.js +88 -0
- package/dist/preview/chunk.U6QXLNHF.js +15 -0
- package/dist/preview/{chunk.P4TAX3HE.js → chunk.U6TEW6YD.js} +1 -1
- package/dist/preview/chunk.UJPX3BUV.js +1 -0
- package/dist/preview/chunk.V5I4GZEY.js +1 -0
- package/dist/preview/{chunk.HZPRMHSL.js → chunk.V7W5AQKL.js} +1 -1
- package/dist/preview/{chunk.77MLXWZV.js → chunk.VGHO3VCB.js} +1 -1
- package/dist/preview/{chunk.YIZPW7IK.js → chunk.VKZIEZ5C.js} +2 -2
- package/dist/preview/chunk.VT2YGDK2.js +1 -0
- package/dist/preview/{chunk.XCLW4GP7.js → chunk.W4YDPHCQ.js} +1 -1
- package/dist/preview/{chunk.2TCOLAL2.js → chunk.W53YNBSM.js} +1 -1
- package/dist/preview/chunk.WAB3L3ZI.js +1 -0
- package/dist/preview/chunk.WSDJPXJD.js +1 -0
- package/dist/preview/chunk.WSO7JOW5.js +1 -0
- package/dist/preview/{chunk.4DZOAB4D.js → chunk.WVLEGCRI.js} +1 -1
- package/dist/preview/chunk.XK65Y2KX.js +1 -0
- package/dist/preview/chunk.XMQG2PSM.js +50 -0
- package/dist/preview/{chunk.WFCE7NLK.js → chunk.XOE4KNP2.js} +2 -2
- package/dist/preview/chunk.Y7QDQ3WF.js +1 -0
- package/dist/preview/chunk.YIPXZUTT.js +2 -0
- package/dist/preview/chunk.YNEHJWJV.js +2 -0
- package/dist/preview/chunk.YXEO3Y65.js +1 -0
- package/dist/preview/chunk.Z274CL7J.js +1 -0
- package/dist/preview/chunk.Z7Y3R3YR.js +3 -0
- package/dist/preview/{chunk.JS2UZYGB.js → chunk.ZBVYD4OX.js} +1 -1
- package/dist/preview/{chunk.P6FNJR6E.js → chunk.ZD7T234N.js} +1 -1
- package/dist/preview/{chunk.2G5WLG3Z.js → chunk.ZQR2SN65.js} +1 -1
- package/dist/preview/chunk.ZR2TP3BF.js +111 -0
- package/dist/preview/chunk.ZRBGYXAO.js +6 -0
- package/dist/preview/index.html +57 -55
- package/dist/preview/page.js +2 -2
- package/dist/preview/splash.js +17 -14
- package/package.json +6 -6
- package/dist/preview/chunk.2D7K2IJQ.js +0 -4
- package/dist/preview/chunk.2E62YCMZ.js +0 -1
- package/dist/preview/chunk.2HV5FF6O.js +0 -1
- package/dist/preview/chunk.2JDAUKSN.js +0 -1133
- package/dist/preview/chunk.37I45R6V.js +0 -35
- package/dist/preview/chunk.3FKKH2XU.js +0 -74
- package/dist/preview/chunk.3J7XLJP2.js +0 -1
- package/dist/preview/chunk.3L37FY3G.js +0 -4
- package/dist/preview/chunk.3OEODIHB.js +0 -1
- package/dist/preview/chunk.3RD4JHVG.js +0 -88
- package/dist/preview/chunk.3RUV4HE4.js +0 -1
- package/dist/preview/chunk.3SAESG6X.js +0 -1
- package/dist/preview/chunk.4HTB6TX2.js +0 -1
- package/dist/preview/chunk.4Q5PCMGZ.js +0 -18
- package/dist/preview/chunk.52MBXPEK.js +0 -1
- package/dist/preview/chunk.5AD2QHWH.js +0 -3
- package/dist/preview/chunk.5HJ2GTKZ.js +0 -1
- package/dist/preview/chunk.5IEZF433.js +0 -2
- package/dist/preview/chunk.5PPCK7QT.js +0 -1
- package/dist/preview/chunk.6NRWLCIZ.js +0 -5
- package/dist/preview/chunk.75JQCTR6.js +0 -1
- package/dist/preview/chunk.7AOEZJRM.js +0 -1
- package/dist/preview/chunk.7ZG77OI3.js +0 -1
- package/dist/preview/chunk.7ZHH7WBN.js +0 -1
- package/dist/preview/chunk.AJEK3I5X.js +0 -6
- package/dist/preview/chunk.APRWUIE3.js +0 -1
- package/dist/preview/chunk.ATHLE33D.js +0 -1
- package/dist/preview/chunk.B2YTHEX5.js +0 -1
- package/dist/preview/chunk.BN42H3C6.js +0 -1
- package/dist/preview/chunk.CC7P435K.js +0 -9
- package/dist/preview/chunk.CM65MCHA.js +0 -1
- package/dist/preview/chunk.DJIF7IAQ.js +0 -2
- package/dist/preview/chunk.DMENNIHT.js +0 -1
- package/dist/preview/chunk.DN7UCBOA.js +0 -1
- package/dist/preview/chunk.DVSTLVIH.js +0 -15
- package/dist/preview/chunk.DYRULRFX.js +0 -1
- package/dist/preview/chunk.FN34P4IS.js +0 -1
- package/dist/preview/chunk.FUPYIOXZ.js +0 -1
- package/dist/preview/chunk.FXRYMT3U.js +0 -1
- package/dist/preview/chunk.G5BVZLCM.js +0 -1
- package/dist/preview/chunk.G7YLK4PX.js +0 -1
- package/dist/preview/chunk.GF62K25C.js +0 -1
- package/dist/preview/chunk.GFQPO3NC.js +0 -1
- package/dist/preview/chunk.GHHKRFPD.js +0 -1
- package/dist/preview/chunk.GP5DAA4P.js +0 -3
- package/dist/preview/chunk.HPG6CNKM.js +0 -1
- package/dist/preview/chunk.HSJEOM3W.js +0 -1
- package/dist/preview/chunk.IQGSEAQ2.js +0 -5
- package/dist/preview/chunk.K2HDEL7I.js +0 -1
- package/dist/preview/chunk.K2PXP5H6.js +0 -1
- package/dist/preview/chunk.K54ISAXN.js +0 -1
- package/dist/preview/chunk.KHXRJLLU.js +0 -50
- package/dist/preview/chunk.KMIFSPGQ.js +0 -1
- package/dist/preview/chunk.L4V5VLSM.js +0 -1
- package/dist/preview/chunk.LTOQ22ZJ.js +0 -1
- package/dist/preview/chunk.M5VHUIDB.js +0 -1
- package/dist/preview/chunk.N643PVQA.js +0 -1
- package/dist/preview/chunk.NJSK3UO2.js +0 -6
- package/dist/preview/chunk.NRPBTV6O.js +0 -21
- package/dist/preview/chunk.O7HHNQK4.js +0 -2
- package/dist/preview/chunk.PR74PGLC.js +0 -1
- package/dist/preview/chunk.QROPDEJF.js +0 -1
- package/dist/preview/chunk.QRT6BZR6.js +0 -1
- package/dist/preview/chunk.RDA35HZB.js +0 -2
- package/dist/preview/chunk.S6QZBWCJ.js +0 -1
- package/dist/preview/chunk.SADHOSRC.js +0 -19
- package/dist/preview/chunk.SJHUC4TL.js +0 -1
- package/dist/preview/chunk.SL5FXE3R.js +0 -1
- package/dist/preview/chunk.T4JP6BGP.js +0 -1
- package/dist/preview/chunk.TOLW64EO.js +0 -1
- package/dist/preview/chunk.TP3PZRHE.js +0 -1
- package/dist/preview/chunk.TUR2DA2M.js +0 -1
- package/dist/preview/chunk.TYIBLD2D.js +0 -1
- package/dist/preview/chunk.UD2GGG7L.js +0 -1
- package/dist/preview/chunk.UN2IAA5R.js +0 -1
- package/dist/preview/chunk.VLX7YWVH.js +0 -25
- package/dist/preview/chunk.VT4YBFZL.js +0 -1
- package/dist/preview/chunk.WMARJ5E3.js +0 -1
- package/dist/preview/chunk.X36BYTEG.js +0 -1
- package/dist/preview/chunk.XEG7ZDRG.js +0 -1
- package/dist/preview/chunk.XQ5RTPEF.js +0 -1
- package/dist/preview/chunk.YLOGIJOH.js +0 -1
- package/dist/preview/chunk.Z4XGEV34.js +0 -1
- package/dist/preview/chunk.ZNDVJGTY.js +0 -1
- package/dist/preview/chunk.ZQGLPP7A.js +0 -1
- /package/dist/preview/{chunk.GZHZLJBF.js → chunk.MIE4TJRW.js} +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import{a as je,c as Ge}from"./chunk.HOCD7KIR.js";import{b as _e}from"./chunk.FDZE5LTJ.js";import{a as He,b as ze,c as Ve,d as Q}from"./chunk.LGRVEHXT.js";import"./chunk.CTASTRQN.js";import{k as qe,l as Ke}from"./chunk.DPJNGFEZ.js";import"./chunk.YNEHJWJV.js";import"./chunk.QQAZQDRW.js";import"./chunk.72ZCLEQC.js";import"./chunk.ONYBW45K.js";import{e as Pe}from"./chunk.2VR7YEJ6.js";import{m as Be}from"./chunk.FXT5CN32.js";import{a as Fe,b as Ie}from"./chunk.WVLEGCRI.js";import{h as Me}from"./chunk.LETAQTLJ.js";import{e as Re,f as Ee}from"./chunk.BUVTUAB5.js";import"./chunk.HJCQ6I3S.js";import"./chunk.OJY7VJ7D.js";import{e as de}from"./chunk.GEFXU4VO.js";import"./chunk.7VP6Y6D2.js";import"./chunk.WSO7JOW5.js";import"./chunk.XOE4KNP2.js";import{a as Ce}from"./chunk.WAB3L3ZI.js";import"./chunk.W53YNBSM.js";import"./chunk.2KFZHUAC.js";import"./chunk.V5I4GZEY.js";import{a as De,b as Te,j as Le}from"./chunk.QWNSHISU.js";import"./chunk.G4JJXA63.js";import{a as $e}from"./chunk.TBY5IR7C.js";import"./chunk.FIFUMX5X.js";import"./chunk.BIDL7GQD.js";import"./chunk.V7W5AQKL.js";import"./chunk.EMFOMSMI.js";import"./chunk.QOS5T46W.js";import"./chunk.PPSYUOH7.js";import"./chunk.XOZU4OFA.js";import"./chunk.GME63ZHI.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.4FCFNAA4.js";import"./chunk.4AC2QM7T.js";import"./chunk.JXNVNFV4.js";import"./chunk.WVUJXDXZ.js";import"./chunk.I2737CPF.js";import{a as Ne}from"./chunk.NJRLJEJY.js";import"./chunk.CVPMSPCH.js";import"./chunk.OTV5XTBB.js";import"./chunk.KBPJ7X7W.js";import"./chunk.OEIWIZCP.js";import"./chunk.MIE4TJRW.js";import{s as Ae}from"./chunk.5LJVOLKR.js";import"./chunk.OJGHDWI6.js";import"./chunk.OWFS2YDQ.js";import"./chunk.WSDJPXJD.js";import"./chunk.F4VB6Q2W.js";import{d as se,l as Se}from"./chunk.FFOD5B4B.js";import{b as xe}from"./chunk.Z7Y3R3YR.js";import"./chunk.YXEO3Y65.js";import{F as Oe,t as te}from"./chunk.U3HERHAI.js";import"./chunk.FBILPNGH.js";import{G as st,Qa as re,Ra as ee,W as be,Z as ke,ea as K,ga as oe,j as fe,l as he,m as me,r as X,ra as ye}from"./chunk.MODLZJD4.js";import"./chunk.SDO3U72B.js";import{L as ge,T as ue,Z as $,cb as J,la as W,na as ae,pa as we,ra as ve}from"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import{b as ie}from"./chunk.AJZBJBMO.js";var g=ie(st(),1);var dt=300,lt=14,Z=50,pt=3,ct=2;function We(e,n,o){let s=e.tryDefinition(n)?.fields?.shape;return(s?.[o]===void 0?void 0:Ne(s[o]))?.type}var gt=(e,n)=>Object.keys(e.tryDefinition(n)?.fields?.shape??{}),ut=e=>e==="date"||e==="datetime",Qe=/^(due|dueOn|dueAt|dueDate|deadline|by)$/i,wt=/^(date|on|day|when|at|start|starts|startsOn|startsAt|begins|from|sown|scheduled|scheduledFor|planned|plannedFor)$/i,vt=/^(done|finished|complete|completed|closed)$/i;function pe(e,n){let o=e.tryDefinition(n),s=gt(e,n),a=s.filter(c=>ut(We(e,n,c)));if(a.length===0)return;let i=o?.fieldRoles??{},r=c=>i[c]!==void 0&&a.includes(i[c])?i[c]:void 0,p=r("start")??r("when")??a.find(c=>Qe.test(c))??a.find(c=>wt.test(c));if(!p)return;let k=r("end")??a.find(c=>c!==p&&/^(end|ends|until|to|finish|finished|harvested|through)$/i.test(c)),m=s.find(c=>vt.test(c)&&We(e,n,c)==="boolean");return{field:p,due:Qe.test(p),...k?{end:k}:{},...m?{done:m}:{}}}function le(e,n){return Math.round((Date.parse(`${n.slice(0,10)}T00:00:00Z`)-Date.parse(`${e.slice(0,10)}T00:00:00Z`))/864e5)}var _=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}/.test(e)?e.slice(0,10):void 0;function Ze(e,n,o,s){let a=de(e,n);if(a&&o.length>0&&o.length<=dt)return{shape:"board",field:a.field};let i=pe(e,n);if(i&&!i.due){let r=l=>{let v=_(l[i.field]),b=_(J(l,i.field,s));return v&&b?le(v,b):0},p=o.map(l=>({from:_(J(l,i.field,s)),to:i.end&&_(l[i.end])?H(_(l[i.end]),r(l)):void 0})).filter(l=>l.from!==void 0).map(l=>({from:l.from,to:l.to&&l.to>l.from?l.to:l.from})),k=`${s.slice(0,7)}-01`,m=H(`${H(k,31).slice(0,7)}-01`,-1),c=p.filter(l=>l.from<=m&&l.to>=k),w=p.map(l=>le(l.from,l.to)).sort((l,v)=>l-v),u=w[Math.floor(w.length/2)]??0;if(c.length>0&&u<=lt){let l=H(s,-((new Date(`${s}T00:00:00Z`).getUTCDay()+6)%7)),v=H(l,6),b=c.every(f=>f.from>=l&&f.to<=v);return{shape:"calendar",start:i.field,...i.end?{end:i.end}:{},...i.done?{done:i.done}:{},range:b?"week":"month"}}}return{shape:"table"}}function Ue(e,n){let o=pe(e,n);return o?{by:o.field,direction:o.due?"asc":"desc"}:void 0}function Ye(e,n,o={}){switch(n.shape){case"board":return{lens:"columns",kind:e,column:n.field};case"calendar":return{lens:"calendar",kind:e,start:n.start,...n.end?{end:n.end}:{},...n.done?{done:n.done}:{},range:n.range};case"table":return{lens:"blocks",kind:e,as:"row",...o.group?.by?{group:o.group.by}:{},...o.sort?{sort:{by:o.sort.by,...o.sort.direction==="desc"?{direction:"desc"}:{}}}:{}}}}var ft=60;function Je(e,n,o,s){let a=e.tryDefinition(n),i=o.slice(0,ft),r=new Map;i.forEach(w=>{let u=W(a,w);se(w,a,{glance:!0,said:[u]}).forEach((l,v)=>{if(l.long||l.files||l.app)return;let b=r.get(l.key);b?b.count++:r.set(l.key,{label:l.label,count:1,at:v})})});let p=Math.max(1,Math.ceil(i.length/3)),k=[...r.entries()].filter(([,w])=>w.count>=p).sort((w,u)=>w[1].at-u[1].at).slice(0,pt).map(([w,u])=>({about:"field",key:w,label:u.label})),m=new Map;for(let w of i){let u=new Set;for(let[l,v]of[["out",s.outEdges(w.id)],["in",s.inEdges(w.id)]])for(let b of v){let f=s.getNode(l==="out"?b.to:b.from);if(!f||f.id===w.id)continue;let x=`${b.kind}|${l}`;if(u.has(x))continue;u.add(x);let y=m.get(x);y?y.count++:m.set(x,{edge:b.kind,direction:l,far:f.kind,count:1})}}let c=[...m.entries()].sort((w,u)=>u[1].count-w[1].count).slice(0,ct).map(([w,u])=>{let l=xe(e,u.direction==="out"?n:u.far,u.edge,u.direction);return{about:"edge",key:w,label:l.charAt(0).toUpperCase()+l.slice(1),edge:u.edge,direction:u.direction}});return[...k,...c]}function Xe(e,n,o,s){if(o.about==="field"){let r=e.tryDefinition(n.kind);return{text:se(n,r,{excerpt:!0}).find(k=>k.key===o.key)?.value??""}}let i=(o.direction==="out"?s.outEdges(n.id):s.inEdges(n.id)).filter(r=>r.kind===o.edge).map(r=>s.getNode(o.direction==="out"?r.to:r.from)).filter(r=>r!==void 0).map(r=>W(e.tryDefinition(r.kind),r));return i.length===0?{text:""}:i.length===1?{text:i[0]}:{text:`${i[0]} +${i.length-1}`,title:i.join(", ")}}function et(e,n,o=()=>{}){let s=new Map;for(let a of e){let i=a.nodeIds.filter(p=>n.has(p));if(i.length===0&&!(a.subjectId!==void 0&&n.has(a.subjectId)))continue;let r=s.get(a.invariant)??{invariant:a.invariant,label:o(a.invariant)||a.label||a.message,violations:[],records:new Set};r.violations.push(a);for(let p of i)r.records.add(p);a.subjectId!==void 0&&n.has(a.subjectId)&&r.records.add(a.subjectId),s.set(a.invariant,r)}return[...s.values()].sort((a,i)=>i.violations.length-a.violations.length).map(a=>({invariant:a.invariant,label:a.label,violations:a.violations,records:[...a.records]}))}var tt=6;function nt(e,n,o,s){let a=pe(e,n);if(!a)return;let i=de(e,n),r=m=>{if(a.done!==void 0&&m[a.done]===!0)return!0;if(!i)return!1;let c=i.values.indexOf(String(m[i.field]));return c>=0&&i.tiers[c]==="done"},p=0,k=0;for(let m of o){let c=_(J(m,a.field,s));if(!c||r(m))continue;let w=le(s,c);a.due&&w<0?p++:w>=0&&w<=tt&&k++}if(!(p===0&&k===0))return{field:a.field,due:a.due,overdue:p,soon:k}}function H(e,n){return new Date(Date.parse(`${e.slice(0,10)}T00:00:00Z`)+n*864e5).toISOString().slice(0,10)}function ce(e,n,o){return n==="overdue"?[{key:e.field,value:`before:${o}`}]:[{key:e.field,value:`after:${H(o,-1)}`},{key:e.field,value:`before:${H(o,tt+1)}`}]}function it(e,n,o,s){let a=new Set,i=new Set;for(let r of e)if(!(r.at<=o))for(let p of r.primitives)p.op==="add-node"&&p.node?.kind===n?a.add(p.node.id):(p.op==="patch-node"||p.op==="splice-text")&&p.id!==void 0&&s(p.id)===n&&i.add(p.id);for(let r of a)i.delete(r);return{added:[...a].filter(r=>s(r)===n).length,changed:[...i].filter(r=>s(r)===n).length}}var t=ie(be(),1),ht=560;function mt(e,n){let[o,s]=(0,g.useState)(0);return(0,g.useEffect)(()=>{let a=e.current;if(!a||!n){s(0);return}let i=0,r=()=>{i=0;let c=a.getBoundingClientRect().bottom;s([...a.querySelectorAll('[data-testid="kind-stop-table"] tbody tr[data-graview-pick]')].filter(w=>w.getBoundingClientRect().top>c-24).length)},p=()=>{i||(i=requestAnimationFrame(r))};r(),a.addEventListener("scroll",p,{passive:!0});let k=typeof ResizeObserver>"u"?null:new ResizeObserver(p);k?.observe(a);let m=a.querySelector('[data-testid="kind-stop-body"]');return m&&k?.observe(m),()=>{a.removeEventListener("scroll",p),k?.disconnect(),i&&cancelAnimationFrame(i)}},[e,n]),o}function bt({narrow:e,at:n,children:o}){return e?(0,t.jsx)("div",{ref:n,className:"graview-kind-stop-scroll","data-testid":"kind-stop-scroll",children:o}):(0,t.jsx)(t.Fragment,{children:o})}function kt(e){let[n,o]=(0,g.useState)(!1);return(0,g.useLayoutEffect)(()=>{let s=e.current;if(!s)return;let a=()=>{let r=s.getBoundingClientRect().width;r>0&&o(r<ht)};if(a(),typeof ResizeObserver>"u")return;let i=new ResizeObserver(a);return i.observe(s),()=>i.disconnect()},[e]),n}var ot="as",yt=(e,n)=>`graview:kind-seen:${e}:${n}`;function xt(e){try{return localStorage.getItem(e)}catch{return null}}function St(e,n){try{localStorage.setItem(e,n)}catch{}}var Nt=(e,n)=>({...fe(me(e,!1),n),relation:null});function rn({kind:e,members:n,flagged:o=[],label:s,retired:a=0}){let{store:i,brand:r,principal:p,views:k,view:m}=K(),{go:c}=ee(),w=oe(),u=i.schema,l=u.tryDefinition(e),v=s??we(u,e),b=i.today()??ge(),f=n,x=(0,g.useId)(),y=(0,g.useMemo)(()=>Ze(u,e,f,b),[u,e,f,b]),N=m.within?.[ot]==="table"?{shape:"table"}:y,R=Fe(m),D=N.shape==="table"&&!R.sort?Ue(u,e):void 0,E=D?{...R,sort:D}:R,L=(0,g.useMemo)(()=>new Set(o),[o]),h=(0,g.useMemo)(()=>Me(f,E,{schema:u,graph:i.graph,flagged:L,today:b}),[f,E,u,i,L,b,w]),C=(0,g.useMemo)(()=>Ee(u,Re(u,e)),[u,e]),P=k.arrangement?.()?.lists?.[e]?.filters,q=M=>c(Ie(m,M)),j=(0,g.useMemo)(()=>({name:r?.name??"app",schema:u,...i.policy?{policy:i.policy}:{}}),[r,u,i]),U=JSON.stringify(Ye(e,N,E)),F=(0,g.useMemo)(()=>{let M=Le(JSON.parse(U),{app:j,sight:Te(j,p)});return De(M)?void 0:M},[U,j,p]),G=N.shape!=="table"&&F!==void 0,z=(0,g.useRef)(null),O=kt(z),[V,d]=(0,g.useState)(!1),A=(0,g.useId)(),I=(0,g.useMemo)(()=>$e(i,p),[i,p]),B=(f.length>1||a>0)&&!G?(0,t.jsx)(Be,{schema:u,graph:i.graph,kind:e,arrangement:E,onChange:q,offers:C,...P?{filters:P}:{},kept:{shown:h.nodes.length,of:f.length},testId:"kind-arrange",chips:{nodes:f,flagged:L,today:b},...a>0?{past:{count:a,widen:()=>c(Pe(m,!0))}}:{}}):null,T=!!E.query||(E.filter?.length??0)>0,Y=(0,g.useRef)(null),ne=mt(Y,O&&!G);return(0,t.jsxs)("section",{ref:z,"aria-labelledby":x,className:"graview-kind-stop","data-testid":"kind-stop","data-graview-kind-stop":e,"data-graview-shape":N.shape,"data-graview-narrow":O||void 0,children:[(0,t.jsx)("style",{children:Lt}),(0,t.jsxs)(bt,{narrow:O,at:Y,children:[(0,t.jsx)(At,{kind:e,plural:v,count:f.length,headingId:x,description:l?.description,...O?{tools:{open:V,id:A,toggle:()=>d(M=>!M),narrowed:T}}:{}}),O&&V?(0,t.jsxs)("div",{id:A,className:"graview-kind-stop-tools","data-testid":"kind-stop-tools",role:"group","aria-label":`Find, filter and arrange the ${v.toLowerCase()}`,children:[B,f.length>0?(0,t.jsx)(at,{derived:y,shape:N,draft:F,author:!1}):null,(0,t.jsx)(rt,{kind:e,plural:v})]}):null,(0,t.jsx)(Rt,{kind:e,plural:v,members:f,today:b,arrangement:E,onArrange:q,compact:O}),O&&T&&!V?(0,t.jsxs)("p",{className:"graview-kind-stop-narrowed","data-testid":"kind-stop-narrowed",children:[(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[$(h.nodes.length)," of ",$(f.length)," shown"]})," ",(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-link",onClick:()=>q({}),children:"Show all"})]}):null,O?null:B,f.length>0&&!O?(0,t.jsx)(at,{derived:y,shape:N,draft:F,author:I}):null,(0,t.jsx)("div",{className:"graview-kind-stop-body","data-testid":"kind-stop-body",children:f.length===0?(0,t.jsx)("p",{className:"graview-kind-stop-empty","data-testid":"kind-stop-empty",children:"Nothing here yet."}):G?(0,t.jsx)(Dt,{draft:F,nodes:f}):h.nodes.length===0?(0,t.jsxs)("p",{className:"graview-kind-stop-empty","data-testid":"kind-stop-none-kept",children:["None of the ",$(f.length)," ",v.toLowerCase()," ",E.query?`says \u201C${E.query}\u201D`:"is kept by these filters","."," ",(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-link",onClick:()=>q({}),children:"Show them all"})]}):(0,t.jsx)(Tt,{kind:e,nodes:h.nodes,groups:h.grouped?h.groups.map(M=>({key:M.key,label:M.label,nodes:M.nodes})):void 0,flagged:L,plural:v,arrangement:E})})]}),ne>0?(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-below","data-testid":"kind-stop-below","data-graview-below":ne,onClick:()=>Y.current?.scrollBy({top:Math.round(Y.current.clientHeight*.8),behavior:"smooth"}),children:[ae(u,e,ne).replace(/^(\S+)\s/,"$1 more ")," below ",(0,t.jsx)("span",{"aria-hidden":"true",children:"\u2193"})]}):null]})}function rt({kind:e,plural:n}){let{setSelection:o,setMenuAt:s}=K();return(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-quiet","data-testid":"kind-stop-acts","aria-haspopup":"menu","aria-label":`What can be done with the ${n.toLowerCase()}`,onClick:a=>{let i=a.currentTarget.getBoundingClientRect();o([X(e)]),s({x:Math.round(i.left),y:Math.round(i.bottom+4),on:X(e)})},children:"Acts\u2026"})}function At({kind:e,plural:n,count:o,headingId:s,description:a,tools:i}){let{store:r}=K(),p=(0,g.useMemo)(()=>({about:[X(e)]}),[e]),{affordances:k}=qe(p),{apply:m,preview:c}=Ke(),w=(0,g.useMemo)(()=>{let S=N=>r.allMutations().find(R=>R.name===N.mutation)?.creates?.includes(e)??!1;return k.find(N=>!N.destructive&&!N.setsAside&&S(N))},[k,r,e]),[u,l]=(0,g.useState)(!1),[v,b]=(0,g.useState)(null),f=(0,g.useRef)(null),x=(0,g.useRef)(null);(0,g.useEffect)(()=>{let S=x.current;if(!S||S.closest('[data-testid="kind-stop"]')?.contains(document.activeElement))return;let N=!1;try{N=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.matches(":focus-visible")}catch{N=!0}N?delete S.dataset.graviewQuietFocus:S.dataset.graviewQuietFocus="",S.focus({preventScroll:!0})},[e]);let y=(S,N)=>{try{c(S,N),m(S,N),b(null),l(!1),requestAnimationFrame(()=>f.current?.focus())}catch(R){return b(Se(r.schema,r.allMutations(),R)),[]}};return(0,t.jsxs)("header",{className:"graview-kind-stop-head",children:[(0,t.jsxs)("div",{className:"graview-kind-stop-title",children:[(0,t.jsx)("h2",{id:s,ref:x,tabIndex:-1,"data-testid":"kind-stop-title",onKeyDown:S=>delete S.currentTarget.dataset.graviewQuietFocus,onBlur:S=>delete S.currentTarget.dataset.graviewQuietFocus,children:n}),(0,t.jsxs)("p",{"data-testid":"kind-stop-count",children:[ae(r.schema,e,o),a?` \xB7 ${a}`:""]})]}),(0,t.jsxs)("div",{className:"graview-kind-stop-acts",children:[w?(0,t.jsx)("button",{ref:f,type:"button",className:"graview-kind-stop-primary","data-testid":"kind-stop-primary","data-affordance":w.id,"aria-expanded":w.open.length>0?u:void 0,onClick:()=>{b(null),w.open.length===0?y(w):l(S=>!S)},children:w.label}):null,i?(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-more-tools","data-testid":"kind-stop-tools-open","aria-expanded":i.open,"aria-controls":i.open?i.id:void 0,"aria-label":`Find, filter, arrange and act on the ${n.toLowerCase()}`,title:"Find, filter, arrange and acts","data-narrowed":i.narrowed||void 0,onClick:i.toggle,children:(0,t.jsx)("span",{"aria-hidden":"true",children:"\u22EF"})}):(0,t.jsx)(rt,{kind:e,plural:n})]}),u&&w?(0,t.jsx)("div",{className:"graview-kind-stop-ask","data-testid":"kind-stop-ask","aria-label":w.label,role:"group",children:(0,t.jsx)(Ce,{affordance:w,onApply:S=>y(w,S),onCancel:()=>{l(!1),f.current?.focus()}})}):null,v?(0,t.jsx)("p",{role:"alert",className:"graview-kind-stop-failed","data-testid":"kind-stop-failed",children:v}):null]})}var Ct=te.part((e,n)=>(0,t.jsx)(e.ProblemRows,{...n}),{what:"The problems",as:"li"});function Rt({kind:e,plural:n,members:o,today:s,arrangement:a,onArrange:i,compact:r=!1}){let{store:p,brand:k,setSelection:m}=K(),c=p.schema,w=re(),u=(0,g.useMemo)(()=>new Set(o.map(h=>h.id)),[o]),l=(0,g.useMemo)(()=>et(w,u,h=>p.allInvariants().find(C=>C.name===h)?.label),[w,u,p]),v=(0,g.useMemo)(()=>nt(c,e,o,s),[c,e,o,s]),b=yt(Oe(k,c),e),[f]=(0,g.useState)(()=>xt(b));(0,g.useEffect)(()=>()=>St(b,new Date().toISOString()),[b]);let x=oe(),y=(0,g.useMemo)(()=>f?it(p.log.all(),e,f,h=>p.graph.getNode(h)?.kind):null,[f,p,e,x]),[S,N]=(0,g.useState)(null),R=h=>i({...a,filter:[...(a.filter??[]).filter(C=>!h?.some(P=>P.key===C.key)),...h??[]]}),D=l.reduce((h,C)=>h+C.violations.length,0),E=[];if(v&&(v.overdue>0||v.soon>0)){let h=v.field;E.push((0,t.jsxs)("li",{"data-testid":"kind-stop-dates",children:[v.overdue>0?(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-fact","data-tone":"warn",onClick:()=>R(ce(v,"overdue",s)),"aria-label":`${$(v.overdue)} overdue \u2014 show only these`,children:[$(v.overdue)," overdue"]}):null,v.soon>0?(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-fact",onClick:()=>R(ce(v,"soon",s)),"aria-label":`${$(v.soon)} in the next 7 days \u2014 show only these`,children:[$(v.soon)," ",v.due?"due":""," in the next 7 days"]}):null,(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[" by ",ve(c.tryDefinition(e),h).toLowerCase()]})]},"dates"))}let L=(a.filter??[]).some(h=>h.key==="is"&&h.value==="flagged");if(l.length>0&&r){let h=l.map(C=>C.label).join(", ");E.push((0,t.jsxs)("li",{className:"graview-kind-stop-problems-line","data-testid":"kind-stop-problems","data-graview-problems":D,children:[(0,t.jsxs)("span",{className:"graview-kind-stop-warn",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"\u26A0 "}),D===1?"1 problem":`${$(D)} problems`]}),(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text graview-kind-stop-rules-said",title:h,children:[" ","\xB7 ",h]}),(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-only-problems","aria-pressed":L,"aria-label":L?`Show all the ${n.toLowerCase()}`:`Show only the ${n.toLowerCase()} with a problem`,onClick:()=>L?i({...a,filter:(a.filter??[]).filter(C=>!(C.key==="is"&&C.value==="flagged"))}):R([{key:"is",value:"flagged"}]),children:L?"Show all":"Show"})]},"problems"))}else l.length>0&&E.push((0,t.jsxs)("li",{"data-testid":"kind-stop-problems","data-graview-problems":D,children:[(0,t.jsxs)("span",{className:"graview-kind-stop-warn",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"\u26A0 "}),D===1?"1 problem":`${$(D)} problems`]}),(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:[" in ",n.toLowerCase(),":"]}),(0,t.jsx)("ul",{className:"graview-kind-stop-rules",children:l.map(h=>(0,t.jsx)(Et,{group:h,open:S===h.invariant,onToggle:()=>N(C=>C===h.invariant?null:h.invariant),onPick:C=>m([C])},h.invariant))}),(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-only-problems",onClick:()=>R([{key:"is",value:"flagged"}]),children:["Show only the ",n.toLowerCase()," with a problem"]})]},"problems"));if(y&&(y.added>0||y.changed>0)){let h=[y.added>0?`${$(y.added)} added`:"",y.changed>0?`${$(y.changed)} changed`:""].filter(Boolean);E.push((0,t.jsxs)("li",{"data-testid":"kind-stop-since",children:[(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["Since you last looked (",ue(f.slice(0,10)),"):"]})," ",h.join(", ")]},"since"))}return E.length===0?null:(0,t.jsx)("ul",{className:"graview-kind-stop-going-on","aria-label":`What is going on in the ${n.toLowerCase()}`,"data-testid":"kind-stop-going-on",children:E})}function Et({group:e,open:n,onToggle:o,onPick:s}){let a=(0,g.useId)();return(0,t.jsxs)("li",{"data-graview-rule":e.invariant,children:[(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-rule","aria-expanded":n,"aria-controls":a,onClick:o,onPointerEnter:te.prefetch,onFocus:te.prefetch,children:[(0,t.jsx)("span",{"aria-hidden":"true",className:"graview-kind-stop-chevron","data-open":n||void 0,children:"\u203A"}),e.label," ",(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["\xB7 ",$(e.violations.length)]})]}),n?(0,t.jsx)("ol",{id:a,className:"graview-kind-stop-problem-rows","data-testid":"kind-stop-problem-rows",children:(0,t.jsx)(g.Suspense,{fallback:null,children:(0,t.jsx)(Ct,{violations:e.violations,pick:i=>{let r=i.subjectId??e.records[0]??i.nodeIds[0];r!==void 0&&s(r)}})})}):null]})}var $t={board:"Board",calendar:"Calendar",table:"Table"};function at({derived:e,shape:n,draft:o,author:s}){let{view:a}=K(),{go:i}=ee(),{keep:r}=je(Ge()),[p,k]=(0,g.useState)(!1),m=e.shape==="table"?[]:[e.shape,"table"];return!s&&m.length===0?null:(0,t.jsxs)("div",{className:"graview-kind-stop-shape","data-testid":"kind-stop-shape",children:[m.length>0?(0,t.jsx)("span",{role:"group","aria-label":"Show as",className:"graview-kind-stop-switch",children:m.map(c=>(0,t.jsx)("button",{type:"button","aria-pressed":n.shape===c,"data-testid":`kind-stop-as-${c}`,onClick:()=>i(he(a,ot,c===e.shape?null:c)),children:$t[c]},c))}):null,s?(0,t.jsx)("span",{className:"graview-kind-stop-quiet-text","data-testid":"kind-stop-derived",children:o?`${o.said.replace(/\.$/,"")}, derived from the declaration`:"Derived from the declaration"}):null,o&&s?(0,t.jsx)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-keep",disabled:p,title:`Keep \u201C${o.title}\u201D as a lens: a place of its own`,onClick:()=>{k(!0),r(o).finally(()=>k(!1))},children:"Keep as a lens"}):null]})}function Dt({draft:e,nodes:n}){let o=_e(e.drawn);return(0,t.jsx)("div",{className:"graview-kind-stop-lens","data-graview-draft":e.lens.name,children:(0,t.jsx)(ke,{mode:"scene",children:(0,t.jsx)(Ae,{kind:e.kind,view:e.title,children:(0,t.jsx)(o,{nodes:n,label:e.title,fidelity:"full",cardinality:"many",mode:"fullscreen",selected:!1})})})})}function Tt({kind:e,nodes:n,groups:o,flagged:s,plural:a,arrangement:i}){let{store:r,views:p,view:k,selection:m,setSelection:c,setMenuAt:w,principal:u}=K(),{go:l}=ee(),v=r.schema,b=r.graph,f=(0,g.useMemo)(()=>(o?o.flatMap(d=>d.nodes):n).map(d=>d.id),[n,o]),x=He(f),y=(0,g.useMemo)(()=>r.permittedMutations(u).some(d=>{let A=d.subject?.kinds;return A!==void 0&&(A==="*"||A.includes(e))}),[r,u,e]),S=(0,g.useRef)(null),N=d=>{x.choose(d),requestAnimationFrame(()=>{let A=x.list.current;((d[0]===void 0?null:A?.querySelector(`[data-graview-choose-box="${CSS.escape(d[0])}"]`))??A)?.focus({preventScroll:!0})})},R=x.chosen.length,D=p.lookup(e,{cardinality:"one",fidelity:"glyph"}),E=D!==void 0&&!ye(D)?D:void 0,L=d=>m.includes(d),h=re(),C=(0,g.useMemo)(()=>Je(v,e,n,b),[v,e,n,b]),[P,q]=(0,g.useState)(Z);(0,g.useEffect)(()=>q(Z),[i.query,i.filter?.length,i.sort?.by,i.group?.by]);let j=v.tryDefinition(e),U=d=>h.filter(A=>A.nodeIds.includes(d)||A.subjectId===d).map(A=>A.message),F=i.sort?.by,G=`${a}${i.sort?`, in order of ${C.find(d=>d.key===F)?.label.toLowerCase()??F}`:""}`,z=P,O=d=>{let A=W(j,d),I=s.has(d.id)?U(d.id):[];return(0,t.jsxs)("tr",{"data-graview-pick":d.id,tabIndex:-1,"data-graview-record":d.id,"data-flagged":I.length>0||void 0,...y?{"data-graview-choose":d.id}:{},children:[y?(0,t.jsx)("td",{className:"graview-choose-at",children:(0,t.jsx)("input",{...x.boxProps(d.id,A),onPointerEnter:Q,onFocus:Q})}):null,(0,t.jsxs)("th",{scope:"row",className:"graview-kind-stop-name",children:[E?(0,t.jsx)("div",{"data-graview-pick":d.id,className:"graview-kind-stop-own-row",children:(0,t.jsx)(E,{node:d,cardinality:"one",fidelity:"glyph",mode:"scene",selected:L(d.id),...I.length>0?{flagged:[d.id]}:{}})}):(0,t.jsx)("button",{type:"button","data-testid":"kind-stop-row-go",title:`Go to ${A}`,onClick:()=>l(Nt(k,d.id)),children:A}),I.length>0?(0,t.jsxs)("span",{className:"graview-kind-stop-flag",title:I.join(" \xB7 "),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"\u26A0"}),(0,t.jsx)("span",{className:"graview-kind-stop-hidden",children:`Problem: ${I.join(". ")}`})]}):null]}),C.map(B=>{let T=Xe(v,d,B,b);return(0,t.jsx)("td",{"data-label":B.label,"data-short":T.text.length>0&&T.text.length<=14||void 0,"data-empty":T.text?void 0:"",...T.title?{title:T.title}:{},children:T.text?(0,t.jsx)("span",{children:T.text}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("b",{"aria-hidden":"true",children:"\u2014"}),(0,t.jsx)("i",{className:"graview-kind-stop-hidden",children:"none"})]})},B.key)}),(0,t.jsx)("td",{className:"graview-kind-stop-row-acts",children:(0,t.jsx)("button",{type:"button","data-testid":"kind-stop-row-acts","aria-haspopup":"menu","aria-label":`What can be done with ${A}`,onClick:B=>{let T=B.currentTarget.getBoundingClientRect();c([d.id]),w({x:Math.round(T.left),y:Math.round(T.bottom+4),on:d.id})},children:(0,t.jsx)("span",{"aria-hidden":"true",children:"\u22EF"})})})]},d.id)},V=d=>{let A=d.slice(0,Math.max(0,z));return z-=A.length,A.map(O)};return(0,t.jsxs)("div",{className:"graview-kind-stop-table-at",...y?{...x.listProps,ref:d=>{S.current=d,x.list.current=d},tabIndex:-1,role:"group","aria-label":R>0?`${a}, ${R} chosen`:a,"data-graview-choosable":""}:{},children:[y?(0,t.jsx)("style",{children:ze}):null,(0,t.jsxs)("table",{className:"graview-kind-stop-table","data-testid":"kind-stop-table",children:[(0,t.jsx)("caption",{className:"graview-kind-stop-hidden",children:G}),(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[y?(0,t.jsx)("td",{className:"graview-choose-at graview-choose-all",children:(0,t.jsx)("input",{type:"checkbox",className:"graview-choose-box","data-testid":"kind-stop-choose-all","aria-label":`Choose all ${$(n.length)} ${a.toLowerCase()}`,checked:R>0&&R===n.length,ref:d=>{d&&(d.indeterminate=R>0&&R<n.length)},onPointerEnter:Q,onFocus:Q,onChange:()=>R===n.length?x.clear():x.choose(f)})}):null,(0,t.jsx)("th",{scope:"col","aria-sort":F==="label"?i.sort?.direction==="desc"?"descending":"ascending":void 0,children:"Name"}),C.map(d=>(0,t.jsx)("th",{scope:"col","aria-sort":d.about==="field"&&d.key===F?i.sort?.direction==="desc"?"descending":"ascending":void 0,children:d.label},d.key)),(0,t.jsx)("th",{scope:"col",children:(0,t.jsx)("span",{className:"graview-kind-stop-hidden",children:"Acts"})})]})}),o?o.map(d=>z<=0?null:(0,t.jsxs)("tbody",{"data-graview-group":d.key,children:[(0,t.jsx)("tr",{className:"graview-kind-stop-group",children:(0,t.jsxs)("th",{scope:"rowgroup",colSpan:C.length+(y?3:2),children:[d.label," ",(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text",children:["\xB7 ",$(d.nodes.length)]})]})}),V(d.nodes)]},d.key||"-")):(0,t.jsx)("tbody",{children:V(n)})]}),y?(0,t.jsx)(Ve,{store:r,chosen:x.chosen,principal:u,anchor:()=>S.current?.closest('[data-testid="kind-stop"]')??null,of:f.length,onChooseAll:()=>x.choose(f),onClear:x.clear,onActed:N}):null,n.length>P?(0,t.jsxs)("p",{className:"graview-kind-stop-more",children:[(0,t.jsxs)("span",{className:"graview-kind-stop-quiet-text","data-testid":"kind-stop-shown",children:[$(P)," of ",$(n.length)," shown"]})," ",(0,t.jsxs)("button",{type:"button",className:"graview-kind-stop-link","data-testid":"kind-stop-more",onClick:()=>q(d=>d+Z),children:["Show ",$(Math.min(Z,n.length-P))," more"]})]}):null]})}var Lt=`
|
|
2
|
+
.graview-kind-stop{container-type:inline-size;box-sizing:border-box;height:100%;min-height:0;display:flex;flex-direction:column;gap:10px;padding:16px 18px 12px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-panel);color:var(--graview-ink);box-shadow:var(--graview-lift-low);overflow:auto;overscroll-behavior:contain}
|
|
3
|
+
[data-graview-map-panel] .graview-kind-stop{height:auto;padding:4px 6px 12px;border:0;box-shadow:none;background:none;overflow:visible}
|
|
4
|
+
.graview-kind-stop :focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
5
|
+
.graview-kind-stop h2[data-graview-quiet-focus]:focus{outline:none}
|
|
6
|
+
.graview-kind-stop button{font:inherit;cursor:pointer}
|
|
7
|
+
.graview-kind-stop :is(.graview-kind-stop-more-tools,.graview-kind-stop-link,.graview-kind-stop-rule,.graview-kind-stop-name button,.graview-kind-stop-row-acts button,.graview-kind-stop-fact,.graview-kind-stop-switch button){box-shadow:none}
|
|
8
|
+
.graview-kind-stop-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 16px}
|
|
9
|
+
.graview-kind-stop-title{flex:1 1 16rem;min-width:0}
|
|
10
|
+
.graview-kind-stop-title h2{margin:0;outline-offset:2px;font-size:var(--graview-text-heading);line-height:1.3;overflow-wrap:anywhere}
|
|
11
|
+
.graview-kind-stop-title p{margin:2px 0 0;font-size:.875rem;color:var(--graview-ink-muted);overflow-wrap:anywhere}
|
|
12
|
+
.graview-kind-stop-acts{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
|
|
13
|
+
.graview-kind-stop-primary,.graview-kind-stop-quiet{min-height:32px;padding:0 14px;border-radius:8px;font-size:.875rem}
|
|
14
|
+
.graview-kind-stop-primary{border:1px solid var(--graview-accent);background:var(--graview-accent);color:var(--graview-accent-ink);font-weight:600}
|
|
15
|
+
.graview-kind-stop-quiet{border:1px solid var(--graview-edge);background:transparent;color:var(--graview-ink)}
|
|
16
|
+
.graview-kind-stop-ask{flex:1 1 100%;min-width:0;padding:10px 12px;border:1px solid var(--graview-edge);border-radius:10px}
|
|
17
|
+
.graview-kind-stop-failed{flex:1 1 100%;margin:0;font-size:var(--graview-text-small);color:var(--graview-warn)}
|
|
18
|
+
.graview-kind-stop-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
|
|
19
|
+
.graview-kind-stop-going-on{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:.875rem}
|
|
20
|
+
.graview-kind-stop-going-on>li{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0}
|
|
21
|
+
.graview-kind-stop-fact{min-height:28px;padding:0 10px;border:1px solid var(--graview-edge);border-radius:999px;background:transparent;color:var(--graview-ink)}
|
|
22
|
+
.graview-kind-stop-fact[data-tone=warn],.graview-kind-stop-warn{color:var(--graview-warn);font-weight:600}
|
|
23
|
+
.graview-kind-stop-quiet-text{color:var(--graview-ink-muted)}
|
|
24
|
+
.graview-kind-stop-rules{list-style:none;margin:0;padding:0;flex:1 1 100%;display:grid;gap:2px}
|
|
25
|
+
.graview-kind-stop-rule{display:inline-flex;align-items:center;gap:6px;min-height:28px;max-width:100%;padding:0 6px;border:1px solid transparent;border-radius:7px;background:none;color:var(--graview-ink);text-align:left;overflow-wrap:anywhere}
|
|
26
|
+
.graview-kind-stop-rule:hover{border-color:var(--graview-edge)}
|
|
27
|
+
.graview-kind-stop-chevron{display:inline-block;width:.8em}
|
|
28
|
+
.graview-kind-stop-chevron[data-open]{transform:rotate(90deg)}
|
|
29
|
+
.graview-kind-stop-problem-rows{list-style:none;margin:2px 0 6px 18px;padding:0;max-width:44rem}
|
|
30
|
+
.graview-kind-stop-link{min-height:28px;padding:0 4px;border:0;background:none;color:var(--graview-accent);text-decoration:underline;text-underline-offset:2px}
|
|
31
|
+
.graview-kind-stop-link:disabled{opacity:.6;cursor:default}
|
|
32
|
+
.graview-kind-stop-shape{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:var(--graview-text-small)}
|
|
33
|
+
.graview-kind-stop-switch{display:inline-flex;border:1px solid var(--graview-edge);border-radius:8px;overflow:hidden}
|
|
34
|
+
.graview-kind-stop-switch button{min-height:28px;padding:0 12px;border:0;background:transparent;color:var(--graview-ink-muted)}
|
|
35
|
+
.graview-kind-stop-switch button+button{border-left:1px solid var(--graview-edge)}
|
|
36
|
+
.graview-kind-stop-switch button[aria-pressed=true]{background:color-mix(in srgb,var(--graview-accent) 16%,transparent);color:var(--graview-ink);font-weight:600}
|
|
37
|
+
.graview-kind-stop-body{flex:1 0 auto;min-width:0}
|
|
38
|
+
.graview-kind-stop-empty{margin:24px 0;color:var(--graview-ink-muted)}
|
|
39
|
+
.graview-kind-stop-lens{min-width:0}
|
|
40
|
+
|
|
41
|
+
.graview-kind-stop-table-at{min-width:0}
|
|
42
|
+
.graview-kind-stop-table{width:100%;border-collapse:collapse;font-size:.875rem}
|
|
43
|
+
.graview-kind-stop-table th,.graview-kind-stop-table td{padding:7px 8px;text-align:left;vertical-align:top;border-top:1px solid var(--graview-edge);overflow-wrap:break-word}
|
|
44
|
+
.graview-kind-stop-table td{color:var(--graview-ink)}
|
|
45
|
+
.graview-kind-stop-table td>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
|
|
46
|
+
.graview-kind-stop-table td[data-short]{white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
47
|
+
.graview-kind-stop-table thead th{border-top:0;font-size:var(--graview-text-small);font-weight:600;letter-spacing:.04em;color:var(--graview-ink-muted)}
|
|
48
|
+
.graview-kind-stop-name{font-weight:500;min-width:8rem;max-width:22rem}
|
|
49
|
+
.graview-kind-stop-name button{display:inline-block;min-width:24px;min-height:24px;padding:0;border:0;background:none;color:var(--graview-ink);font-weight:500;text-align:left;text-decoration:underline;text-decoration-color:var(--graview-edge);text-underline-offset:3px}
|
|
50
|
+
.graview-kind-stop-name button:hover{text-decoration-color:currentColor}
|
|
51
|
+
.graview-kind-stop-own-row{display:inline-block;max-width:100%;cursor:pointer}
|
|
52
|
+
.graview-kind-stop-flag{margin-left:6px;color:var(--graview-warn)}
|
|
53
|
+
.graview-kind-stop-group th{padding-top:12px;font-weight:600;color:var(--graview-ink)}
|
|
54
|
+
.graview-kind-stop-row-acts{width:1%;white-space:nowrap;text-align:right}
|
|
55
|
+
.graview-kind-stop-row-acts button{min-width:32px;min-height:28px;border:1px solid var(--graview-edge-bright,var(--graview-edge));border-radius:7px;background:none;color:var(--graview-ink);font-size:1.125rem;font-weight:700;line-height:1}
|
|
56
|
+
.graview-kind-stop-row-acts button:hover{background:color-mix(in srgb,var(--graview-ink) 8%,transparent)}
|
|
57
|
+
.graview-kind-stop-table td[data-empty] b{font-weight:400;color:var(--graview-ink-faint)}
|
|
58
|
+
.graview-kind-stop-table tr[data-graview-pick]{cursor:default}
|
|
59
|
+
.graview-kind-stop-more{margin:10px 0 0;font-size:.875rem}
|
|
60
|
+
.graview-kind-stop-table-at[data-graview-choosable]{outline:none}
|
|
61
|
+
[data-graview-choosable]:hover .graview-choose-all .graview-choose-box{opacity:1}
|
|
62
|
+
.graview-kind-stop-table .graview-choose-at{width:1%;padding-right:0;vertical-align:middle}
|
|
63
|
+
.graview-kind-stop-more-tools{position:relative;min-width:32px;min-height:32px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--graview-ink);font-size:1.125rem;line-height:1}
|
|
64
|
+
.graview-kind-stop-more-tools:hover,.graview-kind-stop-more-tools[aria-expanded=true]{background:color-mix(in srgb,var(--graview-ink) 8%,transparent)}
|
|
65
|
+
.graview-kind-stop-more-tools[data-narrowed]::after{content:"";position:absolute;top:8px;right:6px;width:7px;height:7px;border-radius:50%;background:var(--graview-accent)}
|
|
66
|
+
.graview-kind-stop-tools{display:grid;gap:8px;justify-items:start;padding:10px;border:1px solid var(--graview-edge);border-radius:10px}
|
|
67
|
+
.graview-kind-stop-tools>*{max-width:100%}
|
|
68
|
+
.graview-kind-stop-problems-line{flex-wrap:nowrap!important}
|
|
69
|
+
.graview-kind-stop-problems-line .graview-kind-stop-warn{flex:0 0 auto;white-space:nowrap}
|
|
70
|
+
.graview-kind-stop-rules-said{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
71
|
+
.graview-kind-stop-problems-line .graview-kind-stop-link{flex:0 0 auto}
|
|
72
|
+
.graview-kind-stop-narrowed{margin:0;font-size:.875rem}
|
|
73
|
+
.graview-kind-stop[data-graview-narrow]{overflow:hidden}
|
|
74
|
+
|
|
75
|
+
.graview-kind-stop[data-graview-narrow]{height:auto;max-height:100%;flex:0 1 auto;margin-bottom:auto}
|
|
76
|
+
.graview-kind-stop-scroll{flex:1 1 auto;min-height:0;padding:4px;margin:-4px;display:flex;flex-direction:column;gap:10px;overflow:auto;overscroll-behavior:contain}
|
|
77
|
+
[data-graview-map-panel] .graview-kind-stop-scroll{overflow:visible}
|
|
78
|
+
[data-graview-map-panel] .graview-kind-stop[data-graview-narrow]{overflow:visible}
|
|
79
|
+
.graview-kind-stop-below{align-self:stretch;flex:0 0 auto;margin:0 -16px -12px;min-height:44px;padding:0 16px;border:0;border-top:1px solid var(--graview-edge);background:var(--graview-panel);color:var(--graview-accent);font-size:.875rem;text-align:left}
|
|
80
|
+
@container (max-width: 559px){
|
|
81
|
+
.graview-kind-stop{padding:14px 16px 12px}
|
|
82
|
+
.graview-kind-stop-head{position:relative;padding-right:52px}
|
|
83
|
+
.graview-kind-stop-acts{flex:1 1 100%}
|
|
84
|
+
.graview-kind-stop-primary{flex:0 0 auto}
|
|
85
|
+
.graview-kind-stop-more-tools{position:absolute;top:-6px;right:0}
|
|
86
|
+
.graview-kind-stop-name button{text-decoration:none}
|
|
87
|
+
.graview-kind-stop-row-acts button{border-color:transparent;font-weight:400;color:var(--graview-ink-muted)}
|
|
88
|
+
.graview-kind-stop-row-acts button:hover{color:var(--graview-ink)}
|
|
89
|
+
.graview-kind-stop-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
|
|
90
|
+
.graview-kind-stop-table,.graview-kind-stop-table tbody,.graview-kind-stop-table tr{display:block}
|
|
91
|
+
.graview-kind-stop-table tr{position:relative;padding:8px 40px 8px 0;border-top:1px solid var(--graview-edge)}
|
|
92
|
+
.graview-kind-stop-table th,.graview-kind-stop-table td{display:block;padding:1px 0;border:0}
|
|
93
|
+
.graview-kind-stop-table td>span{display:inline}
|
|
94
|
+
.graview-kind-stop-table td[data-short]{white-space:normal}
|
|
95
|
+
.graview-kind-stop-table td[data-label]::before{content:attr(data-label) " \xB7 ";color:var(--graview-ink-muted)}
|
|
96
|
+
.graview-kind-stop-row-acts{position:absolute;top:6px;right:0;width:auto}
|
|
97
|
+
.graview-kind-stop-table [data-graview-choose]{padding-left:34px}
|
|
98
|
+
.graview-kind-stop-table td.graview-choose-at{position:absolute;left:0;top:8px;width:auto;padding:0}
|
|
99
|
+
.graview-kind-stop-table thead .graview-choose-at{position:static}
|
|
100
|
+
}
|
|
101
|
+
@media (pointer: coarse){
|
|
102
|
+
.graview-kind-stop-table-at:not([data-graview-choosing]) .graview-choose-at{display:none}
|
|
103
|
+
.graview-kind-stop-table-at:not([data-graview-choosing]) [data-graview-choose]{padding-left:0}
|
|
104
|
+
}
|
|
105
|
+
@media (pointer: coarse){
|
|
106
|
+
.graview-kind-stop-primary,.graview-kind-stop-quiet,.graview-kind-stop-fact,.graview-kind-stop-rule,.graview-kind-stop-link,.graview-kind-stop-switch button,.graview-kind-stop-row-acts button{min-height:44px}
|
|
107
|
+
.graview-kind-stop-row-acts button,.graview-kind-stop-more-tools{min-width:44px;min-height:44px}
|
|
108
|
+
.graview-kind-stop-name button{min-height:44px}
|
|
109
|
+
}
|
|
110
|
+
@media (prefers-reduced-motion: reduce){.graview-kind-stop *{transition:none!important;animation:none!important}}
|
|
111
|
+
`;export{rn as KindStop};
|
|
@@ -0,0 +1,6 @@
|
|
|
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)}};var t,i=()=>t??=(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.OWO3OV62.js")).catch(e=>{throw t=void 0,e});async function s(e){let{VIEW_RUNTIME:r}=await i();return`${r}
|
|
2
|
+
;(function () {
|
|
3
|
+
"use strict";
|
|
4
|
+
${e}
|
|
5
|
+
})();
|
|
6
|
+
`}var o=new WeakMap;function u(e){let r=o.get(e);return r||(r=Promise.resolve().then(e).catch(n=>{throw o.delete(e),n}),o.set(e,r)),r}export{s as a,u as b};
|
package/dist/preview/index.html
CHANGED
|
@@ -5,70 +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.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.6LXIEM6B.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.LLIURXFP.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.SSF47GUY.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.PAGEGBUD.js">
|
|
12
|
+
<link rel="modulepreload" href="/chunk.72XP2ARZ.js">
|
|
12
13
|
<link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
|
|
13
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
17
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
+
<link rel="modulepreload" href="/chunk.4AC2QM7T.js">
|
|
15
|
+
<link rel="modulepreload" href="/chunk.OEIWIZCP.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.U3HERHAI.js">
|
|
17
|
+
<link rel="modulepreload" href="/chunk.FBILPNGH.js">
|
|
18
|
+
<link rel="modulepreload" href="/chunk.MODLZJD4.js">
|
|
18
19
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
19
|
-
<link rel="modulepreload" href="/chunk.
|
|
20
|
+
<link rel="modulepreload" href="/chunk.6HY6ZGEE.js">
|
|
20
21
|
<link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
|
|
21
22
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
22
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.6NRWLCIZ.js">
|
|
23
|
+
<link rel="modulepreload" href="/chunk.VT2YGDK2.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.OMT4QUZY.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.ANS2IEEV.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.XMQG2PSM.js">
|
|
27
|
+
<link rel="modulepreload" href="/chunk.45JP6VGJ.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.
|
|
41
|
-
<link rel="modulepreload" href="/chunk.
|
|
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.
|
|
29
|
+
<link rel="modulepreload" href="/chunk.OO2OP76C.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.BFAFCVL4.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.LGRVEHXT.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.CTASTRQN.js">
|
|
33
|
+
<link rel="modulepreload" href="/chunk.QQAZQDRW.js">
|
|
34
|
+
<link rel="modulepreload" href="/chunk.72ZCLEQC.js">
|
|
35
|
+
<link rel="modulepreload" href="/chunk.ONYBW45K.js">
|
|
36
|
+
<link rel="modulepreload" href="/chunk.2VR7YEJ6.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.FXT5CN32.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.WVLEGCRI.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.LETAQTLJ.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.BUVTUAB5.js">
|
|
41
|
+
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
42
|
+
<link rel="modulepreload" href="/chunk.U6TEW6YD.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.FK722SHI.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.7VP6Y6D2.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.WSO7JOW5.js">
|
|
46
|
+
<link rel="modulepreload" href="/chunk.XOE4KNP2.js">
|
|
47
|
+
<link rel="modulepreload" href="/chunk.W53YNBSM.js">
|
|
48
|
+
<link rel="modulepreload" href="/chunk.2KFZHUAC.js">
|
|
49
|
+
<link rel="modulepreload" href="/chunk.V5I4GZEY.js">
|
|
50
|
+
<link rel="modulepreload" href="/chunk.V7W5AQKL.js">
|
|
50
51
|
<link rel="modulepreload" href="/chunk.BJUUSIQY.js">
|
|
51
|
-
<link rel="modulepreload" href="/chunk.
|
|
52
|
-
<link rel="modulepreload" href="/chunk.
|
|
52
|
+
<link rel="modulepreload" href="/chunk.EMFOMSMI.js">
|
|
53
|
+
<link rel="modulepreload" href="/chunk.QOS5T46W.js">
|
|
53
54
|
<link rel="modulepreload" href="/chunk.XOZU4OFA.js">
|
|
54
|
-
<link rel="modulepreload" href="/chunk.
|
|
55
|
-
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
55
|
+
<link rel="modulepreload" href="/chunk.GME63ZHI.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.
|
|
62
|
-
<link rel="modulepreload" href="/chunk.
|
|
63
|
-
<link rel="modulepreload" href="/chunk.
|
|
57
|
+
<link rel="modulepreload" href="/chunk.I2737CPF.js">
|
|
58
|
+
<link rel="modulepreload" href="/chunk.NJRLJEJY.js">
|
|
59
|
+
<link rel="modulepreload" href="/chunk.CVPMSPCH.js">
|
|
60
|
+
<link rel="modulepreload" href="/chunk.OTV5XTBB.js">
|
|
61
|
+
<link rel="modulepreload" href="/chunk.KBPJ7X7W.js">
|
|
62
|
+
<link rel="modulepreload" href="/chunk.MIE4TJRW.js">
|
|
63
|
+
<link rel="modulepreload" href="/chunk.5LJVOLKR.js">
|
|
64
64
|
<link rel="modulepreload" href="/chunk.OJGHDWI6.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
|
-
<
|
|
65
|
+
<link rel="modulepreload" href="/chunk.OWFS2YDQ.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.WSDJPXJD.js">
|
|
67
|
+
<link rel="modulepreload" href="/chunk.F4VB6Q2W.js">
|
|
68
|
+
<link rel="modulepreload" href="/chunk.FFOD5B4B.js">
|
|
69
|
+
<link rel="modulepreload" href="/chunk.Z7Y3R3YR.js">
|
|
70
|
+
<link rel="modulepreload" href="/chunk.YXEO3Y65.js">
|
|
71
|
+
<link rel="modulepreload" href="/chunk.E4VRRWFP.js">
|
|
72
|
+
<link rel="modulepreload" href="/chunk.DZFM6GSY.js">
|
|
73
|
+
<script>(()=>{const later=["/chunk.GAFMWOME.js","/chunk.FDZE5LTJ.js","/chunk.DPJNGFEZ.js","/chunk.YNEHJWJV.js","/chunk.HJCQ6I3S.js","/chunk.OJY7VJ7D.js","/chunk.GEFXU4VO.js","/chunk.FIFUMX5X.js","/chunk.BIDL7GQD.js","/chunk.4FCFNAA4.js","/chunk.JXNVNFV4.js","/chunk.K6DFXDPZ.js","/chunk.E3UL4MCD.js","/chunk.CBXS23YH.js","/chunk.QU52E5RG.js","/chunk.7VADSNPZ.js","/chunk.U5P23GO7.js","/chunk.6EHHMWPP.js","/chunk.TXHYGFIZ.js","/chunk.WAB3L3ZI.js","/chunk.CU2WCYMK.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>
|
|
72
74
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
73
75
|
</head>
|
|
74
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 jt,b as lr,c as ur,d as fr,e as pr,f as qt,g as mr,h as zt}from"./chunk.K5YFUMRS.js";import{a as uo}from"./chunk.XJWKIXPV.js";import{a as Gt,b as yr,c as gr,d as wr,e as Ut,f as vr,g as br,h as Sr,i as Ar,j as Pr,k as kr,l as Er,m as Rr,n as Tr,o as Ye}from"./chunk.TOLW64EO.js";import{b as hr}from"./chunk.4VRX7FCO.js";import{a as Ct}from"./chunk.Q5WEOX3Q.js";import{b as Lt,i as Bn}from"./chunk.DUP2CGVH.js";import{k as lt}from"./chunk.YMXWS4XN.js";import{C as ir,H as sr,L as cr,M as dr,i as er,l as tr,m as nr,n as It,o as rr,q as or,u as ar,z as _t}from"./chunk.3FKKH2XU.js";import{c as lo}from"./chunk.DLWFULWE.js";import{$ as Nn,Aa as zn,Ba as Gn,Ca as Un,Da as Kn,Ea as Jn,G as Wt,Ga as Yn,Ha as Qn,Ja as Zn,Ka as Nt,Na as Xn,Qa as pt,V as Wn,a as Dn,b as ut,c as ft,ia as In,j as $n,ja as _n,la as jn,m as $t,za as qn}from"./chunk.VLX7YWVH.js";import{a as xe}from"./chunk.SDO3U72B.js";import{Dd as xn,Eb as kn,Ed as Fn,Jd as On,Ld as Cn,Md as Ln,Nb as En,Od as dt,Pb as Rn,ke as Te,lb as qe,le as Mn,me as Hn,re as Ht,se as Vt,te as Bt,wb as ct,wc as Mt,we as Vn,xc as Tn,xe as Dt}from"./chunk.IQGSEAQ2.js";import"./chunk.FQLNBIQ5.js";import{b as Be}from"./chunk.AJZBJBMO.js";async function mt(e,n={}){let o=e.compiled===void 0||!po(e.compiled,e.document)?void 0:Bn(e.compiled,n);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await fo();return i(e.document,n)}var xr,fo=()=>xr??=(__graviewPreload(import.meta.url,["./chunk.2E62YCMZ.js","./chunk.DUP2CGVH.js","./chunk.7CLKGKSF.js","./chunk.R5MLRKAO.js","./chunk.YMXWS4XN.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.YLOGIJOH.js")).catch(e=>{throw xr=void 0,e});function po(e,n){let o=typeof e=="object"&&e!==null?e.document:void 0,i=n;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ct(Lt(o).document)===Ct(Lt(i).document)}var d=Be(Wt(),1);var yt=Be(Wt(),1),Kt="data-graview-drawn",mo=200,Fr=50,ho=1e4,ht=()=>typeof performance<"u"?performance.now():Date.now();function yo(e){let n=[...e.querySelectorAll("img")];for(let o of e.querySelectorAll("[data-worker-view]"))o.shadowRoot&&n.push(...o.shadowRoot.querySelectorAll("img"));return n}function go(e,n){if(e.ownerDocument.fonts?.status==="loading"||zn()>0||Jn(n)>0||e.querySelector('[aria-busy="true"]')||yo(e).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of e.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Or(e){let n=e.querySelector("[data-embed-content]"),o=[...e.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${e.scrollWidth}x${e.scrollHeight}|${n?`${n.scrollWidth}x${n.scrollHeight}`:""}|${o.join(",")}`}function wo(e,n,o,i){e.removeAttribute(Kt);let l=e.ownerDocument.defaultView;if(!l)return()=>{};let u=ht(),c=u,v=Or(e),m=!1,E,F=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(O=>!(O.target===e&&O.attributeName===Kt))&&(c=ht())});F?.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let W=()=>{m=!0,F?.disconnect(),E!==void 0&&clearTimeout(E)},b=x=>{let O=!1,oe=()=>{O||(O=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(oe,0)),setTimeout(oe,100)},T=()=>{if(m)return;let x=Or(e);x!==v&&(v=x,c=ht());let O=ht();if(go(e,i)&&O-c>=mo||O-u>=ho){b(()=>{m||(W(),e.setAttribute(Kt,n),Qn(),o())});return}E=setTimeout(T,Fr)};return E=setTimeout(T,Fr),W}function Cr(e,n,o,i,l){Yn();let u=(0,yt.useRef)({place:o,onDrawn:i});u.current={place:o,onDrawn:i},(0,yt.useLayoutEffect)(()=>{l&&Kn(l);let c=E=>wo(E,u.current.place.path,()=>u.current.onDrawn?.(u.current.place),l);if(e.current)return c(e.current);let v,m=!1;return queueMicrotask(()=>{!m&&e.current&&(v=c(e.current))}),()=>{m=!0,v?.()}},[n,e,l])}var we=Be(Wt(),1),Qe,vo=xe(()=>(__graviewPreload(import.meta.url,["./chunk.NJSK3UO2.js","./chunk.G5BVZLCM.js","./chunk.NGRL3QOI.js","./chunk.DN7UCBOA.js","./chunk.DMENNIHT.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.L4V5VLSM.js"))),Lr=()=>vo().then(e=>void(Qe=e),()=>new Promise(e=>setTimeout(e,2e3)).then(Lr)),Jt=qn(Lr),Mr=e=>!!e&&Qe===void 0;function Yt({onReady:e,fetch:n}){return(0,we.useLayoutEffect)(()=>void n().then(e),[e,n]),null}var bo=0;function Hr(e){let[n,o]=(0,we.useState)(()=>Qe);(0,we.useEffect)(()=>{if(!e||n)return;let u=!1;return Jt().then(()=>{u||o(Qe)}),()=>{u=!0}},[e,n]);let i=(0,we.useMemo)(()=>bo+=1,[e]);return{over:(0,we.useMemo)(()=>{let u=n??Qe;if(!e||!u)return;let{source:c,worker:v,...m}=e,E={...m,worker:v??{source:c},draft:!0};return{name:e.manifest.name,home:e.manifest.attach==="home",register:F=>u.registerWorkerView(F,E)}},[e,n]),n:i}}var Dr=Be(uo(),1),$=Be(lo(),1);var w=Be(Wn(),1);function gt(e,n={}){let o=Nt(e);return{Face:o.part((l,u)=>(0,d.createElement)(l,u),n),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Xt=e=>Promise.all([e,cr()]).then(([n])=>n),$r=xe(()=>(__graviewPreload(import.meta.url,["./chunk.ZQGLPP7A.js","./chunk.WHX47OJM.js","./chunk.2D7K2IJQ.js","./chunk.2V7QTIAV.js","./chunk.77JI5T4F.js","./chunk.UDU545CL.js","./chunk.7VAHHEDX.js","./chunk.HJCQ6I3S.js","./chunk.DQAMVVE6.js","./chunk.OXFDB5BB.js","./chunk.ATHLE33D.js","./chunk.T4TRJDBF.js","./chunk.APUQIELA.js","./chunk.S6QZBWCJ.js","./chunk.LTOQ22ZJ.js","./chunk.2TCOLAL2.js","./chunk.FUPYIOXZ.js","./chunk.3OEODIHB.js","./chunk.BIDL7GQD.js","./chunk.TA2JTUNX.js","./chunk.HZPRMHSL.js","./chunk.TQ2G4AM4.js","./chunk.X36BYTEG.js","./chunk.U5P23GO7.js","./chunk.TOLW64EO.js","./chunk.4VRX7FCO.js","./chunk.Q5WEOX3Q.js","./chunk.2E62YCMZ.js","./chunk.DUP2CGVH.js","./chunk.YEXFVDRA.js","./chunk.7CLKGKSF.js","./chunk.TMHVYI5R.js","./chunk.R5MLRKAO.js","./chunk.YMXWS4XN.js","./chunk.GZHZLJBF.js","./chunk.3SAESG6X.js","./chunk.OJGHDWI6.js","./chunk.F6BNFLQM.js","./chunk.75JQCTR6.js","./chunk.5IEZF433.js","./chunk.5AD2QHWH.js","./chunk.3FKKH2XU.js","./chunk.DLWFULWE.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.2JDAUKSN.js"))),So=xe(()=>(__graviewPreload(import.meta.url,["./chunk.4Q5PCMGZ.js","./chunk.2VIS2NAT.js","./chunk.KHXRJLLU.js","./chunk.GHHKRFPD.js","./chunk.6NRWLCIZ.js","./chunk.Q355UPFG.js","./chunk.ZQGLPP7A.js","./chunk.7SRSE5IS.js","./chunk.VZAF3452.js","./chunk.WHX47OJM.js","./chunk.QRT6BZR6.js","./chunk.2V7QTIAV.js","./chunk.Z26T5E76.js","./chunk.77JI5T4F.js","./chunk.SADHOSRC.js","./chunk.4DZOAB4D.js","./chunk.UDU545CL.js","./chunk.7VAHHEDX.js","./chunk.P4TAX3HE.js","./chunk.T4TRJDBF.js","./chunk.2TCOLAL2.js","./chunk.2VYGDY5Z.js","./chunk.FUPYIOXZ.js","./chunk.APRWUIE3.js","./chunk.3OEODIHB.js","./chunk.WFCE7NLK.js","./chunk.HZPRMHSL.js","./chunk.BJUUSIQY.js","./chunk.TQ2G4AM4.js","./chunk.X36BYTEG.js","./chunk.XOZU4OFA.js","./chunk.G7YLK4PX.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZA5TDCBC.js","./chunk.2JEN2RCB.js","./chunk.7CLKGKSF.js","./chunk.TMHVYI5R.js","./chunk.R5MLRKAO.js","./chunk.YMXWS4XN.js","./chunk.GZHZLJBF.js","./chunk.3SAESG6X.js","./chunk.OJGHDWI6.js","./chunk.F6BNFLQM.js","./chunk.75JQCTR6.js","./chunk.5IEZF433.js","./chunk.5AD2QHWH.js","./chunk.3FKKH2XU.js","./chunk.DLWFULWE.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.3J7XLJP2.js"))),Ao=xe(()=>(__graviewPreload(import.meta.url,["./chunk.4Q5PCMGZ.js","./chunk.2VIS2NAT.js","./chunk.KHXRJLLU.js","./chunk.GHHKRFPD.js","./chunk.6NRWLCIZ.js","./chunk.Q355UPFG.js","./chunk.ZQGLPP7A.js","./chunk.7SRSE5IS.js","./chunk.VZAF3452.js","./chunk.WHX47OJM.js","./chunk.QRT6BZR6.js","./chunk.2V7QTIAV.js","./chunk.Z26T5E76.js","./chunk.77JI5T4F.js","./chunk.SADHOSRC.js","./chunk.4DZOAB4D.js","./chunk.UDU545CL.js","./chunk.7VAHHEDX.js","./chunk.P4TAX3HE.js","./chunk.T4TRJDBF.js","./chunk.2TCOLAL2.js","./chunk.2VYGDY5Z.js","./chunk.FUPYIOXZ.js","./chunk.APRWUIE3.js","./chunk.3OEODIHB.js","./chunk.WFCE7NLK.js","./chunk.HZPRMHSL.js","./chunk.BJUUSIQY.js","./chunk.TQ2G4AM4.js","./chunk.X36BYTEG.js","./chunk.XOZU4OFA.js","./chunk.G7YLK4PX.js","./chunk.MB7LKKUD.js","./chunk.WVUJXDXZ.js","./chunk.ZA5TDCBC.js","./chunk.2JEN2RCB.js","./chunk.7CLKGKSF.js","./chunk.TMHVYI5R.js","./chunk.R5MLRKAO.js","./chunk.YMXWS4XN.js","./chunk.GZHZLJBF.js","./chunk.3SAESG6X.js","./chunk.OJGHDWI6.js","./chunk.F6BNFLQM.js","./chunk.75JQCTR6.js","./chunk.5IEZF433.js","./chunk.5AD2QHWH.js","./chunk.3FKKH2XU.js","./chunk.DLWFULWE.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.4HTB6TX2.js"))),Wr=gt(()=>Xt($r().then(e=>e.SceneFace)),{what:"This view"}),Nr=gt(()=>$r().then(e=>e.SceneKeeping),{quiet:!0}),Ir=gt(()=>Xt(So().then(e=>e.PagesContent)),{what:"This page"}),_r=gt(()=>Xt(Ao().then(e=>e.PictureFace)),{what:"This picture"}),Po=Wr.Face,ko=Nr.Face,Eo=Ir.Face,Ro=_r.Face;function De(...e){let n=e.length>0?e:["scene","pages","picture"],o=new Set(n.flatMap(jr));return Promise.all([...[...o].map(i=>i.fetch()),or()]).then(()=>{},()=>{})}var jr=e=>e==="pages"?[Ir]:e==="picture"?[_r]:[Wr,Nr],qr=e=>jr(e).every(n=>n.here()),To=150,Qt=0;function Vr(e,n){if(qr(e))return n();let o=++Qt,i=()=>{o===Qt&&(Qt+=1,n())};De(e).then(i),setTimeout(i,To)}var xo=768;function Fo(e,n){let o=n!==null&&n>=xo;(0,d.useEffect)(()=>{if(!o||e==="picture")return;let i=e==="pages"?"scene":"pages";if(qr(i))return;let l=globalThis,u=()=>void De(i),c=()=>{},v=Zn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let m=l.requestIdleCallback(u,{timeout:4e3});c=()=>l.cancelIdleCallback?.(m)}else{let m=setTimeout(u,1500);c=()=>clearTimeout(m)}});return()=>(v(),c())},[e,o])}function Oo({asked:e,shown:n,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(e,n),[e,n,o]),null}function Co({auto:e,scene:n}){return(0,w.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:e?n?`0 0 ${Ut}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Lo=Nt(xe(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((e,n)=>(0,w.jsx)(e.StudioPlace,{...n}),{quiet:!0});function zr(e,n,o,i,l){return qt(e,pr(n?ft(n):l??Dn,i),o)}function en(e){return e&&ft(e).overview?"graview":"scene"}function Br(e,n){if(n.homeView?.()===void 0)return!1;let o=e.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function Gr(e){let[,n]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>n(!0),[]),i=(0,d.useRef)(!1);return e.at&&!wt?(0,w.jsx)(Yt,{onReady:o,fetch:tn}):!i.current&&Mr(e.draftView)?(0,w.jsx)(Yt,{onReady:o,fetch:Jt}):(i.current=!0,(0,w.jsx)(Mo,{...e}))}function Mo(e){let{app:n,stop:o,bar:i=!0,standing:l="Everything is in order",principal:u,heading:c=2}=e,{rootRef:v,scope:m,css:E,scheme:F,store:W,presence:b,brand:T,auto:x,height:O}=vr(e),oe=Hr(e.draftView),R=gr(e,dr,oe.over),[le]=(0,d.useState)(Un),p=e.basePath===void 0?{}:{basePath:e.basePath},[B]=(0,d.useState)(It),D=e.notices??B,z=g=>Ht(g,p),ie={...e.routing?{routing:e.routing}:{},...p},[se]=(0,d.useState)(()=>{let g=e.at?.face;if(g)return g;let Q=o===void 0&&Br(n,R)?"pages":en(o),K=jt({...ie,face:Q});return e.face===void 0&&e.onOpening?.(K),K}),[be,H]=(0,d.useState)(()=>e.face!==void 0&&e.face!=="pages"&&!e.at&&o===void 0&&lr(ie)&&Br(n,R)),Se=(0,d.useRef)(e.onFace);Se.current=e.onFace,(0,d.useLayoutEffect)(()=>{be&&(Se.current?.("pages"),H(!1))},[be]);let A=be?"pages":e.face??se,k=n.schema.kinds,V=e.routing==="address",Ae=(0,d.useMemo)(()=>e.at?wt.settleAt(e,W.seenBy(u??{kind:"human"}),R.places()):void 0,[]),C=(0,d.useMemo)(()=>_n(R,n.schema),[R,n.schema]),me=(0,d.useMemo)(()=>{let g=Ae?.stop??(V?ur(e.basePath):void 0)??o;return A==="scene"&&g===void 0&&C===void 0&&(e.path===void 0||Zt(e.path))?zt(void 0):zr(A,g,k,R.places(),C)},[]),[N]=(0,d.useState)(A);(0,d.useEffect)(()=>{N!=="pages"&&In(R)},[N,R]);let L=(0,d.useRef)(void 0),q=g=>g===void 0||Zt(g)?"/":g;L.current??={path:q(Ae?.path??(V?A==="pages"?(Vt(window.location.pathname,e.basePath)??"/")+window.location.search:"/":e.path)),asked:e.path},e.path!==L.current.asked&&(L.current={path:q(e.path),asked:e.path});let Z=(0,d.useRef)(e.onNavigate);Z.current=e.onNavigate;let Oe=(0,d.useCallback)((g,Q)=>{L.current.path=g,Z.current?.(g,Q)},[]),{at:he,setAt:j,steering:G,steer:ae}=Er(L.current.path),M=(0,d.useContext)(Ur);M&&(M.pages=()=>L.current.path);let[$e]=(0,d.useState)(()=>({})),J=M??$e,ce=(0,d.useMemo)(()=>tr(D),[D]),I=(0,d.useRef)(void 0),Pe=(0,d.useCallback)(g=>void(L.current.path=g),[]),X=er(v),[Ce,ee]=(0,d.useState)(!1),Xe=e.pagesBelow!==void 0&&X!==null&&X<e.pagesBelow&&(A==="scene"||A==="graview")&&!Ce,P=Xe?"pages":A,Le=(0,d.useRef)(!1);Le.current=Ce&&e.pagesBelow!==void 0&&X!==null&&X<e.pagesBelow&&(A==="scene"||A==="graview"),M&&(M.shown=P);let Me=(0,d.useRef)(A==="graview"?"graview":"scene");(P==="scene"||P==="graview")&&(Me.current=P),(0,d.useState)(()=>{if(!V||typeof window>"u"||P==="pages"||P==="picture")return;let{pathname:g,search:Q,hash:K}=window.location;Vt(g,e.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Q}${K}`)}),wr(v,P,e.onIntrinsicHeight),Fo(P,X);let te=Rr(e.onError,P),He=Tr(e.onReady,P),ke=(0,d.useRef)(e.onFaceDrawn);ke.current=e.onFaceDrawn;let et=(0,d.useCallback)((g,Q)=>{He(Q),ke.current?.(g)},[He]),[We,Pt]=(0,d.useState)(null),tt=R.places(),Ne=(0,d.useRef)({shown:P,onFace:e.onFace});Ne.current={shown:P,onFace:e.onFace};let _=(0,d.useCallback)((g,Q,K)=>{if(V){I.current?.(g,Q,K);return}Ne.current.onFace?.(g),Z.current?.(g==="pages"?Q??L.current.path:Te,"push")},[V]),[ye,U]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{P==="pages"&&U(void 0)},[P]);let Ie=(0,d.useRef)(o);(0,d.useEffect)(()=>{Ie.current!==o&&(Ie.current=o,U(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ne.current.shown==="pages"){if(ee(!0),U(g),A==="scene"||A==="graview"){Vr(A,()=>{V?window.history.pushState(null,"",`${z(Te)}${g??""}`):Z.current?.(Te,"push")});return}Vr(Me.current,()=>_(Me.current,void 0,g))}},[V,A,e.basePath,_]),Ve=(0,d.useCallback)(g=>{if(Ne.current.shown==="pages"){G.go.current||(L.current.path=g),ae(g);return}if(L.current.path=g,j(g),Le.current){ee(!1),V?window.history.pushState(null,"",z(g)):Z.current?.(g,"push");return}_("pages",g)},[G,ae,j,_,V,e.basePath]),Ke=R.arrangement?.(),ue=P==="pages",Re=e.hrefOf,_e=Re??(V?z:void 0),Y=(0,d.useMemo)(()=>({open:Ve,...Re?{href:Re}:V?{href:g=>Ht(g,e.basePath===void 0?{}:{basePath:e.basePath})}:{}}),[Ve,V,e.basePath,Re]);return(0,w.jsxs)("section",{ref:v,className:m,"aria-label":e.label??n.name,"data-graview-embed":P,"data-graview-scheme":F,...Xe?{"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,w.jsx)("style",{children:E}),(0,w.jsxs)(Xn.Provider,{value:te,children:[(0,w.jsx)(br,{rootRef:v,board:D,onReport:e.onReport,where:()=>P==="pages"?Sr(he):P==="picture"?{place:"picture"}:nr(J.view?.focusId)}),(0,w.jsx)(yr,{rootRef:v,firstLook:e.firstLook,app:ir(T??{name:n.name},n.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:te,content:!0,children:(0,w.jsx)(Gn.Provider,{value:le,children:(0,w.jsx)(Nn,{store:W,views:R,initialView:me,scheme:F,...Ar(e,b,T),...e.onSeat?{onSeat:e.onSeat}:{},children:(0,w.jsxs)(rr.Provider,{value:ce,children:[(0,w.jsx)(Do,{face:P,stop:ye??o,kinds:k,places:tt,opens:C}),(0,w.jsx)(Ho,{into:J}),(0,w.jsx)(Vo,{rootRef:v,face:A,shown:P,path:he,stop:o,draft:oe.n,onDrawn:e.onDrawn,parts:le}),V?(0,w.jsx)(fr,{pagesWere:Ae?.path,basePath:e.basePath,shown:P,onFace:e.onFace,toggle:I,kinds:k,places:tt,opens:C,landed:Pe}):null,i&&P!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:te,children:(0,w.jsx)(Pr,{name:T?.name??n.name,heading:c,named:Gt(i).name!==!1,faces:Gt(i).faces===!1?void 0:{scene:{label:Mn(Ke),current:!ue,go:()=>Ee(),reach:()=>void De(Me.current)},pages:{label:Hn(Ke),current:ue,go:()=>Ve(L.current.path),reach:()=>void De("pages")}},at:ue?he:null,without:e.pages?.without(),home:{..._e?.("/")!==void 0?{href:_e("/")}:{},go:()=>Ve("/"),current:ue&&he.split("?")[0]==="/"},reach:{..._e?{href:_e}:{},go:g=>Ve(g.path)},standing:l,hostActions:e.hostActions,barActions:e.barActions,keeping:ue?void 0:(0,w.jsx)($o,{app:n,studio:e.studio,report:te}),onFind:Pt,switch:e.switch})}):null,(0,w.jsx)(ar.Provider,{value:We,children:(0,w.jsx)(Ye,{module:P==="pages"||P==="picture"?"@graview/pages":"@graview/react",report:te,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(Co,{auto:x,scene:P!=="pages"&&P!=="picture"}),children:[P==="picture"?(0,w.jsx)(Ro,{scope:m,store:W,views:R,as:(o?ft(o).within?.view:void 0)??""}):P==="pages"?(0,w.jsx)(Eo,{store:W,views:R,presence:b,auto:x,brand:T,steering:G,overview:Ee,scope:m,titleLevel:kr(c),quickAsk:_t(e.quickAsk),props:{...e,onNavigate:Oe,...V?{}:{path:L.current.path}}}):(0,w.jsx)(jn.Provider,{value:Y,children:(0,w.jsx)(Po,{address:V,auto:x,scheme:F,scope:m,quickAsk:_t(e.quickAsk)})}),(0,w.jsx)(Oo,{asked:A,shown:P,onDrawn:et})]})},P)})]})})})})]})]})}var Zt=e=>e.split(/[?#]/)[0]===Te,Ur=(0,d.createContext)(null);function Ho({into:e}){return e.view=pt().view,null}function Vo({rootRef:e,face:n,shown:o,path:i,stop:l,draft:u,onDrawn:c,parts:v}){let{view:m}=pt(),E=o==="scene"||o==="graview",F=ut(m),{pan:W,...b}=m,T=m.pan?ut(b):F,x={face:n,path:E?Te:o==="picture"?l??"#":i,stop:F};return Cr(e,`${o} ${E?T:x.path} ${u}`,x,c,v),null}var wt,Bo=xe(()=>(__graviewPreload(import.meta.url,["./chunk.K5YFUMRS.js","./chunk.3FKKH2XU.js","./chunk.DLWFULWE.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JHUCKEJS.js"))),tn=()=>Bo().then(e=>void(wt=e),()=>new Promise(e=>{let n=()=>{window.removeEventListener("online",n),clearTimeout(o),e()},o=setTimeout(n,1e4);window.addEventListener("online",n)}).then(tn));function Do({face:e,stop:n,kinds:o,places:i,opens:l}){let{view:u,go:c}=pt(),v=(0,d.useRef)({face:e,stop:n});return(0,d.useLayoutEffect)(()=>{let m=v.current.stop!==n,E=v.current.face!==e,F=v.current.face==="pages";if(v.current={face:e,stop:n},!m&&!E||e==="pages"||e==="picture")return;let W=(m||F)&&n!==void 0?zr(e,n,o,i):F&&mr(u)?qt(e,zt(l),o):e==="graview"?$t(u,!0):u.overview?$n($t(u,!1),sr(u,o)):u;c(W)},[e,n,o,u,c,l]),null}function $o({app:e,studio:n,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(ko,{})}),n!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(Wo,{app:e,studio:n})}):null]})}function Wo({app:e,studio:n}){let o={app:e,within:"box",...n?{onApply:n.onApply}:{},...n?.landmark?{landmark:n.landmark}:{},...n?.offered!==void 0?{offered:n.offered}:{}},i=n?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Lo,{...o})})}function No({path:e,stop:n,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function nn(e,n){let o=n.store??n.remote?.store??hr(n.app,n.seed),i=n.notices??It(),l=null,u={},c=0,v=n.label,m=n.app,E=Promise.resolve(),F=n.at?.face??n.face,W=F===void 0?void 0:jt({...n,face:F}),b=W??en(n.stop),T=null,x=[],O=p=>{if(T=p,p!==b)return;let B=x;x=[];for(let D of B)D()};function oe(){let[p,B]=(0,d.useState)(W),[D,z]=(0,d.useState)(n.stop),[ie,se]=(0,d.useState)(n.path),[be,H]=(0,d.useState)(n.scheme??"auto"),[Se,A]=(0,d.useState)(n.principal),[k,V]=(0,d.useState)(n.seats),[Ae,C]=(0,d.useState)(n.quickAsk),[me,N]=(0,d.useState)(n.people),[L,q]=(0,d.useState)(n.hostContext),[Z,Oe]=(0,d.useState)(n.brand),[he,j]=(0,d.useState)(n.whileAway),[G,ae]=(0,d.useState)(n.label),[M,$e]=(0,d.useState)(n.hostActions),[J,ce]=(0,d.useState)(n.barActions),[I,Pe]=(0,d.useState)(void 0),[X,Ce]=(0,d.useState)(n.draftView);return l={app:ee=>{Pe(ee),se(void 0),z(void 0)},face:B,stop:z,path:se,scheme:H,seat:A,seats:V,quickAsk:C,people:N,hostContext:q,brand:Oe,whileAway:j,label:ae,hostActions:$e,barActions:ce,draft:Ce},(0,w.jsx)(Ur.Provider,{value:u,children:(0,w.jsx)(Gr,{...I?No(n,I):n,store:o,notices:i,...p!==void 0?{face:p}:{},onOpening:ee=>{b=ee},...D!==void 0?{stop:D}:{},...ie!==void 0?{path:ie}:{},...Se?{principal:Se}:{},...k?{seats:k}:{},...Ae!==void 0?{quickAsk:Ae}:{},...me?{people:me}:{},...L?{hostContext:L}:{},...Z?{brand:Z}:{},whileAway:he,label:G,hostActions:M,barActions:J,draftView:X,scheme:be,onFace:ee=>{b=ee,B(ee)},onSeat:A,onFaceDrawn:O},I?.n??0)})}let R=()=>{let p=u.view?.focusId,B=p?o.graph.getNode(p)?.kind:void 0,D=(u.shown??b)==="scene"||(u.shown??b)==="graview";return{face:b,path:D?Te:u.pages?.()??n.path??"/",stop:u.view?ut(u.view):n.stop??"#",...B?{kind:B}:{}}},le=(0,Dr.createRoot)(e);return(0,$.flushSync)(()=>le.render((0,w.jsx)(oe,{}))),{get store(){return o},where:R,setApp:(p,B,D)=>{let z="graph"in B?{store:B}:B,ie=()=>{let se=R();o=z.store,v=D?.label??(v===m.name?p.name:v),m=p,(0,$.flushSync)(()=>{l?.label(v),l?.app({app:p,remote:z,at:se,n:++c})})};wt?ie():E=E.then(tn).then(ie)},setFace:p=>{b=p,(0,$.flushSync)(()=>l?.face(p))},setStop:p=>(0,$.flushSync)(()=>l?.stop(p)),setPath:p=>(0,$.flushSync)(()=>{if(Zt(p)){(b==="pages"||b==="picture")&&(b="scene",l?.face("scene"));return}l?.path(p),b!=="pages"&&(b="pages",l?.face("pages"))}),setScheme:p=>(0,$.flushSync)(()=>l?.scheme(p)),setSeat:p=>(0,$.flushSync)(()=>l?.seat(p)),setSeats:p=>(0,$.flushSync)(()=>l?.seats(p)),setQuickAsk:p=>(0,$.flushSync)(()=>l?.quickAsk(p)),setPeople:p=>(0,$.flushSync)(()=>l?.people(p)),setHostContext:p=>(0,$.flushSync)(()=>l?.hostContext(p)),setBrand:p=>(0,$.flushSync)(()=>l?.brand(p)),setWhileAway:p=>(0,$.flushSync)(()=>l?.whileAway(p)),setDraftView:p=>(0,$.flushSync)(()=>l?.draft(p)),setLabel:p=>{v=p,(0,$.flushSync)(()=>l?.label(p))},setHostActions:p=>(0,$.flushSync)(()=>l?.hostActions(p)),setBarActions:p=>(0,$.flushSync)(()=>l?.barActions(p)),drawn:()=>E.then(()=>T===b?void 0:new Promise(p=>x.push(p))),notify:p=>{let B;return(0,$.flushSync)(()=>{B=i.notify(p)}),B},unmount:()=>le.unmount()}}var vt=e=>`s${(e+1).toString(36)}`;var ve={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",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function bt(e,n={}){try{let o=new URL(e),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...n}}}catch{}return{url:e.replace(/\/$/,""),headers:n}}var Kr="/graview/friction";var Jr="/graview/live",rn="graview.ship",on=`${rn}.${ct}`;var Ge=class extends Error{constructor(n){super(n),this.name="Superseded"}},Fe=e=>e?.lineage?{lineage:e.lineage}:{},Io=(e,n)=>`${e.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${n instanceof Error?n.message.split(`
|
|
2
|
-
`)[0]??"":String(n)})`;function _o(e){if(!e)return[];try{let n=e.storage.getItem(e.key);if(n===null)return[];e.storage.removeItem(e.key);let o=JSON.parse(n);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},jo={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},pe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Ze=class extends Error{constructor(n){super(n),this.name="Unreached"}},qo=new Set([502,503,504]);async function zo(e){try{return(await e.clone().json()).reason==="unavailable"}catch{return!1}}function Go(){let e=Math.random().toString(36).slice(2,8),n=0;return()=>`local-${e}-${++n}`}var Uo=1,Ko=()=>({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(e){return(await Yr(e,_o(e.carry),"This app was updated while your changes were on the way.",Ko())).remote}async function Yr(e,n,o,i){let{key:l,...u}=bt(e.url,e.headers),c={...e,...u},v=c.fetch??fetch,m={"content-type":"application/json",...c.headers??{}},E={...At(c.principal),[ve.via]:c.via??"web"};Object.assign(m,E);let F=c.live===!0,W=c.presenceEveryMs,b=c.visible??Qo,T="connecting",x=i.statuses,O=i.tally,oe=[],R,le=[],p=()=>T==="online"&&R!==void 0?"held":T,B=()=>{let t=p();if(i.told!==t){i.told=t;for(let r of[...x])r(t)}},D=t=>{if(!(t===T||de)&&(T==="offline"&&t==="online"&&O.reconnects++,T=t,B(),t==="online"))for(let r of oe.splice(0))r.again()},z=t=>{if(de)return;let r=typeof t=="string"&&t.length>0?t:void 0,s=r!==R;if(R=r,ie(),!!s&&(B(),r===void 0)){for(let a of le.splice(0))a();ne&&clearTimeout(ne),ln()}},ie=()=>{if(i.toldHeld!==R){i.toldHeld=R;for(let t of[...i.helds])t(R??null)}},se=async(t,r)=>{let s;try{s=await v(t,r)}catch(a){throw Y()||D("offline"),new Ze(a instanceof Error?a.message:String(a))}if(s.status===503&&await zo(s))return D("online"),s;if(qo.has(s.status))throw Y()||D("offline"),new Ze(`The server is away (${s.status})`);return D("online"),s},be=async(t=!1)=>{let r=`${c.url}/graview/state?opFormat=${qe.op}`,s=t?await v(r,{headers:m}):await se(r,{headers:m});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await be(!0);F||(T="online"),R=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ie();let Se=H.enabledModules??c.enabledModules,A=c.localApp?c.localApp(c.app):c.app,k=new Ln({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}:{},...Se?{enabledModules:Se}:{},...A.intelligence?{intelligence:A.intelligence}:{},...A.brand?.timeZone?{timeZone:A.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:Go(),...c.storeOptions??{}});Rn.served.add(k);let V=c.friction!==!1&&c.principal?.kind!=="visitor";V&&xn(k,t=>{V&&v(`${c.url}${Kr}`,{method:"POST",headers:m,body:JSON.stringify({event:t})}).then(r=>void(V=r.status!==404&&r.status!==410),()=>{})});let Ae=On(k),C=H.log.at(-1)?.seq??(H.horizon??0)-1,me=Mt.of(H.log,{horizon:H.horizon??0}),N=null,L,q=new Map,Z=i.who,Oe=!1,he=t=>{if(de)return;Oe=!0;let r=Vn(new Map,t,Date.now(),Bt,N?.participant);L!==void 0&&r.delete(L);let s=r.size!==q.size;if(!s)for(let[a,f]of r)Dt(f,q.get(a))||(s=!0);if(q=r,!!s)for(let a of[...Z])a([...q.values()])},j=[],G=new Set,ae=t=>{let r=j.indexOf(t);r>=0&&j.splice(r,1)},M=new Map,$e=(t,r)=>{let s=M.get(t);s&&(M.delete(t),s.resolve({ops:r.filter(a=>a.batch===t),batch:t}))},J,ce=[],I=(t,r=[])=>{if(t.length===0&&r.length===0)return[];if(J)return ce.push({ops:t,drop:r}),[];let s=Math.min(...t.filter(h=>h.seq>C).map(h=>h.seq));if(Number.isFinite(s)&&s>C+1)return ce.push({ops:t,drop:r}),Pe(),[];let a=j.filter(h=>t.some(re=>re.batch===h)),f=[...new Set([...r,...a])].filter(h=>G.has(h)),y,S=j.filter(h=>!a.includes(h));try{y=k.rebase({confirmed:t,pending:S,drop:f}).confirmed}catch(h){if(!(h instanceof Cn))throw h;return ce.push({ops:t,drop:r}),Pe(),[]}for(let h of a)ae(h);t.some(h=>h.seq>C)&&S.some(h=>!f.includes(h))&&O.rebases++,t.length>0&&(C=Math.max(C,...t.map(h=>h.seq)),me.note(t));for(let h of f)G.delete(h);for(let h of a)$e(h,t);return y},Pe=()=>{J||(J=ke(be().then(t=>{if(X(t)){ce=[];return}let r=new Set(t.log.map(f=>f.batch)),s=j.filter(f=>r.has(f));for(let f of s)ae(f);let a=k.adopt({snapshot:t.snapshot,log:t.log,...t.horizon!==void 0?{horizon:t.horizon}:{},pending:[...j],drop:[...G].filter(f=>!j.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);C=t.log.at(-1)?.seq??(t.horizon??0)-1,me=Mt.of(t.log,{horizon:t.horizon??0}),O.resyncs++;for(let f of s)$e(f,t.log)}).then(()=>{J=void 0;let t=ce;ce=[];for(let{ops:r,drop:s}of t)I(r,s)},()=>{J=void 0,ce=[]})))},X=t=>(typeof t.build=="string"&&fn(t.build),typeof t.version=="number"&&z(t.held),typeof t.version!="number"||t.version===H.version?!1:(Rt(t.version),!0)),Ce=async t=>{let s=await(await se(`${c.url}/graview/since?seq=${vt(t)}&opFormat=${qe.op}`,{headers:m})).json();return X(s)?[]:s.reset===!0?(Pe(),[]):s.ops??[]},ee=async()=>{let t=await Xe();return J&&await J,t},Xe=async()=>{if(N&&!Y()&&b()){let r=await(await se(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:m,body:JSON.stringify({presence:N,seq:vt(C)})})).json();return X(r)?[]:(typeof r.participant=="string"&&(L=r.participant),he(r.who??[]),I(r.ops??[]))}return I(await Ce(C))},P=new Map,Le=new Map,Me=new Set,te=new Map,He=new Set,ke=t=>(He.add(t),t.finally(()=>He.delete(t)).catch(()=>{}),t),et=Promise.resolve(),We=0,Pt=(t,r)=>{let s=et.then(()=>Ne(t,r));return et=s.catch(()=>{}),s},tt=()=>new Promise((t,r)=>oe.push({again:t,give:r})),Ne=async(t,r)=>{let s,a;for(;;){try{s=await se(`${c.url}/graview/ops`,{method:"POST",headers:m,body:JSON.stringify({...t,opFormat:qe.op})})}catch(h){if(!(h instanceof Ze)||U)throw h;if(await tt(),Y())return nt(t,r);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!U){if(typeof a.version=="number"?X(a):(z(a.held),!1))break;if(R!==void 0&&(Ot>0||F)){if(await new Promise(h=>le.push(h)),U)throw new Ge("The client closed.");if(Y())return nt(t,r);continue}}let S;if(s.status===503&&a.reason==="unavailable"&&!U)S=an(c.backoff,We++);else{if(We=0,s.status!==429||U)break;S=Jo(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(h=>setTimeout(h,S)),Y())return nt(t,r)}if(de||X(a))throw new Ge("The app was changed.");if(!s.ok){let S=a.error??`The server refused (${s.status})`;throw a.conflict?new pe(S,a.conflicts??[]):new Ue({reason:a.reason??jo[s.status]??"invalid",sentence:S,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>C+1&&(f=await Ce(C)),r!==void 0&&(a.batch&&P.set(r,a.batch),ae(r)),I(f,r!==void 0?[r]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},_,ye=!1,U=!1,Ie=0,Ee,Ve=0,Ke=0,ue=null,Re=()=>{},_e=new Promise(t=>{Re=t}),Y=()=>F&&ye&&_?.readyState===Uo,g=t=>{if(!Y())return!1;try{return _.send(JSON.stringify(t)),!0}catch{return!1}},Q=(t=!1)=>{!N||!Y()||!b()||!t&&ue&&Dt(N,ue)&&(W===void 0||Date.now()-Ke<W)||g({t:"here",presence:N})&&(ue=N,Ke=Date.now())},K=new Set,ne,ln=()=>{if(ne=void 0,R!==void 0)return;let t=[...M.entries()].filter(([r])=>K.has(r));K.clear();for(let[,r]of t)g(r.message)},un=(t,r)=>{M.has(t)&&(K.add(t),ne&&clearTimeout(ne),ne=setTimeout(ln,Math.max(0,r)))},Xr=t=>{M.has(t)&&K.add(t)},nt=(t,r)=>new Promise((s,a)=>{let f=r??`send-${++Ve}`,y=t.undo?{t:"undo",cid:f,batches:t.undo,...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.via?{via:t.via}:{},...Fe(t)}:{t:"call",cid:f,calls:t.calls??[],...t.intent?{intent:t.intent}:{},...t.batch?{batch:t.batch}:{},...t.base?.length?{base:t.base}:{},...t.via?{via:t.via}:{},...Fe(t)};if(M.set(f,{message:y,...r!==void 0?{mine:r}:{},resolve:s,reject:a}),K.size>0||R!==void 0){K.add(f);return}g(y)}),rt=(t,r)=>Y()?nt(t,r):Pt(t,r),eo=t=>{switch(t.t){case"welcome":{if(fn(t.build),typeof t.version=="number"&&t.version!==H.version){Rt(t.version);return}if(ye=!0,Ie=0,typeof t.participant=="string"&&(L=t.participant),z(t.held),t.state?Pe():I(t.ops??[]),K.clear(),ne&&clearTimeout(ne),ne=void 0,R!==void 0)for(let r of M.keys())K.add(r);else for(let r of M.values())g(r.message);Q(!0),D("online"),Re();return}case"ops":I(t.ops??[]);return;case"ack":{let r=M.get(t.cid);if(!r){I(t.ops??[]);return}M.delete(t.cid),We=0,r.mine!==void 0&&(P.set(r.mine,t.batch),ae(r.mine)),I(t.ops??[],r.mine!==void 0?[r.mine]:[]),r.resolve({ops:t.ops??[],batch:t.batch});return}case"refused":case"conflict":{let r=M.get(t.cid);if(!r)return;if(t.t==="refused"&&t.reason==="unavailable"){R!==void 0?Xr(t.cid):un(t.cid,an(c.backoff,We++));return}M.delete(t.cid),r.reject(t.t==="conflict"?new pe(t.sentence,t.conflicts??[]):new Ue({reason:t.reason??"invalid",sentence:t.sentence,...t.wouldNeed?.length?{wouldNeed:[...t.wouldNeed]}:{}}));return}case"busy":typeof t.cid=="string"&&un(t.cid,typeof t.retryAfter=="number"?t.retryAfter:1e3);return;case"presence":he(t.who??[]);return;case"held":z(t.sentence);return;case"declaration":typeof t.version=="number"&&t.version!==H.version&&Rt(t.version);return;case"reload":yn(typeof t.reason=="string"?t.reason:"This app was updated.");return;case"error":if(t.reopen===!0&&_){let r=_;wn(r);try{r.close(1e3,"Opening again.")}catch{}}return;default:return}},de=!1,kt=i.declarations,Et=i.builds,fn=t=>{if(!(de||i.otherBuild!==void 0||!c.build||typeof t!="string"||t.length===0||t===c.build)){i.otherBuild=t;for(let r of[...Et])r(t)}},pn=()=>{let t=[],r=0;for(let s of j){let a=te.get(s);a?t.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...Fe(a),batch:s}):r++}return{carried:t,undos:r}},mn=(t,r)=>`${r} while ${t===1?"an undo of yours was":"undos of yours were"} on the way; ${t===1?"it was":"they were"} not made.`,hn=t=>{de=!0,N=null;let r=new Ge(t);for(let a of M.values())a.reject(r);M.clear(),it&&clearInterval(it),U=!0,Ee&&clearTimeout(Ee),ne&&clearTimeout(ne),ge&&clearTimeout(ge);for(let a of oe.splice(0))a.give(r);for(let a of le.splice(0))a();let s=_;_=void 0,ye=!1;try{s?.close(1e3,t)}catch{}Re()};async function Rt(t){if(de)return;if(!c.resolveApp){yn(`This app was changed on its server (version ${t}); reload the page to carry on.`);return}let{carried:r,undos:s}=pn(),a=c.resolveApp,f=N;hn("The app was changed.");try{let y=await a(t),{state:S,...h}=c,re=await Yr({...h,app:y},r,"The app was changed while your changes were on the way.",i);f&&re.remote.presence.here(f);for(let st of[...kt])st(re.remote,t);let fe=[...s>0?[ot(mn(s,"The app was changed"))]:[],...re.unheard()];for(let st of fe)for(let co of je)co(st.sentence,st)}catch(y){let S=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let h of je)h(S,ot(S))}}function yn(t){if(de)return;let{carried:r,undos:s}=pn();hn(t);let a=!1;if(c.carry&&r.length>0)try{c.carry.storage.setItem(c.carry.key,JSON.stringify(r)),a=!0}catch{}let f=[];!a&&r.length>0&&f.push(`${t} ${r.length===1?"A change of yours was":`${r.length} changes of yours were`} not sent; make ${r.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(mn(s,"This app was updated"));for(let y of f)for(let S of je)S(y,ot(y));(c.reloadPage??Yo)()}let gn=()=>{if(U||!F)return;let t=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Jr}`,{"content-type":r,...s}=m,a;try{a=c.socket?c.socket(t,s,[on]):so(t,s)}catch{return vn()}_=a,ye=!1,a.onopen=()=>{_===a&&a.send(JSON.stringify({t:"hello",seq:vt(C),protocol:ct,wire:rn,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(_!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}eo(y)},a.onclose=()=>wn(a),a.onerror=()=>{}},ge,to=()=>{Oe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Oe||U)return;let t=new Map([...q].filter(([,r])=>r.held!=="socket"));if(t.size!==q.size){q=t;for(let r of Z)r([...q.values()])}},Bt),ge.unref?.()};function wn(t){if(_!==t)return;let r=ye;_=void 0,ye=!1,ue=null,r&&(D("offline"),to()),vn()}let vn=()=>{if(U)return;let t=an(c.backoff,Ie);Ie++,Ee=setTimeout(gn,t)},bn=k.applyAll.bind(k),no=k.undo.bind(k),ro=k.previewAll.bind(k);k.previewAll=(t,r)=>ro(t,{...c.principal?{author:c.principal}:{},...r});let je=i.refusals,Je=[],ot=t=>({reason:"invalid",sentence:t}),at=i.conflicts,Tt=!1,Sn,xt=async(t,r)=>{if(r instanceof Ge||de)return;let s=r instanceof Ue?r.refusal:En(r),a=s.sentence,f=r instanceof pe?Sn?.yoursOf(k,te.get(t)?.calls??[]):void 0;ae(t);try{I([],[t])}catch{}let y=te.get(t);te.delete(t);let S=y?.calls[0];if(S&&!(r instanceof pe)){let h=k.allMutations().find(fe=>fe.name===S.name)?.subject?.arg,re=h&&k.graph.getNode(S.args[h])?.kind;Fn(k,{type:"refused",act:S.name,code:s.reason,...re?{kind:re}:{}},c.principal)}if(r instanceof pe&&O.conflicts++,r instanceof pe&&!Y()&&await ee().catch(()=>[]),r instanceof pe&&J&&await J,r instanceof pe&&at.size>0){let h=!1,re={sentence:a,conflicts:f?r.conflicts.map(fe=>fe.node===f.node&&fe.field===f.field?{...fe,yours:f.yours}:fe):r.conflicts,keepTheirs(){h=!0},useMine(){if(!(h||!y)){h=!0,Tt=!0;try{k.applyAll(f?[f.over(C)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...Fe(y)})}finally{Tt=!1}}}};for(let fe of at)fe(re);return}for(let h of je)h(a,s)},oo=(t,r)=>t.flatMap(s=>s.mutation?.name===kn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!r.has(a.id)&&!r.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:C}]:[]));k.applyAll=(t,r)=>{let s=Tn(k.log.all().filter(S=>G.has(S.batch))),a=bn(t,{...c.principal?{author:c.principal}:{},...r}),f=t.map((S,h)=>{let re=a.minted?.[h];return re===void 0||S.args?.id!==void 0?S:{...S,mintedHint:re}});j.push(a.batch),G.add(a.batch),te.set(a.batch,{calls:f,...r?.intent?{intent:r.intent}:{},...r?.via?{via:r.via}:{},...Fe(r)});let y=Tt?[]:[...me.baseFor(a.ops,s,(S,h)=>k.collaborative(S,h)),...oo(a.ops,s)];return Le.set(a.batch,ke(rt({calls:f,...r?.intent?{intent:r.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...r?.via?{via:r.via}:{},...Fe(r)},a.batch).catch(S=>xt(a.batch,S)))),a},k.apply=(t,r)=>k.applyAll([t],r),k.undo=(t,r)=>{let s=typeof t=="string"?[t]:t,a=no(s.map(y=>P.get(y)??y),{...c.principal?{author:c.principal}:{},...r});j.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>Le.get(y)));return Le.set(a.batch,ke(f.then(()=>{let y=s.filter(S=>!Me.has(S));if(y.length===0){ae(a.batch),te.delete(a.batch),I([],[a.batch]);return}return rt({undo:y.map(S=>P.get(S)??S),...r?.intent?{intent:r.intent}:{},batch:a.batch,...r?.via?{via:r.via}:{},...Fe(r)},a.batch)}).catch(y=>xt(a.batch,y)))),a};let ao=async(t,r={})=>{Ft++;try{return(await ke(rt({calls:t,...r}))).ops}finally{Ft--}},Ft=0,An={here(t){N=t,Q()},onWho(t){return Z.add(t),q.size>0&&t([...q.values()]),()=>{Z.delete(t)}},leave(){if(!N)return;let t=JSON.stringify({participant:L??N.participant});if(N=null,g({t:"bye"}))return;let r=globalThis.navigator?.sendBeacon;r?r.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,t):v(`${c.url}/graview/leave`,{method:"POST",headers:m,body:t}).catch(()=>{})}},Ot=c.pollMs??800,it=Ot>0&&typeof setInterval=="function"?setInterval(()=>{Y()||ee().catch(()=>{})},Ot):null;if(F){gn();let t;await Promise.race([_e,new Promise(r=>t=setTimeout(r,c.openTimeoutMs??3e3))]),clearTimeout(t)}if(n.length>0&&!de){let t=[],r=new Set(k.log.all().map(s=>s.batch));for(let s of n)if(!(s.batch!==void 0&&r.has(s.batch)))try{k.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...Fe(s)})}catch(a){t.push(Io(s,a))}t.length>0&&Je.push(ot(`${o} ${t.length===1?"One no longer fits and was not made":`${t.length} no longer fit and were not made`}: ${t.join("; ")}.`))}let Pn=new Map,io=()=>({store:k,author:c.principal,appliedAll:bn,pending:j,provisional:G,asked:te,answers:Le,letGo:Me,sent:(t,r)=>ke(rt({calls:r,batch:t},t).catch(s=>xt(t,s))),settle:ae,land:I,seen:()=>C,gone:()=>U||de});return{remote:{store:k,typing(t,r){let s=`${t}\0${r}`,a=Pn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.UDYFGYJP.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BVIJXL4J.js")).then(f=>(Sn=f,f.typingOf(t,r,f.wireOf(io())))),Pn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:ao,pull:ee,onRefusal(t){je.add(t);let r=Je;Je=[];for(let s of r)t(s.sentence,s);return()=>je.delete(t)},onDeclaration(t){return kt.add(t),()=>kt.delete(t)},onBuild(t){return Et.add(t),i.otherBuild!==void 0&&t(i.otherBuild),()=>Et.delete(t)},onConflict(t){return at.add(t),()=>at.delete(t)},revision:(t,r)=>me.of(t,r),seq:()=>C,participant:()=>L,transport:()=>Y()?"socket":"poll",status:p,onStatus(t){return x.add(t),()=>x.delete(t)},held:()=>R,onHeld(t){return i.helds.add(t),R!==void 0&&t(R),()=>i.helds.delete(t)},counters:()=>({...O}),who:()=>[...q.values()],pending:()=>j.length+Ft,async settled(){for(;He.size>0;)await Promise.allSettled([...He])},presence:An,close(){it&&clearInterval(it),Ae(),An.leave(),U=!0,Ee&&clearTimeout(Ee),ne&&clearTimeout(ne),ge&&clearTimeout(ge);for(let r of oe.splice(0))r.give(new Error("The client closed before the server could be reached."));for(let r of le.splice(0))r();let t=_;_=void 0,ye=!1;try{t?.close(1e3,"Closed.")}catch{}}},unheard(){let t=Je;return Je=[],t}};function so(t,r){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[on]:[];if(!a)try{return new s(t,{headers:r,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(t);for(let[S,h]of Object.entries(E))y.searchParams.set(S,h);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Jo(e,n,o=Date.now()){let i,l=e?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let v=Date.parse(l);Number.isFinite(v)&&(i=Math.max(0,v-o))}let u=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:void 0,c=u!==void 0&&u<50&&i!==void 0&&Math.abs(u*1e3-i)<1e3;return u!==void 0&&!c?u:i??1e3}function Yo(){globalThis.location?.reload?.()}function Qo(){return globalThis.document?.visibilityState!=="hidden"}function an(e,n){if(typeof e=="function")return Math.max(0,e(n));let{min:o=250,max:i=1e4,factor:l=2}=e??{};return Math.min(i,o*l**n)*(.75+Math.random()*.5)}function At(e){let n={};if(!e)return n;e.id&&(n[ve.seat]=e.id),e.roles?.length&&(n[ve.roles]=e.roles.join(",")),e.kind!=="human"&&(n[ve.kind]=e.kind),e.name&&(n[ve.name]=encodeURIComponent(e.name));let o=e.onBehalfOf;return o?.id&&(n[ve.for]=o.id),o?.roles?.length&&(n[ve.forRoles]=o.roles.join(",")),o?.name&&(n[ve.forName]=encodeURIComponent(o.name)),n}var Qr="/graview/views";function sn(e){let n=e.fetch??fetch,o=bt(e.url,e.headers),i=o.url,l={"content-type":"application/json",...e.principal?At(e.principal):{},...o.headers},u=e.state?{hidden:e.state.hidden??[],removed:e.state.removed??[],may:e.state.may??dt.may}:dt,c=new Set,v=b=>{if(JSON.stringify(b)!==JSON.stringify(u)){u=b;for(let T of c)T()}},m=async(b,T)=>{let x=await n(`${i}${e.path??Qr}`,{method:b,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),O=await x.json();if(!x.ok)throw new Error(O.error??`The store answered ${x.status}.`);v({hidden:O.hidden??[],removed:O.removed??[],may:O.may??dt.may})},E=()=>m("GET"),F=e.state?Promise.resolve():E().catch(()=>{}),W=e.pollMs?setInterval(()=>void E().catch(()=>{}),e.pollMs):void 0;return{ready:F,refresh:E,close:()=>clearInterval(W),current:()=>u,onChange(b){return c.add(b),()=>void c.delete(b)},hide:b=>m("POST",{hide:b}),show:b=>m("POST",{show:b}),remove:(b,T)=>m("POST",{remove:b,...T?{about:T}:{}}),async restore(b){let T=u.removed.find(x=>x.name===b)?.lens;await m("POST",{restore:b}),T&&await e.onDeclaration?.()},async lens(b){await m("POST",{lens:b}),await e.onDeclaration?.()}}}var dn=document.getElementById("graview-app"),cn=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Zr=cn?(__graviewPreload(import.meta.url,["./chunk.2VIS2NAT.js","./chunk.3OEODIHB.js","./chunk.XOZU4OFA.js","./chunk.G7YLK4PX.js","./chunk.XJWKIXPV.js","./chunk.4VRX7FCO.js","./chunk.75JQCTR6.js","./chunk.5IEZF433.js","./chunk.5AD2QHWH.js","./chunk.DLWFULWE.js","./chunk.VLX7YWVH.js","./chunk.SDO3U72B.js","./chunk.IQGSEAQ2.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.DYRULRFX.js")):De("pages");try{cn?await Zo(decodeURIComponent(cn[1])):await Xo()}catch(e){let n=document.createElement("pre");n.setAttribute("role","alert"),n.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",n.textContent=e instanceof Error?e.message:String(e),dn.replaceChildren(n),window.__graviewFailed=n.textContent}async function Zo(e){let n=await fetch(`/graview/document?form=${encodeURIComponent(e)}`),o=await n.json();if(!n.ok)throw new Error(o.error??`The preview server did not hand over the form (${n.status}).`);let i=await mt(o);if(!i.ok)throw new Error(lt(i.findings));let l=i.app,u=o.principal,c=await St({app:l,url:location.origin,principal:u,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[e]?.title??l.name;let{mount:v}=await Zr;window.__graview=v(dn,{app:l,form:e,principal:u,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Xo(){let e=await fetch("/graview/document");if(!e.ok)throw new Error(`The preview server did not hand over the document (${e.status}).`);let n=await e.json(),i=await(async m=>{if(typeof m.module=="string")return(await import(m.module)).app;let E=await mt(m);if(!E.ok)throw new Error(lt(E.findings));return E.app})(n);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=n.principal,u=await St({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...n.state?{state:n.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,v=sn({url:location.origin,principal:l,...n.views?{state:n.views}:{},onDeclaration:async()=>{let m=await(await fetch("/graview/document")).json();if(typeof m.module=="string")return;let E=await mt(m);E.ok&&c?.setApp(E.app,u)}});await Promise.all([Zr,v.ready]),c=nn(dn,{app:i,remote:u,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:v,...n.draftView?{draftView:n.draftView}:{}}),window.__graview=c,c.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 _t,b as sr,c as cr,d as dr,e as lr,f as Wt,g as ur,h as Dt}from"./chunk.6LXIEM6B.js";import{a as lo}from"./chunk.LLIURXFP.js";import{a as fr,b as pr,c as qt,d as mr,e as zt,f as yr,g as gr,h as wr,i as Gt,j as vr,k as br,l as Sr,m as Ar,n as Pr,o as Rr,p as Er,q as kr,r as Tr,s as xr,t as Fr,u as Ye}from"./chunk.SSF47GUY.js";import{b as hr}from"./chunk.PAGEGBUD.js";import{c as jt}from"./chunk.72XP2ARZ.js";import{a as Ft}from"./chunk.Q5WEOX3Q.js";import{b as Ot,i as Mn}from"./chunk.4AC2QM7T.js";import{k as ct}from"./chunk.OEIWIZCP.js";import{C as It,F as rr,K as or,O as ar,P as ir,k as Qn,n as Zn,o as Xn,p as $t,q as er,s as tr,w as nr}from"./chunk.U3HERHAI.js";import{c as co}from"./chunk.FBILPNGH.js";import{Ba as Dn,Ca as jn,Da as qn,Ea as zn,Fa as Gn,G as Nn,Ha as Un,Ia as Kn,Ka as Jn,La as Vt,Oa as Yn,Ra as ut,W as Vn,a as Bn,aa as $n,b as dt,c as lt,j as Hn,ja as In,ka as _n,m as Nt,ma as Wn}from"./chunk.MODLZJD4.js";import{a as Be}from"./chunk.SDO3U72B.js";import{Ae as Ln,Be as Ht,Ed as En,Fb as Sn,Fd as kn,Nd as Tn,Ob as An,Pd as xn,Qb as Pn,Qd as Fn,Sd as st,mb as qe,oe as Te,pe as On,qe as Cn,ve as Lt,we as Mt,xb as it,xc as Ct,xe as Bt,yc as Rn}from"./chunk.6HY6ZGEE.js";import"./chunk.FQLNBIQ5.js";import{b as je}from"./chunk.AJZBJBMO.js";async function ft(t,r={}){let o=t.compiled===void 0||!fo(t.compiled,t.document)?void 0:Mn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await uo();return i(t.document,r)}var Or,uo=()=>Or??=(__graviewPreload(import.meta.url,["./chunk.4FCFNAA4.js","./chunk.4AC2QM7T.js","./chunk.CVPMSPCH.js","./chunk.KBPJ7X7W.js","./chunk.OEIWIZCP.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TA36WBHK.js")).catch(t=>{throw Or=void 0,t});function fo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,i=r;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ft(Ot(o).document)===Ft(Ot(i).document)}var d=je(Nn(),1);var mt=je(Nn(),1),Ut="data-graview-drawn",po=200,Cr=50,mo=1e4,pt=()=>typeof performance<"u"?performance.now():Date.now();function ho(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 yo(t,r){if(t.ownerDocument.fonts?.status==="loading"||Dn()>0||Gn(r)>0||t.querySelector('[aria-busy="true"]')||ho(t).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of t.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Lr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function go(t,r,o,i){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let p=pt(),c=p,b=Lr(t),h=!1,k,F=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(O=>!(O.target===t&&O.attributeName===Ut))&&(c=pt())});F?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let I=()=>{h=!0,F?.disconnect(),k!==void 0&&clearTimeout(k)},S=x=>{let O=!1,re=()=>{O||(O=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(re,0)),setTimeout(re,100)},T=()=>{if(h)return;let x=Lr(t);x!==b&&(b=x,c=pt());let O=pt();if(yo(t,i)&&O-c>=po||O-p>=mo){S(()=>{h||(I(),t.setAttribute(Ut,r),Kn(),o())});return}k=setTimeout(T,Cr)};return k=setTimeout(T,Cr),I}function Mr(t,r,o,i,l){Un();let p=(0,mt.useRef)({place:o,onDrawn:i});p.current={place:o,onDrawn:i},(0,mt.useLayoutEffect)(()=>{l&&zn(l);let c=k=>go(k,p.current.place.path,()=>p.current.onDrawn?.(p.current.place),l);if(t.current)return c(t.current);let b,h=!1;return queueMicrotask(()=>{!h&&t.current&&(b=c(t.current))}),()=>{h=!0,b?.()}},[r,t,l])}var Nr=je(lo(),1);var C=je(co(),1);var w=je(Vn(),1);function ht(t,r={}){let o=Vt(t);return{Face:o.part((l,p)=>(0,d.createElement)(l,p),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Yt=t=>Promise.all([t,ar()]).then(([r])=>r),Vr=Be(()=>(__graviewPreload(import.meta.url,["./chunk.OO2OP76C.js","./chunk.CTASTRQN.js","./chunk.DPJNGFEZ.js","./chunk.72ZCLEQC.js","./chunk.2VR7YEJ6.js","./chunk.LETAQTLJ.js","./chunk.BUVTUAB5.js","./chunk.HJCQ6I3S.js","./chunk.OJY7VJ7D.js","./chunk.GEFXU4VO.js","./chunk.QU52E5RG.js","./chunk.7VADSNPZ.js","./chunk.FK722SHI.js","./chunk.U5P23GO7.js","./chunk.6EHHMWPP.js","./chunk.TXHYGFIZ.js","./chunk.WAB3L3ZI.js","./chunk.W53YNBSM.js","./chunk.2KFZHUAC.js","./chunk.V5I4GZEY.js","./chunk.FIFUMX5X.js","./chunk.BIDL7GQD.js","./chunk.V7W5AQKL.js","./chunk.EMFOMSMI.js","./chunk.QOS5T46W.js","./chunk.SSF47GUY.js","./chunk.PAGEGBUD.js","./chunk.Q5WEOX3Q.js","./chunk.4FCFNAA4.js","./chunk.4AC2QM7T.js","./chunk.JXNVNFV4.js","./chunk.CVPMSPCH.js","./chunk.OTV5XTBB.js","./chunk.KBPJ7X7W.js","./chunk.OEIWIZCP.js","./chunk.MIE4TJRW.js","./chunk.5LJVOLKR.js","./chunk.OJGHDWI6.js","./chunk.OWFS2YDQ.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.C2C3AXGI.js"))),wo=Be(()=>(__graviewPreload(import.meta.url,["./chunk.OMT4QUZY.js","./chunk.ANS2IEEV.js","./chunk.XMQG2PSM.js","./chunk.45JP6VGJ.js","./chunk.Q355UPFG.js","./chunk.OO2OP76C.js","./chunk.BFAFCVL4.js","./chunk.LGRVEHXT.js","./chunk.CTASTRQN.js","./chunk.QQAZQDRW.js","./chunk.72ZCLEQC.js","./chunk.ONYBW45K.js","./chunk.2VR7YEJ6.js","./chunk.FXT5CN32.js","./chunk.WVLEGCRI.js","./chunk.LETAQTLJ.js","./chunk.BUVTUAB5.js","./chunk.MB7LKKUD.js","./chunk.U6TEW6YD.js","./chunk.FK722SHI.js","./chunk.7VP6Y6D2.js","./chunk.WSO7JOW5.js","./chunk.XOE4KNP2.js","./chunk.W53YNBSM.js","./chunk.2KFZHUAC.js","./chunk.V5I4GZEY.js","./chunk.V7W5AQKL.js","./chunk.BJUUSIQY.js","./chunk.EMFOMSMI.js","./chunk.QOS5T46W.js","./chunk.XOZU4OFA.js","./chunk.GME63ZHI.js","./chunk.WVUJXDXZ.js","./chunk.I2737CPF.js","./chunk.NJRLJEJY.js","./chunk.CVPMSPCH.js","./chunk.OTV5XTBB.js","./chunk.KBPJ7X7W.js","./chunk.OEIWIZCP.js","./chunk.MIE4TJRW.js","./chunk.5LJVOLKR.js","./chunk.OJGHDWI6.js","./chunk.OWFS2YDQ.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.VT2YGDK2.js"))),vo=Be(()=>(__graviewPreload(import.meta.url,["./chunk.OMT4QUZY.js","./chunk.ANS2IEEV.js","./chunk.XMQG2PSM.js","./chunk.45JP6VGJ.js","./chunk.Q355UPFG.js","./chunk.OO2OP76C.js","./chunk.BFAFCVL4.js","./chunk.LGRVEHXT.js","./chunk.CTASTRQN.js","./chunk.QQAZQDRW.js","./chunk.72ZCLEQC.js","./chunk.ONYBW45K.js","./chunk.2VR7YEJ6.js","./chunk.FXT5CN32.js","./chunk.WVLEGCRI.js","./chunk.LETAQTLJ.js","./chunk.BUVTUAB5.js","./chunk.MB7LKKUD.js","./chunk.U6TEW6YD.js","./chunk.FK722SHI.js","./chunk.7VP6Y6D2.js","./chunk.WSO7JOW5.js","./chunk.XOE4KNP2.js","./chunk.W53YNBSM.js","./chunk.2KFZHUAC.js","./chunk.V5I4GZEY.js","./chunk.V7W5AQKL.js","./chunk.BJUUSIQY.js","./chunk.EMFOMSMI.js","./chunk.QOS5T46W.js","./chunk.XOZU4OFA.js","./chunk.GME63ZHI.js","./chunk.WVUJXDXZ.js","./chunk.I2737CPF.js","./chunk.NJRLJEJY.js","./chunk.CVPMSPCH.js","./chunk.OTV5XTBB.js","./chunk.KBPJ7X7W.js","./chunk.OEIWIZCP.js","./chunk.MIE4TJRW.js","./chunk.5LJVOLKR.js","./chunk.OJGHDWI6.js","./chunk.OWFS2YDQ.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EUAO4QNV.js"))),$r=ht(()=>Yt(Vr().then(t=>t.SceneFace)),{what:"This view"}),Ir=ht(()=>Vr().then(t=>t.SceneKeeping),{quiet:!0}),_r=ht(()=>Yt(wo().then(t=>t.PagesContent)),{what:"This page"}),Wr=ht(()=>Yt(vo().then(t=>t.PictureFace)),{what:"This picture"}),bo=$r.Face,So=Ir.Face,Ao=_r.Face,Po=Wr.Face;jt(Be(()=>(__graviewPreload(import.meta.url,["./chunk.CEVGND3Y.js","./chunk.CEQQIW7Z.js","./chunk.DQFHIJFN.js","./chunk.BFAFCVL4.js","./chunk.32SHA3EY.js","./chunk.GG47EIKO.js","./chunk.NYLKG25K.js","./chunk.DTCAUPLC.js","./chunk.PDDIQ6PK.js","./chunk.3PBTN7RO.js","./chunk.QDVGHI7R.js","./chunk.6P6NGZ6D.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.FIFUMX5X.js","./chunk.V7W5AQKL.js","./chunk.JXNVNFV4.js","./chunk.F4VB6Q2W.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.BXBEGMPO.js"))));function He(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(Dr));return Promise.all([...[...o].map(i=>i.fetch()),tr()]).then(()=>{},()=>{})}var Dr=t=>t==="pages"?[_r]:t==="picture"?[Wr]:[$r,Ir],jr=t=>Dr(t).every(r=>r.here()),Ro=150,Kt=0;function Br(t,r){if(jr(t))return r();let o=++Kt,i=()=>{o===Kt&&(Kt+=1,r())};He(t).then(i),setTimeout(i,Ro)}var Eo=768;function ko(t,r){let o=r!==null&&r>=Eo;(0,d.useEffect)(()=>{if(!o||t==="picture")return;let i=t==="pages"?"scene":"pages";if(jr(i))return;let l=globalThis,p=()=>void He(i),c=()=>{},b=Jn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(p,{timeout:4e3});c=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(p,1500);c=()=>clearTimeout(h)}});return()=>(b(),c())},[t,o])}function To({asked:t,shown:r,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function xo({auto:t,scene:r}){return(0,w.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 Fo=Vt(Be(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,w.jsx)(t.StudioPlace,{...r}),{quiet:!0});function qr(t,r,o,i,l){return Wt(t,lr(r?lt(r):l??Bn,i),o)}function Qt(t){return t&<(t).overview?"graview":"scene"}function Hr(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 zr(t){let[,r]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>r(!0),[]),i=(0,d.useRef)(!1);return t.at&&!yt?(0,w.jsx)(qt,{onReady:o,fetch:Zt}):!i.current&&pr(t.draftView)?(0,w.jsx)(qt,{onReady:o,fetch:fr}):(i.current=!0,(0,w.jsx)(Oo,{...t}))}function Oo(t){let{app:r,stop:o,bar:i=!0,standing:l="Everything is in order",principal:p,heading:c=2}=t,{rootRef:b,scope:h,css:k,scheme:F,store:I,presence:S,brand:T,auto:x,height:O}=vr(t),re=mr(t.draftView),E=gr(t,ir,re.over),[de]=(0,d.useState)(qn),u=t.basePath===void 0?{}:{basePath:t.basePath},[V]=(0,d.useState)($t),$=t.notices??V,z=g=>Lt(g,u),ae={...t.routing?{routing:t.routing}:{},...u},[ie]=(0,d.useState)(()=>{let g=t.at?.face;if(g)return g;let Z=o===void 0&&Hr(r,E)?"pages":Qt(o),J=_t({...ae,face:Z});return t.face===void 0&&t.onOpening?.(J),J}),[ve,H]=(0,d.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&sr(ae)&&Hr(r,E)),be=(0,d.useRef)(t.onFace);be.current=t.onFace,(0,d.useLayoutEffect)(()=>{ve&&(be.current?.("pages"),H(!1))},[ve]);let P=ve?"pages":t.face??ie,R=r.schema.kinds,N=t.routing==="address",Se=(0,d.useMemo)(()=>t.at?yt.settleAt(t,I.seenBy(p??{kind:"human"}),E.places()):void 0,[]),L=(0,d.useMemo)(()=>_n(E,r.schema),[E,r.schema]),pe=(0,d.useMemo)(()=>{let g=Se?.stop??(N?cr(t.basePath):void 0)??o;return P==="scene"&&g===void 0&&L===void 0&&(t.path===void 0||Jt(t.path))?Dt(void 0):qr(P,g,R,E.places(),L)},[]),[_]=(0,d.useState)(P);(0,d.useEffect)(()=>{_!=="pages"&&In(E)},[_,E]);let M=(0,d.useRef)(void 0),j=g=>g===void 0||Jt(g)?"/":g;M.current??={path:j(Se?.path??(N?P==="pages"?(Mt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==M.current.asked&&(M.current={path:j(t.path),asked:t.path});let X=(0,d.useRef)(t.onNavigate);X.current=t.onNavigate;let Fe=(0,d.useCallback)((g,Z)=>{M.current.path=g,X.current?.(g,Z)},[]),{at:me,setAt:D,steering:G,steer:oe}=Tr(M.current.path),B=(0,d.useContext)(Gr);B&&(B.pages=()=>M.current.path);let[Ne]=(0,d.useState)(()=>({})),Y=B??Ne,se=(0,d.useMemo)(()=>Zn($),[$]),q=(0,d.useRef)(void 0),Ae=(0,d.useCallback)(g=>void(M.current.path=g),[]),U=Qn(b),[Oe,Pe]=(0,d.useState)(!1),Ve=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview")&&!Oe,v=Ve?"pages":P,he=(0,d.useRef)(!1);he.current=Oe&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview"),B&&(B.shown=v);let Ce=(0,d.useRef)(P==="graview"?"graview":"scene");(v==="scene"||v==="graview")&&(Ce.current=v),(0,d.useState)(()=>{if(!N||typeof window>"u"||v==="pages"||v==="picture")return;let{pathname:g,search:Z,hash:J}=window.location;Mt(g,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Z}${J}`)}),wr(b,v,t.onIntrinsicHeight),ko(v,U);let ee=xr(t.onError,v),Le=Fr(t.onReady,v),Re=(0,d.useRef)(t.onFaceDrawn);Re.current=t.onFaceDrawn;let Ze=(0,d.useCallback)((g,Z)=>{Le(Z),Re.current?.(g)},[Le]),[$e,St]=(0,d.useState)(null),Xe=E.places(),Ie=(0,d.useRef)({shown:v,onFace:t.onFace});Ie.current={shown:v,onFace:t.onFace};let W=(0,d.useCallback)((g,Z,J)=>{if(N){q.current?.(g,Z,J);return}Ie.current.onFace?.(g),X.current?.(g==="pages"?Z??M.current.path:Te,"push")},[N]),[ye,K]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v==="pages"&&K(void 0)},[v]);let _e=(0,d.useRef)(o);(0,d.useEffect)(()=>{_e.current!==o&&(_e.current=o,K(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){if(Pe(!0),K(g),P==="scene"||P==="graview"){Br(P,()=>{N?window.history.pushState(null,"",`${z(Te)}${g??""}`):X.current?.(Te,"push")});return}Br(Ce.current,()=>W(Ce.current,void 0,g))}},[N,P,t.basePath,W]),Me=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){G.go.current||(M.current.path=g),oe(g);return}if(M.current.path=g,D(g),he.current){Pe(!1),N?window.history.pushState(null,"",z(g)):X.current?.(g,"push");return}W("pages",g)},[G,oe,D,W,N,t.basePath]),Ke=E.arrangement?.(),le=v==="pages",ke=t.hrefOf,We=ke??(N?z:void 0),Q=(0,d.useMemo)(()=>({open:Me,...ke?{href:ke}:N?{href:g=>Lt(g,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[Me,N,t.basePath,ke]);return(0,w.jsxs)("section",{ref:b,className:h,"aria-label":t.label??r.name,"data-graview-embed":v,"data-graview-scheme":F,...Ve?{"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,w.jsx)("style",{children:k}),(0,w.jsxs)(Yn.Provider,{value:ee,children:[(0,w.jsx)(br,{rootRef:b,board:$,onReport:t.onReport,where:()=>v==="pages"?Sr(me):v==="picture"?{place:"picture"}:Xn(Y.view?.focusId)}),(0,w.jsx)(yr,{rootRef:b,firstLook:t.firstLook,app:rr(T??{name:r.name},r.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:ee,content:!0,children:(0,w.jsx)(jn.Provider,{value:de,children:(0,w.jsx)($n,{store:I,views:E,initialView:pe,scheme:F,...Ar(t,S,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,w.jsxs)(er.Provider,{value:se,children:[(0,w.jsx)(Bo,{face:v,stop:ye??o,kinds:R,places:Xe,opens:L}),(0,w.jsx)(Co,{into:Y}),(0,w.jsx)(Lo,{rootRef:b,face:P,shown:v,path:me,stop:o,draft:re.n,onDrawn:t.onDrawn,parts:de}),N?(0,w.jsx)(dr,{pagesWere:Se?.path,basePath:t.basePath,shown:v,onFace:t.onFace,toggle:q,kinds:R,places:Xe,opens:L,landed:Ae}):null,i&&v!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:ee,children:(0,w.jsx)(Pr,{name:T?.name??r.name,heading:c,named:zt(i).name!==!1,faces:zt(i).faces===!1?void 0:{scene:{label:On(Ke),current:!le,go:()=>Ee(),reach:()=>void He(Ce.current)},pages:{label:Cn(Ke),current:le,go:()=>Me(M.current.path),reach:()=>void He("pages")}},at:le?me:null,without:t.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>Me("/"),current:le&&me.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:g=>Me(g.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,keeping:le?void 0:(0,w.jsx)(Ho,{app:r,studio:t.studio,report:ee}),onFind:St})}):null,(0,w.jsx)(nr.Provider,{value:$e,children:(0,w.jsx)(Ye,{module:v==="pages"||v==="picture"?"@graview/pages":"@graview/react",report:ee,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(xo,{auto:x,scene:v!=="pages"&&v!=="picture"}),children:[v==="picture"?(0,w.jsx)(Po,{scope:h,store:I,views:E,as:(o?lt(o).within?.view:void 0)??""}):v==="pages"?(0,w.jsx)(Ao,{store:I,views:E,presence:S,auto:x,brand:T,steering:G,overview:Ee,scope:h,titleLevel:kr(c),quickAsk:It(t.quickAsk),props:{...t,onNavigate:Fe,...N?{}:{path:M.current.path}}}):(0,w.jsx)(Wn.Provider,{value:Q,children:(0,w.jsx)(bo,{address:N,auto:x,scheme:F,scope:h,quickAsk:It(t.quickAsk)})}),(0,w.jsx)(To,{asked:P,shown:v,onDrawn:Ze})]})},v)})]})})})})]})]})}var Jt=t=>t.split(/[?#]/)[0]===Te,Gr=(0,d.createContext)(null);function Co({into:t}){return t.view=ut().view,null}function Lo({rootRef:t,face:r,shown:o,path:i,stop:l,draft:p,onDrawn:c,parts:b}){let{view:h}=ut(),k=o==="scene"||o==="graview",F=dt(h),{pan:I,...S}=h,T=h.pan?dt(S):F,x={face:r,path:k?Te:o==="picture"?l??"#":i,stop:F};return Mr(t,`${o} ${k?T:x.path} ${p}`,x,c,b),null}var yt,Mo=Be(()=>(__graviewPreload(import.meta.url,["./chunk.6LXIEM6B.js","./chunk.U3HERHAI.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IWYMKGZZ.js"))),Zt=()=>Mo().then(t=>void(yt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Zt));function Bo({face:t,stop:r,kinds:o,places:i,opens:l}){let{view:p,go:c}=ut(),b=(0,d.useRef)({face:t,stop:r});return(0,d.useLayoutEffect)(()=>{let h=b.current.stop!==r,k=b.current.face!==t,F=b.current.face==="pages";if(b.current={face:t,stop:r},!h&&!k||t==="pages"||t==="picture")return;let I=(h||F)&&r!==void 0?qr(t,r,o,i):F&&ur(p)?Wt(t,Dt(l),o):t==="graview"?Nt(p,!0):p.overview?Hn(Nt(p,!1),or(p,o)):p;c(I)},[t,r,o,p,c,l]),null}function Ho({app:t,studio:r,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(So,{})}),r!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(No,{app:t,studio:r})}):null]})}function No({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}:{}},i=r?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Fo,{...o})})}function Vo({path:t,stop:r,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Xt(t,r){let o=r.store??r.remote?.store??hr(r.app,r.seed),i=r.notices??$t(),l=null,p={},c=0,b=r.label,h=r.app,k=Promise.resolve(),F=r.at?.face??r.face,I=F===void 0?void 0:_t({...r,face:F}),S=I??Qt(r.stop),T=null,x=[],O=u=>{if(T=u,u!==S)return;let V=x;x=[];for(let $ of V)$()};function re(){let[u,V]=(0,d.useState)(I),[$,z]=(0,d.useState)(r.stop),[ae,ie]=(0,d.useState)(r.path),[ve,H]=(0,d.useState)(r.scheme??"auto"),[be,P]=(0,d.useState)(r.principal),[R,N]=(0,d.useState)(r.seats),[Se,L]=(0,d.useState)(r.quickAsk),[pe,_]=(0,d.useState)(r.people),[M,j]=(0,d.useState)(r.hostContext),[X,Fe]=(0,d.useState)(r.brand),[me,D]=(0,d.useState)(r.whileAway),[G,oe]=(0,d.useState)(r.label),[B,Ne]=(0,d.useState)(r.hostActions),[Y,se]=(0,d.useState)(r.barActions),[q,Ae]=(0,d.useState)(()=>Rr(r)),[U,Oe]=(0,d.useState)(void 0),[Pe,Ve]=(0,d.useState)(r.draftView);return l={app:v=>{Oe(v),ie(void 0),z(void 0)},face:V,stop:z,path:ie,scheme:H,seat:P,seats:N,quickAsk:L,people:_,hostContext:j,brand:Fe,whileAway:D,label:oe,hostActions:Ne,barActions:se,hostBar:v=>Ae(he=>({...he,...v})),draft:Ve},(0,w.jsx)(Gr.Provider,{value:p,children:(0,w.jsx)(zr,{...U?Vo(r,U):r,store:o,notices:i,...u!==void 0?{face:u}:{},onOpening:v=>{S=v},...$!==void 0?{stop:$}:{},...ae!==void 0?{path:ae}:{},...be?{principal:be}:{},...R?{seats:R}:{},...Se!==void 0?{quickAsk:Se}:{},...pe?{people:pe}:{},...M?{hostContext:M}:{},...X?{brand:X}:{},whileAway:me,label:G,hostActions:B,barActions:Y,...Er(q),draftView:Pe,scheme:ve,onFace:v=>{S=v,V(v)},onSeat:P,onFaceDrawn:O},U?.n??0)})}let E=()=>{let u=p.view?.focusId,V=u?o.graph.getNode(u)?.kind:void 0,$=(p.shown??S)==="scene"||(p.shown??S)==="graview";return{face:S,path:$?Te:p.pages?.()??r.path??"/",stop:p.view?dt(p.view):r.stop??"#",...V?{kind:V}:{}}},de=(0,Nr.createRoot)(t);return(0,C.flushSync)(()=>de.render((0,w.jsx)(re,{}))),{get store(){return o},where:E,setApp:(u,V,$)=>{let z="graph"in V?{store:V}:V,ae=()=>{let ie=E();o=z.store,b=$?.label??(b===h.name?u.name:b),h=u,(0,C.flushSync)(()=>{l?.label(b),l?.app({app:u,remote:z,at:ie,n:++c})})};yt?ae():k=k.then(Zt).then(ae)},setFace:u=>{S=u,(0,C.flushSync)(()=>l?.face(u))},setStop:u=>(0,C.flushSync)(()=>l?.stop(u)),setPath:u=>(0,C.flushSync)(()=>{if(Jt(u)){(S==="pages"||S==="picture")&&(S="scene",l?.face("scene"));return}l?.path(u),S!=="pages"&&(S="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=>{b=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})),setSchemeChoice:u=>(0,C.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,C.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>k.then(()=>T===S?void 0:new Promise(u=>x.push(u))),notify:u=>{let V;return(0,C.flushSync)(()=>{V=i.notify(u)}),V},unmount:()=>de.unmount()}}var gt=t=>`s${(t+1).toString(36)}`;var we={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",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function wt(t,r={}){try{let o=new URL(t),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Ur="/graview/friction";var Kr="/graview/live",en="graview.ship",tn=`${en}.${it}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},xe=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 Io(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(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},_o={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},fe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},Wo=new Set([502,503,504]);async function Do(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function jo(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var qo=1,zo=()=>({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 vt(t){return(await Jr(t,Io(t.carry),"This app was updated while your changes were on the way.",zo())).remote}async function Jr(t,r,o,i){let{key:l,...p}=wt(t.url,t.headers),c={...t,...p},b=c.fetch??fetch,h={"content-type":"application/json",...c.headers??{}},k={...bt(c.principal),[we.via]:c.via??"web"};Object.assign(h,k);let F=c.live===!0,I=c.presenceEveryMs,S=c.visible??Ko,T="connecting",x=i.statuses,O=i.tally,re=[],E,de=[],u=()=>T==="online"&&E!==void 0?"held":T,V=()=>{let e=u();if(i.told!==e){i.told=e;for(let n of[...x])n(e)}},$=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&O.reconnects++,T=e,V(),e==="online"))for(let n of re.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,s=n!==E;if(E=n,ae(),!!s&&(V(),n===void 0)){for(let a of de.splice(0))a();te&&clearTimeout(te),sn()}},ae=()=>{if(i.toldHeld!==E){i.toldHeld=E;for(let e of[...i.helds])e(E??null)}},ie=async(e,n)=>{let s;try{s=await b(e,n)}catch(a){throw Q()||$("offline"),new Qe(a instanceof Error?a.message:String(a))}if(s.status===503&&await Do(s))return $("online"),s;if(Wo.has(s.status))throw Q()||$("offline"),new Qe(`The server is away (${s.status})`);return $("online"),s},ve=async(e=!1)=>{let n=`${c.url}/graview/state?opFormat=${qe.op}`,s=e?await b(n,{headers:h}):await ie(n,{headers:h});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await ve(!0);F||(T="online"),E=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ae();let be=H.enabledModules??c.enabledModules,P=c.localApp?c.localApp(c.app):c.app,R=new Fn({schema:P.schema,mutations:P.mutations??[],invariants:P.invariants??[],...P.policy?{policy:P.policy}:{},...P.publishing?{publishing:P.publishing}:{},...P.tidying?{tidying:P.tidying}:{},...P.modules?{modules:P.modules}:{},...be?{enabledModules:be}:{},...P.intelligence?{intelligence:P.intelligence}:{},...P.brand?.timeZone?{timeZone:P.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:jo(),...c.storeOptions??{}});Pn.served.add(R);let N=c.friction!==!1&&c.principal?.kind!=="visitor";N&&En(R,e=>{N&&b(`${c.url}${Ur}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(N=n.status!==404&&n.status!==410),()=>{})});let Se=Tn(R),L=H.log.at(-1)?.seq??(H.horizon??0)-1,pe=Ct.of(H.log,{horizon:H.horizon??0}),_=null,M,j=new Map,X=i.who,Fe=!1,me=e=>{if(ce)return;Fe=!0;let n=Ln(new Map,e,Date.now(),Bt,_?.participant);M!==void 0&&n.delete(M);let s=n.size!==j.size;if(!s)for(let[a,f]of n)Ht(f,j.get(a))||(s=!0);if(j=n,!!s)for(let a of[...X])a([...j.values()])},D=[],G=new Set,oe=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},B=new Map,Ne=(e,n)=>{let s=B.get(e);s&&(B.delete(e),s.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,se=[],q=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return se.push({ops:e,drop:n}),[];let s=Math.min(...e.filter(m=>m.seq>L).map(m=>m.seq));if(Number.isFinite(s)&&s>L+1)return se.push({ops:e,drop:n}),Ae(),[];let a=D.filter(m=>e.some(ne=>ne.batch===m)),f=[...new Set([...n,...a])].filter(m=>G.has(m)),y,A=D.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(m){if(!(m instanceof xn))throw m;return se.push({ops:e,drop:n}),Ae(),[]}for(let m of a)oe(m);e.some(m=>m.seq>L)&&A.some(m=>!f.includes(m))&&O.rebases++,e.length>0&&(L=Math.max(L,...e.map(m=>m.seq)),pe.note(e));for(let m of f)G.delete(m);for(let m of a)Ne(m,e);return y},Ae=()=>{Y||(Y=Re(ve().then(e=>{if(U(e)){se=[];return}let n=new Set(e.log.map(f=>f.batch)),s=D.filter(f=>n.has(f));for(let f of s)oe(f);let a=R.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);L=e.log.at(-1)?.seq??(e.horizon??0)-1,pe=Ct.of(e.log,{horizon:e.horizon??0}),O.resyncs++;for(let f of s)Ne(f,e.log)}).then(()=>{Y=void 0;let e=se;se=[];for(let{ops:n,drop:s}of e)q(n,s)},()=>{Y=void 0,se=[]})))},U=e=>(typeof e.build=="string"&&dn(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===H.version?!1:(Rt(e.version),!0)),Oe=async e=>{let s=await(await ie(`${c.url}/graview/since?seq=${gt(e)}&opFormat=${qe.op}`,{headers:h})).json();return U(s)?[]:s.reset===!0?(Ae(),[]):s.ops??[]},Pe=async()=>{let e=await Ve();return Y&&await Y,e},Ve=async()=>{if(_&&!Q()&&S()){let n=await(await ie(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:_,seq:gt(L)})})).json();return U(n)?[]:(typeof n.participant=="string"&&(M=n.participant),me(n.who??[]),q(n.ops??[]))}return q(await Oe(L))},v=new Map,he=new Map,Ce=new Set,ee=new Map,Le=new Set,Re=e=>(Le.add(e),e.finally(()=>Le.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),$e=0,St=(e,n)=>{let s=Ze.then(()=>Ie(e,n));return Ze=s.catch(()=>{}),s},Xe=()=>new Promise((e,n)=>re.push({again:e,give:n})),Ie=async(e,n)=>{let s,a;for(;;){try{s=await ie(`${c.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:qe.op})})}catch(m){if(!(m instanceof Qe)||K)throw m;if(await Xe(),Q())return et(e,n);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!K){if(typeof a.version=="number"?U(a):(z(a.held),!1))break;if(E!==void 0&&(xt>0||F)){if(await new Promise(m=>de.push(m)),K)throw new Ge("The client closed.");if(Q())return et(e,n);continue}}let A;if(s.status===503&&a.reason==="unavailable"&&!K)A=nn(c.backoff,$e++);else{if($e=0,s.status!==429||K)break;A=Go(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,A)),Q())return et(e,n)}if(ce||U(a))throw new Ge("The app was changed.");if(!s.ok){let A=a.error??`The server refused (${s.status})`;throw a.conflict?new fe(A,a.conflicts??[]):new Ue({reason:a.reason??_o[s.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>L+1&&(f=await Oe(L)),n!==void 0&&(a.batch&&v.set(n,a.batch),oe(n)),q(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ye=!1,K=!1,_e=0,Ee,Me=0,Ke=0,le=null,ke=()=>{},We=new Promise(e=>{ke=e}),Q=()=>F&&ye&&W?.readyState===qo,g=e=>{if(!Q())return!1;try{return W.send(JSON.stringify(e)),!0}catch{return!1}},Z=(e=!1)=>{!_||!Q()||!S()||!e&&le&&Ht(_,le)&&(I===void 0||Date.now()-Ke<I)||g({t:"here",presence:_})&&(le=_,Ke=Date.now())},J=new Set,te,sn=()=>{if(te=void 0,E!==void 0)return;let e=[...B.entries()].filter(([n])=>J.has(n));J.clear();for(let[,n]of e)g(n.message)},cn=(e,n)=>{B.has(e)&&(J.add(e),te&&clearTimeout(te),te=setTimeout(sn,Math.max(0,n)))},Zr=e=>{B.has(e)&&J.add(e)},et=(e,n)=>new Promise((s,a)=>{let f=n??`send-${++Me}`,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}:{},...xe(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}:{},...xe(e)};if(B.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:s,reject:a}),J.size>0||E!==void 0){J.add(f);return}g(y)}),tt=(e,n)=>Q()?et(e,n):St(e,n),Xr=e=>{switch(e.t){case"welcome":{if(dn(e.build),typeof e.version=="number"&&e.version!==H.version){Rt(e.version);return}if(ye=!0,_e=0,typeof e.participant=="string"&&(M=e.participant),z(e.held),e.state?Ae():q(e.ops??[]),J.clear(),te&&clearTimeout(te),te=void 0,E!==void 0)for(let n of B.keys())J.add(n);else for(let n of B.values())g(n.message);Z(!0),$("online"),ke();return}case"ops":q(e.ops??[]);return;case"ack":{let n=B.get(e.cid);if(!n){q(e.ops??[]);return}B.delete(e.cid),$e=0,n.mine!==void 0&&(v.set(n.mine,e.batch),oe(n.mine)),q(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=B.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){E!==void 0?Zr(e.cid):cn(e.cid,nn(c.backoff,$e++));return}B.delete(e.cid),n.reject(e.t==="conflict"?new fe(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":me(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==H.version&&Rt(e.version);return;case"reload":pn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&W){let n=W;hn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=i.declarations,Pt=i.builds,dn=e=>{if(!(ce||i.otherBuild!==void 0||!c.build||typeof e!="string"||e.length===0||e===c.build)){i.otherBuild=e;for(let n of[...Pt])n(e)}},ln=()=>{let e=[],n=0;for(let s of D){let a=ee.get(s);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):n++}return{carried:e,undos:n}},un=(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.`,fn=e=>{ce=!0,_=null;let n=new Ge(e);for(let a of B.values())a.reject(n);B.clear(),ot&&clearInterval(ot),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let a of re.splice(0))a.give(n);for(let a of de.splice(0))a();let s=W;W=void 0,ye=!1;try{s?.close(1e3,e)}catch{}ke()};async function Rt(e){if(ce)return;if(!c.resolveApp){pn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:s}=ln(),a=c.resolveApp,f=_;fn("The app was changed.");try{let y=await a(e),{state:A,...m}=c,ne=await Jr({...m,app:y},n,"The app was changed while your changes were on the way.",i);f&&ne.remote.presence.here(f);for(let at of[...At])at(ne.remote,e);let ue=[...s>0?[nt(un(s,"The app was changed"))]:[],...ne.unheard()];for(let at of ue)for(let so of De)so(at.sentence,at)}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 m of De)m(A,nt(A))}}function pn(e){if(ce)return;let{carried:n,undos:s}=ln();fn(e);let a=!1;if(c.carry&&n.length>0)try{c.carry.storage.setItem(c.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.`),s>0&&f.push(un(s,"This app was updated"));for(let y of f)for(let A of De)A(y,nt(y));(c.reloadPage??Uo)()}let mn=()=>{if(K||!F)return;let e=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Kr}`,{"content-type":n,...s}=h,a;try{a=c.socket?c.socket(e,s,[tn]):io(e,s)}catch{return yn()}W=a,ye=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:gt(L),protocol:it,wire:en,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(W!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}Xr(y)},a.onclose=()=>hn(a),a.onerror=()=>{}},ge,eo=()=>{Fe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Fe||K)return;let e=new Map([...j].filter(([,n])=>n.held!=="socket"));if(e.size!==j.size){j=e;for(let n of X)n([...j.values()])}},Bt),ge.unref?.()};function hn(e){if(W!==e)return;let n=ye;W=void 0,ye=!1,le=null,n&&($("offline"),eo()),yn()}let yn=()=>{if(K)return;let e=nn(c.backoff,_e);_e++,Ee=setTimeout(mn,e)},gn=R.applyAll.bind(R),to=R.undo.bind(R),no=R.previewAll.bind(R);R.previewAll=(e,n)=>no(e,{...c.principal?{author:c.principal}:{},...n});let De=i.refusals,Je=[],nt=e=>({reason:"invalid",sentence:e}),rt=i.conflicts,Et=!1,wn,kt=async(e,n)=>{if(n instanceof Ge||ce)return;let s=n instanceof Ue?n.refusal:An(n),a=s.sentence,f=n instanceof fe?wn?.yoursOf(R,ee.get(e)?.calls??[]):void 0;oe(e);try{q([],[e])}catch{}let y=ee.get(e);ee.delete(e);let A=y?.calls[0];if(A&&!(n instanceof fe)){let m=R.allMutations().find(ue=>ue.name===A.name)?.subject?.arg,ne=m&&R.graph.getNode(A.args[m])?.kind;kn(R,{type:"refused",act:A.name,code:s.reason,...ne?{kind:ne}:{}},c.principal)}if(n instanceof fe&&O.conflicts++,n instanceof fe&&!Q()&&await Pe().catch(()=>[]),n instanceof fe&&Y&&await Y,n instanceof fe&&rt.size>0){let m=!1,ne={sentence:a,conflicts:f?n.conflicts.map(ue=>ue.node===f.node&&ue.field===f.field?{...ue,yours:f.yours}:ue):n.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Et=!0;try{R.applyAll(f?[f.over(L)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Et=!1}}}};for(let ue of rt)ue(ne);return}for(let m of De)m(a,s)},ro=(e,n)=>e.flatMap(s=>s.mutation?.name===Sn?[]:s.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:L}]:[]));R.applyAll=(e,n)=>{let s=Rn(R.log.all().filter(A=>G.has(A.batch))),a=gn(e,{...c.principal?{author:c.principal}:{},...n}),f=e.map((A,m)=>{let ne=a.minted?.[m];return ne===void 0||A.args?.id!==void 0?A:{...A,mintedHint:ne}});D.push(a.batch),G.add(a.batch),ee.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...xe(n)});let y=Et?[]:[...pe.baseFor(a.ops,s,(A,m)=>R.collaborative(A,m)),...ro(a.ops,s)];return he.set(a.batch,Re(tt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...xe(n)},a.batch).catch(A=>kt(a.batch,A)))),a},R.apply=(e,n)=>R.applyAll([e],n),R.undo=(e,n)=>{let s=typeof e=="string"?[e]:e,a=to(s.map(y=>v.get(y)??y),{...c.principal?{author:c.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>he.get(y)));return he.set(a.batch,Re(f.then(()=>{let y=s.filter(A=>!Ce.has(A));if(y.length===0){oe(a.batch),ee.delete(a.batch),q([],[a.batch]);return}return tt({undo:y.map(A=>v.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...xe(n)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let oo=async(e,n={})=>{Tt++;try{return(await Re(tt({calls:e,...n}))).ops}finally{Tt--}},Tt=0,vn={here(e){_=e,Z()},onWho(e){return X.add(e),j.size>0&&e([...j.values()]),()=>{X.delete(e)}},leave(){if(!_)return;let e=JSON.stringify({participant:M??_.participant});if(_=null,g({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):b(`${c.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},xt=c.pollMs??800,ot=xt>0&&typeof setInterval=="function"?setInterval(()=>{Q()||Pe().catch(()=>{})},xt):null;if(F){mn();let e;await Promise.race([We,new Promise(n=>e=setTimeout(n,c.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(R.log.all().map(s=>s.batch));for(let s of r)if(!(s.batch!==void 0&&n.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){e.push($o(s,a))}e.length>0&&Je.push(nt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let bn=new Map,ao=()=>({store:R,author:c.principal,appliedAll:gn,pending:D,provisional:G,asked:ee,answers:he,letGo:Ce,sent:(e,n)=>Re(tt({calls:n,batch:e},e).catch(s=>kt(e,s))),settle:oe,land:q,seen:()=>L,gone:()=>K||ce});return{remote:{store:R,typing(e,n){let s=`${e}\0${n}`,a=bn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.B6JRTW3A.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.LSN2IPAI.js")).then(f=>(wn=f,f.typingOf(e,n,f.wireOf(ao())))),bn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:oo,pull:Pe,onRefusal(e){De.add(e);let n=Je;Je=[];for(let s of n)e(s.sentence,s);return()=>De.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Pt.add(e),i.otherBuild!==void 0&&e(i.otherBuild),()=>Pt.delete(e)},onConflict(e){return rt.add(e),()=>rt.delete(e)},revision:(e,n)=>pe.of(e,n),seq:()=>L,participant:()=>M,transport:()=>Q()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>E,onHeld(e){return i.helds.add(e),E!==void 0&&e(E),()=>i.helds.delete(e)},counters:()=>({...O}),who:()=>[...j.values()],pending:()=>D.length+Tt,async settled(){for(;Le.size>0;)await Promise.allSettled([...Le])},presence:vn,close(){ot&&clearInterval(ot),Se(),vn.leave(),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let n of re.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of de.splice(0))n();let e=W;W=void 0,ye=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function io(e,n){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[tn]:[];if(!a)try{return new s(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,m]of Object.entries(k))y.searchParams.set(A,m);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Go(t,r,o=Date.now()){let i,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let b=Date.parse(l);Number.isFinite(b)&&(i=Math.max(0,b-o))}let p=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,c=p!==void 0&&p<50&&i!==void 0&&Math.abs(p*1e3-i)<1e3;return p!==void 0&&!c?p:i??1e3}function Uo(){globalThis.location?.reload?.()}function Ko(){return globalThis.document?.visibilityState!=="hidden"}function nn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:i=1e4,factor:l=2}=t??{};return Math.min(i,o*l**r)*(.75+Math.random()*.5)}function bt(t){let r={};if(!t)return r;t.id&&(r[we.seat]=t.id),t.roles?.length&&(r[we.roles]=t.roles.join(",")),t.kind!=="human"&&(r[we.kind]=t.kind),t.name&&(r[we.name]=encodeURIComponent(t.name));let o=t.onBehalfOf;return o?.id&&(r[we.for]=o.id),o?.roles?.length&&(r[we.forRoles]=o.roles.join(",")),o?.name&&(r[we.forName]=encodeURIComponent(o.name)),r}var Yr="/graview/views";function rn(t){let r=t.fetch??fetch,o=wt(t.url,t.headers),i=o.url,l={"content-type":"application/json",...t.principal?bt(t.principal):{},...o.headers},p=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??st.may}:st,c=new Set,b=S=>{if(JSON.stringify(S)!==JSON.stringify(p)){p=S;for(let T of c)T()}},h=async(S,T)=>{let x=await r(`${i}${t.path??Yr}`,{method:S,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),O=await x.json();if(!x.ok)throw new Error(O.error??`The store answered ${x.status}.`);b({hidden:O.hidden??[],removed:O.removed??[],may:O.may??st.may})},k=()=>h("GET"),F=t.state?Promise.resolve():k().catch(()=>{}),I=t.pollMs?setInterval(()=>void k().catch(()=>{}),t.pollMs):void 0;return{ready:F,refresh:k,close:()=>clearInterval(I),current:()=>p,onChange(S){return c.add(S),()=>void c.delete(S)},hide:S=>h("POST",{hide:S}),show:S=>h("POST",{show:S}),remove:(S,T)=>h("POST",{remove:S,...T?{about:T}:{}}),async restore(S){let T=p.removed.find(x=>x.name===S)?.lens;await h("POST",{restore:S}),T&&await t.onDeclaration?.()},async lens(S){await h("POST",{lens:S}),await t.onDeclaration?.()}}}var an=document.getElementById("graview-app"),on=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Qr=on?(__graviewPreload(import.meta.url,["./chunk.ANS2IEEV.js","./chunk.V5I4GZEY.js","./chunk.XOZU4OFA.js","./chunk.GME63ZHI.js","./chunk.LLIURXFP.js","./chunk.PAGEGBUD.js","./chunk.WSDJPXJD.js","./chunk.F4VB6Q2W.js","./chunk.FFOD5B4B.js","./chunk.Z7Y3R3YR.js","./chunk.YXEO3Y65.js","./chunk.FBILPNGH.js","./chunk.MODLZJD4.js","./chunk.SDO3U72B.js","./chunk.6HY6ZGEE.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.2MHNPBHC.js")):He("pages");try{on?await Jo(decodeURIComponent(on[1])):await Yo()}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),an.replaceChildren(r),window.__graviewFailed=r.textContent}async function Jo(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 i=await ft(o);if(!i.ok)throw new Error(ct(i.findings));let l=i.app,p=o.principal,c=await vt({app:l,url:location.origin,principal:p,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:b}=await Qr;window.__graview=b(an,{app:l,form:t,principal:p,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Yo(){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(),i=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let k=await ft(h);if(!k.ok)throw new Error(ct(k.findings));return k.app})(r);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,p=await vt({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,b=rn({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 k=await ft(h);k.ok&&c?.setApp(k.app,p)}});await Promise.all([Qr,b.ready]),c=Xt(an,{app:i,remote:p,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:b,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=c,c.drawn().then(()=>{window.__graviewReady=!0})}
|