graview 0.1.65 → 0.1.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/preview/{chunk.3IZEZPJB.js → chunk.25QFDTCU.js} +1 -1
- package/dist/preview/{chunk.SOMRYDDH.js → chunk.264PB572.js} +1 -1
- package/dist/preview/chunk.2FHIINXG.js +2 -0
- package/dist/preview/chunk.2VUX54XH.js +1 -0
- package/dist/preview/chunk.32SHA3EY.js +1 -0
- package/dist/preview/{chunk.ZDUTEM3Z.js → chunk.35KMZHB7.js} +1 -1
- package/dist/preview/{chunk.74B6KQF4.js → chunk.37RFCHSS.js} +1 -1
- package/dist/preview/chunk.3ENPWZBG.js +1 -0
- package/dist/preview/chunk.3GNT5MKP.js +50 -0
- package/dist/preview/chunk.3NSV3WKM.js +22 -0
- package/dist/preview/chunk.3ZODN6BW.js +1 -0
- package/dist/preview/{chunk.7VQ3C7F4.js → chunk.47XEJZ3O.js} +1 -1
- package/dist/preview/{chunk.KIQXTQDU.js → chunk.4EMKCKDB.js} +1 -1
- package/dist/preview/{chunk.LKK5YF2H.js → chunk.4UUJHLHR.js} +1 -1
- package/dist/preview/{chunk.L6FGKJ5H.js → chunk.4W57E7AX.js} +1 -1
- package/dist/preview/chunk.55G4IPOO.js +1 -0
- package/dist/preview/chunk.5AKZROMR.js +1 -0
- package/dist/preview/chunk.5J6DVR7S.js +1 -0
- package/dist/preview/chunk.5R744JGZ.js +19 -0
- package/dist/preview/{chunk.64FCAUAJ.js → chunk.6KJGRM7A.js} +1 -1
- package/dist/preview/{chunk.INTJD5WG.js → chunk.6N4PE3U5.js} +1 -1
- package/dist/preview/{chunk.44ZHHPPJ.js → chunk.6NG76MDA.js} +2 -2
- package/dist/preview/chunk.6SJEZWH3.js +1 -0
- package/dist/preview/chunk.6UQFV53C.js +1 -0
- package/dist/preview/chunk.6W6XMLSF.js +1 -0
- package/dist/preview/chunk.77C556NM.js +1 -0
- package/dist/preview/{chunk.7E4CSXBT.js → chunk.7ARRVNUR.js} +1 -1
- package/dist/preview/chunk.7BJRHPE3.js +23 -0
- package/dist/preview/{chunk.TY74U3EI.js → chunk.7S6ZRMW4.js} +1 -1
- package/dist/preview/{chunk.F5VEHAP2.js → chunk.7UHPHEH5.js} +1 -1
- package/dist/preview/chunk.7WHQWLL6.js +1 -0
- package/dist/preview/{chunk.NSO6RUKW.js → chunk.A4EZAGG7.js} +1 -1
- package/dist/preview/chunk.A5PSEU3W.js +25 -0
- package/dist/preview/{chunk.2TZSLREX.js → chunk.A7GVTE5Y.js} +2 -2
- package/dist/preview/chunk.AJMVRFYX.js +5 -0
- package/dist/preview/chunk.AKJS2NUM.js +1 -0
- package/dist/preview/chunk.ARWO4WOV.js +1 -0
- package/dist/preview/chunk.B5SJMCTT.js +7 -0
- package/dist/preview/{chunk.2QQ37RCZ.js → chunk.B7KZBT27.js} +1 -1
- package/dist/preview/chunk.BDNQMKDG.js +35 -0
- package/dist/preview/chunk.BKYZSV2Y.js +2 -0
- package/dist/preview/chunk.CEQQIW7Z.js +1 -0
- package/dist/preview/chunk.CKDCTFLU.js +1 -0
- package/dist/preview/chunk.CTUJZ3IV.js +1 -0
- package/dist/preview/chunk.CY7FFKEZ.js +1 -0
- package/dist/preview/chunk.D4WJ7OM5.js +1 -0
- package/dist/preview/{chunk.AB4RZSYW.js → chunk.D7NWMXSX.js} +16 -16
- package/dist/preview/chunk.DEKRFTRN.js +4 -0
- package/dist/preview/{chunk.6YDC6IDA.js → chunk.DKEIEH2D.js} +1 -1
- package/dist/preview/{chunk.S2DOVJRL.js → chunk.DWM7AR5Y.js} +1 -1
- package/dist/preview/{chunk.FHHVW2WB.js → chunk.DZMIYEHQ.js} +1 -1
- package/dist/preview/chunk.E5PYNAYT.js +21 -0
- package/dist/preview/chunk.EBKH3ILT.js +1 -0
- package/dist/preview/chunk.EFVSZKB5.js +1 -0
- package/dist/preview/chunk.EG7OOJH5.js +1 -0
- package/dist/preview/chunk.EGPCVMDU.js +1 -0
- package/dist/preview/{chunk.C437FVD7.js → chunk.EJ2EZL2G.js} +1 -1
- package/dist/preview/{chunk.IR4OW67N.js → chunk.EP6Q32WT.js} +1 -1
- package/dist/preview/{chunk.G3Q5IMM3.js → chunk.F464JKHZ.js} +1 -1
- package/dist/preview/{chunk.IFBGYFS4.js → chunk.FLJXYESX.js} +1 -1
- package/dist/preview/chunk.FOUBDGL3.js +1 -0
- package/dist/preview/chunk.FPHRAO3R.js +1 -0
- package/dist/preview/chunk.FRQSLWP4.js +1 -0
- package/dist/preview/chunk.FVQKSN33.js +1 -0
- package/dist/preview/{chunk.CGQ6KXVK.js → chunk.G3GFDVO2.js} +1 -1
- package/dist/preview/{chunk.4O3C2LJF.js → chunk.G5GVT6JY.js} +1 -1
- package/dist/preview/chunk.GFLH7RCI.js +1 -0
- package/dist/preview/chunk.GG47EIKO.js +1 -0
- package/dist/preview/chunk.GMLONS5L.js +1 -0
- package/dist/preview/{chunk.RFVOXX3P.js → chunk.GRFD42WM.js} +1 -1
- package/dist/preview/{chunk.2PK335JQ.js → chunk.GVT4UUQA.js} +1 -1
- package/dist/preview/{chunk.5M34BJIQ.js → chunk.H3EGBDW2.js} +1 -1
- package/dist/preview/chunk.H6KIEDZN.js +1 -0
- package/dist/preview/chunk.HAOB6O72.js +1 -0
- package/dist/preview/chunk.HB5NWHFP.js +3 -0
- package/dist/preview/{chunk.GPCKOYSF.js → chunk.HJUZMOW2.js} +1 -1
- package/dist/preview/chunk.HN4ZJ4B4.js +1 -0
- package/dist/preview/chunk.HVBKI5ZO.js +1 -0
- package/dist/preview/chunk.I3SDKMQS.js +1 -0
- package/dist/preview/chunk.IAEGJDF3.js +1 -0
- package/dist/preview/{chunk.CS72MISN.js → chunk.IDALEKIW.js} +1 -1
- package/dist/preview/chunk.ILJDLBPJ.js +1 -0
- package/dist/preview/chunk.J2OPIS3H.js +111 -0
- package/dist/preview/chunk.J5OLYVZ4.js +1 -0
- package/dist/preview/{chunk.3KUYB5ZT.js → chunk.J6HF7IRQ.js} +1 -1
- package/dist/preview/chunk.JEC5FDKX.js +1 -0
- package/dist/preview/chunk.JKFVNQY7.js +1 -0
- package/dist/preview/chunk.JO2X52D4.js +1 -0
- package/dist/preview/{chunk.LVD3V77M.js → chunk.JQ2WNKDW.js} +1 -1
- package/dist/preview/{chunk.NBVPWLRY.js → chunk.JQ63N4MZ.js} +1 -1
- package/dist/preview/{chunk.7Q43N5JS.js → chunk.JU6UFWS3.js} +1 -1
- package/dist/preview/chunk.JVB5KDSG.js +1 -0
- package/dist/preview/chunk.KFT7JIEH.js +1 -0
- package/dist/preview/chunk.KGMSSXZL.js +1 -0
- package/dist/preview/chunk.KX5ZBHMA.js +2 -0
- package/dist/preview/{chunk.XTTESA7X.js → chunk.LP2ZMAT2.js} +1 -1
- package/dist/preview/{chunk.IMKD6QQG.js → chunk.LRNFE3UK.js} +1 -1
- package/dist/preview/{chunk.BUQKRXI6.js → chunk.LVOTLGJB.js} +1 -1
- package/dist/preview/chunk.LYEGRY77.js +3 -0
- package/dist/preview/{chunk.B3WVCSW5.js → chunk.M5FP4Y4Q.js} +1 -1
- package/dist/preview/{chunk.MH46V556.js → chunk.M7KXQGQL.js} +1 -1
- package/dist/preview/{chunk.LY5CY7GE.js → chunk.MAKCZ6B6.js} +1 -1
- package/dist/preview/{chunk.5THLLSS4.js → chunk.MJY4SLWA.js} +1 -1
- package/dist/preview/{chunk.J6KNEI5R.js → chunk.MSAYU25L.js} +1 -1
- package/dist/preview/chunk.MUSMNKE4.js +1 -0
- package/dist/preview/chunk.MW7R5G3C.js +1 -0
- package/dist/preview/chunk.N4ZKZ4GM.js +6 -0
- package/dist/preview/chunk.NAXOXBOF.js +1 -0
- package/dist/preview/{chunk.LGRQDILY.js → chunk.NKLPL7QD.js} +1 -1
- package/dist/preview/chunk.NKYWIGC7.js +3 -0
- package/dist/preview/{chunk.35E75QJ7.js → chunk.NRURQGXV.js} +1 -1
- package/dist/preview/chunk.NSOPYIT4.js +1 -0
- package/dist/preview/chunk.NXZL5CA2.js +1 -0
- package/dist/preview/chunk.NYLKG25K.js +4 -0
- package/dist/preview/{chunk.BU5PVRX7.js → chunk.O2OL6RQQ.js} +1 -1
- package/dist/preview/chunk.O5VFKVZS.js +1 -0
- package/dist/preview/chunk.OCXY5DCD.js +6 -0
- package/dist/preview/chunk.OHAO6KKH.js +1 -0
- package/dist/preview/{chunk.CXDGE5ZS.js → chunk.OWO3OV62.js} +1 -1
- package/dist/preview/chunk.P2EKKKK2.js +1 -0
- package/dist/preview/chunk.PSNMZBVS.js +1 -0
- package/dist/preview/{chunk.NKYYDFIX.js → chunk.PZ7KY6XH.js} +1 -1
- package/dist/preview/chunk.QAM76AXV.js +1 -0
- package/dist/preview/chunk.QDVGHI7R.js +1 -0
- package/dist/preview/{chunk.HJS3LTSR.js → chunk.QF5QB5YR.js} +1 -1
- package/dist/preview/chunk.QNP5OR3P.js +93 -0
- package/dist/preview/chunk.QRQ5WPZI.js +1 -0
- package/dist/preview/chunk.QWGWOEBZ.js +90 -0
- package/dist/preview/chunk.QXLJGHMC.js +23 -0
- package/dist/preview/{chunk.3RFAUIGT.js → chunk.QZQCQWQG.js} +1 -1
- package/dist/preview/chunk.R6JBA7UK.js +1 -0
- package/dist/preview/chunk.R7CRBRD4.js +1 -0
- package/dist/preview/chunk.RD2FSSLV.js +1 -0
- package/dist/preview/{chunk.CD6YWH6T.js → chunk.RG5G6YQD.js} +1 -1
- package/dist/preview/{chunk.T3KNLP7C.js → chunk.RJY7VJBH.js} +1 -1
- package/dist/preview/chunk.RR25BGWP.js +1 -0
- package/dist/preview/chunk.RSMCTI2N.js +1 -0
- package/dist/preview/{chunk.ZYNC73DJ.js → chunk.RSQ432QN.js} +1 -1
- package/dist/preview/chunk.SFBHPYRD.js +1 -0
- package/dist/preview/{chunk.FOSY7MZF.js → chunk.SJQPTDAT.js} +1 -1
- package/dist/preview/{chunk.TUCSUZNO.js → chunk.SNHKYH72.js} +1 -1
- package/dist/preview/chunk.SO6NT5K7.js +1 -0
- package/dist/preview/{chunk.FDWRH5P2.js → chunk.STPA7HBK.js} +3 -3
- package/dist/preview/{chunk.R2TSTDS3.js → chunk.SY5ID44D.js} +1 -1
- package/dist/preview/chunk.T27QKVKP.js +1 -0
- package/dist/preview/{chunk.FXG5AJF6.js → chunk.T2OUHRAA.js} +1 -1
- package/dist/preview/chunk.T3WCRS6M.js +1 -0
- package/dist/preview/chunk.TI5FR2QQ.js +1 -0
- package/dist/preview/{chunk.N2FNHRI2.js → chunk.TTSGCNPT.js} +1 -1
- package/dist/preview/{chunk.P6TZGR3A.js → chunk.TXZQEJ5T.js} +1 -1
- package/dist/preview/chunk.U6QXLNHF.js +15 -0
- package/dist/preview/{chunk.DICM56FT.js → chunk.UDHPMVC4.js} +1 -1
- package/dist/preview/{chunk.ZMWAZACO.js → chunk.UGQYMN4J.js} +1 -1
- package/dist/preview/chunk.UJPX3BUV.js +1 -0
- package/dist/preview/{chunk.CPYBJNHP.js → chunk.UQIPEMJ5.js} +1 -1
- package/dist/preview/{chunk.XSWR5LI4.js → chunk.URQTF5SY.js} +1 -1
- package/dist/preview/{chunk.7IGD2K4M.js → chunk.UW52CMGJ.js} +1 -1
- package/dist/preview/chunk.UWS4RMM3.js +1 -0
- package/dist/preview/{chunk.KHAVEYT7.js → chunk.V7H4BUEB.js} +1 -1
- package/dist/preview/{chunk.KHRS2SKB.js → chunk.VBHV4TLG.js} +1 -1
- package/dist/preview/chunk.VBLQJVQ5.js +1 -0
- package/dist/preview/{chunk.SPCAMQJE.js → chunk.WALVW3KJ.js} +1 -1
- package/dist/preview/{chunk.6RZHKQP3.js → chunk.WEMUKZKH.js} +1 -1
- package/dist/preview/chunk.X226YATK.js +2 -0
- package/dist/preview/{chunk.IJ3YDBWI.js → chunk.XFLGSUYO.js} +1 -1
- package/dist/preview/{chunk.ZTN7BS5O.js → chunk.XSWSBTUO.js} +1 -1
- package/dist/preview/{chunk.ZJFXM3LE.js → chunk.YCD4JSXD.js} +1 -1
- package/dist/preview/{chunk.QSDBF7VL.js → chunk.YZPESGCP.js} +1 -1
- package/dist/preview/{chunk.QO5RXOCS.js → chunk.Z27NSSYL.js} +2 -2
- package/dist/preview/chunk.Z2XUVJAL.js +1 -0
- package/dist/preview/{chunk.S3EEY7T3.js → chunk.Z3O2VZAJ.js} +1 -1
- package/dist/preview/chunk.Z4TY44CD.js +1 -0
- package/dist/preview/{chunk.O2W5JTWA.js → chunk.ZAPS4J6G.js} +1 -1
- package/dist/preview/{chunk.F2TWV4TX.js → chunk.ZAQ4IDX6.js} +1 -1
- package/dist/preview/chunk.ZEZUKRC6.js +5 -0
- package/dist/preview/{chunk.PTQPS2FJ.js → chunk.ZG5VGP5U.js} +1 -1
- 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.2P34ML3O.js +0 -111
- package/dist/preview/chunk.2UW5CRHF.js +0 -1
- package/dist/preview/chunk.2YMO7ZVX.js +0 -1
- package/dist/preview/chunk.33ULA3CG.js +0 -1
- package/dist/preview/chunk.3CJLAJXP.js +0 -25
- package/dist/preview/chunk.3IJSB5ET.js +0 -1
- package/dist/preview/chunk.3KO35VN4.js +0 -1
- package/dist/preview/chunk.3L37FY3G.js +0 -4
- package/dist/preview/chunk.3WP66LB5.js +0 -1
- package/dist/preview/chunk.4GJ7F4SP.js +0 -35
- package/dist/preview/chunk.4IJTPV5X.js +0 -1
- package/dist/preview/chunk.4JFBLVXJ.js +0 -1
- package/dist/preview/chunk.4PCVQEVI.js +0 -1
- package/dist/preview/chunk.5FQSYMAE.js +0 -1
- package/dist/preview/chunk.5NCLZ4NZ.js +0 -1
- package/dist/preview/chunk.5YNLFOBJ.js +0 -5
- package/dist/preview/chunk.77XQEDT5.js +0 -1
- package/dist/preview/chunk.7HPQI5SY.js +0 -1
- package/dist/preview/chunk.A4VA3DU5.js +0 -1
- package/dist/preview/chunk.ABSY3UZF.js +0 -1
- package/dist/preview/chunk.ARHAD5IS.js +0 -1
- package/dist/preview/chunk.BOC2EOGB.js +0 -9
- package/dist/preview/chunk.BR6TINGU.js +0 -1
- package/dist/preview/chunk.CDEAAWPS.js +0 -1
- package/dist/preview/chunk.CXJJB3MK.js +0 -1
- package/dist/preview/chunk.CXLQPE4J.js +0 -1
- package/dist/preview/chunk.DA4RSHLW.js +0 -1
- package/dist/preview/chunk.DJMSXXP4.js +0 -90
- package/dist/preview/chunk.DJPNVXBQ.js +0 -6
- package/dist/preview/chunk.DJVHKBEI.js +0 -1
- package/dist/preview/chunk.DVSTLVIH.js +0 -15
- package/dist/preview/chunk.E5WJSTOV.js +0 -1
- package/dist/preview/chunk.FEGSYSA7.js +0 -1
- package/dist/preview/chunk.HJUXC5GM.js +0 -1
- package/dist/preview/chunk.HNMSYQRA.js +0 -1
- package/dist/preview/chunk.HWLRKOI3.js +0 -1
- package/dist/preview/chunk.IHUMKFYH.js +0 -10
- package/dist/preview/chunk.IQ54QTA5.js +0 -1
- package/dist/preview/chunk.IQC3GOXO.js +0 -1
- package/dist/preview/chunk.ISN2QTVL.js +0 -2
- package/dist/preview/chunk.J24YPQ5I.js +0 -5
- package/dist/preview/chunk.J545NAMY.js +0 -1
- package/dist/preview/chunk.K2HDEL7I.js +0 -1
- package/dist/preview/chunk.K3JARAWU.js +0 -1
- package/dist/preview/chunk.KROR65KD.js +0 -2
- package/dist/preview/chunk.KV7GZBJ6.js +0 -50
- package/dist/preview/chunk.L7NJLZWV.js +0 -1
- package/dist/preview/chunk.LON75VHP.js +0 -1
- package/dist/preview/chunk.LQWVJQ5X.js +0 -18
- package/dist/preview/chunk.M5W2RHC6.js +0 -1
- package/dist/preview/chunk.M6BTLH24.js +0 -1
- package/dist/preview/chunk.MAGKI4PD.js +0 -1
- package/dist/preview/chunk.MD36ZSM5.js +0 -74
- package/dist/preview/chunk.MFZJVHWP.js +0 -1
- package/dist/preview/chunk.MHTA4HYB.js +0 -19
- package/dist/preview/chunk.N2YM247R.js +0 -1
- package/dist/preview/chunk.N35SJWAM.js +0 -1
- package/dist/preview/chunk.NJSK3UO2.js +0 -6
- package/dist/preview/chunk.OHMHPTEW.js +0 -1
- package/dist/preview/chunk.OJGHDWI6.js +0 -1
- package/dist/preview/chunk.PV2I4UPH.js +0 -1
- package/dist/preview/chunk.QFQSSZN7.js +0 -1
- package/dist/preview/chunk.RSS6OHXG.js +0 -1
- package/dist/preview/chunk.SBCAYTMT.js +0 -1
- package/dist/preview/chunk.SMTGRCMG.js +0 -3
- package/dist/preview/chunk.TCZIZ2PU.js +0 -1
- package/dist/preview/chunk.U74PTRHJ.js +0 -1
- package/dist/preview/chunk.UAORKZLO.js +0 -1
- package/dist/preview/chunk.UDVTPI2W.js +0 -1
- package/dist/preview/chunk.UETLP5KC.js +0 -1
- package/dist/preview/chunk.UHI3X2YD.js +0 -1
- package/dist/preview/chunk.UL62ELNR.js +0 -1
- package/dist/preview/chunk.VRYSZYAD.js +0 -1
- package/dist/preview/chunk.VUZFLDOX.js +0 -1
- package/dist/preview/chunk.X2NGFOAF.js +0 -1
- package/dist/preview/chunk.XE762VL2.js +0 -2
- package/dist/preview/chunk.Y2RZ5B4U.js +0 -1
- package/dist/preview/chunk.YKMBXMZE.js +0 -1
- package/dist/preview/chunk.Z34KASY7.js +0 -1
- package/dist/preview/chunk.ZMGKWMID.js +0 -1
- package/dist/preview/chunk.ZT5YQSSP.js +0 -21
- package/dist/preview/chunk.ZZM75ZTN.js +0 -4
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import{a as je,c as Ge}from"./chunk.N2FNHRI2.js";import{b as _e}from"./chunk.FDWRH5P2.js";import{a as He,b as ze,c as Ve,d as Q}from"./chunk.44ZHHPPJ.js";import"./chunk.ZDUTEM3Z.js";import{k as qe,l as Ke}from"./chunk.ZZM75ZTN.js";import"./chunk.ISN2QTVL.js";import"./chunk.ARHAD5IS.js";import"./chunk.R2TSTDS3.js";import"./chunk.QSDBF7VL.js";import{e as Pe}from"./chunk.2PK335JQ.js";import{m as Be}from"./chunk.MHTA4HYB.js";import{a as Fe,b as Ie}from"./chunk.BU5PVRX7.js";import{h as Me}from"./chunk.3KUYB5ZT.js";import{e as Re,f as Ee}from"./chunk.IMKD6QQG.js";import"./chunk.HJCQ6I3S.js";import"./chunk.ZJFXM3LE.js";import{e as de}from"./chunk.PTQPS2FJ.js";import{a as Ce}from"./chunk.IQC3GOXO.js";import"./chunk.NKYYDFIX.js";import"./chunk.IR4OW67N.js";import"./chunk.6RZHKQP3.js";import"./chunk.N35SJWAM.js";import"./chunk.L7NJLZWV.js";import"./chunk.QO5RXOCS.js";import{a as De,b as Te,j as Le}from"./chunk.CS72MISN.js";import"./chunk.G4JJXA63.js";import{a as $e}from"./chunk.TBY5IR7C.js";import"./chunk.XSWR5LI4.js";import"./chunk.BIDL7GQD.js";import"./chunk.XTTESA7X.js";import"./chunk.J6KNEI5R.js";import"./chunk.2YMO7ZVX.js";import"./chunk.MH46V556.js";import"./chunk.XOZU4OFA.js";import"./chunk.5M34BJIQ.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.UHI3X2YD.js";import"./chunk.INTJD5WG.js";import"./chunk.2QQ37RCZ.js";import"./chunk.MIE4TJRW.js";import{s as Ae}from"./chunk.CXJJB3MK.js";import"./chunk.OJGHDWI6.js";import"./chunk.74B6KQF4.js";import"./chunk.WVUJXDXZ.js";import"./chunk.S2DOVJRL.js";import{a as Ne}from"./chunk.64FCAUAJ.js";import"./chunk.DA4RSHLW.js";import{d as se,l as Se}from"./chunk.FOSY7MZF.js";import{b as xe}from"./chunk.NBVPWLRY.js";import"./chunk.S3EEY7T3.js";import"./chunk.SPCAMQJE.js";import"./chunk.TUCSUZNO.js";import"./chunk.ZMWAZACO.js";import"./chunk.CD6YWH6T.js";import{E as Oe,t as te}from"./chunk.MD36ZSM5.js";import"./chunk.L6FGKJ5H.js";import{G as st,Pa as re,Qa as ee,V as be,Y as ke,da as K,fa as oe,j as fe,l as he,m as me,qa as ye,r as X}from"./chunk.3CJLAJXP.js";import"./chunk.SDO3U72B.js";import{L as ge,T as ue,Z as $,bb as J,la as W,na as ae,pa as we,ra as ve}from"./chunk.J24YPQ5I.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Ie}from"./chunk.HJCQ6I3S.js";import{a as Se,b as Fe,c as Te,d as Ce}from"./chunk.ZJFXM3LE.js";import"./chunk.NSO6RUKW.js";import{c as Me}from"./chunk.PTQPS2FJ.js";import"./chunk.DA4RSHLW.js";import"./chunk.FOSY7MZF.js";import"./chunk.NBVPWLRY.js";import"./chunk.S3EEY7T3.js";import{G as Qe,V as Oe}from"./chunk.3CJLAJXP.js";import"./chunk.SDO3U72B.js";import"./chunk.J24YPQ5I.js";import"./chunk.FQLNBIQ5.js";import{b as Re}from"./chunk.AJZBJBMO.js";var I=Re(Qe(),1);var O=.5,fe=1,Pe=.76,Ne=3,Ze=3,Ae=.6;function et(t){let n=De(t);for(;;){let s=n.next();if(s.done)return s.value}}function*De(t){let{ribbons:n,plots:s,cell:i}=t,u=t.tilt??.5,g=t.labels??[],k=[...s.values()],p=new Map;if(k.length===0||i<=0)return p;let R=1/0,j=1/0,E=-1/0,W=-1/0;for(let o of k)R=Math.min(R,o.col),j=Math.min(j,o.row),E=Math.max(E,o.col+o.side),W=Math.max(W,o.row+o.side);R-=3,j-=3,E+=3,W+=3;let M=Math.round((E-R)/O)+1,P=Math.round((W-j)/O)+1,H=o=>R+o*O,_=o=>j+o*O,B=4,te=(o,c)=>{if(g.length===0)return!1;let l=Me(o,c,i,u);for(let f of g)if(l.x>f.x-B&&l.x<f.x+f.width+B&&l.y>f.y-B&&l.y<f.y+f.height+B)return!0;return!1},L=(o,c)=>{for(let l of k)if(o>l.col-Pe&&o<l.col+l.side+Pe&&c>l.row-Pe&&c<l.row+l.side+Pe)return!0;return!1},A=M*P,N=new Uint8Array(A),S=new Uint8Array(A),ne=new Uint8Array(A),oe=new Uint8Array(A),G=new Uint8Array(A),re=new Uint8Array(A),V=new Float32Array(A);for(let o=0;o<P;o++){let c=_(o);for(let l=0;l<M;l++){let f=H(l),m=o*M+l;if(S[m]=L(f,c)?0:1,N[m]=S[m]&&!te(f,c)?1:0,l+1<M){let a=f+O/2;oe[m]=L(a,c)?0:1,ne[m]=oe[m]&&!te(a,c)?1:0}if(o+1<P){let a=c+O/2;re[m]=L(f,a)?0:1,G[m]=re[m]&&!te(f,a)?1:0}let e=1/0;for(let a of k)e=Math.min(e,Math.max(0,a.col-f,f-(a.col+a.side),a.row-c,c-(a.row+a.side)));V[m]=e}}let J=(o,c)=>{let l=[],f=(e,a)=>{let w=[],b=Math.min(1,a/3);for(let r=Math.ceil((e+b)/O-1e-9)*O;r<=e+a-b+1e-9;r+=O)w.push(r);return w},m=(e,a,w,b)=>{let r=Math.round((e-R)/O),d=Math.round((a-j)/O);r>=0&&d>=0&&r<M&&d<P&&c[d*M+r]&&l.push({i:r,j:d,out:w,curb:b})};for(let e of f(o.row,o.side))m(o.col-fe,e,1,{col:o.col,row:e}),m(o.col+o.side+fe,e,0,{col:o.col+o.side,row:e});for(let e of f(o.col,o.side))m(e,o.row-fe,3,{col:e,row:o.row}),m(e,o.row+o.side+fe,2,{col:e,row:o.row+o.side});return l};yield;let se=new Uint8Array(A),ie=new Uint8Array(A),le=[[1,0],[-1,0],[0,1],[0,-1]],ae=[1,0,3,2],D=A*4,X=new Float64Array(D),F=[new Int32Array(D),new Int32Array(D)],U=new je,ge=(o,c,l,f,m)=>{let e=l?N:S,a=l?ne:oe,w=l?G:re,b=J(o,e),r=J(c,e),d=new Map(r.map(h=>[h.j*M+h.i,h]));if(b.length===0||r.length===0)return{reached:-1,best:1/0,starts:b,goal:d,back:f};let y=(h,x)=>{let $=H(h),K=_(x);return(Math.max(0,c.col-$,$-(c.col+c.side))+Math.max(0,c.row-K,K-(c.row+c.side)))*Ae};X.fill(1/0),f.fill(-1),U.clear();let Y=-1,v=1/0;for(let h of b){let x=(h.j*M+h.i)*4+h.out;X[x]=0,U.push(x,y(h.i,h.j))}for(;U.size>0;){let h=U.peekKey();if(h>=v||h>=m)break;let x=U.pop(),$=x>>2,K=x&3,ee=$%M,ue=($-ee)/M,Ee=d.get($);if(Ee){let q=X[x]+(K===ae[Ee.out]?0:Ne);q<v&&(v=q,Y=x);continue}for(let q=0;q<4;q++){let[pe,Be]=le[q],be=ee+pe,xe=ue+Be;if(be<0||xe<0||be>=M||xe>=P)continue;let ke=xe*M+be;if(!e[ke])continue;let Le=pe+Be>0?$:ke;if(!(pe!==0?a:w)[Le])continue;let _e=(pe!==0?se:ie)[Le]?Ae:1,Je=O*_e*(1+Math.max(0,V[ke]-Ze))+(q===K?0:Ne),ve=ke*4+q,$e=X[x]+Je;$e<X[ve]&&(X[ve]=$e,f[ve]=x,U.push(ve,$e+y(be,xe)))}}return{reached:Y,best:v,starts:b,goal:d,back:f}},Q=new Map;for(let o of n){let c=s.get(o.from),l=s.get(o.to);if(!c||!l||c===l)continue;let f=ge(c,l,!1,F[1],1/0);if(f.reached===-1){yield;continue}let m=ge(c,l,!0,F[0],1.3*f.best+2+Ae*fe+1e-9),e=m.reached!==-1&&m.best<=1.3*f.best+2?m:f;if(e.reached===-1)continue;let{reached:a,starts:w,goal:b,back:r}=e,d=[];for(let v=a;v!==-1;v=r[v]){let h=v>>2,x=d[d.length-1],$={i:h%M,j:Math.floor(h/M)};(!x||x.i!==$.i||x.j!==$.j)&&d.push($)}d.reverse();for(let v=1;v<d.length;v++){let h=d[v-1],x=d[v],$=h.i+h.j<x.i+x.j?h:x;(h.i!==x.i?se:ie)[$.j*M+$.i]=1}let y=w.find(v=>v.i===d[0].i&&v.j===d[0].j),Y=b.get(d[d.length-1].j*M+d[d.length-1].i);Q.set(o.key,{cells:d,start:y.curb,end:Y.curb}),yield}let ce=new Map(n.map(o=>[o.key,o.width])),de=new Map(n.map((o,c)=>[o.key,c])),we=i*u/Math.sqrt(1+u*u),Z=(o,c)=>o==="col"?`r${c.row.toFixed(2)}`:`c${c.col.toFixed(2)}`,T=new Map;for(let[o,c]of Q)for(let l=1;l<c.cells.length;l++){let f=c.cells[l-1],m=c.cells[l],e=Z(f.i!==m.i?"col":"row",{col:H(f.i),row:_(f.j)});T.set(e,(T.get(e)??new Set).add(o))}for(let[o,c]of Q){let l=[c.start,...c.cells.map(r=>({col:H(r.i),row:_(r.j)})),c.end],f=r=>r>=2&&r<=c.cells.length,m=[];for(let r=1;r<l.length;r++){let d=Math.abs(l[r].col-l[r-1].col)>1e-9?"col":"row",y=m[m.length-1];y&&y.axis===d?y.to=r:m.push({from:r-1,to:r,axis:d})}if(m.length===0)continue;let e=m.map(r=>{if(!Array.from({length:r.to-r.from},(h,x)=>f(r.from+1+x)).some(Boolean))return 0;let d=T.get(Z(r.axis,l[r.from]))??new Set;if(!d.has(o))return 0;let y=[...d].sort((h,x)=>(de.get(h)??0)-(de.get(x)??0)),v=-(y.reduce((h,x)=>h+(ce.get(x)??2)+2,0)-2)/2;for(let h of y){if(h===o)return(v+(ce.get(h)??2)/2)/we;v+=(ce.get(h)??2)+2}return 0}),a=r=>{let d=m[r],y=l[d.from];return d.axis==="col"?{row:y.row+e[r]}:{col:y.col+e[r]}},w=(r,d,y)=>({col:r.col??d.col??y.col,row:r.row??d.row??y.row}),b=[w(a(0),{},l[0])];for(let r=0;r+1<m.length;r++)b.push(w(a(r),a(r+1),l[m[r].to]));b.push(w(a(m.length-1),{},l[l.length-1])),p.set(o,b.map(r=>Me(r.col,r.row,i,u)))}return p}var je=class{items=[];keys=[];get size(){return this.items.length}clear(){this.items.length=0,this.keys.length=0}peekKey(){return this.keys[0]??1/0}push(n,s){this.items.push(n),this.keys.push(s);let i=this.items.length-1;for(;i>0;){let u=i-1>>1;if(this.keys[u]<=this.keys[i])break;this.swap(i,u),i=u}}pop(){let n=this.items[0],s=this.items.pop(),i=this.keys.pop();if(this.items.length>0){this.items[0]=s,this.keys[0]=i;let u=0;for(;;){let g=2*u+1,k=g+1,p=u;if(g<this.items.length&&this.keys[g]<this.keys[p]&&(p=g),k<this.items.length&&this.keys[k]<this.keys[p]&&(p=k),p===u)break;this.swap(u,p),u=p}}return n}swap(n,s){let i=this.items[n];this.items[n]=this.items[s],this.items[s]=i;let u=this.keys[n];this.keys[n]=this.keys[s],this.keys[s]=u}},tt=16,z=new Map,Ue=0;function me(t){let n=[...t.plots].map(([s,i])=>`${s}:${i.col},${i.row},${i.side}`).join(";");return`${t.ribbons.map(s=>`${s.key}>${s.from}>${s.to}>${s.width}`).join(";")}|${n}`}var nt=t=>t.map(n=>`${Math.round(n.x)},${Math.round(n.y)},${Math.round(n.width)},${Math.round(n.height)}`).join(";"),Ke=(t,n)=>`${n}|${t.cell}|${t.tilt??.5}|${nt(t.labels??[])}`;function qe(t,n,s){for(z.set(Ke(t,n),{ground:n,cell:t.cell,tilt:t.tilt??.5,runs:s});z.size>tt;)z.delete(z.keys().next().value)}function ye(t){let n=Ke(t,me(t)),s=z.get(n);if(s)return z.delete(n),z.set(n,s),s.runs}function ze(t){let n=ye(t);if(n)return n;Ue+=1;let s=et(t);return qe(t,me(t),s),s}function We(t,n,s=8){let i=ye(t);if(i)return n(i),()=>{};let u=me(t),g=De(t),k=!1,p;Ue+=1;let R=()=>{if(p=void 0,k)return;let j=performance.now();for(;;){let E=g.next();if(E.done){qe(t,u,E.value),n(E.value);return}if(performance.now()-j>=s)break}p=setTimeout(R,0)};return p=setTimeout(R,0),()=>{k=!0,p!==void 0&&clearTimeout(p)}}function Ge(t,n,s){let i;for(let g of z.values())g.ground===t&&g.tilt===s&&(i=g);if(!i||n<=0)return;if(i.cell===n)return i.runs;let u=n/i.cell;return new Map([...i.runs].map(([g,k])=>[g,k.map(p=>({x:p.x*u,y:p.y*u}))]))}function Ve(t,n){let s=t.col+t.side,i=s+.25+.22*Math.max(0,n),u=t.row+t.side*Math.max(.1,.3-.06*n),g=t.row+t.side*Math.min(.9,.7+.06*n);return[{col:s,row:u},{col:i,row:u},{col:i,row:g},{col:s,row:g}]}function Xe(t,n){return t.map(s=>Me(s.col,s.row,n.cell,n.tilt))}function Ye(t){return t.map((n,s)=>`${s===0?"M":"L"} ${n.x.toFixed(1)} ${n.y.toFixed(1)}`).join(" ")}function He(t){if(t.length===0)return{x:0,y:0};let n=0;for(let i=1;i<t.length;i++)n+=Math.hypot(t[i].x-t[i-1].x,t[i].y-t[i-1].y);let s=n/2;for(let i=1;i<t.length;i++){let u=t[i-1],g=t[i],k=Math.hypot(g.x-u.x,g.y-u.y);if(k>=s&&k>0)return{x:u.x+(g.x-u.x)*s/k,y:u.y+(g.y-u.y)*s/k};s-=k}return t[t.length-1]}var C=Re(Oe(),1),he=new Map,ot=(t,n)=>t.length===n.length&&t.every((s,i)=>Math.round(s.x)===Math.round(n[i].x)&&Math.round(s.y)===Math.round(n[i].y)&&Math.round(s.width)===Math.round(n[i].width)&&Math.round(s.height)===Math.round(n[i].height));function dt({frame:t,width:n,height:s,pan:i,store:u,graphVersion:g,selection:k,view:p,emphasis:R,hiddenKinds:j,drawn:E}){let[W,M]=(0,I.useState)(null),P=t.city,H=e=>u.graph.getNode(e)?.kind,_=(0,I.useMemo)(()=>Se(u.graph.allEdges(),e=>u.graph.getNode(e)?.kind),[u,g]),B=new Map;for(let e of t.nodes){let a=e.id.startsWith("kind:")?Te(e.id):null;a!==null&&e.plot&&Math.round(e.plane)===2&&B.set(a,e.plot)}let te=[...B].map(([e,a])=>`${e}:${a.col},${a.row},${a.side}`).join(";"),L=P?.cell??0,A=_.filter(e=>B.has(e.from)&&B.has(e.to)&&!j.has(e.from)&&!j.has(e.to)&&E(e.edge)),N=P?.tilt??.5,S=`${te}|${L}|${N}`,[ne,oe]=(0,I.useState)(null),[G,re]=(0,I.useState)(null),V=t.t>=1,J=!!P&&!!p.overview;(0,I.useLayoutEffect)(()=>{let e=G?.parentElement;if(!e||!P||!V)return;let a=e.getBoundingClientRect(),w=P.originX+i.x,b=P.originY+i.y,r=[...e.querySelectorAll('[data-graview-view^="kind:"] .graview-kind-face')].flatMap(d=>{let y=d.getBoundingClientRect();return y.width>0&&y.height>0?[{x:y.left-a.left-w,y:y.top-a.top-b,width:y.width,height:y.height}]:[]});for(he.set(S,r);he.size>16;)he.delete(he.keys().next().value);oe(d=>d?.cards===S&&ot(d.labels,r)?d:{cards:S,labels:r})},[G,V,S]);let se=Math.max(0,...A.map(e=>e.links)),ie=A.map(e=>({key:e.key,from:e.from,to:e.to,width:Ie(e.links,se)})),le=me({ribbons:ie,plots:B}),ae=typeof window>"u",D=ne?.cards===S?ne.labels:he.get(S)??(ae?[]:void 0),F=L>0&&J&&V&&D!==void 0?{ribbons:ie,plots:B,cell:L,tilt:N,labels:D}:null,[U,ge]=(0,I.useState)(0),Q=F!==null&&!ae&&ye(F)===void 0,ce=`${le}|${L}|${N}|${(D??[]).map(e=>`${Math.round(e.x)},${Math.round(e.y)},${Math.round(e.width)},${Math.round(e.height)}`).join(";")}`;(0,I.useEffect)(()=>{if(!(!Q||!F))return We(F,()=>ge(e=>e+1))},[Q,ce]);let de=(0,I.useMemo)(()=>{if(L===0||!J)return[];let e=F?ae?ze(F):ye(F):Ge(le,L,N);if(!e)return[];let a=new Map;return A.flatMap(w=>{let b;if(w.from===w.to){let r=a.get(w.from)??0;a.set(w.from,r+1),b=Xe(Ve(B.get(w.from),r),{cell:L,tilt:N})}else b=e.get(w.key);return!b||b.length<2?[]:[{ribbon:w,points:b,d:Ye(b),middle:He(b),width:Ie(w.links,se)}]})},[L,N,le,D,V,J,U]),we=(0,I.useRef)([]),Z=(0,I.useRef)({x:0,y:0});if(Z.current=P?{x:P.originX+i.x,y:P.originY+i.y}:{x:0,y:0},(0,I.useEffect)(()=>{let e=G?.parentElement;if(!e||typeof window>"u")return;let a=0,w=null,b=()=>{a=0;let y=w;if(!y)return;let Y=y.target;if(y.pointerType==="touch"||y.buttons!==0||Y?.closest("[data-graview-view], button, a, input, select, textarea, [data-graview-overlay], [data-graview-offstage]")){M(null);return}let v=e.getBoundingClientRect(),h=y.clientX-v.left-Z.current.x,x=y.clientY-v.top-Z.current.y,$=null,K=1/0;for(let ee of we.current){let ue=rt(ee.points,h,x);ue<=ee.reach&&ue<K&&(K=ue,$=ee.key)}M($)},r=y=>{w=y,a===0&&(a=requestAnimationFrame(b))},d=()=>M(null);return e.addEventListener("pointermove",r,{passive:!0}),e.addEventListener("pointerleave",d),()=>{a!==0&&cancelAnimationFrame(a),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",d)}},[G]),!P||!p.overview)return null;let T=Fe(k,p,H);if(T.records.length>0||T.lens!==null)return null;let o=T.districts.length>0?de.filter(({ribbon:e})=>T.districts.includes(e.from)||T.districts.includes(e.to)):de;if(o.length===0&&A.length===0)return null;let c=R??null,l=o.find(({ribbon:e})=>e.key===W);we.current=o.map(({ribbon:e,points:a,width:w})=>({key:e.key,points:a,reach:w/2+6}));let f={x:P.originX+i.x,y:P.originY+i.y},m=`translate(${f.x.toFixed(1)} ${f.y.toFixed(1)})`;return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("svg",{ref:re,className:"graview-ribbons","aria-hidden":"true","data-graview-world":"","data-graview-ribbons":o.length,width:n,height:s,style:{position:"absolute",left:0,top:0,pointerEvents:"none",overflow:"visible"},children:(0,C.jsx)("g",{transform:m,children:o.map(({ribbon:e,d:a,width:w})=>{let b=W===e.key||c!==null&&c===e.edge||T.districts.length>0,r=c!==null&&c!==e.edge;return(0,C.jsx)("g",{className:"graview-ribbon","data-graview-ribbon":e.edge,"data-graview-from":`kind:${e.from}`,"data-graview-to":`kind:${e.to}`,"data-graview-links":e.links,"data-graview-lit":b&&!r?"":void 0,"data-graview-receded":r?"":void 0,children:(0,C.jsx)("path",{className:"graview-ribbon-band",d:a,style:{strokeWidth:w}})},e.key)})})}),l?(0,C.jsx)("div",{className:"graview-ribbon-said","data-graview-world":"","data-testid":"ribbon-said",role:"status",style:{position:"absolute",left:f.x+l.middle.x,top:f.y+l.middle.y,pointerEvents:"none"},children:Ce(u.schema,l.ribbon)}):null]})}function rt(t,n,s){let i=1/0;for(let u=1;u<t.length;u++){let g=t[u-1],k=t[u],p=k.x-g.x,R=k.y-g.y,j=p*p+R*R,E=j===0?0:Math.max(0,Math.min(1,((n-g.x)*p+(s-g.y)*R)/j));i=Math.min(i,Math.hypot(n-(g.x+E*p),s-(g.y+E*R)))}return i}export{dt as Ribbons,rt as distanceTo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cb as g}from"./chunk.J24YPQ5I.js";function y(e){return[`based on \u201C${e.basis}\u201D`,...e.confidence!==void 0?[`${Math.round(e.confidence*100)}% sure`]:[],...e.model?[e.model]:[]].join(" \xB7 ")}var u=e=>`Not yet kept by a person. ${e.by.name??e.by.id??"Something"} made it${e.lineage?`, ${y(e.lineage)}`:""}.`,p=e=>`${e.kind}\0${e.from}\0${e.to}`;function k(e,o){let r=new Map;for(let n of e){if(n.undoes!==void 0||o.has(n.id)||n.withheld)continue;let l=g(n.author),s=l==="human"||l==="visitor",c=new Map;for(let t of n.primitives){if(t.op!=="add-edge"&&t.op!=="remove-edge")continue;let i=p(t.edge),a=r.get(i)??c.get(i);if(r.delete(i),t.op==="remove-edge")a&&c.set(i,a);else if(a&&(s||!n.lineage))r.set(i,s?{...a,provisional:!1,keptBy:n.id}:a);else{let d=n.lineage;r.set(i,{edge:t.edge,made:n.id,by:n.author,...d?{lineage:d}:{},provisional:!s&&(d?.confidence??1)<1})}}}return r}var f=new WeakMap;function v({log:e}){let o=e.all(),r=`${e.horizon}:${o.length}:${o.at(-1)?.id}`,n=f.get(e);return n?.at!==r&&f.set(e,n={at:r,links:k(o,e.undoneIds())}),n.links}var L=(e,o)=>v(e).get(p(o));var m=e=>[...v(e).values()].filter(o=>o.provisional);export{y as a,u as b,L as c,m as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk.LQWVJQ5X.js";import"./chunk.KV7GZBJ6.js";import"./chunk.5YNLFOBJ.js";import"./chunk.FHHVW2WB.js";import"./chunk.Q355UPFG.js";import{o as s}from"./chunk.HNMSYQRA.js";import"./chunk.SOMRYDDH.js";import"./chunk.44ZHHPPJ.js";import"./chunk.ZDUTEM3Z.js";import"./chunk.ARHAD5IS.js";import"./chunk.R2TSTDS3.js";import"./chunk.QSDBF7VL.js";import"./chunk.2PK335JQ.js";import"./chunk.MHTA4HYB.js";import"./chunk.BU5PVRX7.js";import"./chunk.3KUYB5ZT.js";import"./chunk.IMKD6QQG.js";import"./chunk.MB7LKKUD.js";import"./chunk.FXG5AJF6.js";import"./chunk.RFVOXX3P.js";import"./chunk.NKYYDFIX.js";import"./chunk.IR4OW67N.js";import"./chunk.6RZHKQP3.js";import"./chunk.N35SJWAM.js";import"./chunk.L7NJLZWV.js";import"./chunk.QO5RXOCS.js";import"./chunk.XTTESA7X.js";import"./chunk.BJUUSIQY.js";import"./chunk.J6KNEI5R.js";import"./chunk.2YMO7ZVX.js";import"./chunk.XOZU4OFA.js";import"./chunk.5M34BJIQ.js";import"./chunk.MIE4TJRW.js";import"./chunk.CXJJB3MK.js";import"./chunk.OJGHDWI6.js";import"./chunk.74B6KQF4.js";import"./chunk.WVUJXDXZ.js";import"./chunk.S2DOVJRL.js";import"./chunk.64FCAUAJ.js";import"./chunk.DA4RSHLW.js";import"./chunk.FOSY7MZF.js";import"./chunk.NBVPWLRY.js";import"./chunk.S3EEY7T3.js";import"./chunk.SPCAMQJE.js";import"./chunk.TUCSUZNO.js";import"./chunk.ZMWAZACO.js";import"./chunk.CD6YWH6T.js";import"./chunk.MD36ZSM5.js";import"./chunk.L6FGKJ5H.js";import{G as y,V as i}from"./chunk.3CJLAJXP.js";import"./chunk.SDO3U72B.js";import"./chunk.J24YPQ5I.js";import"./chunk.FQLNBIQ5.js";import{b as r}from"./chunk.AJZBJBMO.js";var c=r(y(),1),e=r(i(),1);function v({store:d,views:t,as:a,scope:o}){let l=(0,c.useMemo)(()=>s({scope:`.${o}`}),[o]);return(0,e.jsxs)("div",{"data-testid":"embed-picture","data-embed-content":"",tabIndex:0,"aria-label":t.places().find(m=>m.as===a)?.title??"The picture",style:{flex:"1 1 auto",minHeight:0,display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)"},children:[(0,e.jsx)("style",{children:l}),(0,e.jsx)(n,{store:d,views:t,as:a})]})}export{v as PictureFace};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as et}from"./chunk.SDO3U72B.js";import{Bd as go,Hd as mo,Kd as ho,N as lo,Na as uo,Qc as Lt,Ra as It,Ta as co,_d as wo,db as po,ie as So,je as vo,pe as bo,sd as fo,te as xo,ve as Qe,we as _t,zd as yo}from"./chunk.J24YPQ5I.js";import{a as Je,b as H}from"./chunk.AJZBJBMO.js";var Go=Je(S=>{"use strict";var Bt=Symbol.for("react.transitional.element"),gi=Symbol.for("react.portal"),mi=Symbol.for("react.fragment"),hi=Symbol.for("react.strict_mode"),wi=Symbol.for("react.profiler"),Si=Symbol.for("react.consumer"),vi=Symbol.for("react.context"),bi=Symbol.for("react.forward_ref"),xi=Symbol.for("react.suspense"),Pi=Symbol.for("react.memo"),_o=Symbol.for("react.lazy"),Ei=Symbol.for("react.activity"),Oo=Symbol.iterator;function Ai(e){return e===null||typeof e!="object"?null:(e=Oo&&e[Oo]||e["@@iterator"],typeof e=="function"?e:null)}var Ho={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Do=Object.assign,No={};function xe(e,t,n){this.props=e,this.context=t,this.refs=No,this.updater=n||Ho}xe.prototype.isReactComponent={};xe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wo(){}Wo.prototype=xe.prototype;function Kt(e,t,n){this.props=e,this.context=t,this.refs=No,this.updater=n||Ho}var qt=Kt.prototype=new Wo;qt.constructor=Kt;Do(qt,xe.prototype);qt.isPureReactComponent=!0;var Vo=Array.isArray;function Ft(){}var L={H:null,A:null,T:null,S:null},jo=Object.prototype.hasOwnProperty;function zt(e,t,n){var o=n.ref;return{$$typeof:Bt,type:e,key:t,ref:o!==void 0?o:null,props:n}}function ki(e,t){return zt(e.type,t,e.props)}function $t(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bt}function Ri(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Io=/\/+/g;function Gt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ri(""+e.key):t.toString(36)}function Ti(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ft,Ft):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function be(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Bt:case gi:a=!0;break;case _o:return a=e._init,be(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+Gt(e,0):o,Vo(r)?(n="",a!=null&&(n=a.replace(Io,"$&/")+"/"),be(r,t,n,"",function(c){return c})):r!=null&&($t(r)&&(r=ki(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Io,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(Vo(e))for(var l=0;l<e.length;l++)o=e[l],i=s+Gt(o,l),a+=be(o,t,n,i,r);else if(l=Ai(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+Gt(o,l++),a+=be(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return be(Ti(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function lt(e,t,n){if(e==null)return e;var o=[],r=0;return be(e,o,"","",function(i){return t.call(n,i,r++)}),o}function Ci(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Mi={map:lt,forEach:function(e,t,n){lt(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return lt(e,function(){t++}),t},toArray:function(e){return lt(e,function(t){return t})||[]},only:function(e){if(!$t(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};S.Activity=Ei;S.Children=Mi;S.Component=xe;S.Fragment=mi;S.Profiler=wi;S.PureComponent=Kt;S.StrictMode=hi;S.Suspense=xi;S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L;S.__COMPILER_RUNTIME={__proto__:null,c:function(e){return L.H.useMemoCache(e)}};S.cache=function(e){return function(){return e.apply(null,arguments)}};S.cacheSignal=function(){return null};S.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=Do({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!jo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return zt(e.type,r,o)};S.createContext=function(e){return e={$$typeof:vi,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Si,_context:e},e};S.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)jo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return zt(e,i,r)};S.createRef=function(){return{current:null}};S.forwardRef=function(e){return{$$typeof:bi,render:e}};S.isValidElement=$t;S.lazy=function(e){return{$$typeof:_o,_payload:{_status:-1,_result:e},_init:Ci}};S.memo=function(e,t){return{$$typeof:Pi,type:e,compare:t===void 0?null:t}};S.startTransition=function(e){var t=L.T,n={};L.T=n;try{var o=e(),r=L.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(Ft,Lo)}catch(i){Lo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),L.T=t}};S.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()};S.use=function(e){return L.H.use(e)};S.useActionState=function(e,t,n){return L.H.useActionState(e,t,n)};S.useCallback=function(e,t){return L.H.useCallback(e,t)};S.useContext=function(e){return L.H.useContext(e)};S.useDebugValue=function(){};S.useDeferredValue=function(e,t){return L.H.useDeferredValue(e,t)};S.useEffect=function(e,t){return L.H.useEffect(e,t)};S.useEffectEvent=function(e){return L.H.useEffectEvent(e)};S.useId=function(){return L.H.useId()};S.useImperativeHandle=function(e,t,n){return L.H.useImperativeHandle(e,t,n)};S.useInsertionEffect=function(e,t){return L.H.useInsertionEffect(e,t)};S.useLayoutEffect=function(e,t){return L.H.useLayoutEffect(e,t)};S.useMemo=function(e,t){return L.H.useMemo(e,t)};S.useOptimistic=function(e,t){return L.H.useOptimistic(e,t)};S.useReducer=function(e,t,n){return L.H.useReducer(e,t,n)};S.useRef=function(e){return L.H.useRef(e)};S.useState=function(e){return L.H.useState(e)};S.useSyncExternalStore=function(e,t,n){return L.H.useSyncExternalStore(e,t,n)};S.useTransition=function(){return L.H.useTransition()};S.version="19.2.8"});var W=Je((fs,Fo)=>{"use strict";Fo.exports=Go()});var Qo=Je(ct=>{"use strict";var Gi=Symbol.for("react.transitional.element"),Fi=Symbol.for("react.fragment");function Jo(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:Gi,type:e,key:o,ref:t!==void 0?t:null,props:n}}ct.Fragment=Fi;ct.jsx=Jo;ct.jsxs=Jo});var Ge=Je((Ps,er)=>{"use strict";er.exports=Qo()});var Se={focusId:null,relation:null,expanded:[],pins:{}},tt=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Y(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${nt(r.x)},${nt(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${nt(e.pan.x)},${nt(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function di(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function ot(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[f,g]of n){if(!f.startsWith("pin."))continue;let[m,b]=g.split(","),T=m===void 0?null:tt(m),y=b===void 0?null:tt(b);T===null||y===null||(o[f.slice(4)]={x:T,y})}let r=Object.create(null);for(let[f,g]of n)!f.startsWith("in.")||g.length===0||(r[f.slice(3)]=g);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:tt(a[0]),l=a[1]===void 0?null:tt(a[1]),c=(n.get("sel")??"").split(",").filter(f=>f.length>0).sort(),u=n.get("overview")==="1";return{...c.length>0?{selection:c}:{},...u?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:di(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(f=>f.length>0&&(u||!f.startsWith("kind:"))).sort(),pins:o}}function Za(e){let t=ot(e);return Y(t)==="#"?{...t,overview:!0}:t}function Xa(e){let t=Y(e);return t==="#overview=1"?"":t}function nt(e){return Math.round(e*100)/100}function Eo(e,t){return Y(e)===Y(t)}var Po="edge:";function Ao(e){if(!e.startsWith(Po))return null;let t=e.slice(Po.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function Ht(e){let{pan:t,...n}=e;return{...n,pins:{}}}function z(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Ht(e);return{...n.within?.q!==void 0?re(n,"q",null):n,focusId:t}}function ko(e,t){return{...e,relation:t}}function re(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function ce(e,t){if(t!==e.overview&&(e=Ht(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function rt(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function We(e,t){if(t!==(e.zoom===!0)&&(e=Ht(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function it(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var st="aggregate:",at="kind:";function Dt(e){return`${at}${e}`}function ve(e){return e.startsWith(at)?e.slice(at.length):null}var es="kinds:beyond";function ui(e){let t=ve(e);return t?[t]:pe(e)}function ie(...e){return`${st}${[...e].sort().join("+")}`}function Ro(e){return e.startsWith(st)}function pe(e){return!Ro(e)||e.includes("|")?[]:e.slice(st.length).split("+").filter(Boolean)}function To(e,t,n={}){let o=ve(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return it(e,t);let r=o!==null?ie(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return We(e,!1);if(o!==null&&n.carry){let i=ce({...z(e,r),relation:null},!1);return re(We(i,!0),"q",n.carry)}return We({...z(e,r),relation:null},!0)}function ci(e,t,n){return re(ce(z(e,ie(t)),!1),"view",n)}function ts(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Co="aggregate:";function Nt(e){return e.startsWith(Co)&&e.includes("|")}var Wt=e=>e?.off===!0,pi=e=>e!==void 0&&!Wt(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),Mo=e=>e!==void 0&&!Wt(e)&&(e.fast!==void 0||e.decide!==void 0),fi=e=>e?.suggestOnOpen!==!1&&Mo(e),yi=e=>e?.hoverChips===!0&&Mo(e);var jt={};var Bo=H(W(),1),Oi={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},Ko=e=>`graview:seat:${e}`;function Vi(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function Ii(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Ut(e){let t=e===null?null:Ko(e),n={...Oi,...Vi(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&Ii(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function Li(e){return(0,Bo.useSyncExternalStore)(e.subscribe,e.get,e.get)}var zo=H(W(),1),_i={entries:[],ghost:null,loaded:!1};function qo(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function Yt(e){let t=_i,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:qo(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:qo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Hi(e){return(0,zo.useSyncExternalStore)(e.subscribe,e.get,e.get)}function $o(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var Pe=H(W(),1),dt=(0,Pe.createContext)(void 0),Di=()=>(0,Pe.useContext)(dt),ut=(0,Pe.createContext)(void 0),Ni=()=>(0,Pe.useContext)(ut);var A=H(W(),1),je=(0,A.createContext)(null);function Yo(){return(0,A.useContext)(je)}function Wi(e,t){let n=Yo(),o=(0,A.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,A.useRef)(0),i=(0,A.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,A.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Zo=et(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function Zt(e){let[,t]=(0,A.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!yo();return(0,A.useEffect)(()=>{n&&Zo().then(t,()=>{})},[n]),!n}var Uo,ji=400;function Xt(e,t,n){let o=(0,A.useContext)(je),r=o!==null&&o.owns(e,t),[i,a]=(0,A.useState)(null),[s,l]=(0,A.useState)(Uo);(0,A.useEffect)(()=>{if(s||r||i===null)return;let P=!0;return Zo().then(V=>{Uo=V,P&&l(V)},()=>{}),()=>{P=!1}},[s,r,i]);let[c,u]=(0,A.useState)(0),[f,g]=(0,A.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,c]),m=f&&"waiting"in f?f.waiting:void 0,b=f&&"seq"in f?f:null,[T,y]=(0,A.useState)(void 0);(0,A.useEffect)(()=>{if(!m)return;let P=!0,V=setTimeout(()=>P&&y(m),ji);return m.then(()=>P&&u(_=>_+1)),()=>{P=!1,clearTimeout(V)}},[m]);let w=m!==void 0&&T!==m||b!==null,v=(0,A.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||w)return null;try{let P=s.pastAt(e,i,n);return{seq:i,at:P.past?.at,store:P}}catch{return null}},[r,e,i,n,s,w,c]),k=(0,A.useRef)(null),E=w?k.current:v;(0,A.useEffect)(()=>{k.current=E},[E]);let B=(0,A.useCallback)(P=>a(P===null?null:P>=e.log.length?Number.POSITIVE_INFINITY:P),[e]),D=(0,A.useCallback)((P,V)=>[e,E?.store].some(_=>_!==void 0&&(_===P||_.seenBy(V)===P)),[e,E]),j=i!==null,O=(0,A.useMemo)(()=>({past:E,open:j,show:B,live:e,host:n,owns:D,archive:b,kept:g}),[E,j,B,e,n,D,b,g]);return r?o:O}var Xo=H(W(),1),Jt=(0,Xo.createContext)(null);var tr=e=>`graview:setting:${e}`;function nr(){return localStorage}function or(e,t){try{let n=(t??nr()).getItem(tr(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function rr(e,t,n){try{(n??nr()).setItem(tr(e.name),t)}catch{}}function ir(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var R=H(W(),1);function Qt(e){return Qe(e)}var Bi=12,Ki=4;function qi(e,t,n){let o=Qt(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var pt=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-Bi);function ar(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Ki)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Dt([...o][0]):n[0]}function en(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=qi(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=ar(t.ids,n);return i({at:a,mode:"reading",trail:pt(r.trail,a)}),o}case"about-to-write":case"write":{let a=ar(t.ids,n);return i({at:a,mode:"writing",trail:pt(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:pt(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:pt(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var sr="graview:session";function dr(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(sr);if(o)return o;let r=t();return n.setItem(sr,r),r}catch{return t()}}var tn={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},nn={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},ur=[tn,nn],lr=800;function cr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:c,ttlMs:u=xo,people:f,seats:g}=e,[m,b]=(0,R.useState)(()=>new Map),[T,y]=(0,R.useState)(null),[w,v]=(0,R.useState)(null),[k,E]=(0,R.useState)(null),B=typeof r.id=="string"&&r.id.length>0,D=B&&(l[tn.name]??tn.initial)==="shared",j=D&&(l[nn.name]??nn.initial)==="shared",O=Qt({kind:r.kind,...r.id?{id:r.id}:{},session:i}),P=B?po(r,{graph:n.graph,schema:n.schema,...g?{seats:g}:{},...f?{people:f}:{}}):"",V=s?a.get(`agent:${s}:${i}`):void 0,_=(0,R.useMemo)(()=>!t||!D?null:{participant:O,kind:r.kind,name:P,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:Lt(r.id??"nobody"),stop:k??Y(o),...j?{over:T}:{},...V?{robot:{at:V.at,mode:V.mode}}:{},at:new Date().toISOString()},[t,D,j,O,P,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,k,T,V?.at,V?.mode]),ge=(0,R.useRef)(null),Te=x=>x&&t?.here({...x,caret:ge.current??void 0,at:new Date().toISOString()}),Ke=(0,R.useCallback)(x=>{ge.current=x,Te(_)},[t,_]);(0,R.useEffect)(()=>{if(!_)return;Te(_);let x=setInterval(()=>Te(_),lr);return()=>clearInterval(x)},[t,_]),(0,R.useEffect)(()=>t?t.onWho(G=>b(_t(new Map,G,Date.now(),u))):void 0,[t,u]);let qe=m.size>0;(0,R.useEffect)(()=>{if(!qe)return;let x=setInterval(()=>{b(G=>{let ne=_t(G,[],Date.now(),u);return ne.size===G.size?G:ne})},Math.max(250,Math.min(1e3,u/4)));return()=>clearInterval(x)},[qe,u]),(0,R.useEffect)(()=>{if(!t||typeof window>"u")return;let x=()=>t.leave();return window.addEventListener("pagehide",x),()=>window.removeEventListener("pagehide",x)},[t]),(0,R.useEffect)(()=>{if(!j||typeof document>"u")return;let x=null,G=ne=>{let le=$o(ne.target);le!==x&&(x=le,y(le))};return document.addEventListener("pointermove",G,{passive:!0}),()=>document.removeEventListener("pointermove",G)},[j]);let me=(0,R.useRef)(null),$=w?m.get(w)??null:null,Ce=(0,R.useCallback)(x=>{me.current=null,v(x)},[]);(0,R.useEffect)(()=>{if(w){if(!$){v(null);return}$.stop!==me.current?.stop&&(me.current={stop:$.stop,at:Date.now()},c(ot($.stop)))}},[w,$,c]),(0,R.useEffect)(()=>{let x=me.current;!w||x===null||Date.now()-x.at<400||Eo(o,ot(x.stop))||v(null)},[o,w]),(0,R.useEffect)(()=>{if(!w||typeof document>"u")return;let x=G=>{G.key==="Escape"&&v(null)};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[w]);let[J,At]=(0,R.useState)(null),Q=(0,R.useRef)(Y(o));Q.current=k??Y(o);let se=(0,R.useCallback)(x=>At(G=>(x===null&&G&&t?.alsoHere?.({...G,at:new Date().toISOString(),until:new Date().toISOString()}),x===null?null:{hue:Lt("graview"),...x,stop:Q.current,at:new Date().toISOString()})),[t]);(0,R.useEffect)(()=>{if(!J||!t?.alsoHere)return;let x=()=>t.alsoHere?.({...J,at:new Date().toISOString()});x();let G=setInterval(x,lr);return()=>clearInterval(G)},[J,t]);let Me=(0,R.useMemo)(()=>{if(!J)return m;let x=new Map(m);return x.set(J.participant,{...J,at:new Date().toISOString()}),x},[m,J]),te=_!==null,Oe=(0,R.useMemo)(()=>te?{participant:O,name:P}:null,[te,O,P]);return(0,R.useMemo)(()=>({who:Me,aiHere:se,sharing:Oe,following:$,follow:Ce,sayWhere:E,sayCaret:Ke}),[Me,se,Oe,$,Ce,Ke])}var Z=H(W(),1);function pr(e){return Qe(e.author)}function zi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function fr(e,t,n,o,r){let i=new Map;for(let[l,c]of e)o-c.at<r&&i.set(l,c);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,c,u)=>{let f=i.get(l),g=f?.participants.includes(pr(c))?f.participants:[...f?.participants??[],pr(c)];i.set(l,{at:o,manner:zi(g,c.author.kind),intent:c.intent,wrote:(f?.wrote??!1)||(u.wrote??!1),read:(f?.read??!1)||(u.read??!1),broke:(f?.broke??!1)||a.has(l),participants:g})};for(let l of t){for(let c of l.writes)s(c,l,{wrote:!0});for(let c of l.reads)l.writes.includes(c)||s(c,l,{read:!0})}for(let l of n)for(let c of l.nodeIds){let u=i.get(c);i.set(c,{at:o,manner:u?.manner??"rule",intent:u?.intent??l.message,wrote:u?.wrote??!1,read:u?.read??!1,broke:!0,participants:u?.participants??["rule::"]})}return i}var $i=2600;function yr(e,t=$i){let[n,o]=(0,Z.useState)(()=>new Map),r=(0,Z.useRef)(n);r.current=n;let i=(0,Z.useRef)(null),a=(0,Z.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,Z.useEffect)(()=>{let l=e.violations(),c=e.subscribe((u,f)=>{let g=e.violations(),m=ho(e.allInvariants(),l,g).introduces;l=g,a(fr(r.current,f,m.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{c(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,Z.useCallback)(l=>{l.reads.length!==0&&a(fr(r.current,[Ui(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Ui(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=H(W(),1);function gr(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var ft=H(W(),1),Yi=e=>e.definitions.some(t=>uo(t).size>0);function mr(e,t,n){let[o,r]=(0,ft.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,ft.useEffect)(()=>{if(!t||!Yi(e.schema)){r(void 0);return}let s=!0,l=!1,c=e.graph,u=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},f=co(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},u);return It(c,f.read),r(f),e.reread(),()=>{s=!1,It(c,void 0)}},[e,t,n.kind,n.id,i,a]),o}function hr(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var ee=H(Ge(),1),Zi="graview:place-menu",Fe=(0,d.createContext)(null),br=(0,d.createContext)("scene");function Xi({mode:e,children:t}){return(0,ee.jsx)(br.Provider,{value:e,children:t})}function Ji(){return(0,d.useContext)(br)}var xr={kind:"human"},Qi=[],ea=[],ta=[],on=[];function Pr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??xr,r=()=>mo(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var na=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},oa={off:!0};function ra({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=Qi,onSeat:l,people:c=ea,memory:u,presenceTtlMs:f,app:g,settings:m=g?.settings??ta,presence:b,typing:T,brand:y,locale:w,timeZone:v,onKeepLens:k,onProposeChange:E,composeChange:B,providers:D,ai:j,files:O,assetsAt:P,resolveApp:V,history:_,linkedRecords:ge,menuSections:Te,keptViews:Ke,onExport:qe,subscriptions:me,dismissals:$,whileAway:Ce,workflowRuns:J,signIn:At,view:Q,onViewChange:se,children:Me}){let te=(0,d.useContext)(Fe),Oe=Te??te?.menuSections,x=At??te?.signIn,G=J??te?.workflowRuns,ne=Ke??te?.keptViews,le=qe??te?.onExport,[Yr,Zr]=(0,d.useState)(null),he=Yr??i??s[0]?.principal??xr,ze=Xt(e,he,_),bn=ze.past&&ze.live===e?ze.past.store:e,kt=a??na(),Rt=!Zt(e),N=(0,d.useMemo)(()=>Rt?e:bn.seenBy(he,kt?{as:kt}:void 0),[Rt,e,bn,he,kt]);Pr(e,he);let[de]=(0,d.useState)(()=>dr(u)),[xn,Xr]=(0,d.useState)(!1),Pn=(0,d.useCallback)(()=>Xr(!0),[]),ue=(0,d.useMemo)(()=>b?[...m,...ur]:m,[m,b]),[Tt]=(0,d.useState)(()=>n??ln(t,e.schema)),[Jr,En]=(0,d.useState)(()=>rt(Tt??Se,r??Tt?.selection??[])),Ve=(0,d.useRef)(Tt??Se).current,[An,Qr]=(0,d.useState)(null),[kn,ei]=(0,d.useState)(null),K=(0,d.useContext)(Fe),[Rn]=(0,d.useState)(()=>K?.seatTalk??Ut(y?.name??e.schema.kinds.join(","))),Ct=j??K?.ai??jt,$e=(0,d.useMemo)(()=>Ct.off?oa:Ct,[Ct]),Tn=(0,d.useRef)($e.interactions);Tn.current=$e.interactions;let[Cn]=(0,d.useState)(()=>K?.aiDesk??Yt(()=>Tn.current)),[ti]=(0,d.useState)(()=>K?.subscriptions??go()),Mn=me??K?.subscriptions??ti,Mt=k??K?.onKeepLens,On=E??K?.onProposeChange,Vn=B??K?.composeChange,Ue=g??K?.app,Ye=w??K?.locale,ni=y?.locale??Ue?.brand?.locale,Ze=v??K?.timeZone;lo({reader:Ye,app:ni,readerTimeZone:Ze,appTimeZone:y?.timeZone??Ue?.brand?.timeZone});let In=(0,d.useRef)(null),Ln=(0,d.useCallback)(p=>{In.current=p},[]),_n=(0,d.useCallback)(p=>In.current?.whereIs(p)??null,[]),[Hn]=(0,d.useState)(()=>gr()),[Dn]=(0,d.useState)(()=>hr()),[Ot,oi]=(0,d.useState)(null),[Ie,Nn]=(0,d.useState)(()=>new Map),Le=(0,d.useRef)(Ie);Le.current=Ie;let _e=(0,d.useRef)(null),Vt=(0,d.useCallback)(p=>N.graph.getNode(p)?.kind,[N]),oe=(0,d.useCallback)(p=>{let h=en(Le.current,p,Vt);Le.current=h,Nn(h),_e.current&&clearTimeout(_e.current),[...h.values()].some(I=>I.mode!=="docked"&&I.mode!=="asking")&&(_e.current=setTimeout(()=>{let I=en(Le.current,{type:"rest",at:Date.now(),holdMs:sn},Vt);Le.current=I,Nn(I)},sn+20))},[Vt]),Wn=(0,d.useCallback)(p=>oe({...p,at:p.at??Date.now()}),[oe]),jn=(0,d.useCallback)(p=>{oi(p),p&&oe({type:"home",author:{kind:"agent",id:p,session:de},at:Date.now()})},[oe,de]);(0,d.useEffect)(()=>N.subscribe((p,h)=>{for(let C of h)C.author.kind==="agent"&&oe({type:"write",author:C.author,ids:C.writes,at:Date.now()})}),[N,oe]),(0,d.useEffect)(()=>()=>{_e.current&&clearTimeout(_e.current)},[]);let U=(0,d.useMemo)(()=>({...he,session:de}),[he,de]),Gn=mr(N,ge,U),Fn=(0,d.useCallback)(p=>{Zr(p),l?.(p)},[l]),[He,ri]=(0,d.useState)(()=>Object.fromEntries(ue.map(p=>[p.name,or(p,u)])));(0,d.useEffect)(()=>{for(let p of ue)ir(p,He[p.name]??p.initial)},[ue,He]);let Bn=(0,d.useCallback)((p,h)=>{let C=ue.find(I=>I.name===p);!C||!C.options.some(I=>I.value===h)||(rr(C,h,u),ri(I=>({...I,[p]:h})))},[ue,u]),[Kn,ii]=(0,d.useState)(null),{activity:qn,noteAttention:zn}=yr(N),$n=(0,d.useCallback)(p=>{zn(p),oe({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[zn,oe]),we=(0,d.useCallback)(p=>{if(ve(p)!==null||pe(p).length>0||Nt(p))return!0;let h=Ao(p);return h?N.graph.allEdges().some(C=>C.kind===h.kind&&C.from===h.from&&C.to===h.to):N.graph.getNode(p)!==void 0},[N]),Un=(0,d.useCallback)(p=>{let h=p.selection??on,C=h.filter(we),I=C.length===h.length?p:rt(p,C);return I.focusId!==null&&!we(I.focusId)&&(I=z(I,null)),I},[we]),De=(0,d.useCallback)(p=>{let h=Un(p),C=vr(N,U,h.shown);if(h.focusId!==null&&C.size>0){let I=pe(h.focusId),so=N.graph.getNode(h.focusId);(I.length>0?I.every(li=>C.has(li)):so?C.has(so.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let I=Ve.focusId!==null&&!we(Ve.focusId)?ln(t,e.schema)??{...Se,overview:!0}:Ve;I.focusId!==null&&we(I.focusId)?h={...h,focusId:I.focusId}:I.overview===!0&&(h={...h,overview:!0})}return h},[Un,we,N,Ve,U,t,e.schema]),q=De(Q??Jr),Yn=(0,d.useMemo)(()=>vr(N,U,q.shown),[N,U,q.shown]),Zn=(0,d.useMemo)(()=>[...N.modules.administered.entries()].map(([p,h])=>{let C=N.mayAdminister(p,U);return{name:p,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:C,shown:C&&(q.shown??[]).includes(p)}}),[N,U,q.shown]),Ne=(0,d.useCallback)(p=>{let h=C=>De(typeof p=="function"?p(C):p);if(Q!==void 0){se?.(h(Q));return}se&&se(h(q)),En(C=>h(C))},[q,se,Q,De]);(0,d.useEffect)(()=>{Q===void 0&&En(p=>{let h=De(p);return h===p?p:h})},[q,Q,De]);let Xn=q.selection??on,Jn=(0,d.useCallback)(p=>{Ne(h=>rt(h,typeof p=="function"?p(h.selection??on):p))},[Ne]),{who:Xe,aiHere:Qn,following:eo,follow:to,sayWhere:ai,sayCaret:no,sharing:oo}=cr({channel:b,store:N,view:q,principal:U,session:de,robots:Ie,seatWho:Ot,settingValues:He,setView:Ne,seats:s,people:c,...f!==void 0?{ttlMs:f}:{}}),si=(0,d.useMemo)(()=>({store:N,scheme:o,views:t,view:q,setView:Ne,homeView:Ve,selection:Xn,setSelection:Jn,menuAt:An,setMenuAt:Qr,whereIs:_n,pointer:Hn,motion:Dn,registerScene:Ln,robots:Ie,noteSeat:Wn,seatWho:Ot,registerSeatWho:jn,actsDoor:kn,registerActsDoor:ei,seatTalk:Rn,aiDesk:Cn,...u?{memory:u}:{},who:Xe,aiHere:Qn,following:eo,follow:to,sayWhere:ai,sharing:oo,session:de,ai:$e,resolveApp:V,linkedRecords:ge,menuSections:Oe,...ne?{keptViews:ne}:{},...le?{onExport:le}:{},subscriptions:Mn,dismissals:$,whileAway:Ce,...G?{workflowRuns:G}:{},signIn:x,linkedReads:Gn,movedByHand:xn,noteMoved:Pn,emphasis:Kn,setEmphasis:ii,activity:qn,noteAttention:$n,principal:U,seats:s,people:c,takeSeat:Fn,settings:ue,settingValues:He,chooseSetting:Bn,hiddenKinds:Yn,administered:Zn,...D?{providers:D}:{},...y?{brand:y}:{},...Mt?{onKeepLens:Mt}:{},...On?{onProposeChange:On}:{},...Vn?{composeChange:Vn}:{},app:Ue,...Ye?{locale:Ye}:{},...Ze?{timeZone:Ze}:{}}),[N,o,t,q,Ne,Xn,Jn,An,_n,Hn,Dn,Ln,Ie,Wn,Ot,jn,kn,Rn,Cn,u,Xe,Qn,eo,to,oo,de,$e,V,ge,Oe,ne,le,Mn,$,Ce,G,x,Gn,xn,Pn,Kn,qn,$n,U,s,c,Fn,ue,He,Bn,Yn,Zn,D,y,Mt,Ue,Ye,Ze]),ro=(0,d.useMemo)(()=>T?{typing:T,sayCaret:no,who:Xe}:null,[T,no,Xe]),io=P?(0,ee.jsx)(ut.Provider,{value:P,children:Me}):Me,ao=O?(0,ee.jsx)(dt.Provider,{value:O,children:io}):io;return(0,ee.jsx)(Fe.Provider,{value:si,children:(0,ee.jsx)(je.Provider,{value:ze,children:(0,ee.jsx)(da,{children:Rt?null:ro?(0,ee.jsx)(Jt.Provider,{value:ro,children:ao}):ao})})})}var Er=(0,d.createContext)(null),rn,an=new Set,ia=e=>(an.add(e),()=>void an.delete(e)),wr=()=>rn;function aa(e){if(!rn){rn=e;for(let t of[...an])t()}}var sa=300;function la(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,sa)),r===t?e(n,o):[]}}function da({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=ae(),l=yt(),c=n.q,u=n.focusId,f=!!(c&&c.trim().length>0),g=(0,d.useSyncExternalStore)(ia,wr,wr),m=(0,d.useMemo)(()=>f&&g?{flagged:new Set(t.violations().flatMap(k=>k.nodeIds)),touched:g.touchWeights(t.log.all())}:null,[t,l,f,g]),b=u?t.graph.getNode(u)?.kind??ve(u)??(pe(u).length===1?pe(u)[0]:void 0):void 0,T=(0,d.useMemo)(()=>s.near&&la(s.near),[s.near]),y=(0,d.useMemo)(()=>!c||!m||!g?null:g.search(t,c,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(k=>!i.has(k)),from:[...a,...u&&t.graph.has(u)?[u]:[]],flagged:m.flagged,touched:m.touched,limit:200,rank:T}),[t,c,r,o,i,a,u,b,m,T]),[w,v]=(0,d.useState)();return(0,d.useEffect)(()=>void y?.later?.then(k=>v([y,k])),[y]),(0,ee.jsx)(Er.Provider,{value:w?.[0]===y?w[1]:y,children:e})}var Sr=new WeakMap;function el(e){let t=Sr.get(e);return t||Sr.set(e,t=new Set(e.matched)),t}function ua(){return(0,d.useContext)(Er)}function ae(){let e=(0,d.useContext)(Fe);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function dn(){return(0,d.useContext)(Fe)??null}function yt(){let{store:e}=ae(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function ca(e){let{store:t}=ae(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function vr(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var sn=2600;var Ar=new WeakSet,pa=e=>Ar.has(e),fa=e=>void Ar.add(e);function ln(e,t){let n=bo(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...Se,focusId:ie(n.place.kind),within:{view:n.place.as}}:{...Se,focusId:ie(n.kind)}}var fe=H(W(),1);var un=H(W(),1),ya=(0,un.createContext)(null),cn=(0,un.createContext)(null);var kr=(0,fe.createContext)(null);function ga(){let e=(0,fe.useContext)(kr),t=dn(),n=(0,fe.useContext)(cn),o=(i,a,s)=>t?.setView(l=>re(re(ce(z(l,ie(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>re(ce(i,!0),"view",null));return(0,fe.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>z(ce(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===vo)return r();if(i===So)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var Rr=H(W(),1),ma=(0,Rr.createContext)(!1);var gt=Symbol.for("graview.default-view");function Tr(e){return Object.defineProperty(e,gt,{value:!0,enumerable:!1}),e}function Cr(e){return typeof e=="function"&&e[gt]===!0}var mt=Symbol.for("graview.replaces-page");function Mr(e){return Object.defineProperty(e,mt,{value:!0,enumerable:!1}),e}function Or(e){return typeof e=="function"&&e[mt]===!0}var ht=Symbol.for("graview.bleeds");function Vr(e){return Object.defineProperty(e,ht,{value:!0,enumerable:!1}),e}function Ir(e){return typeof e=="function"&&e[ht]===!0}var wt=Symbol.for("graview.previews");function Lr(e,t={}){return Object.defineProperty(e,wt,{value:t,enumerable:!1}),e}function _r(e){return typeof e=="function"?e[wt]:void 0}function ha(e){return wo(e)}function wa(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var M=H(W(),1),X=H(Ge(),1),pn=new Set,St=0;function fn(e){return()=>{St+=1;let t=e();return t.then(()=>void(St-=1),()=>void(St-=1)),t}}var Sa=()=>St,bt=(0,M.createContext)(null);function va(){return{waiting:new Map,at:0}}function ba(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var xa=e=>e?.waiting.size??0;function Nr(e,t){e?.waiting.set(t,e.at)}function Wr(e){let t=(0,M.useContext)(bt);(0,M.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function Pa(e){let t={},n=!1,o=new Set,r=(0,M.lazy)(fn(()=>e().then(a=>{n=!0;let s=a.default;function l(c){return Wr(t),(0,M.createElement)(s,c)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,M.useContext)(bt);return!n&&s&&(o.add(s),Nr(s,t)),(0,M.createElement)(r,a)}return i}var jr=!1,Gr=!1,vt=new Set;function Ea(){jr=!0}function Aa(){Gr=!0;for(let e of[...vt])e();vt.clear()}var Fr=()=>Gr||!jr;function ka(e){return Fr()?(e(),()=>{}):(vt.add(e),()=>void vt.delete(e))}var Hr=!1;function yn(){for(let e of[...pn])e()}function Ra(){Hr||typeof window>"u"||(Hr=!0,window.addEventListener("online",yn))}function gn(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let g of[...a])g()},l=g=>(a.add(g),()=>void a.delete(g)),c=()=>i,u=()=>void f().catch(()=>{});function f(){if(n)return Promise.resolve(t);if(r)return r;let g=e().then(m=>(t=m,n=!0,o=!1,r=void 0,pn.delete(u),s(),m),m=>{throw r=void 0,o=!0,pn.add(u),Ra(),s(),m});return g.catch(()=>{}),r=g,g}return{load:f,prefetch:u,get current(){return t},get failed(){return o},part(g,m={}){let b=m.what??"This part",T={};function y(k){(0,M.useSyncExternalStore)(l,c,c),Wr(T);let E=(0,M.useRef)(null),B=(0,M.useRef)(null),D=(0,M.useRef)(!1);return(0,M.useEffect)(()=>{o&&r===void 0&&u()},[]),n&&typeof document<"u"&&E.current!==null&&document.activeElement===E.current&&(D.current=!0),(0,M.useLayoutEffect)(()=>{if(!(!n||!D.current)){D.current=!1;for(let j=B.current?.nextElementSibling??null;j!==null;j=j.nextElementSibling){let O=j.matches(Dr)?j:j.querySelector(Dr);if(O instanceof HTMLElement){O.focus();return}}}}),n?(0,X.jsxs)(X.Fragment,{children:[D.current?(0,X.jsx)("span",{ref:B,hidden:!0}):null,g(t,k)]}):m.quiet?null:(0,X.jsx)(Ta,{what:b,button:E,...m.as?{as:m.as}:{}})}let w=(0,M.lazy)(fn(()=>f().then(()=>({default:y}),()=>({default:y}))));function v(k){let E=(0,M.useContext)(bt),[B]=(0,M.useState)(()=>n||o);return!n&&!o&&Nr(E,T),(0,M.createElement)(B?y:w,k)}return v}}}var Dr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function Ta({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,X.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,X.jsx)("span",{role:"status",children:r})," ",(0,X.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:yn,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var Ae=H(W(),1);function Ca(){let{selection:e,setSelection:t}=ae();return(0,Ae.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function Ma(){let{store:e}=ae(),t=yt();return(0,Ae.useMemo)(()=>Oa(e),[e,t])}var Br=new WeakMap;function Oa(e){let t=Br.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Br.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function Va(){let{view:e,setView:t}=ae();return(0,Ae.useMemo)(()=>({view:e,url:Y(e),focus:n=>t(o=>z(o,n)),show:n=>t(o=>ko(o,n)),toggle:n=>t(o=>it(o,n)),go:n=>t(n)}),[e,t])}var Ee={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;Ee.at=typeof t?.graview=="number"?t.graview:0,Ee.at>Ee.depth&&(Ee.depth=Ee.at),Ee.tell()});var F=H(W(),1),hn={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},Ia={position:"fixed",inset:"auto",margin:0,zIndex:fo("popover"),boxSizing:"border-box"},xt=6,ye=8,La=e=>typeof e.showPopover=="function";function Et(e){try{return e.matches(":popover-open")}catch{return!1}}function _a(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function Pt(e,t,n={}){let o=_a(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-xt-ye,l=o.top-xt-ye,c=a.height<=s||s>=l,u=Math.max(96,Math.floor(c?s:l)),f=Math.min(a.height,u);a.height>u&&(e.style.maxHeight=i?`min(${i}, ${u}px)`:`${u}px`);let g=a.width,m=n.align==="start"?o.left:o.right-g,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&g<=b.right-b.left&&(m<b.left?m=o.left+g<=b.right?o.left:b.left:m+g>b.right&&(m=o.right-g>=b.left?o.right-g:b.right-g));let T=g>=r.width-2*ye?Math.max(0,(r.width-g)/2):Math.max(ye,Math.min(m,r.width-ye-g)),y=c?o.bottom+xt:Math.max(ye,o.top-xt-f);e.style.left=`${Math.round(T)}px`,e.style.top=`${Math.round(y)}px`}function Kr(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(La(i)&&!Et(i))try{i.showPopover(),Da()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>Pt(i,n,{align:r})))};Pt(i,n,{align:r});let l=()=>{let u=i.style.top;cancelAnimationFrame(a),a=requestAnimationFrame(()=>{Pt(i,n,{align:r});let f=Number.parseFloat(u);typeof n=="function"&&Number.isFinite(f)&&f+i.getBoundingClientRect().height<=innerHeight-ye&&(i.style.top=u)})};addEventListener("resize",s),addEventListener("scroll",s,!0);let c=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>l());return c?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),c?.disconnect(),i.isConnected&&Et(i))try{i.hidePopover()}catch{}}},[t,e,r])}var wn=new Set;function Ha(e){return wn.add(e),()=>wn.delete(e)}function Da(){for(let e of wn)if(!(!e.isConnected||!Et(e)))try{e.hidePopover(),e.showPopover()}catch{}}var ke=null,Na='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Wa(e){for(let t of e.querySelectorAll(Na))if(t.closest("[hidden]")===null&&!t.hasAttribute("data-graview-not-first")&&getComputedStyle(t).visibility!=="hidden")return t;return e}var mn=()=>{let e=document.activeElement;return e===null||e===document.body};function ja(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,c=(0,F.useRef)(null),u=(0,F.useRef)(null),f=(0,F.useCallback)(v=>{c.current=v},[]),g=(0,F.useCallback)(v=>{u.current=v},[]),m=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,b=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let T=(0,F.useCallback)(v=>{b.current.controlled||s(v),b.current.onOpenChange?.(v)},[]),y=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${m}"]`)??c.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[m]),w=(0,F.useCallback)(v=>{let k=u.current,E=typeof document>"u"?null:document.activeElement,B=E===null||E===document.body||k!==null&&k.contains(E);T(!1),!(!v||!B)&&(y(),requestAnimationFrame(()=>{mn()&&y()}))},[T,y]);return Kr(u,i&&l,n??c,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let v={name:e,close:()=>w(!1)};if(ke&&ke.close!==v.close&&ke.close(),ke=v,hn[e].focus==="into"){let O=u.current;O&&!O.contains(document.activeElement)&&Wa(O).focus({preventScroll:!0})}let k=O=>{O.key==="Escape"&&w(!0)},E=O=>{let P=O.target;if(!(P instanceof Node))return;let V=u.current;if(V?.contains(P)||c.current?.contains(P))return;let _=P instanceof Element?P.closest('[role="dialog"], [role="alertdialog"]'):null;_&&!(V&&_.contains(V))||(w(!1),hn[e].focus==="into"&&requestAnimationFrame(()=>{(mn()||V!==null&&V.contains(document.activeElement))&&y()}))},B=null,D=null,j=O=>{let P=O.target;if(!(P instanceof Element))return;let V=u.current,_=P.closest('[role="dialog"], [role="alertdialog"]');!_||V&&(V.contains(_)||_.contains(V))||(B=_,w(!1))};return document.addEventListener("keydown",k),document.addEventListener("pointerdown",E,!0),document.addEventListener("focusin",j),()=>{document.removeEventListener("keydown",k),document.removeEventListener("pointerdown",E,!0),document.removeEventListener("focusin",j);let O=B;O&&typeof MutationObserver<"u"&&(D?.disconnect(),D=new MutationObserver(()=>{O.isConnected||(D?.disconnect(),requestAnimationFrame(()=>{(mn()||document.activeElement.closest("[hidden]")!==null)&&y()}))}),D.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>D?.disconnect(),10*6e4)),ke?.close===v.close&&(ke=null)}},[i,l,e,w,y]),{open:l,setOpen:v=>v?T(!0):w(!0),toggle:()=>l?w(!0):T(!0),trigger:{ref:f,"aria-expanded":l,"aria-controls":m,"data-graview-popover-trigger":e},pane:{ref:g,id:m,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var Re=H(W(),1);var Ga=gn(et(()=>(__graviewPreload(import.meta.url,["./chunk.3CJLAJXP.js","./chunk.SDO3U72B.js","./chunk.J24YPQ5I.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZYNC73DJ.js"))));function Fa(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},Ga.load().then(c=>{r||(o=c.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function Ba(e,t){let[n,o]=(0,Re.useState)();return(0,Re.useEffect)(()=>t?Fa(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var qr=H(W(),1),Ka=(0,qr.createContext)(!1);var zr=H(W(),1),qa=(0,zr.createContext)(null);var $r=H(W(),1),Sn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',vn=e=>e instanceof HTMLElement&&(e.matches(Sn)||e.hasAttribute("tabindex")),Be=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function za(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&vn(s)&&Be(s)?s:null}var $a=e=>e.isConnected&&vn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&Be(e);function Ur(e,t){let n=t?za(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&Be(o))return o;for(let r of e.querySelectorAll(Sn))if(Be(r))return r;return vn(e)&&Be(e)?e:null}function Ua(e){(0,$r.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=y=>{let w=y.target;if(w instanceof Element){n=[];for(let v=w;v&&v!==t.parentElement;v=v.parentElement)n.push(v)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(y,w)=>void setTimeout(()=>s()&&w(),y),c=y=>void requestAnimationFrame(()=>s()&&y()),u=y=>{if(r=!1,i)return;let w=a.activeElement;if(!(!(w===null||w===a.body||w===a.documentElement)||n.length===0)){if($a(n[0])){y&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let k of n.slice(1)){if(!k.isConnected)continue;let E=Ur(k,n[0]);if(E){E.focus({preventScroll:!0}),n=[];return}}}},f=(y,w=Date.now()+2500)=>{l(100,()=>{u(y);let v=a.activeElement;(v===null||v===a.body||v===a.documentElement)&&n.length>0&&Date.now()<w&&f(y,w)})},g=()=>{r||n.length===0||(r=!0,l(60,()=>c(()=>{u(!1),f(!1)})))},m=y=>{if(!(y instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(y.key))){if(!(y instanceof KeyboardEvent)){let w=y.target instanceof Element?y.target.closest(Sn):null,v=a.activeElement,k=v===null||v===a.body||v===a.documentElement;if(w&&k&&t.contains(w)){n=[];for(let E=w;E&&E!==t.parentElement;E=E.parentElement)n.push(E);l(150,()=>c(()=>{u(!1),f(!1)}));return}}!(y instanceof KeyboardEvent)&&!(y.target instanceof Node&&n[0]?.contains(y.target))||l(150,()=>c(()=>{u(!0),f(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&g()}),T=y=>{y.relatedTarget===null&&g()};return t.addEventListener("focusin",o),t.addEventListener("focusout",T),t.addEventListener("click",m),t.addEventListener("keydown",m),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",T),t.removeEventListener("click",m),t.removeEventListener("keydown",m),b.disconnect()}},[e])}export{Se as a,Y as b,ot as c,Za as d,Xa as e,Eo as f,Po as g,Ao as h,Ht as i,z as j,ko as k,re as l,ce as m,rt as n,We as o,it as p,st as q,Dt as r,ve as s,es as t,ui as u,ie as v,Ro as w,pe as x,To as y,ci as z,ts as A,Co as B,Nt as C,pi as D,fi as E,yi as F,W as G,Ut as H,Li as I,Hi as J,$o as K,dt as L,Di as M,ut as N,Ni as O,je as P,Yo as Q,Wi as R,Zt as S,Xt as T,Jt as U,Ge as V,Zi as W,Fe as X,Xi as Y,Ji as Z,Pr as _,ra as $,aa,el as ba,ua as ca,ae as da,dn as ea,yt as fa,ca as ga,pa as ha,fa as ia,ln as ja,ya as ka,cn as la,kr as ma,ga as na,ma as oa,Tr as pa,Cr as qa,Mr as ra,Or as sa,Vr as ta,Ir as ua,Lr as va,_r as wa,ha as xa,wa as ya,fn as za,Sa as Aa,bt as Ba,va as Ca,ba as Da,xa as Ea,Pa as Fa,Ea as Ga,Aa as Ha,Fr as Ia,ka as Ja,gn as Ka,Ba as La,Ka as Ma,qa as Na,Ca as Oa,Ma as Pa,Va as Qa,Ee as Ra,Ua as Sa,Ia as Ta,Et as Ua,Kr as Va,Ha as Wa,ja as Xa};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p}from"./chunk.MHTA4HYB.js";import{a,b}from"./chunk.BU5PVRX7.js";import"./chunk.3KUYB5ZT.js";import"./chunk.IMKD6QQG.js";import"./chunk.DA4RSHLW.js";import"./chunk.FOSY7MZF.js";import"./chunk.NBVPWLRY.js";import"./chunk.S3EEY7T3.js";import"./chunk.MD36ZSM5.js";import"./chunk.L6FGKJ5H.js";import"./chunk.3CJLAJXP.js";import"./chunk.SDO3U72B.js";import"./chunk.J24YPQ5I.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{j as ARRANGE_NARROW,o as ArrangeBar,e as CHIP_FIELDS,d as MANY_AT_THE_FAR_END,c as TYPED_FROM,p as arrangementCaption,a as arrangementOf,i as chipOffers,m as directionWords,g as farCount,f as farCounts,l as inSentence,h as offeredFilters,n as preloadArrangeLists,k as sayCondition,b as withArrangement};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.7VQ3C7F4.js";import"./chunk.ISN2QTVL.js";import"./chunk.XTTESA7X.js";import"./chunk.J6KNEI5R.js";import"./chunk.2YMO7ZVX.js";import"./chunk.5M34BJIQ.js";import"./chunk.S2DOVJRL.js";import"./chunk.64FCAUAJ.js";import"./chunk.DA4RSHLW.js";import"./chunk.FOSY7MZF.js";import"./chunk.NBVPWLRY.js";import"./chunk.S3EEY7T3.js";import"./chunk.SPCAMQJE.js";import"./chunk.TUCSUZNO.js";import"./chunk.ZMWAZACO.js";import"./chunk.CD6YWH6T.js";import"./chunk.J24YPQ5I.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as actOnSeveral,a as actsForSeveral};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var V={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},Q=["all","display","position","top","right","bottom","left","inset","inset-block","inset-inline","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","width","height","min-width","min-height","max-width","max-height","inline-size","block-size","min-inline-size","min-block-size","max-inline-size","max-block-size","margin","margin-top","margin-right","margin-bottom","margin-left","margin-block","margin-inline","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end","padding","padding-top","padding-right","padding-bottom","padding-left","padding-block","padding-inline","padding-block-start","padding-block-end","padding-inline-start","padding-inline-end","box-sizing","overflow","overflow-x","overflow-y","overflow-wrap","float","clear","z-index","aspect-ratio","object-fit","object-position","vertical-align","isolation","contain","container","container-type","container-name","content-visibility","flex","flex-direction","flex-wrap","flex-flow","flex-grow","flex-shrink","flex-basis","order","grid","grid-template","grid-template-columns","grid-template-rows","grid-template-areas","grid-auto-columns","grid-auto-rows","grid-auto-flow","grid-area","grid-column","grid-row","grid-column-start","grid-column-end","grid-row-start","grid-row-end","gap","row-gap","column-gap","align-items","align-content","align-self","justify-items","justify-content","justify-self","place-items","place-content","place-self","columns","column-count","column-width","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-fill","color","background","background-color","background-image","background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode","border","border-top","border-right","border-bottom","border-left","border-block","border-inline","border-block-start","border-block-end","border-inline-start","border-inline-end","border-width","border-style","border-color","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-radius","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","border-start-start-radius","border-start-end-radius","border-end-start-radius","border-end-end-radius","border-collapse","border-spacing","outline","outline-width","outline-style","outline-color","outline-offset","box-shadow","opacity","visibility","mix-blend-mode","filter","backdrop-filter","clip-path","accent-color","caret-color","color-scheme","appearance","-webkit-appearance","mask-image","mask-size","mask-position","mask-repeat","mask-origin","mask-clip","mask-composite","mask-mode","mask-type","-webkit-mask","-webkit-mask-image","-webkit-mask-size","-webkit-mask-position","-webkit-mask-repeat","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-composite","font","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-variant-numeric","font-variant-caps","font-variant-ligatures","font-feature-settings","font-variation-settings","font-kerning","font-optical-sizing","font-size-adjust","font-synthesis","line-height","letter-spacing","word-spacing","text-align","text-align-last","text-indent","text-transform","text-decoration","text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-underline-position","text-shadow","text-overflow","text-wrap","text-wrap-mode","text-wrap-style","white-space","white-space-collapse","word-break","line-break","hyphens","tab-size","direction","unicode-bidi","writing-mode","text-orientation","text-rendering","-webkit-font-smoothing","-webkit-line-clamp","-webkit-box-orient","line-clamp","-webkit-text-fill-color","-webkit-background-clip","-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","list-style","list-style-type","list-style-position","content","quotes","counter-reset","counter-increment","counter-set","table-layout","caption-side","empty-cells","transform","transform-origin","transform-box","transform-style","translate","rotate","scale","perspective","perspective-origin","backface-visibility","transition","transition-property","transition-duration","transition-timing-function","transition-delay","transition-behavior","animation","animation-name","animation-duration","animation-timing-function","animation-delay","animation-iteration-count","animation-direction","animation-fill-mode","animation-play-state","animation-composition","will-change","animation-timeline","animation-range","animation-range-start","animation-range-end","scroll-timeline","scroll-timeline-name","scroll-timeline-axis","view-timeline","view-timeline-name","view-timeline-axis","view-timeline-inset","timeline-scope","cursor","pointer-events","user-select","-webkit-user-select","touch-action","resize","scroll-behavior","overscroll-behavior","overscroll-behavior-x","overscroll-behavior-y","scroll-snap-type","scroll-snap-align","scroll-snap-stop","scroll-margin","scroll-padding","scrollbar-width","scrollbar-color","scrollbar-gutter","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","stop-color","stop-opacity","clip-rule","marker","marker-start","marker-mid","marker-end","paint-order","vector-effect","shape-rendering","text-anchor","dominant-baseline","alignment-baseline","r","cx","cy","rx","ry","x","y","d","mask","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],ee=["var","env","calc","min","max","clamp","round","mod","rem","abs","sign","sin","cos","tan","asin","acos","atan","atan2","pow","sqrt","hypot","log","exp","rgb","rgba","hsl","hsla","hwb","lab","lch","oklab","oklch","color","color-mix","light-dark","linear-gradient","radial-gradient","conic-gradient","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","translate","translatex","translatey","translatez","translate3d","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","matrix","matrix3d","perspective","cubic-bezier","steps","linear","repeat","minmax","fit-content","blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia","opacity","circle","ellipse","inset","polygon","path","xywh","rect","counter","counters","scroll","view"],te=["fill","stroke","clip-path","mask","marker","marker-start","marker-mid","marker-end","filter"],ne=["media","supports","container","keyframes"],re={position:["static","relative","absolute","sticky"],all:[],appearance:["auto","none","menulist-button","textfield"],"-webkit-appearance":["auto","none","menulist-button","textfield"]},oe=["host","host-context","slotted","part","backdrop","picker","view-transition","view-transition-group","view-transition-image-pair","view-transition-old","view-transition-new"],ie=["-webkit-details-marker"],R=64e3;var f=e=>e>=48&&e<=57,ae=e=>f(e)||e>=65&&e<=70||e>=97&&e<=102,G=e=>e>=65&&e<=90||e>=97&&e<=122,X=e=>e>=128,T=e=>G(e)||X(e)||e===95,se=e=>T(e)||f(e)||e===45,le=e=>e===10,x=e=>e===10||e===9||e===32,ze=e=>e>=0&&e<=8||e===11||e>=14&&e<=31||e===127,y=-1;function Ne(e){let r=[];for(let n=0;n<e.length;n+=1){let t=e.codePointAt(n);t>65535&&(n+=1),t===13?(e.charCodeAt(n+1)===10&&(n+=1),t=10):t===12?t=10:(t===0||t>=55296&&t<=57343)&&(t=65533),r.push(t)}return r}function W(e){let r=Ne(e),n=0,t=(s=0)=>n+s<r.length?r[n+s]:y,i=[],o=(s,d)=>s===92&&d!==10&&d!==y,a=(s,d,g)=>s===45?T(d)||d===45||o(d,g):T(s)?!0:o(s,d),u=(s,d,g)=>s===43||s===45?f(d)||d===46&&f(g):f(s===46?d:s),c=()=>{let s=t();if(n+=1,s===y)return 65533;if(ae(s)){let d=String.fromCodePoint(s);for(;d.length<6&&ae(t());)d+=String.fromCodePoint(t()),n+=1;x(t())&&(n+=1);let g=parseInt(d,16);return g===0||g>=55296&&g<=57343||g>1114111?65533:g}return s},p=()=>{let s="";for(;;){let d=t();if(se(d))s+=String.fromCodePoint(d),n+=1;else if(o(d,t(1)))n+=1,s+=String.fromCodePoint(c());else return s}},m=()=>{let s="";for((t()===43||t()===45)&&(s+=String.fromCodePoint(r[n++]));f(t());)s+=String.fromCodePoint(r[n++]);if(t()===46&&f(t(1)))for(s+=String.fromCodePoint(r[n++],r[n++]);f(t());)s+=String.fromCodePoint(r[n++]);if((t()===69||t()===101)&&(f(t(1))||(t(1)===43||t(1)===45)&&f(t(2))))for(s+=String.fromCodePoint(r[n++]),f(t())||(s+=String.fromCodePoint(r[n++]));f(t());)s+=String.fromCodePoint(r[n++]);return s},C=()=>{let s=m();return a(t(),t(1),t(2))?{type:"dimension",repr:s,unit:p()}:t()===37?(n+=1,{type:"percentage",repr:s}):{type:"number",repr:s}},h=()=>{for(;;){let s=t();if(n+=1,s===41||s===y)return;o(s,t())&&c()}},Ae=()=>{let s="";for(;x(t());)n+=1;for(;;){let d=t();if(n+=1,d===41)return{type:"url",value:s};if(d===y)return{type:"url",value:s};if(x(d)){for(;x(t());)n+=1;return t()===41||t()===y?(t()===41&&(n+=1),{type:"url",value:s}):(h(),{type:"bad-url"})}if(d===34||d===39||d===40||ze(d))return h(),{type:"bad-url"};if(d===92){if(o(d,t()))s+=String.fromCodePoint(c());else return h(),{type:"bad-url"};continue}s+=String.fromCodePoint(d)}},j=()=>{let s=p();if(s.toLowerCase()==="url"&&t()===40){for(n+=1;x(t())&&x(t(1));)n+=1;let d=x(t())?t(1):t();return d===34||d===39?{type:"function",value:s}:Ae()}return t()===40?(n+=1,{type:"function",value:s}):{type:"ident",value:s}},Pe=s=>{let d="";for(;;){let g=t();if(n+=1,g===s||g===y)return{type:"string",value:d};if(le(g))return n-=1,{type:"bad-string"};if(g===92){if(t()===y)continue;if(le(t())){n+=1;continue}d+=String.fromCodePoint(c());continue}d+=String.fromCodePoint(g)}};for(;;){for(;t()===47&&t(1)===42;){for(n+=2;t()!==y&&!(t()===42&&t(1)===47);)n+=1;t()!==y&&(n+=2)}let s=t();if(s===y)return i;if(x(s)){for(;x(t());)n+=1;i.push({type:"whitespace"});continue}switch(n+=1,s){case 34:case 39:i.push(Pe(s));continue;case 35:if(se(t())||o(t(),t(1))){let d=a(t(),t(1),t(2));i.push({type:"hash",value:p(),id:d})}else i.push({type:"delim",value:"#"});continue;case 40:i.push({type:"("});continue;case 41:i.push({type:")"});continue;case 43:case 46:u(s,t(),t(1))?(n-=1,i.push(C())):i.push({type:"delim",value:String.fromCodePoint(s)});continue;case 44:i.push({type:","});continue;case 45:u(s,t(),t(1))?(n-=1,i.push(C())):t()===45&&t(1)===62?(n+=2,i.push({type:"CDC"})):a(s,t(),t(1))?(n-=1,i.push(j())):i.push({type:"delim",value:"-"});continue;case 58:i.push({type:":"});continue;case 59:i.push({type:";"});continue;case 60:t()===33&&t(1)===45&&t(2)===45?(n+=3,i.push({type:"CDO"})):i.push({type:"delim",value:"<"});continue;case 64:a(t(),t(1),t(2))?i.push({type:"at-keyword",value:p()}):i.push({type:"delim",value:"@"});continue;case 91:i.push({type:"["});continue;case 92:o(s,t())?(n-=1,i.push(j())):i.push({type:"delim",value:"\\"});continue;case 93:i.push({type:"]"});continue;case 123:i.push({type:"{"});continue;case 125:i.push({type:"}"});continue;default:f(s)?(n-=1,i.push(C())):T(s)?(n-=1,i.push(j())):i.push({type:"delim",value:String.fromCodePoint(s)})}}}var fe={"{":"}","[":"]","(":")"},me=32,U=class{constructor(r){this.tokens=r}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function ge(e,r){let n=e.next();return n.type==="{"||n.type==="["||n.type==="("?{type:"block",open:n.type,value:ue(e,fe[n.type],r+1)}:n.type==="function"?{type:"func",name:n.value,value:ue(e,")",r+1)}:n}function ue(e,r,n){let t=[];for(;;){let i=e.peek();if(!i)return t;if(i.type===r)return e.next(),t;if(n>me){e.next(),t.push({type:"bad-string"});continue}t.push(ge(e,n))}}function E(e,r){let n=[],t=0;for(;t<e.length;){let i=e[t];if(i.type==="whitespace"||r&&(i.type==="CDO"||i.type==="CDC")){t+=1;continue}if(i.type==="at-keyword"){let u=[];t+=1;let c;for(;t<e.length;){let p=e[t];if(t+=1,p.type===";")break;if(p.type==="block"&&p.open==="{"){c=p.value;break}u.push(p)}n.push({type:"at-rule",name:i.value,prelude:u,...c?{block:c}:{}});continue}let o=[],a;for(;t<e.length;){let u=e[t];if(t+=1,u.type==="block"&&u.open==="{"){a=u.value;break}o.push(u)}a&&n.push({type:"qualified",prelude:o,block:a})}return n}function H(e){let r=[],n=0;for(;n<e.length;){let t=e[n];if(t.type==="whitespace"||t.type===";"){n+=1;continue}if(t.type==="at-keyword"){let o=(()=>{for(let a=n+1;a<e.length;a+=1){let u=e[a];if(u.type===";"||u.type==="block"&&u.open==="{")return a+1}return e.length})();r.push(...E(e.slice(n,o),!1)),n=o;continue}if(t.type==="ident"){let o=n+1;for(;e[o]?.type==="whitespace";)o+=1;if(e[o]?.type===":"){let a=o+1;for(;a<e.length&&e[a].type!==";";)a+=1;let u=ye(t.value,e.slice(o+1,a));if(u.value.some(c=>c.type==="block"&&c.open==="{")){let c=e.findIndex((p,m)=>m>n&&p.type==="block"&&p.open==="{");r.push(...E(e.slice(n,c+1),!1)),n=c+1;continue}r.push(u),n=a+1;continue}}let i=n;for(;i<e.length&&!(e[i].type==="block"&&e[i].open==="{")&&e[i].type!==";";)i+=1;i<e.length&&e[i].type==="block"&&r.push(...E(e.slice(n,i+1),!1)),n=i+1}return r}function ye(e,r){let n=[...r];for(;n[0]?.type==="whitespace";)n.shift();for(;n.at(-1)?.type==="whitespace";)n.pop();let t=!1,o=n.length-1;if(n[o]?.type==="ident"&&n[o].value.toLowerCase()==="important"){for(o-=1;n[o]?.type==="whitespace";)o-=1;let a=n[o];if(a?.type==="delim"&&a.value==="!")for(t=!0,n.length=o;n.at(-1)?.type==="whitespace";)n.pop()}return{type:"declaration",name:e,value:n,important:t}}function q(e){let r=new U(W(e)),n=[];for(;r.peek();)n.push(ge(r,0));return n}function v(e){let r="",n=[...e].map(t=>t.codePointAt(0));return n.forEach((t,i)=>{t===0?r+="\uFFFD":t>=1&&t<=31||t===127||i===0&&f(t)||i===1&&f(t)&&n[0]===45?r+=`\\${t.toString(16)} `:i===0&&t===45&&n.length===1?r+="\\-":X(t)||t===45||t===95||f(t)||G(t)?r+=String.fromCodePoint(t):r+=`\\${String.fromCodePoint(t)}`}),r}function A(e){let r="";for(let n of e){let t=n.codePointAt(0);X(t)||t===45||t===95||f(t)||G(t)?r+=n:t>=1&&t<=31||t===127?r+=`\\${t.toString(16)} `:r+=`\\${n}`}return r}function O(e){let r='"';for(let n of e){let t=n.codePointAt(0);t===0?r+="\uFFFD":t>=1&&t<=31||t===127||t===60||t===62?r+=`\\${t.toString(16)} `:t===34||t===92?r+=`\\${n}`:r+=n}return`${r}"`}function Le(e){let r=A(e);return/^[eE]([0-9]|[+-][0-9])/.test(e)?`\\${e.codePointAt(0).toString(16)} ${A(e.slice(1))}`:r}var de=e=>{switch(e.type){case"ident":case"url":case"bad-url":case"number":case"percentage":case"dimension":case"CDC":case"hash":case"at-keyword":return e.type;case"func":case"function":return"function";case"block":return e.open==="("?"(":"other";case"(":return"(";case"delim":return`delim${e.value}`;default:return"other"}};function $e(e,r){let n=["ident","function","url","bad-url","delim-","number","percentage","dimension","CDC"];return e==="ident"?[...n,"("].includes(r):e==="at-keyword"||e==="hash"||e==="dimension"||e==="delim#"||e==="delim-"?n.includes(r):e==="number"?["ident","function","url","bad-url","number","percentage","dimension","delim%"].includes(r):e==="delim@"?["ident","function","url","bad-url","delim-","CDC"].includes(r):e==="delim."||e==="delim+"?["number","percentage","dimension"].includes(r):e==="delim/"?r==="delim*":!1}function De(e){switch(e.type){case"whitespace":return" ";case"ident":return v(e.value);case"at-keyword":return`@${v(e.value)}`;case"hash":return`#${A(e.value)}`;case"string":return O(e.value);case"url":return`url(${O(e.value)})`;case"delim":return e.value==="\\"?`\\
|
|
2
|
-
`:e.value;case"CDO":return"<!--";case"CDC":return"-->";case"number":return e.repr;case"percentage":return`${e.repr}%`;case"dimension":return`${e.repr}${Le(e.unit)}`;case"func":return`${v(e.name)}(${S(e.value)})`;case"block":return`${e.open}${S(e.value)}${fe[e.open]}`;case":":case";":case",":case"[":case"]":case"(":case")":case"{":case"}":return e.type;default:return""}}function S(e){let r="",n;for(let t of e)t.type==="whitespace"&&n?.type==="whitespace"||(n&&$e(de(n),de(t))&&(r+="/**/"),r+=De(t),n=t);return r}var Me=new Set(Q),be=new Set(ee),ce=new Set(te),je=new Set(ne),Ve=new Set(oe),Ie=new Set(ie),pe=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,k=e=>e.replace(/[A-Z]/g,r=>r.toLowerCase()),Ue=e=>k(e);function F(e,r,n){let t=[];for(let i of r){if(i.type==="bad-url"||i.type==="bad-string"){n({reason:"unreadable",...e?{name:e}:{}});return}if(i.type==="url"){if(e&&ce.has(e)&&pe.test(i.value)){t.push({type:"func",name:"url",value:[{type:"string",value:i.value}]});continue}n({reason:"url",...e?{name:e}:{}});return}if(i.type==="func"){let o=k(i.name);if(o==="url"||o==="src"){let u=i.value.filter(p=>p.type!=="whitespace"),c=u[0];if(o==="url"&&u.length===1&&c?.type==="string"&&e&&ce.has(e)&&pe.test(c.value)){t.push({type:"func",name:"url",value:[{type:"string",value:c.value}]});continue}n({reason:"url",...e?{name:e}:{}});return}if(!be.has(o)){n({reason:"function",name:o});return}let a=F(e,i.value,n);if(!a)return;o==="var"?t.push({type:"whitespace"},{type:"func",name:o,value:a},{type:"whitespace"}):t.push({type:"func",name:o,value:a});continue}if(i.type==="block"){if(i.open==="{"||i.open==="("&&t.at(-1)?.type==="ident"){n({reason:"unreadable",...e?{name:e}:{}});return}let o=F(e,i.value,n);if(!o)return;t.push({type:"block",open:i.open,value:o});continue}if(i.type==="at-keyword"||i.type==="CDO"||i.type==="CDC"||i.type==="{"||i.type==="}"||i.type===";"||i.type==="delim"&&i.value==="\\"){n({reason:"unreadable",...e?{name:e}:{}});return}t.push(i)}return t}var Fe=/^(animation|transition|scroll-behavior)/;function z(e,r,n=!1){let t=e.name.startsWith("--"),i=t?e.name:Ue(e.name);if(!t&&!Me.has(i)){r({reason:"property",name:i});return}let o=re[i];if(o){let c=e.value.filter(C=>C.type!=="whitespace"),p=c[0],m=c.length===1&&p?.type==="ident"?k(p.value):void 0;if(!m||![...o,"inherit","initial","unset","revert"].includes(m)){r({reason:"value",name:i});return}return`${i}: ${m}${e.important?" !important":""}`}let a=F(t?void 0:i,e.value,r);if(!a)return;let u=S(a).trim();return`${t?`--${A(e.name.slice(2))}`:i}: ${u}${e.important&&!(n&&Fe.test(i))?" !important":""}`}function he(e,r){let n=t=>{for(let i=0;i<t.length;i+=1){let o=t[i];if(i>0&&t[i-1].type===":"&&(o.type==="ident"||o.type==="func")){let u=k(o.type==="ident"?o.value:o.name);if(Ve.has(u)||(u.startsWith("-webkit-")||u.startsWith("-moz-"))&&!Ie.has(u))return r({reason:"selector",name:u}),!1}if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="at-keyword"||o.type==="CDO"||o.type==="CDC"||o.type==="block"&&o.open==="{")return r({reason:"unreadable",name:"selector"}),!1;if(o.type==="func"&&!n(o.value)||o.type==="block"&&!n(o.value))return!1}return!0};return n(e)}function I(e,r,n){let t=[];for(let i of H(e))if(i.type==="declaration"){let o=z(i,r);o&&t.push(`${o};`)}else{let o=P(i,r,n+1,"style");o&&t.push(o)}return t.join(" ")}function Be(e,r,n){let t=i=>i.every(o=>{if(o.type==="url"||o.type==="bad-url"||o.type==="bad-string"||o.type==="block"&&o.open==="{")return n({reason:o.type==="url"?"url":"unreadable",name:`@${r}`}),!1;if(o.type==="func"){let a=k(o.name);return r==="supports"&&a==="selector"?he(o.value,n):be.has(a)?t(o.value):(n({reason:"function",name:a}),!1)}if(o.type==="block"){if(r==="supports"){let a=H(o.value);if(a.length===1&&a[0].type==="declaration")return z(a[0],n)!==void 0}return t(o.value)}return!0});return t(e)?S(e).trim():void 0}function B(e){return e.map((r,n)=>{let t=e[n-1],i=t?.type===":"||t?.type==="delim"&&(t.value==="."||t.value==="|");return r.type==="ident"&&!i&&Object.prototype.hasOwnProperty.call(V,k(r.value))?{type:"block",open:"[",value:[{type:"ident",value:"data-graview-as"},{type:"delim",value:"="},{type:"string",value:k(r.value)}]}:r.type==="func"?{type:"func",name:r.name,value:B(r.value)}:r.type==="block"&&r.open==="("?{type:"block",open:"(",value:B(r.value)}:r})}function P(e,r,n,t){if(n>me){r({reason:"unreadable",name:"nesting"});return}if(e.type==="qualified"){if(t==="keyframes"){if(!e.prelude.every(m=>m.type==="whitespace"||m.type===","||m.type==="percentage"||m.type==="ident"&&["from","to"].includes(k(m.value)))){r({reason:"unreadable",name:"keyframe"});return}return`${S(e.prelude).trim()} { ${I(e.block,r,n)} }`}if(!he(e.prelude,r))return;let c=S(B(e.prelude)).trim();if(c===""){r({reason:"unreadable",name:"selector"});return}return`${c} { ${I(e.block,r,n)} }`}let i=k(e.name),o=i==="-webkit-keyframes"?"keyframes":i;if(!je.has(o)||t==="keyframes"){r({reason:"at-rule",name:`@${i}`});return}if(!e.block){r({reason:"unreadable",name:`@${i}`});return}if(o==="keyframes"){if(t!=="sheet"){r({reason:"at-rule",name:"@keyframes"});return}let c=e.prelude.filter(h=>h.type!=="whitespace"),p=c[0];if(c.length!==1||!p||p.type!=="ident"&&p.type!=="string"){r({reason:"unreadable",name:"@keyframes"});return}let m=E(e.block,!1).map(h=>P(h,r,n+1,"keyframes")).filter(h=>h!==void 0);return`@keyframes ${p.type==="ident"?v(p.value):O(p.value)} { ${m.join(" ")} }`}let a=Be(e.prelude,o,r);if(a===void 0)return;let u=t==="style"?I(e.block,r,n):E(e.block,!1).map(c=>P(c,r,n+1,"sheet")).filter(c=>c!==void 0).join(" ");return`@${o} ${a} { ${u} }`}function Y(e,r=R){let n=[];if(e.length>r)return{css:"",refused:[{reason:"size"}]};let t=o=>void n.push(o);return{css:E(q(e),!0).map(o=>P(o,t,0,"sheet")).filter(o=>o!==void 0).join(`
|
|
3
|
-
`),refused:n}}function xe(e,r=R){let n=[],t=[],i=0;for(let o of e){if(i+o.length>r){t.push({reason:"size"});continue}i+=o.length;let a=Y(o,r);a.css&&n.push(a.css),t.push(...a.refused)}return{css:n.join(`
|
|
4
|
-
`),refused:t}}function N(e,r=R){let n=[];if(e.length>r)return{css:"",refused:[{reason:"size"}]};let t=o=>void n.push(o),i=[];for(let o of H(q(e))){if(o.type!=="declaration"){t({reason:"unreadable",name:"a rule in a style attribute"});continue}let a=z(o,t,!0);a&&i.push(a)}return{css:i.join("; "),refused:n}}function L(e,r){let n,t=z(ye(e,q(r)),i=>n??=i);return t===void 0||n?{refused:n??{reason:"unreadable",name:e}}:{value:t.slice(t.indexOf(":")+1).trim()}}var l={},K={empty:!0},Ge={id:"text",class:"text",title:"text",lang:"text",dir:{oneOf:["ltr","rtl","auto"]},hidden:"text",tabindex:{oneOf:["-1","0"]},role:"text",style:"style",translate:{oneOf:["yes","no"]},spellcheck:{oneOf:["true","false"]},draggable:{oneOf:["true","false"]},inert:"boolean"},D={div:l,section:l,article:l,aside:l,header:l,footer:l,nav:l,hgroup:l,search:l,address:l,figure:l,figcaption:l,blockquote:l,p:l,pre:l,hr:K,br:K,wbr:K,h1:l,h2:l,h3:l,h4:l,h5:l,h6:l,span:l,strong:l,em:l,b:l,i:l,u:l,s:l,small:l,mark:l,abbr:l,cite:l,q:l,code:l,kbd:l,samp:l,var:l,sub:l,sup:l,dfn:l,bdi:l,bdo:l,ruby:l,rt:l,rp:l,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:{attributes:{href:"link"}},ul:l,menu:l,dl:l,dt:l,dd:l,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:l,caption:l,thead:l,tbody:l,tfoot:l,tr:l,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:l,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:l,output:l,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":{empty:!0,attributes:{autoplay:"boolean",cover:"boolean"}}},Xe=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask","filter","flood-color","flood-opacity","lighting-color","color-interpolation-filters"],We={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Xe.map(e=>[e,"css"]))},w={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},$={viewBox:"geometry",preserveAspectRatio:"geometry"},ke={oneOf:["userSpaceOnUse","objectBoundingBox"]},we={oneOf:["R","G","B","A"]},b={...w,in:"text",result:"text"},Se={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},M={svg:{attributes:{...w,...$}},g:l,defs:l,symbol:{attributes:{...w,...$,refX:"geometry",refY:"geometry"}},use:{attributes:{...w,href:"fragment"}},title:l,desc:l,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...w,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...Se}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...Se}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...w,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...w,...$,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...$,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}},a:l,filter:{attributes:{...w,filterUnits:ke,primitiveUnits:ke}},feBlend:{attributes:{...b,in2:"text",mode:"text"}},feColorMatrix:{attributes:{...b,type:{oneOf:["matrix","saturate","hueRotate","luminanceToAlpha"]},values:"geometry"}},feComponentTransfer:{attributes:b},...Object.fromEntries(["feFuncR","feFuncG","feFuncB","feFuncA"].map(e=>[e,{attributes:{type:{oneOf:["identity","table","discrete","linear","gamma"]},tableValues:"geometry",slope:"number",intercept:"number",amplitude:"number",exponent:"number",offset:"number"}}])),feComposite:{attributes:{...b,in2:"text",operator:{oneOf:["over","in","out","atop","xor","lighter","arithmetic"]},k1:"number",k2:"number",k3:"number",k4:"number"}},feDisplacementMap:{attributes:{...b,in2:"text",scale:"number",xChannelSelector:we,yChannelSelector:we}},feDropShadow:{attributes:{...b,dx:"number",dy:"number",stdDeviation:"geometry"}},feFlood:{attributes:b},feGaussianBlur:{attributes:{...b,stdDeviation:"geometry",edgeMode:{oneOf:["duplicate","wrap","none"]}}},feMerge:{attributes:b},feMergeNode:{attributes:{in:"text"}},feMorphology:{attributes:{...b,operator:{oneOf:["erode","dilate"]},radius:"geometry"}},feOffset:{attributes:{...b,dx:"number",dy:"number"}},feTurbulence:{attributes:{...w,result:"text",type:{oneOf:["fractalNoise","turbulence"]},baseFrequency:"geometry",numOctaves:"number",seed:"number",stitchTiles:{oneOf:["stitch","noStitch"]}}}};var Ce=["alert","alertdialog","dialog","banner","main","navigation","contentinfo","complementary","search","form","application","status","log","marquee","timer"],pt=["region"],Z={nav:"div",header:"div",footer:"div",aside:"div",search:"div",output:"span"},Ee={section:["aria-label","title"]},ft=["aria-labelledby","aria-describedby"];function He(e){return/^aria-[a-z]+$/.test(e)}function qe(e){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(e)}var J=4e3,ve=1e5,_=512e3,mt=1e4,gt="http://www.w3.org/1999/xhtml",yt="http://www.w3.org/2000/svg",Ye=new Map(Object.keys(M).map(e=>[e.toLowerCase(),e]));function Re(e){return Ye.get(e.toLowerCase())}function Oe(e,r,n){let t=n.toLowerCase(),i=e==="html"?[D[r]?.attributes,Ge]:[M[r]?.attributes,We],o=e==="svg"&&t==="xlink:href"?"href":t;for(let a of i)if(a){for(let[u,c]of Object.entries(a))if(u.toLowerCase()===o)return{name:u,kind:c}}if(He(t)||qe(t))return{name:t,kind:"text"}}function kt(e,r){if(r==="svg"){let t=Re(e);return t?{namespace:"svg",name:t}:{refused:{reason:"element",element:e}}}let n=e.toLowerCase();return n==="svg"?{namespace:"svg",name:"svg"}:Object.prototype.hasOwnProperty.call(D,n)?Object.prototype.hasOwnProperty.call(Z,n)?{namespace:"html",name:Z[n],as:n}:{namespace:"html",name:n}:{refused:{reason:"element",element:e}}}function wt(e,r){return(e==="html"?D[r]:M[r])?.empty===!0}var Ke=/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/,Ze=/^[0-9A-Za-z\s.,+\-%()]*$/,Je=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Qe=/^data:image\/(png|gif|jpeg|webp|avif|bmp|svg\+xml)(;[A-Za-z0-9=._+-]+)*,/i,et=/^\/graview\/assets\/[0-9a-f]{64}\.(png|gif|jpe?g|webp|avif|svg|ico)$/,_e=/\/graview\/assets\/[0-9a-f]{64}\.(png|gif|jpe?g|webp|avif|svg|ico)$/,tt=/^\/(?!\/)(?!(?:.*\/)?\.\.?(?:\/|$))(?!.*%(?:2e|2f|5c))[^\\\s?#"'<>]*$/i;function nt(e,r){if(et.test(e))return e;let n=e;if(/^https?:\/\//i.test(e))try{let t=new URL(e);if(r==="null"||t.origin!==r||t.username!==""||t.password!==""||t.search!==""||t.hash!=="")return;n=e.slice(t.origin.length)}catch{return}if(tt.test(n))return _e.exec(n)?.[0]}function St(e,r={},n){let t=e.length>120?`${e.slice(0,119)}\u2026`:e,i=Te(r.origins),o=_e.exec(e.split(/[?#]/)[0])?.[0],a=n!==void 0&&n>_?` It is a data: image of ${n.toLocaleString("en-US")} characters, more than the ${_.toLocaleString("en-US")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:o?r.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${o}.`:" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.":/^https:\/\//i.test(e)?i.length>0?` Its origin is not one the host lists for images (${i.join(", ")}).`:" The host lists no origin a view's images may come from (images.origins, on the view's definition).":"",u=["a data: image",...r.assets?["the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)"]:[],"a picture on a record (pictures in its manifest)",...i.length>0?[`an https: image from ${i.join(", ")}`]:[]];return`The image "${t}" was not drawn.${a} A view here shows ${u.slice(0,-1).join(", ")} or ${u[u.length-1]}.`}function Te(e){return(e??[]).flatMap(r=>{try{let n=new URL(r);return n.protocol==="https:"&&n.hostname!==""&&n.username===""&&n.password===""?[n.origin]:[]}catch{return[]}})}function rt(e,r){if(!(!r||r.length===0||!/^https:\/\//i.test(e)))try{let n=new URL(e);return n.protocol!=="https:"||n.username!==""||n.password!==""?void 0:Te(r).includes(n.origin)?n.href:void 0}catch{return}}function Ct(e,r,n,t,i){let o=Oe(e,r,n);if(!o)return{refused:{reason:"attribute",element:r,name:n}};if(e==="html"&&Ee[r]?.includes(o.name))return{refused:{reason:"attribute",element:r,name:n}};if(t===null)return{name:o.name,value:null};let a=ot(o.name,o.kind,t,i);return"refused"in a?{refused:{...a.refused,element:r,...o.kind==="image"&&a.refused.reason==="url"?{address:t.slice(0,200),...t.length>_?{length:t.length}:{}}:{},...o.kind==="link"?{address:t.slice(0,200)}:{}}}:o.name==="role"&&a.value.split(/\s+/).some(u=>Ce.includes(u.toLowerCase()))?{refused:{reason:"value",element:r,name:n}}:o.name==="aria-live"&&!["polite","off"].includes(a.value.toLowerCase())?{refused:{reason:"value",element:r,name:n}}:{name:o.name,value:a.value,...a.dropped?{dropped:a.dropped.map(u=>({reason:u.reason==="url"?"url":"css",element:r,name:o.name,css:u}))}:{}}}function ot(e,r,n,t){let i=(o,a)=>({refused:{reason:o,name:e,...a?{css:a}:{}}});if(r==="geometry")return n.length>ve||!Ze.test(n)||/url/i.test(n)?i("value"):{value:n};if(r==="image"){let o=t.picture?.(n);if(o!==void 0)return{value:o};if(n.length>_)return i("url");if(Qe.test(n))return{value:n};if(n.startsWith(`blob:${t.origin}/`)&&/^blob:[^\s"'<>]+$/.test(n))return{value:n};let a=t.asset?nt(n,t.origin):void 0;if(a!==void 0){let c=t.asset(a);if(c)return{value:c}}let u=rt(n,t.imageOrigins);return u?{value:u}:i("url")}if(r==="link"){let o=t.link?.(n);return o===void 0?i("url"):{value:o}}if(n.length>J)return i("value");if(typeof r=="object"){let o=r.oneOf.find(a=>a.toLowerCase()===n.toLowerCase());return o===void 0?i("value"):{value:o}}switch(r){case"text":return{value:n};case"number":return Ke.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:i("value");case"boolean":return{value:""};case"fragment":return Je.test(n)?{value:n}:i("url");case"style":{let o=N(n,J);return o.refused.length>0&&o.css===""?i(o.refused[0].reason==="url"?"url":"css",o.refused[0]):{value:o.css,...o.refused.length>0?{dropped:o.refused}:{}}}case"css":{let o=L(e,n);return"refused"in o?i(o.refused.reason==="url"?"url":"css",o.refused):{value:o.value}}}}export{Y as a,xe as b,pt as c,ft as d,mt as e,gt as f,yt as g,kt as h,wt as i,St as j,Ct as k};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T,c as A,d as m}from"./chunk.A4VA3DU5.js";import{P as $,S as x}from"./chunk.J24YPQ5I.js";var I=Symbol.for("@graview/core:file"),j=Symbol.for("@graview/core:node-ref"),y=e=>typeof e=="object"&&e!==null?e._zod?.def:void 0;function k(e){let t=y(e);return t?.[I]??(t?.innerType?k(t.innerType):void 0)}function F(e){let t=k(e);if(t)return{as:t,list:!1};let n=y(e);for(;n?.innerType;)n=y(n.innerType);let i=n?.type==="array"?k(n.element):void 0;return i?{as:i,list:!0}:void 0}function M(e){if(typeof e!="object"||e===null)return;let t=e[j];if(t)return t;let n=y(e);return n?.[j]??(n?.innerType?M(n.innerType):void 0)}function z(e){let t=e?.shape??{};return Object.entries(t).flatMap(([n,i])=>{let s=M(i);return s?[{name:n,kinds:s}]:[]})}var R=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&typeof e.href=="string"&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.bytes=="number",C=e=>(Array.isArray(e)?e:[e]).filter(R);function O(e,t,n){let s=e.schema.tryDefinition(t)?.fields?.shape?.[n];return s===void 0?void 0:F(s)}function D(e,t){if(e===void 0)return[];if(!Array.isArray(e))return[`The view's accepts is a list of { "kind": <a kind>, "field": <its image, video or file field> }.`];let n=[],i=new Set(t.schema.kinds);for(let s of e){let{kind:l,field:r}=s??{};typeof l!="string"||typeof r!="string"?n.push(`Each of the view's accepts is { "kind": <a kind>, "field": <its image, video or file field> }.`):i.has(l)?O(t,l,r)?t.allMutations().some(d=>(d.creates??[]).includes(l)&&Object.hasOwn(d.input?.shape??{},r))||n.push(`No act of this app makes a "${l}" with its "${r}", so a file dropped could become nothing.`):n.push(`The view accepts files into ${l}'s "${r}", which holds no picture, video or file.`):n.push(`The view accepts files for "${l}", which is no kind of this app.`)}return n}function N(e,t,n){if(e===void 0||e===!0)return[];let i=`The view's pictures is true; the kinds whose pictures it draws, ["circuit"]; or { "width": <the widest it draws a picture, in pixels> } with the fields it draws them from, by kind, { "circuit": "photo" }.`;if(typeof e!="object"||e===null)return[i];let s=new Set([...n.attach==="home"?[]:[n.attach],...n.reads?.kinds??[]]),l=new Set(t.schema.kinds),r=[],d=a=>{if(!l.has(a))return void r.push(`The view's pictures chooses "${a}", which is no kind of this app.`);s.has(a)||r.push(`The view's pictures chooses "${a}", whose records it is not handed: add "${a}" to its reads.kinds.`)};if(Array.isArray(e)){if(e.length===0||!e.every(a=>typeof a=="string"))return[i];for(let a of e)d(a);return r}for(let[a,c]of Object.entries(e)){if(a==="width"&&typeof c!="string"&&!Array.isArray(c)){Number.isInteger(c)&&c>=16&&c<=4096||r.push("The view's pictures width is a whole number of pixels from 16 to 4096.");continue}let p=typeof c=="string"?[c]:Array.isArray(c)&&c.length>0&&c.every(u=>typeof u=="string")?c:void 0;if(!p){r.push(`The view's pictures says "${a}": beside "width", it names a kind and the field it draws pictures from, "circuit": "photo", or its fields, "circuit": ["photo", "map"].`);continue}let g=r.length;if(d(a),!(r.length>g))for(let u of p){let f=O(t,a,u);f?f.as==="video"&&r.push(`The view's pictures chooses ${a}'s "${u}", which holds videos: the host plays a video where the view places it, and hands no picture of it.`):r.push(`The view's pictures chooses ${a}'s "${u}", which holds no picture.`)}}return r}function H(e){if(e===void 0)return[];if(typeof e!="object"||e===null||Array.isArray(e))return[`The view's scene is { "maxHeight": <the tallest its preview on the Scene is drawn, in pixels> }.`];let{maxHeight:t,...n}=e,i=[];return Object.keys(n).length>0&&i.push(`The view's scene says ${Object.keys(n).map(s=>`"${s}"`).join(", ")}: only "maxHeight" is read.`),t!==void 0&&!(Number.isInteger(t)&&t>=80&&t<=4e3)&&i.push("The view's scene maxHeight is a whole number of pixels from 80 to 4000."),i}function V(e){return(e.acts??[]).map(t=>typeof t=="string"?{act:t}:t)}function J(e,t){let n=[],i=new Set(t.schema.kinds),s=new Set(t.schema.edgeKinds),l=new Set(t.allMutations().map(d=>d.name));(typeof e.name!="string"||!/^[a-z0-9][a-z0-9-]{0,62}$/.test(e.name))&&n.push(`The view's name "${String(e.name)}" is not lower-case letters, digits and hyphens.`),e.title!==void 0&&(typeof e.title!="string"||e.title.trim()===""||e.title.length>80)&&n.push("The view's title is empty or longer than 80 characters."),e.attach!=="home"&&!i.has(e.attach)&&n.push(`The view attaches to "${e.attach}", which is no kind of this app.`),e.cardinality!=="one"&&e.cardinality!=="many"&&n.push(`The view's cardinality is "${String(e.cardinality)}", not one or many.`),e.attach==="home"&&e.cardinality!=="many"&&n.push("A view of the home draws many records: its cardinality is many."),e.replaces!==void 0&&e.replaces!=="page"?n.push(`The view's replaces is "${String(e.replaces)}": the one thing a view replaces is "page", or leave it out to draw the view above the record's own fields.`):e.replaces==="page"&&e.attach==="home"&&n.push(`The home's view is the home already: replaces "page" is for a view of a kind, of one record (its page) or of many (its list).`),e.gestures!==void 0&&typeof e.gestures!="boolean"&&n.push(`The view's gestures is "${String(e.gestures)}": it is true, or left out.`),e.bleed!==void 0&&typeof e.bleed!="boolean"&&n.push(`The view's bleed is "${String(e.bleed)}": it is true, or left out.`),e.heading!==void 0&&(e.heading!=="own"||e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push(`The view's heading is "${String(e.heading)}": it is "own" on a view that is a place (a title, cardinality many), or left out.`),e.flows!==void 0&&typeof e.flows!="boolean"?n.push(`The view's flows is "${String(e.flows)}": it is false for a view that keeps its place's frame, or left out.`):e.flows===!1&&(e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push("Only a view that is a place keeps a frame: flows false needs a title and cardinality many on a kind."),n.push(...H(e.scene)),e.scene!==void 0&&(e.attach==="home"||e.cardinality!=="many")&&n.push("Only a view of a kind's members is drawn on the Scene as a card: scene needs cardinality many on a kind."),n.push(...N(e.pictures,t,e)),n.push(...D(e.accepts,t));for(let d of e.reads?.kinds??[])i.has(d)||n.push(`The view reads "${d}", which is no kind of this app.`);for(let d of e.reads?.edges??[])s.has(d)||n.push(`The view reads the edge "${d}", which no kind of this app declares.`);let r=new Set;for(let d of V(e)){l.has(d.act)||n.push(`The view asks for the act "${d.act}", which this app does not declare.`);let a=d.as??d.act;r.has(a)&&n.push(`Two of the view's acts are called "${a}".`),r.add(a)}return n}function _(e,t,n){let i=[...new Set([...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]])];if(i.length<2)return[];let s=new Set(t.reads?.edges??[]),l=r=>new RegExp(`(["'\`])${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\1`).test(n);return e.schema.edgeKinds.filter(r=>{let d=e.schema.edge(r);return!s.has(r)&&d!==void 0&&d.from.some(a=>i.includes(a))&&(d.to==="*"||d.to.some(a=>i.includes(a)))&&l(r)})}function Q(e,t,n){let i=_(e,t,n);if(i.length===0)return;let s=(l,r)=>l.length<2?l[0]??"":`${l.slice(0,-1).join(", ")} ${r} ${l[l.length-1]}`;return`"${t.name}" names ${s(i,"and")} but does not read ${i.length>1?"them":"it"}, so the view is handed no such links: add ${s(i.map(l=>`"${l}"`),"and")} to its manifest's reads.edges.`}function U(e,t){return[...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]].some(i=>Object.keys(e.schema.tryDefinition(i)?.computed??{}).length>0)}function X(e,t,n){let{manifest:i}=n,s=n.input??{},r=e.seenBy(t).graph,d=i.attach==="home"?void 0:i.attach,a=d&&i.cardinality==="one"&&s.node?r.getNode(s.node.id):void 0,c=a&&a.kind===d?[a]:[],p=d&&i.cardinality==="many"?s.nodes?s.nodes.flatMap(o=>{let h=r.getNode(o.id);return h&&h.kind===d?[h]:[]}):r.nodesOfKind(d):[],g=new Set([...c,...p].map(o=>o.id)),u=T(r,g,{kinds:(i.reads?.kinds??[]).filter(o=>o!==d||i.cardinality==="one"),edges:i.reads?.edges??[]}),f=new Map;for(let o of[...p,...u.nodes])c.some(h=>h.id===o.id)||f.set(o.id,o);let P=new Set([...c.map(o=>o.id),...f.keys()]),G=[...u.edges],K=new Set(V(i).map(o=>o.act)),W=e.permittedMutations(t).filter(o=>K.has(o.name)).map(o=>({name:o.name,title:o.title??o.name,...o.description!==void 0?{description:o.description}:{},...o.subject?{subject:{kinds:o.subject.kinds,arg:o.subject.arg}}:{}})),b=o=>o?.filter(h=>P.has(h)),S=n.computed,v=o=>S?{...m(e,o),...S(r,o)}:m(e,o);return{view:i.name,...c[0]?{node:v(c[0])}:{},nodes:[...f.values()].map(v),edges:G,...i.title!==void 0?{label:i.title}:s.label!==void 0?{label:s.label}:{},cardinality:i.cardinality,...s.fidelity!==void 0?{fidelity:s.fidelity}:{},...s.mode!==void 0?{mode:s.mode}:{},...s.selected!==void 0?{selected:s.selected}:{},...s.implicated?{implicated:b(s.implicated)}:{},...s.flagged?{flagged:b(s.flagged)}:{},acts:W,...n.theme?{theme:n.theme}:{},locale:$(),timeZone:x(),...A(e.schema,[...c,...f.values()]),...n.places?{places:n.places.filter((o,h,w)=>w.findIndex(E=>E.as===o.as)===h).map(({as:o,title:h,kind:w})=>({as:o,title:h,kind:w}))}:{}}}export{z as a,R as b,C as c,O as d,V as e,J as f,_ as g,Q as h,U as i,X as j};
|