graview 0.1.69 → 0.1.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preview/chunk.23DATB5Y.js +1 -0
- package/dist/preview/chunk.2INDKSJI.js +1 -0
- package/dist/preview/chunk.3CLTABGP.js +1 -0
- package/dist/preview/chunk.3RRK6UTN.js +8 -0
- package/dist/preview/chunk.45HUV56Z.js +1 -0
- package/dist/preview/chunk.4HU2ILFY.js +1 -0
- package/dist/preview/{chunk.3VNOTHA5.js → chunk.4LWWXIM4.js} +1 -1
- package/dist/preview/chunk.4O64QV2Y.js +1 -0
- package/dist/preview/{chunk.PJL3I2IW.js → chunk.4QMAYVPU.js} +1 -1
- package/dist/preview/chunk.4UDST6IF.js +1 -0
- package/dist/preview/{chunk.6BNSDPZE.js → chunk.4YZ2A6SJ.js} +3 -3
- package/dist/preview/{chunk.523EFGHU.js → chunk.4ZEHLUXV.js} +1 -1
- package/dist/preview/{chunk.F4CDJBDS.js → chunk.5EQRIZ6I.js} +1 -1
- package/dist/preview/chunk.5OS4SYHE.js +1 -0
- package/dist/preview/{chunk.BO32A3W5.js → chunk.5PQV7GFE.js} +1 -1
- package/dist/preview/{chunk.PZ3KM3TY.js → chunk.5WCSQFS5.js} +1 -1
- package/dist/preview/{chunk.HU3KEWFO.js → chunk.64K5ELSQ.js} +1 -1
- package/dist/preview/{chunk.MKN7ADJB.js → chunk.67S2UWBT.js} +1 -1
- package/dist/preview/chunk.6A3KTD66.js +1 -0
- package/dist/preview/chunk.6BBUTKFC.js +23 -0
- package/dist/preview/chunk.6IMRCKB4.js +1 -0
- package/dist/preview/chunk.6L6RUOSF.js +5 -0
- package/dist/preview/{chunk.MH3AQO2R.js → chunk.6TBQV3NO.js} +1 -1
- package/dist/preview/chunk.6ZRVVRDQ.js +1 -0
- package/dist/preview/{chunk.YZKHTBTC.js → chunk.7FI75ZVE.js} +1 -1
- package/dist/preview/{chunk.IO5VFTXC.js → chunk.7KX36ENH.js} +1 -1
- package/dist/preview/chunk.7LPHWJB4.js +3 -0
- package/dist/preview/chunk.7MDGPTYF.js +1 -0
- package/dist/preview/{chunk.I4H2GS4O.js → chunk.7PWLRRUS.js} +2 -2
- package/dist/preview/{chunk.7T2P42VW.js → chunk.7TACFS7Q.js} +1 -1
- package/dist/preview/{chunk.KLEKC4ZX.js → chunk.7THS3DLZ.js} +1 -1
- package/dist/preview/{chunk.CSVDBDRZ.js → chunk.7XGU6KVF.js} +2 -2
- package/dist/preview/chunk.7ZLCA3WK.js +1 -0
- package/dist/preview/{chunk.RRCPEHM4.js → chunk.AIFT2HNP.js} +1 -1
- package/dist/preview/{chunk.LMZ2WMGH.js → chunk.ARGEGV5T.js} +1 -1
- package/dist/preview/{chunk.4FJ4OPSJ.js → chunk.BSWR5SGX.js} +1 -1
- package/dist/preview/{chunk.RNAL35ID.js → chunk.BWMPC7LK.js} +1 -1
- package/dist/preview/{chunk.KW7PHJYX.js → chunk.CEJIH3CN.js} +1 -1
- package/dist/preview/chunk.CEOQY5KS.js +5 -0
- package/dist/preview/{chunk.G43YUGNW.js → chunk.CGRX6SDE.js} +1 -1
- package/dist/preview/chunk.CPK6CYKN.js +111 -0
- package/dist/preview/{chunk.AZRICZKT.js → chunk.CVN2XFMF.js} +1 -1
- package/dist/preview/chunk.D4F6QX5L.js +1 -0
- package/dist/preview/{chunk.JPAE6K4E.js → chunk.D6ODKMOV.js} +1 -1
- package/dist/preview/{chunk.CCCONK73.js → chunk.DDSAFU3B.js} +1 -1
- package/dist/preview/{chunk.AHYMIVBX.js → chunk.DG3YNOH3.js} +1 -1
- package/dist/preview/chunk.DGYWNM5U.js +1 -0
- package/dist/preview/{chunk.ML5EHDZG.js → chunk.DHO3QZYK.js} +1 -1
- package/dist/preview/{chunk.EL7XXGQY.js → chunk.DJGZOPAS.js} +1 -1
- package/dist/preview/chunk.DOJCYXIJ.js +1 -0
- package/dist/preview/{chunk.CKSRW3LA.js → chunk.DX7RGK5G.js} +1 -1
- package/dist/preview/{chunk.QK7EUIPL.js → chunk.EA2KYBBR.js} +1 -1
- package/dist/preview/chunk.EEGVI266.js +1 -0
- package/dist/preview/{chunk.I7OFRF6N.js → chunk.EHLV3LND.js} +2 -2
- package/dist/preview/{chunk.QEBD7SC4.js → chunk.EJC7ACZT.js} +4 -2
- package/dist/preview/{chunk.QRNKGPAD.js → chunk.EJIQDMLU.js} +1 -1
- package/dist/preview/chunk.EOSN5DWW.js +1 -0
- package/dist/preview/{chunk.4RPKCW4J.js → chunk.EPSYX2SF.js} +1 -1
- package/dist/preview/chunk.EUXAIG73.js +1 -0
- package/dist/preview/chunk.EZQK23AB.js +1 -0
- package/dist/preview/{chunk.KKFKSJUN.js → chunk.F5O3HR7X.js} +1 -1
- package/dist/preview/chunk.F6MY6WJ4.js +1 -0
- package/dist/preview/{chunk.GTF6EMVE.js → chunk.F7KVEWFH.js} +1 -1
- package/dist/preview/{chunk.EEUCRZA3.js → chunk.FIUPDGUZ.js} +1 -1
- package/dist/preview/chunk.FNSVGSZI.js +1 -0
- package/dist/preview/chunk.FOHZPYUV.js +1 -0
- package/dist/preview/chunk.FW6M6GIU.js +32 -0
- package/dist/preview/{chunk.VXPEXUQF.js → chunk.G5AF5IXL.js} +1 -1
- package/dist/preview/chunk.G767NLBH.js +1 -0
- package/dist/preview/chunk.GFBE4VNT.js +1 -0
- package/dist/preview/{chunk.CDSHUWSK.js → chunk.GFOZVQBQ.js} +1 -1
- package/dist/preview/chunk.GKYJQE5A.js +1 -0
- package/dist/preview/chunk.GOVRX2YX.js +4 -0
- package/dist/preview/{chunk.T3PELB6I.js → chunk.H33XWGAY.js} +1 -1
- package/dist/preview/{chunk.2AL26ZPJ.js → chunk.H4BPTMED.js} +1 -1
- package/dist/preview/chunk.HLKDYI6J.js +1 -0
- package/dist/preview/{chunk.VEQIH7HR.js → chunk.HPFEYMGP.js} +1 -1
- package/dist/preview/chunk.HT35PAHI.js +21 -0
- package/dist/preview/{chunk.VR553M6J.js → chunk.HXRHEPPJ.js} +1 -1
- package/dist/preview/chunk.IPKODEOZ.js +1 -0
- package/dist/preview/{chunk.EP7YT7LT.js → chunk.IXYG65TM.js} +1 -1
- package/dist/preview/chunk.IZDB777E.js +1 -0
- package/dist/preview/{chunk.VBBH5R5T.js → chunk.JAPTTM6Y.js} +1 -1
- package/dist/preview/chunk.JCKIJSW7.js +25 -0
- package/dist/preview/{chunk.4R7H3GIL.js → chunk.JLNTE5CH.js} +2 -2
- package/dist/preview/chunk.JNK5WBSU.js +1 -0
- package/dist/preview/chunk.JREA2XDG.js +1 -0
- package/dist/preview/{chunk.WV6SP6IJ.js → chunk.KBJ3UUER.js} +1 -1
- package/dist/preview/{chunk.VBHV4TLG.js → chunk.KHRS2SKB.js} +1 -1
- package/dist/preview/{chunk.ISZFRLNJ.js → chunk.KJPLX72N.js} +1 -1
- package/dist/preview/chunk.KZUHXOZU.js +21 -0
- package/dist/preview/{chunk.6ZFYFT5A.js → chunk.L3MLGFIS.js} +1 -1
- package/dist/preview/{chunk.KEGL6NBD.js → chunk.L6P55HFW.js} +1 -1
- package/dist/preview/{chunk.N7A3T5QU.js → chunk.LDWWUKKX.js} +1 -1
- package/dist/preview/{chunk.CA2SYEYE.js → chunk.LHCGC3K6.js} +1 -1
- package/dist/preview/{chunk.BQORHDAH.js → chunk.LNKY6MT4.js} +1 -1
- package/dist/preview/chunk.LQ5J6YQW.js +1 -0
- package/dist/preview/{chunk.47VEV4BX.js → chunk.MEAUTBVM.js} +1 -1
- package/dist/preview/chunk.MEBKTW7H.js +17 -0
- package/dist/preview/{chunk.WQ7K5O2I.js → chunk.MFMC35ET.js} +1 -1
- package/dist/preview/chunk.MJ4T6YXI.js +1 -0
- package/dist/preview/chunk.MKJV3BM5.js +240 -0
- package/dist/preview/chunk.ML4X7VVK.js +1 -0
- package/dist/preview/chunk.MM7MLBGB.js +1 -0
- package/dist/preview/{chunk.5MOXQUZH.js → chunk.MQNW3O67.js} +1 -1
- package/dist/preview/{chunk.J2N7EKMX.js → chunk.MT252WP4.js} +1 -1
- package/dist/preview/chunk.MWWNKM3I.js +1 -0
- package/dist/preview/chunk.N3MXLORL.js +3 -0
- package/dist/preview/chunk.NH3VXTGX.js +1 -0
- package/dist/preview/{chunk.B422DSYN.js → chunk.NI4OPHTL.js} +1 -1
- package/dist/preview/chunk.NNGG7RCO.js +1 -0
- package/dist/preview/{chunk.LKM2R5UF.js → chunk.NXHEOHRR.js} +1 -1
- package/dist/preview/{chunk.TQQDUJLX.js → chunk.O5RPSUXV.js} +1 -1
- package/dist/preview/{chunk.FE3SINPK.js → chunk.OKHXXIMN.js} +1 -1
- package/dist/preview/chunk.ONAH6MC4.js +1 -0
- package/dist/preview/chunk.OOQG2AEF.js +1 -0
- package/dist/preview/{chunk.ZQYHNFRZ.js → chunk.OPMGQS5J.js} +1 -1
- package/dist/preview/{chunk.UHJSZ2XZ.js → chunk.OUF2QFZL.js} +1 -1
- package/dist/preview/{chunk.CUEIGKFG.js → chunk.OVSKPBPS.js} +1 -1
- package/dist/preview/chunk.OYMN3IFX.js +1 -0
- package/dist/preview/{chunk.QNC2OKLF.js → chunk.P43LPXXJ.js} +1 -1
- package/dist/preview/chunk.PGT4ZQDG.js +4 -0
- package/dist/preview/{chunk.WFJCC6G3.js → chunk.PQTXM4VY.js} +1 -1
- package/dist/preview/{chunk.KHKCTVHD.js → chunk.Q6GEPVQ7.js} +1 -1
- package/dist/preview/chunk.QDDDKEBH.js +1 -0
- package/dist/preview/{chunk.26RYER7Y.js → chunk.QJJWAYHB.js} +1 -1
- package/dist/preview/chunk.QK4QZVQG.js +1 -0
- package/dist/preview/{chunk.CLIC2QBA.js → chunk.QKRQPUCE.js} +1 -1
- package/dist/preview/{chunk.DU76ASS4.js → chunk.QNWGDG2Z.js} +2 -2
- package/dist/preview/{chunk.447RWLS7.js → chunk.QVBP4UZG.js} +2 -2
- package/dist/preview/chunk.RDUGUC7R.js +1 -0
- package/dist/preview/{chunk.EK3JXEZL.js → chunk.RHIP2UYE.js} +1 -1
- package/dist/preview/chunk.RJ7VSWTA.js +87 -0
- package/dist/preview/{chunk.JHAMSDAI.js → chunk.RO3D2RNP.js} +1 -1
- package/dist/preview/{chunk.C6CT6F4C.js → chunk.S2BMI23H.js} +1 -1
- package/dist/preview/{chunk.ZRBGYXAO.js → chunk.SGYZM6ZU.js} +1 -1
- package/dist/preview/{chunk.UPOYRCKI.js → chunk.SPJ34VHA.js} +1 -1
- package/dist/preview/{chunk.UAEOCWSG.js → chunk.T6KOL7TW.js} +1 -1
- package/dist/preview/{chunk.AUNQNTKY.js → chunk.T6UJEXFL.js} +3 -2
- package/dist/preview/chunk.TBEKEHFS.js +1 -0
- package/dist/preview/chunk.TO3ZKCA2.js +1 -0
- package/dist/preview/{chunk.FIY4RUK5.js → chunk.TQ3MNB6K.js} +1 -1
- package/dist/preview/{chunk.GG47EIKO.js → chunk.TRP66PHK.js} +1 -1
- package/dist/preview/{chunk.LGNGFG5V.js → chunk.TSZ2S3VG.js} +1 -1
- package/dist/preview/chunk.TTM5GQ2U.js +1 -0
- package/dist/preview/chunk.TUBY6SV3.js +1 -0
- package/dist/preview/{chunk.ZE5RSKXF.js → chunk.U5KJQFAP.js} +1 -1
- package/dist/preview/chunk.U6V4KZF5.js +1 -0
- package/dist/preview/chunk.UJ7RTNT4.js +1 -0
- package/dist/preview/{chunk.HCX6KPRF.js → chunk.UQZ2P6KD.js} +1 -1
- package/dist/preview/{chunk.CLZYNFFH.js → chunk.UZKBFI52.js} +1 -1
- package/dist/preview/{chunk.66TRDXYR.js → chunk.V5JB5UJS.js} +2 -2
- package/dist/preview/{chunk.3TKIZGC7.js → chunk.VDFQFLTU.js} +1 -1
- package/dist/preview/{chunk.IY3DV52G.js → chunk.VGYG2IBZ.js} +1 -1
- package/dist/preview/chunk.VICBF3MQ.js +2 -0
- package/dist/preview/{chunk.EQZPEOIW.js → chunk.VL3YDD7D.js} +1 -1
- package/dist/preview/{chunk.IYHY4VEC.js → chunk.VPFUOTY7.js} +1 -1
- package/dist/preview/chunk.VUDNQOOX.js +1 -0
- package/dist/preview/{chunk.P26ATAAI.js → chunk.VVIQSFM4.js} +1 -1
- package/dist/preview/{chunk.DO3FQM6R.js → chunk.W332P5T3.js} +6 -6
- package/dist/preview/{chunk.POKGLN4T.js → chunk.W3TJF4EH.js} +1 -1
- package/dist/preview/{chunk.D5JZQZ74.js → chunk.W5O5F4FT.js} +1 -1
- package/dist/preview/chunk.W6L2VAJG.js +2 -0
- package/dist/preview/{chunk.O7NYSO6F.js → chunk.WGH2P2YL.js} +1 -1
- package/dist/preview/{chunk.OD5QZHRC.js → chunk.WS5ORRGS.js} +1 -1
- package/dist/preview/{chunk.VQDL4EEP.js → chunk.WU6D3SPL.js} +1 -1
- package/dist/preview/{chunk.MV27WMNW.js → chunk.X2UYEA7H.js} +1 -1
- package/dist/preview/chunk.X45EITTK.js +18 -0
- package/dist/preview/{chunk.TAJBXG5U.js → chunk.X7U3JMBR.js} +1 -1
- package/dist/preview/chunk.XSM4OTF4.js +1 -0
- package/dist/preview/{chunk.DRAPVGQZ.js → chunk.XTHSPLZZ.js} +1 -1
- package/dist/preview/{chunk.VQOYFBEV.js → chunk.Y5WQD6KV.js} +1 -1
- package/dist/preview/chunk.YXVUJ3NB.js +1 -0
- package/dist/preview/{chunk.NRECR3NQ.js → chunk.Z22C2JJ4.js} +1 -1
- package/dist/preview/{chunk.TQRC5VAM.js → chunk.Z2BCOZDZ.js} +1 -1
- package/dist/preview/{chunk.S2NQRD6W.js → chunk.Z3TK2LJM.js} +1 -1
- package/dist/preview/chunk.ZGLOXN7O.js +1 -0
- package/dist/preview/{chunk.R7POSVUK.js → chunk.ZLQIGZXO.js} +2 -2
- package/dist/preview/{chunk.YJ4PFOPC.js → chunk.ZONRIOIA.js} +1 -1
- package/dist/preview/{chunk.QVCKTDG3.js → chunk.ZY3NAJDM.js} +1 -1
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +7 -7
- package/dist/preview/chunk.2WFOKJB4.js +0 -1
- package/dist/preview/chunk.32SHA3EY.js +0 -1
- package/dist/preview/chunk.3D37E2G5.js +0 -1
- package/dist/preview/chunk.3PT3BU6K.js +0 -1
- package/dist/preview/chunk.3XTIYX6M.js +0 -1
- package/dist/preview/chunk.4O7WYLCK.js +0 -1
- package/dist/preview/chunk.5DU6FA5R.js +0 -1
- package/dist/preview/chunk.5TWRTGP6.js +0 -1
- package/dist/preview/chunk.6BR2SUAE.js +0 -1
- package/dist/preview/chunk.6TDVNWFU.js +0 -17
- package/dist/preview/chunk.6XBQDXT6.js +0 -3
- package/dist/preview/chunk.7L3I776Z.js +0 -1
- package/dist/preview/chunk.7OLKVOS6.js +0 -1
- package/dist/preview/chunk.AG7WJYM5.js +0 -3
- package/dist/preview/chunk.AMAOZVEO.js +0 -1
- package/dist/preview/chunk.AMV2ILR6.js +0 -1
- package/dist/preview/chunk.B5EFNTDA.js +0 -1
- package/dist/preview/chunk.BBLIT7S7.js +0 -1
- package/dist/preview/chunk.BSQI3KM2.js +0 -1
- package/dist/preview/chunk.CYEPHT7V.js +0 -1
- package/dist/preview/chunk.D3SWJ7OS.js +0 -1
- package/dist/preview/chunk.DHPXRDT5.js +0 -5
- package/dist/preview/chunk.DKUEZPGR.js +0 -1
- package/dist/preview/chunk.FWXW4T4I.js +0 -25
- package/dist/preview/chunk.GF5CZPZ7.js +0 -1
- package/dist/preview/chunk.GPBHUIZQ.js +0 -2
- package/dist/preview/chunk.GVFGS2HY.js +0 -1
- package/dist/preview/chunk.HGH27XZG.js +0 -23
- package/dist/preview/chunk.HMJXB6KC.js +0 -5
- package/dist/preview/chunk.HTEQCRVP.js +0 -1
- package/dist/preview/chunk.I7KN732Z.js +0 -2
- package/dist/preview/chunk.IAVIYJTL.js +0 -1
- package/dist/preview/chunk.IPKESOIU.js +0 -21
- package/dist/preview/chunk.IRNEWNUB.js +0 -1
- package/dist/preview/chunk.J7O23NKZ.js +0 -22
- package/dist/preview/chunk.JDUA5PH2.js +0 -1
- package/dist/preview/chunk.JN3WZGJY.js +0 -1
- package/dist/preview/chunk.JQEXH23N.js +0 -1
- package/dist/preview/chunk.KVQYOFDV.js +0 -1
- package/dist/preview/chunk.LAVLPYSC.js +0 -1
- package/dist/preview/chunk.MATUPDZ3.js +0 -1
- package/dist/preview/chunk.MD3N26BC.js +0 -23
- package/dist/preview/chunk.MHHNO3O2.js +0 -1
- package/dist/preview/chunk.MUWI54IP.js +0 -1
- package/dist/preview/chunk.NLZHNPDU.js +0 -93
- package/dist/preview/chunk.NSAGOOJW.js +0 -1
- package/dist/preview/chunk.NYLKG25K.js +0 -4
- package/dist/preview/chunk.OWO3OV62.js +0 -1
- package/dist/preview/chunk.ROYCJXPE.js +0 -1
- package/dist/preview/chunk.RZ73YG5K.js +0 -1
- package/dist/preview/chunk.SAWASNDO.js +0 -1
- package/dist/preview/chunk.SCVKHGO3.js +0 -1
- package/dist/preview/chunk.SM37MNS2.js +0 -1
- package/dist/preview/chunk.T2BZBR7S.js +0 -50
- package/dist/preview/chunk.TLPCYKLW.js +0 -3
- package/dist/preview/chunk.U563J5IM.js +0 -1
- package/dist/preview/chunk.U6QXLNHF.js +0 -15
- package/dist/preview/chunk.VBYJBW32.js +0 -1
- package/dist/preview/chunk.VHLL6VC6.js +0 -1
- package/dist/preview/chunk.W3WXI5B3.js +0 -1
- package/dist/preview/chunk.W43XWQRC.js +0 -1
- package/dist/preview/chunk.WJHLE73Y.js +0 -111
- package/dist/preview/chunk.ZT3ZG52B.js +0 -1
- package/dist/preview/chunk.ZU3RPI34.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as I,j as M,k as O}from"./chunk.LMZ2WMGH.js";import"./chunk.OD5QZHRC.js";import{g as P}from"./chunk.YJ4PFOPC.js";import{l as D}from"./chunk.LKM2R5UF.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import{a as C}from"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import"./chunk.NLZHNPDU.js";import"./chunk.QNC2OKLF.js";import{G as q,W as F}from"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import{la as L,sd as E}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as N}from"./chunk.AJZBJBMO.js";var f=N(q(),1);var n=N(F(),1),R=40,B=60;function T(l,o,s){return l.allNodes().filter(i=>i.kind===o).map(i=>i[s])}function Y(l){if(l.length<2)return[];let o=[...l].sort((a,d)=>a-d),s=o[o.length-1]-o[0];if(s<=0)return[];let i=Math.max(1,10**Math.floor(Math.log10(s/4))),e=s/4>=i*5?i*5:i,t=a=>Math.round(a/e)*e;return[...new Set([.2,.4,.6,.8].map(a=>t(o[Math.floor(a*(o.length-1))])))].filter(a=>a>0)}function _(l,o,s){let i=new Set(s.far??[]),e=new Map;for(let t of o.allNodes())i.has(t.kind)&&e.set(t.id,L(l.tryDefinition(t.kind),t));return[...e.entries()].map(([t,a])=>({id:t,label:a}))}function K(l,o,s){let i=_(l,o,s);return(i.length<=R?i:i.map(t=>({end:t,ties:o.out(t.id).length+o.in(t.id).length})).sort((t,a)=>a.ties-t.ties||t.end.label.localeCompare(a.end.label)).slice(0,R).map(t=>t.end)).sort((t,a)=>t.label.localeCompare(a.label))}function U(l,o,s){let i=[];for(let e of s.filters){let t=i.length;if(e.about==="is")for(let a of e.options??[])i.push({value:`is:${a}`,label:a,group:e.label,condition:{key:"is",value:a}});else if(e.about==="edge"){i.push({value:`${e.key}:*`,label:"anything",group:e.label,condition:{key:e.key,value:"*"}}),i.push({value:`${e.key}:none`,label:"nothing",group:e.label,condition:{key:e.key,value:"none"}});for(let a of K(l,o,e))i.push({value:`${e.key}:${a.id}`,label:a.label,group:e.label,condition:{key:e.key,value:a.id}})}else if(e.type==="date")for(let a of["before","after","on"])i.push({value:`${e.key}:${a}`,label:`${a}\u2026`,group:e.label,ask:{key:e.key,op:a,label:e.label}});else if(e.type==="number"){let a=l.tryDefinition(s.kind),d=Y(T(o,s.kind,e.key).filter(p=>typeof p=="number"));for(let p of["at-most","at-least"])for(let v of p==="at-most"?d:[...d].reverse())i.push({value:`${e.key}:${p}:${v}`,label:`${p==="at-most"?"at most":"at least"} ${C(a,e.key,v)}`,group:e.label,condition:{key:e.key,value:`${p}:${v}`}})}else if(e.type==="text"){let a=[...new Set(T(o,s.kind,e.key).filter(d=>typeof d=="string"&&d.length>0&&!d.includes(",")))].sort((d,p)=>d.localeCompare(p));if(a.length>=2&&a.length<=B)for(let d of a)i.push({value:`${e.key}:${d}`,label:d,group:e.label,condition:{key:e.key,value:d}})}else if(e.type==="boolean")i.push({value:`${e.key}:true`,label:"yes",group:e.label,condition:{key:e.key,value:"true"}}),i.push({value:`${e.key}:false`,label:"no",group:e.label,condition:{key:e.key,value:"false"}});else if(e.about==="via"){let a=l.tryDefinition(e.far?.[0]??"");for(let d of e.options??[])i.push({value:`${e.key}:${d}`,label:C(a,e.key.split(".")[1],d),group:e.label,condition:{key:e.key,value:d}})}else for(let a of e.options??[])i.push({value:`${e.key}:${a}`,label:C(l.tryDefinition(s.kind),e.key,a),group:e.label,condition:{key:e.key,value:a}});for(let a=t;a<i.length;a++)i[a]={...i[a],key:e.key}}return i}function V(l,o,s,i){let e=l.tryDefinition(o);return["at-most","at-least"].map(t=>({value:`${s.key}:${t}:${i}`,label:`${t==="at-most"?"at most":"at least"} ${C(e,s.key,i)}`,group:s.label,key:s.key,condition:{key:s.key,value:`${t}:${i}`}}))}function G(l){let o=l.trim().replace(/(?<=\d),(?=\d{3}\b)/g,"");return/^-?\d+(\.\d+)?$/.test(o)?Number(o):null}function j(l,o,s){let i=U(l,o,s);return s.filters.flatMap(e=>{let t=i.filter(d=>d.key===e.key);if(e.type==="number"&&e.about!=="edge")return[{key:e.key,label:e.label,entries:t,atNumber:d=>V(l,s.kind,e,d)}];if(t.length===0)return[];if(e.about!=="edge")return[{key:e.key,label:e.label,entries:t}];let a=_(l,o,e);return a.length<I?[{key:e.key,label:e.label,entries:t}]:[{key:e.key,label:e.label,entries:t.filter(d=>d.value===`${e.key}:*`||d.value===`${e.key}:none`),typed:[...a].sort((d,p)=>d.label.localeCompare(p.label))}]})}var z=8;function H(l,o){let s=o.trim().toLocaleLowerCase();if(!s)return{shown:[],more:0};let e=[...l.filter(t=>t.label.toLocaleLowerCase().includes(s))].sort((t,a)=>+!t.label.toLocaleLowerCase().startsWith(s)-+!a.label.toLocaleLowerCase().startsWith(s));return{shown:e.slice(0,z),more:Math.max(0,e.length-z)}}var J=["day","week","month","year","decade"];function ie(l){let{which:o,schema:s,graph:i,offers:e,arrangement:t,set:a,toggle:d,has:p,done:v}=l,m=l.testId,A=(0,f.useRef)(null);(0,f.useEffect)(()=>{let u=A.current?.closest("[data-graview-popover]");!u||document.activeElement!==u||(u.querySelector('[aria-pressed="true"]')??u.querySelector("button, input"))?.focus({preventScroll:!0})},[]);let y=t.sort?e.sorts.find(u=>u.key===t.sort.by):void 0,S=t.group?e.groups.find(u=>u.key===t.group.by):void 0,b=O(y),r=e.natural?e.sorts.find(u=>u.key===e.natural.by):void 0,k=o==="filter"||o==="all"&&l.parts?.filter?j(s,i,e):[],w=u=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Sort by"}),(0,n.jsx)($,{testId:`${m}-sort-default`,value:"",on:!t.sort,onPress:()=>(a({sort:void 0}),u()),children:r?`As declared (${M(r.label)})`:"As they were added"}),e.sorts.map(g=>(0,n.jsx)($,{value:g.key,on:t.sort?.by===g.key,onPress:()=>(a({sort:{by:g.key,direction:t.sort?.direction??"asc"}}),u()),children:g.label},g.key)),t.sort?(0,n.jsxs)("div",{role:"group","aria-label":"Order","data-testid":`${m}-direction`,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:"Order"}),["asc","desc"].map(g=>(0,n.jsx)($,{testId:`${m}-direction-${g}`,value:g,on:t.sort.direction===g,onPress:()=>(a({sort:{by:t.sort.by,direction:g}}),u()),children:b[g]},g))]}):null]}),c=u=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Group by"}),(0,n.jsx)($,{testId:`${m}-group-none`,value:"",on:!t.group,onPress:()=>(a({group:void 0}),u()),children:"Not grouped"}),e.groups.map(g=>(0,n.jsx)($,{value:g.key,on:t.group?.by===g.key,onPress:()=>(a({group:{by:g.key}}),u()),children:g.label},g.key)),t.group&&S?.buckets?(0,n.jsxs)("div",{role:"group","aria-label":"How wide a group is","data-testid":`${m}-bucket`,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:"Each group"}),J.map(g=>(0,n.jsx)($,{testId:`${m}-bucket-${g}`,value:g,on:(t.group.bucket??"day")===g,onPress:()=>(a({group:{by:t.group.by,bucket:g}}),u()),children:`A ${g}`},g))]}):null]}),x=u=>(0,n.jsx)(Q,{sections:k,has:p,testId:m,onToggle:g=>(d(g),u())}),h=l.parts??{sort:!0,group:!0,filter:!0};return(0,n.jsxs)("div",{ref:A,style:{display:"contents"},children:[(0,n.jsx)("style",{children:Z}),o==="sort"?w(v):o==="group"?c(v):o==="filter"?x(v):(0,n.jsxs)(n.Fragment,{children:[h.sort?(0,n.jsx)("div",{role:"group","aria-label":"Sort",children:w(v)}):null,h.group?(0,n.jsx)("div",{role:"group","aria-label":"Group",children:c(v)}):null,h.filter?(0,n.jsx)("div",{role:"group","aria-label":"Filter",children:x(v)}):null]})]})}function $({value:l,on:o,onPress:s,testId:i,children:e}){return(0,n.jsx)("button",{type:"button",className:"graview-arrange-item",value:l,"data-value":l,"aria-pressed":o,onClick:s,...i?{"data-testid":i}:{},children:e})}function Q({sections:l,has:o,testId:s,onToggle:i}){let[e,t]=(0,f.useState)(null),[a,d]=(0,f.useState)(""),[p,v]=(0,f.useState)(()=>new Set(l.length===1?[l[0].key]:[])),[m,A]=(0,f.useState)({});if(e)return(0,n.jsx)(X,{ask:e,testId:s,onDay:r=>i({key:e.key,value:`${e.op}:${r}`}),onCancel:()=>t(null)});let y=r=>(0,n.jsx)($,{value:r.value,on:r.condition?o(r.condition):!1,onPress:()=>r.condition?i(r.condition):t(r.ask),children:r.label},r.value),S=(r,k)=>{let w=(r.typed??[]).filter(h=>o({key:r.key,value:h.id})),c=H(r.typed??[],k),x=[...w,...c.shown.filter(h=>!w.includes(h))];return(0,n.jsxs)(n.Fragment,{children:[x.map(h=>y({value:`${r.key}:${h.id}`,label:h.label,group:r.label,key:r.key,condition:{key:r.key,value:h.id}})),k.trim()&&c.shown.length===0?(0,n.jsx)("span",{className:"graview-arrange-none",children:"None is called that."}):null,c.more>0?(0,n.jsx)("span",{className:"graview-arrange-none",children:`${c.more} more \u2014 type more of the name`}):null]})},b=a.trim().toLocaleLowerCase();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"graview-arrange-find",children:[(0,n.jsx)("span",{style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Find a filter"}),(0,n.jsx)("input",{type:"search","data-testid":`${s}-filter-find`,value:a,placeholder:"Find a filter, a name or a number\u2026",onChange:r=>d(r.target.value)})]}),l.map(r=>{let k=r.entries.filter(c=>c.condition&&o(c.condition)).length+(r.typed??[]).filter(c=>o({key:r.key,value:c.id})).length;if(b){let c=r.label.toLocaleLowerCase().includes(b),x=r.atNumber&&G(b)!==null?r.atNumber(G(b)):[],h=[...x,...c?r.entries:r.entries.filter(g=>g.label.toLocaleLowerCase().includes(b)&&!x.some(W=>W.value===g.value))],u=r.typed?H(r.typed,b):{shown:[],more:0};return h.length===0&&u.shown.length===0?null:(0,n.jsxs)("div",{role:"group","aria-label":r.label,"data-section":r.key,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:r.label}),h.map(y),r.typed?S(r,b):null]},r.key)}if(r.entries.length===0&&!r.typed)return null;let w=p.has(r.key);return(0,n.jsxs)("div",{role:"group","aria-label":r.label,"data-section":r.key,children:[(0,n.jsxs)("button",{type:"button",className:"graview-arrange-section","data-testid":`${s}-section`,"data-key":r.key,"aria-expanded":w,onClick:()=>v(c=>c.has(r.key)?new Set([...c].filter(x=>x!==r.key)):new Set([...c,r.key])),children:[(0,n.jsx)("span",{children:r.label}),k>0?(0,n.jsx)("span",{className:"graview-arrange-on",children:`${k} on`}):null]}),w?(0,n.jsxs)(n.Fragment,{children:[r.typed?(0,n.jsx)("input",{type:"search",className:"graview-arrange-far","data-testid":`${s}-far-find`,"data-key":r.key,"aria-label":`${r.label}: type a name`,placeholder:`Type a name (${r.typed.length})\u2026`,autoFocus:!0,value:m[r.key]??"",onChange:c=>A({...m,[r.key]:c.target.value})}):null,r.entries.map(y),r.typed?S(r,m[r.key]??""):null]}):null]},r.key)})]})}function X({ask:l,testId:o,onDay:s,onCancel:i}){let[e,t]=(0,f.useState)(""),a=/^\d{4}-\d{2}-\d{2}$/.test(e)&&Number(e.slice(0,4))>=1e3,d=()=>{a&&s(e)};return(0,n.jsxs)("div",{role:"group","aria-label":`${l.label} ${l.op} which day`,"data-testid":`${o}-ask-day`,className:"graview-arrange-ask",children:[(0,n.jsx)("p",{"aria-hidden":"true",children:`${l.label} ${l.op}`}),(0,n.jsx)("input",{type:"date","data-testid":`${o}-day`,"aria-label":`${l.label} ${l.op} which day`,autoFocus:!0,value:e,onChange:p=>t(p.target.value),onKeyDown:p=>{p.key==="Enter"?(p.preventDefault(),d()):p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),p.nativeEvent.stopImmediatePropagation(),i())}}),(0,n.jsxs)("span",{children:[(0,n.jsx)("button",{type:"button","data-testid":`${o}-day-add`,disabled:!a,onClick:d,children:"Add"}),(0,n.jsx)("button",{type:"button",onClick:i,children:"Never mind"})]})]})}var Z=`
|
|
1
|
+
import{a as I,j as M,k as O}from"./chunk.ARGEGV5T.js";import"./chunk.WS5ORRGS.js";import{g as P}from"./chunk.ZONRIOIA.js";import{l as D}from"./chunk.NXHEOHRR.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import{a as C}from"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{G as q,Y as F}from"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import{ma as L,yd as E}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as N}from"./chunk.AJZBJBMO.js";var f=N(q(),1);var n=N(F(),1),R=40,B=60;function T(l,o,s){return l.allNodes().filter(i=>i.kind===o).map(i=>i[s])}function Y(l){if(l.length<2)return[];let o=[...l].sort((a,d)=>a-d),s=o[o.length-1]-o[0];if(s<=0)return[];let i=Math.max(1,10**Math.floor(Math.log10(s/4))),e=s/4>=i*5?i*5:i,t=a=>Math.round(a/e)*e;return[...new Set([.2,.4,.6,.8].map(a=>t(o[Math.floor(a*(o.length-1))])))].filter(a=>a>0)}function _(l,o,s){let i=new Set(s.far??[]),e=new Map;for(let t of o.allNodes())i.has(t.kind)&&e.set(t.id,L(l.tryDefinition(t.kind),t));return[...e.entries()].map(([t,a])=>({id:t,label:a}))}function K(l,o,s){let i=_(l,o,s);return(i.length<=R?i:i.map(t=>({end:t,ties:o.out(t.id).length+o.in(t.id).length})).sort((t,a)=>a.ties-t.ties||t.end.label.localeCompare(a.end.label)).slice(0,R).map(t=>t.end)).sort((t,a)=>t.label.localeCompare(a.label))}function U(l,o,s){let i=[];for(let e of s.filters){let t=i.length;if(e.about==="is")for(let a of e.options??[])i.push({value:`is:${a}`,label:a,group:e.label,condition:{key:"is",value:a}});else if(e.about==="edge"){i.push({value:`${e.key}:*`,label:"anything",group:e.label,condition:{key:e.key,value:"*"}}),i.push({value:`${e.key}:none`,label:"nothing",group:e.label,condition:{key:e.key,value:"none"}});for(let a of K(l,o,e))i.push({value:`${e.key}:${a.id}`,label:a.label,group:e.label,condition:{key:e.key,value:a.id}})}else if(e.type==="date")for(let a of["before","after","on"])i.push({value:`${e.key}:${a}`,label:`${a}\u2026`,group:e.label,ask:{key:e.key,op:a,label:e.label}});else if(e.type==="number"){let a=l.tryDefinition(s.kind),d=Y(T(o,s.kind,e.key).filter(p=>typeof p=="number"));for(let p of["at-most","at-least"])for(let v of p==="at-most"?d:[...d].reverse())i.push({value:`${e.key}:${p}:${v}`,label:`${p==="at-most"?"at most":"at least"} ${C(a,e.key,v)}`,group:e.label,condition:{key:e.key,value:`${p}:${v}`}})}else if(e.type==="text"){let a=[...new Set(T(o,s.kind,e.key).filter(d=>typeof d=="string"&&d.length>0&&!d.includes(",")))].sort((d,p)=>d.localeCompare(p));if(a.length>=2&&a.length<=B)for(let d of a)i.push({value:`${e.key}:${d}`,label:d,group:e.label,condition:{key:e.key,value:d}})}else if(e.type==="boolean")i.push({value:`${e.key}:true`,label:"yes",group:e.label,condition:{key:e.key,value:"true"}}),i.push({value:`${e.key}:false`,label:"no",group:e.label,condition:{key:e.key,value:"false"}});else if(e.about==="via"){let a=l.tryDefinition(e.far?.[0]??"");for(let d of e.options??[])i.push({value:`${e.key}:${d}`,label:C(a,e.key.split(".")[1],d),group:e.label,condition:{key:e.key,value:d}})}else for(let a of e.options??[])i.push({value:`${e.key}:${a}`,label:C(l.tryDefinition(s.kind),e.key,a),group:e.label,condition:{key:e.key,value:a}});for(let a=t;a<i.length;a++)i[a]={...i[a],key:e.key}}return i}function V(l,o,s,i){let e=l.tryDefinition(o);return["at-most","at-least"].map(t=>({value:`${s.key}:${t}:${i}`,label:`${t==="at-most"?"at most":"at least"} ${C(e,s.key,i)}`,group:s.label,key:s.key,condition:{key:s.key,value:`${t}:${i}`}}))}function G(l){let o=l.trim().replace(/(?<=\d),(?=\d{3}\b)/g,"");return/^-?\d+(\.\d+)?$/.test(o)?Number(o):null}function j(l,o,s){let i=U(l,o,s);return s.filters.flatMap(e=>{let t=i.filter(d=>d.key===e.key);if(e.type==="number"&&e.about!=="edge")return[{key:e.key,label:e.label,entries:t,atNumber:d=>V(l,s.kind,e,d)}];if(t.length===0)return[];if(e.about!=="edge")return[{key:e.key,label:e.label,entries:t}];let a=_(l,o,e);return a.length<I?[{key:e.key,label:e.label,entries:t}]:[{key:e.key,label:e.label,entries:t.filter(d=>d.value===`${e.key}:*`||d.value===`${e.key}:none`),typed:[...a].sort((d,p)=>d.label.localeCompare(p.label))}]})}var z=8;function H(l,o){let s=o.trim().toLocaleLowerCase();if(!s)return{shown:[],more:0};let e=[...l.filter(t=>t.label.toLocaleLowerCase().includes(s))].sort((t,a)=>+!t.label.toLocaleLowerCase().startsWith(s)-+!a.label.toLocaleLowerCase().startsWith(s));return{shown:e.slice(0,z),more:Math.max(0,e.length-z)}}var J=["day","week","month","year","decade"];function ie(l){let{which:o,schema:s,graph:i,offers:e,arrangement:t,set:a,toggle:d,has:p,done:v}=l,m=l.testId,A=(0,f.useRef)(null);(0,f.useEffect)(()=>{let u=A.current?.closest("[data-graview-popover]");!u||document.activeElement!==u||(u.querySelector('[aria-pressed="true"]')??u.querySelector("button, input"))?.focus({preventScroll:!0})},[]);let y=t.sort?e.sorts.find(u=>u.key===t.sort.by):void 0,S=t.group?e.groups.find(u=>u.key===t.group.by):void 0,b=O(y),r=e.natural?e.sorts.find(u=>u.key===e.natural.by):void 0,k=o==="filter"||o==="all"&&l.parts?.filter?j(s,i,e):[],w=u=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Sort by"}),(0,n.jsx)($,{testId:`${m}-sort-default`,value:"",on:!t.sort,onPress:()=>(a({sort:void 0}),u()),children:r?`As declared (${M(r.label)})`:"As they were added"}),e.sorts.map(g=>(0,n.jsx)($,{value:g.key,on:t.sort?.by===g.key,onPress:()=>(a({sort:{by:g.key,direction:t.sort?.direction??"asc"}}),u()),children:g.label},g.key)),t.sort?(0,n.jsxs)("div",{role:"group","aria-label":"Order","data-testid":`${m}-direction`,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:"Order"}),["asc","desc"].map(g=>(0,n.jsx)($,{testId:`${m}-direction-${g}`,value:g,on:t.sort.direction===g,onPress:()=>(a({sort:{by:t.sort.by,direction:g}}),u()),children:b[g]},g))]}):null]}),c=u=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{children:"Group by"}),(0,n.jsx)($,{testId:`${m}-group-none`,value:"",on:!t.group,onPress:()=>(a({group:void 0}),u()),children:"Not grouped"}),e.groups.map(g=>(0,n.jsx)($,{value:g.key,on:t.group?.by===g.key,onPress:()=>(a({group:{by:g.key}}),u()),children:g.label},g.key)),t.group&&S?.buckets?(0,n.jsxs)("div",{role:"group","aria-label":"How wide a group is","data-testid":`${m}-bucket`,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:"Each group"}),J.map(g=>(0,n.jsx)($,{testId:`${m}-bucket-${g}`,value:g,on:(t.group.bucket??"day")===g,onPress:()=>(a({group:{by:t.group.by,bucket:g}}),u()),children:`A ${g}`},g))]}):null]}),x=u=>(0,n.jsx)(Q,{sections:k,has:p,testId:m,onToggle:g=>(d(g),u())}),h=l.parts??{sort:!0,group:!0,filter:!0};return(0,n.jsxs)("div",{ref:A,style:{display:"contents"},children:[(0,n.jsx)("style",{children:Z}),o==="sort"?w(v):o==="group"?c(v):o==="filter"?x(v):(0,n.jsxs)(n.Fragment,{children:[h.sort?(0,n.jsx)("div",{role:"group","aria-label":"Sort",children:w(v)}):null,h.group?(0,n.jsx)("div",{role:"group","aria-label":"Group",children:c(v)}):null,h.filter?(0,n.jsx)("div",{role:"group","aria-label":"Filter",children:x(v)}):null]})]})}function $({value:l,on:o,onPress:s,testId:i,children:e}){return(0,n.jsx)("button",{type:"button",className:"graview-arrange-item",value:l,"data-value":l,"aria-pressed":o,onClick:s,...i?{"data-testid":i}:{},children:e})}function Q({sections:l,has:o,testId:s,onToggle:i}){let[e,t]=(0,f.useState)(null),[a,d]=(0,f.useState)(""),[p,v]=(0,f.useState)(()=>new Set(l.length===1?[l[0].key]:[])),[m,A]=(0,f.useState)({});if(e)return(0,n.jsx)(X,{ask:e,testId:s,onDay:r=>i({key:e.key,value:`${e.op}:${r}`}),onCancel:()=>t(null)});let y=r=>(0,n.jsx)($,{value:r.value,on:r.condition?o(r.condition):!1,onPress:()=>r.condition?i(r.condition):t(r.ask),children:r.label},r.value),S=(r,k)=>{let w=(r.typed??[]).filter(h=>o({key:r.key,value:h.id})),c=H(r.typed??[],k),x=[...w,...c.shown.filter(h=>!w.includes(h))];return(0,n.jsxs)(n.Fragment,{children:[x.map(h=>y({value:`${r.key}:${h.id}`,label:h.label,group:r.label,key:r.key,condition:{key:r.key,value:h.id}})),k.trim()&&c.shown.length===0?(0,n.jsx)("span",{className:"graview-arrange-none",children:"None is called that."}):null,c.more>0?(0,n.jsx)("span",{className:"graview-arrange-none",children:`${c.more} more \u2014 type more of the name`}):null]})},b=a.trim().toLocaleLowerCase();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("label",{className:"graview-arrange-find",children:[(0,n.jsx)("span",{style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Find a filter"}),(0,n.jsx)("input",{type:"search","data-testid":`${s}-filter-find`,value:a,placeholder:"Find a filter, a name or a number\u2026",onChange:r=>d(r.target.value)})]}),l.map(r=>{let k=r.entries.filter(c=>c.condition&&o(c.condition)).length+(r.typed??[]).filter(c=>o({key:r.key,value:c.id})).length;if(b){let c=r.label.toLocaleLowerCase().includes(b),x=r.atNumber&&G(b)!==null?r.atNumber(G(b)):[],h=[...x,...c?r.entries:r.entries.filter(g=>g.label.toLocaleLowerCase().includes(b)&&!x.some(W=>W.value===g.value))],u=r.typed?H(r.typed,b):{shown:[],more:0};return h.length===0&&u.shown.length===0?null:(0,n.jsxs)("div",{role:"group","aria-label":r.label,"data-section":r.key,children:[(0,n.jsx)("p",{"aria-hidden":"true",children:r.label}),h.map(y),r.typed?S(r,b):null]},r.key)}if(r.entries.length===0&&!r.typed)return null;let w=p.has(r.key);return(0,n.jsxs)("div",{role:"group","aria-label":r.label,"data-section":r.key,children:[(0,n.jsxs)("button",{type:"button",className:"graview-arrange-section","data-testid":`${s}-section`,"data-key":r.key,"aria-expanded":w,onClick:()=>v(c=>c.has(r.key)?new Set([...c].filter(x=>x!==r.key)):new Set([...c,r.key])),children:[(0,n.jsx)("span",{children:r.label}),k>0?(0,n.jsx)("span",{className:"graview-arrange-on",children:`${k} on`}):null]}),w?(0,n.jsxs)(n.Fragment,{children:[r.typed?(0,n.jsx)("input",{type:"search",className:"graview-arrange-far","data-testid":`${s}-far-find`,"data-key":r.key,"aria-label":`${r.label}: type a name`,placeholder:`Type a name (${r.typed.length})\u2026`,autoFocus:!0,value:m[r.key]??"",onChange:c=>A({...m,[r.key]:c.target.value})}):null,r.entries.map(y),r.typed?S(r,m[r.key]??""):null]}):null]},r.key)})]})}function X({ask:l,testId:o,onDay:s,onCancel:i}){let[e,t]=(0,f.useState)(""),a=/^\d{4}-\d{2}-\d{2}$/.test(e)&&Number(e.slice(0,4))>=1e3,d=()=>{a&&s(e)};return(0,n.jsxs)("div",{role:"group","aria-label":`${l.label} ${l.op} which day`,"data-testid":`${o}-ask-day`,className:"graview-arrange-ask",children:[(0,n.jsx)("p",{"aria-hidden":"true",children:`${l.label} ${l.op}`}),(0,n.jsx)("input",{type:"date","data-testid":`${o}-day`,"aria-label":`${l.label} ${l.op} which day`,autoFocus:!0,value:e,onChange:p=>t(p.target.value),onKeyDown:p=>{p.key==="Enter"?(p.preventDefault(),d()):p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),p.nativeEvent.stopImmediatePropagation(),i())}}),(0,n.jsxs)("span",{children:[(0,n.jsx)("button",{type:"button","data-testid":`${o}-day-add`,disabled:!a,onClick:d,children:"Add"}),(0,n.jsx)("button",{type:"button",onClick:i,children:"Never mind"})]})]})}var Z=`
|
|
2
2
|
.graview-arrange-list{display:grid;align-content:start;width:min(300px,calc(100vw - 24px));height:auto;max-height:min(70vh,520px);overflow:auto;overscroll-behavior:contain;margin:0;padding:0 6px 6px;border-radius:10px;border:1px solid var(--graview-edge);background:linear-gradient(var(--graview-float),var(--graview-float)),var(--graview-panel);box-shadow:var(--graview-lift-high);color:var(--graview-ink);font-size:.875rem;line-height:1.3}
|
|
3
3
|
.graview-arrange-list>*:first-child:not(.graview-arrange-find){margin-top:6px}
|
|
4
4
|
@media (max-width:519px){.graview-arrange-list{left:0!important;right:0!important;top:auto!important;bottom:0!important;width:100%!important;max-height:min(80dvh,560px)!important;border-radius:14px 14px 0 0;padding-bottom:calc(10px + env(safe-area-inset-bottom))}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as S}from"./chunk.ZONRIOIA.js";import{e as x}from"./chunk.NXHEOHRR.js";import{a as C}from"./chunk.TBY5IR7C.js";import{c as P}from"./chunk.W6L2VAJG.js";import{je as b,ma as y,qa as k,sa as w,va as h}from"./chunk.6L6RUOSF.js";function v(e,t){try{let n=P(e);return n.t==="call"&&n.fn==="all"&&n.args.length===1&&n.args[0].t==="lit"&&n.args[0].value===t}catch{return!1}}function M(e,t){let n=e.options??{};if(e.name===void 0||e.name==="blocks"){let r=n.blocks;if(!Array.isArray(r)||r.length!==1)return!0;let i=r[0];return typeof i?.list!="string"||!v(i.list,t)||i.limit!==void 0}return e.name==="columns"?n.cap!==void 0||Array.isArray(n.hidden)&&n.hidden.length>0:e.name==="calendar"?n.horizon!==void 0:!1}function V(e,t,n,r,i,c=new Set){let g=i?b({filter:i}).filter??[]:[],l=g.length>0?x(e,n).filters:[],s=g.filter(o=>l.some(a=>a.key===o.key));return s.length===0?r:S(r,{filter:s},{schema:e,graph:t,flagged:c}).nodes}var T=new WeakMap,N=e=>e.charAt(0).toUpperCase()+e.slice(1),R=e=>(e??"").replace(/\s+/g," ").trim();function E(e){let t=e.cloneNode(!0);for(let n of t.querySelectorAll("span"))n.remove();return R(t.textContent).replace(/^[▸▾]\s*/,"")}function W(e,t){let n=e.at;if(!n.isConnected||n.closest("[data-graview-popover], [data-worker-view]"))return;let r=n.closest("[data-graview-page-main], main")??n.closest("[data-graview-face]"),i=t.store.schema,c=e.about?.length===1&&e.about[0].startsWith("aggregate:")?e.about[0].slice(10):void 0,g=c&&!c.includes("+")&&i.tryDefinition(c)?c:void 0,l,s=e.on!==void 0?t.store.graph.getNode(e.on):void 0;if(s)l={name:`${N(h(i.tryDefinition(s.kind),s.kind))} page`,slot:"record",kind:s.kind,record:s.id,elements:r?[r]:[],main:r};else if(e.place!==void 0){let o=t.views.places?.().find(a=>a.as===e.place);o&&(l={name:o.title,slot:"place",kind:o.kind,place:o.as,elements:r?[r]:[],main:r})}else if(g){let o=n.closest(".graview-group-head"),a=o?.closest('[data-testid="list-group"]'),f=o?E(o):"";l=a&&f?{name:f,slot:"group",kind:g,group:f,elements:[a],main:r}:{name:k(i,g),slot:"list",kind:g,elements:r?[r]:[],main:r}}else e.home&&(l={name:"Home",slot:"home",elements:r?[r]:[],main:r});return l}function j(e,t){let n=t.onProposeChange!==void 0&&t.composeChange!==void 0&&C(t.store,t.principal),r=e.slot!=="place"&&typeof t.keptViews?.fork=="function"&&typeof t.keptViews.draftFork=="function"&&t.keptViews.current().may.views===!0;return n||r}var m=/^\d{4}-\d{2}-\d{2}/,L=e=>{if(typeof e=="number")return String(e);if(!(typeof e!="string"||!e.trim())){if(m.test(e)){let t=new Date(`${e.slice(0,10)}T12:00:00`);return Number.isNaN(t.getTime())?void 0:t.toLocaleDateString("en-US",{month:"short",day:"numeric"})}return e.length<=40?e:void 0}};function F(e,t){let n=[],{store:r}=t,i=(e.main?.innerText??"").toLowerCase();if((e.slot==="list"||e.slot==="group")&&e.kind){let c=r.schema.tryDefinition(e.kind),g=Object.keys(c?.fields?.shape??{}).filter(d=>!["label","name","title"].includes(d)),l=r.graph.nodesOfKind(e.kind).filter(d=>i.includes(y(c,d).toLowerCase())).slice(0,6),s=d=>w(c,d).toLowerCase(),o=g.find(d=>l.some(u=>typeof u[d]=="string"&&m.test(String(u[d])))),a=g.find(d=>{let u=l.map(p=>L(p[d])).filter(p=>p!==void 0);return u.length>0&&u.every(p=>!i.includes(p.toLowerCase()))});if(a){let d=l.some(u=>m.test(String(u[a]??"")));n.push(d&&!/date|day/.test(s(a))?`Show the ${s(a)} date on each row`:`Show ${s(a)} on each row`)}let f=t.views.arrangement?.()?.lists?.[e.kind],A=typeof f?.sort=="string"?f.sort:f?.sort?.by;o&&A!==o&&n.push(`Sort these by ${/date|day/.test(s(o))?s(o):`${s(o)} date`}, soonest first`)}return n.push(`Make \u201C${e.name}\u201D easier to read at a glance`),n.slice(0,3)}export{M as a,V as b,T as c,W as d,j as e,F as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as B,b as ve}from"./chunk.
|
|
1
|
+
import{a as B,b as ve}from"./chunk.OKHXXIMN.js";import{a as ye,c as he,d as be,f as we}from"./chunk.6IMRCKB4.js";import{b as S,c as fe,d as me}from"./chunk.6TBQV3NO.js";import{k as ce,l as ge}from"./chunk.MT252WP4.js";import{b as pe,k as q}from"./chunk.VVIQSFM4.js";import{b as de,e as ue}from"./chunk.TQ3MNB6K.js";import{G as Re,Y as se,h as ae,ha as le,u as ie}from"./chunk.JCKIJSW7.js";import{Oa as te,Za as re,_a as oe,ha as Z,ma as ee,va as ne}from"./chunk.6L6RUOSF.js";import{b as W}from"./chunk.AJZBJBMO.js";var l=W(Re(),1);var i=W(se(),1);function qe({affordance:n,onApply:a,onCancel:u,store:w}){let y=le(),s=w??y?.store,[x,_]=(0,l.useState)({}),[p,D]=(0,l.useState)(""),[I,F]=(0,l.useState)(G),[J,V]=(0,l.useState)(void 0),U=(0,l.useId)(),L=(0,l.useRef)(null),A=n.open.filter(e=>!(e.name in x)),o=A[0],v=s.allMutations().find(e=>e.name===n.mutation),P=(0,l.useMemo)(()=>De(v,s,n.args??{}),[v,s,n.args]),d=o?P[o.name]:void 0,E=ge(n.open.filter(e=>e.shape?.type==="date").map(e=>e.name)),Se=(()=>{if(!E||o?.name!==E.end||o.shape?.type!=="date")return;let e=x[E.start];if(typeof e!="string")return;let r=P[E.start];return ce(typeof r=="string"?r:void 0,e,typeof d=="string"?d:void 0,{time:o.shape.time===!0,instant:o.shape.instant===!0})})();(0,l.useEffect)(()=>{D(Se??ke(d,o?.shape)),F(Array.isArray(d)?d:G),V(d)},[o?.name]),(0,l.useEffect)(()=>{L.current?.scrollIntoView?.({block:"nearest",inline:"nearest"})},[o?.name]),(0,l.useLayoutEffect)(()=>{let e=L.current,r=typeof document>"u"?null:document.activeElement,f=r instanceof HTMLElement&&r.getAttribute("data-affordance")===n.id;if(!e||r&&r!==document.body&&!e.contains(r)&&!f)return;let b=e.querySelector('[data-testid="ask-filter"], form input, [role=group] button:not([disabled])');b&&b!==r&&b.focus()},[o?.name]);let Y=ve({flow:"both",letters:!0});if(!o)return null;let h=e=>{let r=d!==void 0&&JSON.stringify(e)===JSON.stringify(d)?void 0:e,f={...x,[o.name]:r};if(n.open.filter(R=>!(R.name in f)).length===0){let R=a(Object.fromEntries(Object.entries(f).filter(([,M])=>M!==void 0)));R&&R.length>0&&_(Object.fromEntries(Object.entries(f).filter(([M])=>!R.includes(M))))}else _(f)},O=o.optional?(0,i.jsx)("button",{type:"button",onClick:()=>h(void 0),style:{fontSize:"0.8125rem"},children:"Skip"}):null,t=o.shape??{type:"unknown"},c=t.type==="number"?t.amount:void 0,g=Ee(o,t),m=q(s.schema,v,o.name),Q=te((v?.input?.shape??{})[o.name]),xe=oe((v?.input?.shape??{})[o.name]),N=re(o.name),Ae=typeof d=="boolean"?d?"yes":"no":d,[T,Oe]=(0,l.useState)(""),X=(0,l.useMemo)(()=>{let e=g.map(r=>s.graph.getNode(r)).filter(r=>r!==void 0);return pe(e,r=>s.schema.tryDefinition(r))},[g,s]),j=e=>{let r=Ce(s,t,e),f=t.type==="choice"||t.type==="several"&&t.of.type==="choice"?m.option(e):r,b=X.get(e);return b?`${f} \xB7 ${b}`:f},$=(0,l.useMemo)(()=>{let e=T.trim().toLowerCase();return e===""?g:g.filter(r=>j(r).toLowerCase().includes(e))},[g,T,s,t,X]),k=t.type==="several",H=t.type==="file"?t:t.type==="several"&&t.of.type==="file"?t.of:void 0,K=k&&g.length===0,C=o.kinds&&o.kinds.length>0&&!o.kinds.includes("*")?o.kinds.map(e=>Z(ne(s.schema.tryDefinition(e),e))).join(" or "):m.label,Ne=n.open.length>1?`${C} \xB7 ${n.open.length-A.length+1} of ${n.open.length}`:C;return(0,i.jsxs)("div",{ref:L,"data-graview-asking":n.id,style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:4,padding:"5px 0 2px"},children:[n.open.length>1||g.length>0?(0,i.jsx)("span",{id:U,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:Ne}):null,g.length>z?(0,i.jsx)("input",{type:"search",value:T,onChange:e=>Oe(e.target.value),placeholder:`Filter ${g.length}\u2026`,"aria-label":`Filter ${C}`,"data-testid":"ask-filter",onKeyDown:e=>{if(e.key!=="ArrowDown"||e.metaKey||e.ctrlKey||e.altKey)return;let r=Y.ref.current?.querySelector(`[${B}][tabindex="0"]`);r&&(e.preventDefault(),r.focus())},style:{font:"inherit",fontSize:"0.8125rem",minWidth:0,padding:"3px 7px"}}):null,xe?(0,i.jsxs)("form",{style:{display:"grid",gap:4},onSubmit:e=>{e.preventDefault(),h(J??(d===void 0?void 0:null))},children:[(0,i.jsx)(be,{value:J,onChange:V,start:N?x[N]??P[N]:void 0,label:`${N?q(s.schema,v,N).label:m.label} repeats`,name:o.name}),(0,i.jsxs)("span",{style:{display:"flex",gap:4},children:[(0,i.jsx)("button",{type:"submit",style:{fontSize:"0.8125rem"},children:A.length>1?"Next":"Apply"}),O]})]}):Q?(0,i.jsxs)("div",{style:{display:"grid",gap:4},children:[(0,i.jsx)(he,{relation:Q,value:d,onChange:h,label:m.label}),O]}):H?(0,i.jsxs)("div",{style:{display:"grid",gap:4},children:[(0,i.jsx)(ye,{as:"control",value:d,onChange:h,several:k,image:H.image===!0,video:H.video===!0,label:m.label}),O]}):g.length>0?(0,i.jsxs)("div",{...Y,role:"group","aria-labelledby":U,style:{display:"flex",flexWrap:"wrap",gap:4},children:[$.slice(0,z).map(e=>{let r=k?I.includes(e):e===Ae;return(0,i.jsx)("button",{type:"button",[B]:"","aria-label":`${C}: ${j(e)}`,...k?{"aria-pressed":r}:r?{"aria-current":!0}:{},style:{padding:"3px 9px",fontSize:"0.8125rem",...r?{borderColor:"var(--graview-accent)",color:"var(--graview-accent)"}:{}},onClick:()=>k?F(f=>f.includes(e)?f.filter(b=>b!==e):[...f,e]):h(t.type==="boolean"?e==="yes":e),children:j(e)},e)}),$.length>z?(0,i.jsxs)("span",{"data-testid":"ask-more",style:{alignSelf:"center",fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:[$.length-z," more \u2014 type to narrow"]}):null,$.length===0?(0,i.jsxs)("span",{"data-testid":"ask-none",style:{alignSelf:"center",fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["None of the ",g.length," match that."]}):null,k?(0,i.jsx)("button",{type:"button",disabled:I.length===0,style:{fontSize:"0.8125rem"},onClick:()=>{let e=I;F(G),h(e)},children:A.length>1?"Next":"Apply"}):null,O]}):(0,i.jsxs)("form",{style:{display:"flex",flexWrap:"wrap",gap:4},onSubmit:e=>{if(e.preventDefault(),d!==void 0&&p===ke(d,t)){h(void 0);return}if(K){h(p.split(/[,\n]/).map(r=>r.trim()).filter(Boolean));return}if(p.trim().length!==0){if(c){let r=me(p,c);r!==void 0&&h(r);return}h(t.type==="number"?t.duration?ue(p)??p:Number(p):p)}},children:[t.type==="text"&&t.long?(0,i.jsx)("textarea",{autoFocus:!0,name:o.name,"aria-label":m.label,placeholder:m.label,value:p,rows:4,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key==="Escape"?u():e.key==="Enter"&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())},style:{flex:"1 1 100%",minWidth:0,font:"inherit",fontSize:"0.875rem",lineHeight:1.45,padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)",resize:"vertical",fieldSizing:"content",minHeight:"5.5em",maxHeight:"40vh"}}):t.type==="date"?(0,i.jsx)(we,{autoFocus:!0,name:o.name,label:m.label,value:p===""?void 0:p,time:t.time===!0,instant:t.instant===!0,partial:t.partial===!0,onChange:e=>D(e??""),onCancel:u,boxStyle:{fontSize:"0.875rem",padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}):(0,i.jsx)("input",{autoFocus:!0,type:t.type==="number"&&!t.duration&&!c?"number":t.type==="text"&&t.holds==="phone"?"tel":"text",...c?{inputMode:"decimal","data-graview-amount":c.format??"unit"}:{},name:o.name,"aria-label":m.label,placeholder:K?`${m.label}, separated by commas`:c?`${m.label}, ${S(c).hint} \u2014 ${S(c).prefix??""}${S(c).placeholder}${S(c).suffix?` ${S(c).suffix}`:""}`:m.label,value:p,...t.type==="number"&&t.min!==void 0?{min:t.min}:{},...t.type==="number"&&t.max!==void 0?{max:t.max}:{},...t.type==="number"&&t.step!==void 0?{step:t.step}:{},onChange:e=>D(e.target.value),onKeyDown:e=>{e.key==="Escape"&&u()},style:{flex:1,minWidth:0,font:"inherit",fontSize:"0.875rem",padding:"5px 8px",borderRadius:7,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}),(0,i.jsx)("button",{type:"submit",disabled:!K&&p.trim().length===0,style:{fontSize:"0.8125rem"},children:A.length>1?"Next":"Apply"}),O]})]})}var G=[];function De(n,a,u){let w=n?.derived?.act==="edit"&&n.subject?u[n.subject.arg]:void 0,y=typeof w=="string"?a.graph.getNode(w):void 0;return y?Object.fromEntries((n.writes??[]).filter(s=>y[s]!==void 0&&y[s]!==null).map(s=>[s,y[s]])):{}}function ke(n,a){return typeof n=="number"?a?.type==="number"&&a.amount?fe(n,a.amount):String(n):Array.isArray(n)?n.every(u=>typeof u=="string")?n.join(", "):"":typeof n!="string"?"":n}var z=10;function Ee(n,a){return n.candidates&&n.candidates.length>0?n.candidates:a.type==="choice"?a.options:a.type==="several"&&a.of.type==="choice"?a.of.options:a.type==="boolean"?$e:[]}var $e=["yes","no"];function Ce(n,a,u){return a.type==="boolean"||a.type==="choice"||a.type==="several"&&a.of.type==="choice"?u:ze(n,u)}function ze(n,a){let u=ae(a);if(u){let s=de(n.schema,n.graph.getNode(u.from)?.kind??"",u.kind,"out");return s.charAt(0).toUpperCase()+s.slice(1)}let w=ie(a);if(w.length>0)return w.map(s=>n.schema.tryDefinition(s)?.plural??`${s}s`).join(" + ");let y=n.graph.getNode(a);return y?ee(n.schema.tryDefinition(y.kind),y):a}export{qe as a,ze as b};
|
|
@@ -0,0 +1,17 @@
|
|
|
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 U,b as X,c as Y}from"./chunk.6ZRVVRDQ.js";import"./chunk.DDSAFU3B.js";import{a as E,b as Q}from"./chunk.MB7LKKUD.js";import{a as J}from"./chunk.MEAUTBVM.js";import"./chunk.OKHXXIMN.js";import"./chunk.6IMRCKB4.js";import"./chunk.7KX36ENH.js";import"./chunk.QDDDKEBH.js";import"./chunk.QKRQPUCE.js";import"./chunk.KBJ3UUER.js";import"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import{D as F,E as _,G as ne,Oa as G,Y as K,Ya as A,ha as W}from"./chunk.JCKIJSW7.js";import{a as D}from"./chunk.SDO3U72B.js";import{oa as H,zd as V}from"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import{b as k}from"./chunk.AJZBJBMO.js";var r=k(ne(),1);var a=k(K(),1);function le(t){let n=[];return t.applied.length>0&&t.intent&&n.push(`${t.intent}.`),t.unchanged.length>0&&n.push(`${t.unchanged.length} already so.`),t.allOrNothing&&n.push("None of it was kept."),n.join(" ")}var ie=G(D(()=>(__graviewPreload(import.meta.url,["./chunk.4LWWXIM4.js","./chunk.HXRHEPPJ.js","./chunk.QNWGDG2Z.js","./chunk.BJUUSIQY.js","./chunk.QDDDKEBH.js","./chunk.F7KVEWFH.js","./chunk.QKRQPUCE.js","./chunk.SPJ34VHA.js","./chunk.XOZU4OFA.js","./chunk.KBJ3UUER.js","./chunk.U5KJQFAP.js","./chunk.6TBQV3NO.js","./chunk.MT252WP4.js","./chunk.VVIQSFM4.js","./chunk.TQ3MNB6K.js","./chunk.VGYG2IBZ.js","./chunk.RJ7VSWTA.js","./chunk.P43LPXXJ.js","./chunk.JCKIJSW7.js","./chunk.SDO3U72B.js","./chunk.6L6RUOSF.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JAPTTM6Y.js")))),oe=ie.part((t,n)=>(0,a.jsx)(t.SeveralAi,{...n}),{quiet:!0});function se(t){let n=W()?.ai;return!F(n)||!_(n)?null:(0,a.jsx)(r.Suspense,{fallback:null,children:(0,a.jsx)(oe,{...t})})}function we({store:t,chosen:n,principal:d,context:c,via:N,anchor:O,of:f,onChooseAll:P,onClear:w,onActed:Z}){let[L,ee]=(0,r.useState)(0);(0,r.useEffect)(()=>t.subscribe(()=>ee(e=>e+1)),[t]);let g=n.join(`
|
|
2
|
+
`),{acts:p,withheld:$}=(0,r.useMemo)(()=>U(t,n,{...d?{principal:d}:{},...c?{context:c}:{}}),[t,g,d,c,L]),[M,h]=(0,r.useState)(!1),[o,u]=(0,r.useState)(null),[v,C]=(0,r.useState)(null),y=(0,r.useRef)(null),R=(0,r.useId)(),b=(0,r.useMemo)(()=>[...new Set(n.map(e=>t.graph.getNode(e)?.kind))],[t,g]),s=(0,r.useMemo)(()=>n.filter(e=>t.graph.has(e)),[t,g,L]),ae=b.length===1&&b[0]?`${H(t.schema,b[0],n.length)} chosen`:`${n.length} chosen`,T=typeof matchMedia=="function"&&matchMedia("(pointer: coarse), (max-width: 599px)").matches?2:3,z=p.filter(e=>!e.more),te=z.slice(0,T),I=[...z.slice(T),...p.filter(e=>e.more)];(0,r.useEffect)(()=>{u(null),h(!1)},[g]),(0,r.useLayoutEffect)(()=>{let e=y.current;if(!e)return;if(typeof e.showPopover=="function"&&!A(e))try{e.showPopover()}catch{}let l=()=>{Q(e,O?.()??null),dispatchEvent(new Event(E))};l(),addEventListener("resize",l),addEventListener("scroll",l,!0);let i=typeof ResizeObserver=="function"?new ResizeObserver(l):null;return i?.observe(e),()=>{if(i?.disconnect(),removeEventListener("resize",l),removeEventListener("scroll",l,!0),e.isConnected&&A(e))try{e.hidePopover()}catch{}dispatchEvent(new Event(E))}},[O]);let x=(0,r.useRef)({asking:o,onClear:w});x.current={asking:o,onClear:w},(0,r.useEffect)(()=>{let e=l=>{if(l.key!=="Escape"||l.defaultPrevented)return;let i=document.activeElement;if(!(!(y.current?.contains(i)??!1)&&(i instanceof HTMLTextAreaElement||i instanceof HTMLInputElement&&i.type!=="checkbox"||i instanceof HTMLSelectElement))){if(l.preventDefault(),l.stopPropagation(),x.current.asking){u(null);return}x.current.onClear()}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);let q=(e,l={})=>{let i={...e.args,...l},S=e.open.length>0?X(t,{...e,args:i,open:[]},s,d).applies:e.applies,m=Y(t,{mutation:e.mutation,subject:e.subject,args:i,label:e.label},S.length>0?S:s,{...d?{author:d}:{},...N?{via:N}:{},...c?{context:c}:{}});u(null),h(!1),C(m.refused.length>0||m.applied.length===0?m:null),Z(m.refused.map(re=>re.id))},B=e=>{C(null),h(!1),e.open.length>0?u(e):q(e)},j=e=>(0,a.jsxs)("button",{type:"button",className:"graview-several-act","data-testid":"several-act","data-act":e.id,"data-mutation":e.mutation,"data-applies":e.applies.length,...e.destructive?{"data-tone":"warn"}:{},"aria-pressed":o?.id===e.id?!0:void 0,onClick:()=>B(e),children:[e.label,e.open.length>0?"\u2026":"",e.applies.length<s.length?(0,a.jsx)("span",{className:"graview-several-act-count",children:` \u2014 ${e.applies.length} of ${s.length}`}):null]},e.id);return(0,a.jsxs)("div",{ref:y,popover:"manual",role:"region","aria-label":"The chosen records",className:"graview-several-bar","data-testid":"several-bar","data-graview-foot":"","data-graview-overlay":"","data-graview-popover":"","data-graview-offstage":"",style:de,children:[(0,a.jsx)("style",{children:ve}),(0,a.jsxs)("div",{className:"graview-several-line",children:[(0,a.jsx)("span",{role:"status","aria-live":"polite",className:"graview-several-count","data-testid":"several-count",children:ae}),(0,a.jsxs)("div",{role:"group","aria-label":`What to do with the ${n.length} chosen`,className:"graview-several-acts",children:[te.map(j),I.length>0?(0,a.jsx)("button",{type:"button",className:"graview-several-act","data-testid":"several-more","aria-expanded":M,"aria-controls":R,onClick:()=>h(e=>!e),children:"More"}):null,P&&f!==void 0&&f>n.length?(0,a.jsxs)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-all",onClick:P,children:["Choose all ",f]}):null,(0,a.jsx)("button",{type:"button",className:"graview-several-quiet","data-testid":"several-clear","aria-keyshortcuts":"Escape",title:"Put the choice down \u2014 Escape",onClick:w,children:"Clear"})]})]}),p.length>0&&n.length>1?(0,a.jsx)(se,{chosen:n,acts:p,onAct:B}):null,M?(0,a.jsx)("div",{id:R,role:"group","aria-label":"More",className:"graview-several-acts","data-testid":"several-more-acts",children:I.map(j)}):null,p.length===0?(0,a.jsx)("p",{className:"graview-several-said","data-testid":"several-none",children:$.length>0?`Nothing here can be done to all of them by you: ${$[0].message}`:"Nothing can be done to all of these at once."}):null,o?(0,a.jsx)("div",{className:"graview-several-ask",role:"group","aria-label":o.applies.length<s.length?`${o.label}, for ${o.applies.length} of the ${s.length}`:`${o.label}, for all ${s.length}`,"data-testid":"several-ask",children:(0,a.jsx)(J,{store:t,affordance:o.affordance,onApply:e=>q(o,e),onCancel:()=>u(null)})}):null,v?(0,a.jsxs)("div",{role:"alert",className:"graview-several-said","data-testid":"several-outcome",children:[le(v),v.refused.length>0?(0,a.jsxs)(a.Fragment,{children:[" ",v.refused.length===1?"One was not changed, and is still chosen:":`${v.refused.length} were not changed, and are still chosen:`,(0,a.jsx)("ul",{"data-testid":"several-refused",children:v.refused.map(e=>(0,a.jsxs)("li",{"data-record":e.id,children:["\u201C",e.label,"\u201D \u2014 ",e.message]},e.id))})]}):null]}):null]})}var de={position:"fixed",inset:"auto",margin:0,zIndex:V("toast"),boxSizing:"border-box",width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,overflow:"visible"},ve=`
|
|
3
|
+
.graview-several-bar{display:grid;gap:8px;padding:8px 10px;border:1px solid var(--graview-edge);border-radius:var(--graview-radius,12px);background:var(--graview-float);color:var(--graview-ink);box-shadow:var(--graview-lift-high);font-size:.875rem;line-height:1.4;max-height:70vh;overflow:auto}
|
|
4
|
+
.graview-several-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;min-width:0}
|
|
5
|
+
.graview-several-count{font-weight:600;white-space:nowrap}
|
|
6
|
+
.graview-several-acts{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
|
|
7
|
+
.graview-several-act,.graview-several-quiet{min-height:32px;padding:0 12px;border-radius:8px;font:inherit;cursor:pointer;box-shadow:none}
|
|
8
|
+
.graview-several-act{border:1px solid var(--graview-edge);background:transparent;color:var(--graview-ink);font-weight:600}
|
|
9
|
+
.graview-several-act:hover,.graview-several-act[aria-pressed=true],.graview-several-act[aria-expanded=true]{background:color-mix(in srgb,var(--graview-accent) 14%,transparent)}
|
|
10
|
+
.graview-several-act[data-tone=warn]{color:var(--graview-warn)}
|
|
11
|
+
.graview-several-quiet{border:0;background:none;color:var(--graview-ink-muted);text-decoration:underline;text-underline-offset:2px}
|
|
12
|
+
.graview-several-bar :focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
13
|
+
.graview-several-said{margin:0;max-width:52ch;overflow-wrap:anywhere}
|
|
14
|
+
.graview-several-said ul{margin:4px 0 0;padding-left:18px}
|
|
15
|
+
.graview-several-ask{padding:8px 4px 2px;border-top:1px solid var(--graview-edge)}
|
|
16
|
+
@media (pointer: coarse){.graview-several-act,.graview-several-quiet{min-height:44px}}
|
|
17
|
+
`;export{we as SeveralBar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as p}from"./chunk.
|
|
1
|
+
import{b as p}from"./chunk.GKYJQE5A.js";import{Fc as g}from"./chunk.6L6RUOSF.js";function w(n){let r=n.policy?.sees??[];if(r.length===0)return!0;let t=o=>o.fields===void 0&&(o.hide?.length??0)===0;return n.schema.kinds.every(o=>r.some(s=>s.roles==="*"&&!s.own&&!s.via&&t(s)&&s.kinds.includes(o)))}function b(n){let r=n;for(let t=0;t<8&&r?._zod?.def;t+=1){let o=r._zod.def;if(o.type==="enum")return Object.values(o.entries);if(o.type==="literal")return o.values;if(!("innerType"in o))return;r=o.innerType}}var c=(n,r)=>({ok:!1,reason:n,message:r});function k(n,r){return p(n).find(t=>(t.as??t.act)===r)??p(n).find(t=>t.act===r&&t.as===void 0)}var m=n=>typeof n=="object"&&n!==null&&!Array.isArray(n)&&"href"in n;function S(n,r,t,o,s){let l=k(r,t);if(!l)return c("undeclared",`This view may not ask for \u201C${t}\u201D: its manifest does not name it.`);let u={},f=new Map;for(let[a,d]of Object.entries(o)){let y=i=>{if(!m(i))return i;let e=typeof i.href=="string"?s?.file(i.href):void 0;if(!e)throw c("malformed",`\u201C${a}\u201D is a file the host did not hand this view: a view hands an act a file the person dropped (event.files), or one a record it was shown holds, as it was handed.`);let h=s?.dropped(e.href);if(h){if(f.has(e.href))throw c("malformed",`\u201C${a}\u201D hands the act a dropped file it already carries: each file a person dropped goes in one act, once.`);f.set(e.href,h)}return e};try{u[a]=Array.isArray(d)?d.map(y):y(d)}catch(i){return i}}if(!w(n)){let a=new Set([...f.values()].map(e=>e.target)),d=a.size===1?[...a][0]:void 0,y=e=>m(e)&&typeof e.href=="string"&&f.has(e.href)||g(e)||d!==void 0&&e===d&&s?.shown.has(d)===!0;return f.size>0&&a.size===1&&Object.values(u).every(e=>Array.isArray(e)?e.every(y):y(e))?{ok:!0,name:l.act,args:{...u,...l.constants??{}},spent:[...f.keys()]}:c("press-only","In this app some members may not see some records, so a view's act applies only when you press it.")}return{ok:!0,name:l.act,args:{...u,...l.constants??{}}}}export{w as a,b,c,k as d,S as e};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk.V5JB5UJS.js";import"./chunk.EHLV3LND.js";import"./chunk.EPSYX2SF.js";import"./chunk.JLNTE5CH.js";import"./chunk.DDSAFU3B.js";import"./chunk.EOSN5DWW.js";import"./chunk.T6UJEXFL.js";import"./chunk.7THS3DLZ.js";import"./chunk.4QMAYVPU.js";import"./chunk.ARGEGV5T.js";import"./chunk.WS5ORRGS.js";import"./chunk.ZONRIOIA.js";import"./chunk.NXHEOHRR.js";import"./chunk.HJCQ6I3S.js";import"./chunk.DJGZOPAS.js";import"./chunk.GFOZVQBQ.js";import"./chunk.MQNW3O67.js";import"./chunk.67S2UWBT.js";import"./chunk.7PWLRRUS.js";import"./chunk.NH3VXTGX.js";import"./chunk.6IMRCKB4.js";import"./chunk.PQTXM4VY.js";import"./chunk.BIDL7GQD.js";import"./chunk.7KX36ENH.js";import"./chunk.QDDDKEBH.js";import"./chunk.QKRQPUCE.js";import"./chunk.KBJ3UUER.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.4O64QV2Y.js";import"./chunk.OYMN3IFX.js";import"./chunk.UQZ2P6KD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.NI4OPHTL.js";import"./chunk.U5KJQFAP.js";import"./chunk.FOHZPYUV.js";import"./chunk.IXYG65TM.js";import"./chunk.W6L2VAJG.js";import"./chunk.N3MXLORL.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import{a as Bt,b as Vt,c as We,d as Kt,h as Jt,i as ie,j as Yt,k as Gt}from"./chunk.CEOQY5KS.js";import{a as _t}from"./chunk.MQNW3O67.js";import{d as At}from"./chunk.VVIQSFM4.js";import{c as Nt}from"./chunk.TQ3MNB6K.js";import{A as It,C as zt,J as jt,K as Wt,i as Mt,j as Tt,u as Ot,v as Ut,z as Ht}from"./chunk.RJ7VSWTA.js";import{c as Qr}from"./chunk.P43LPXXJ.js";import{G as H,P as Dt,T as Ft,Y as ae,ha as kt}from"./chunk.JCKIJSW7.js";import{de as xt,ee as Et,fd as wt,fe as Pt,jd as St,pb as vt,qa as be,ve as Ct,we as $t,xe as Lt,yd as bt}from"./chunk.6L6RUOSF.js";import{b as F}from"./chunk.AJZBJBMO.js";function Zr(e,t){return xt(e,t).slice(1)}function xe(e,t){return e.kinds.find(r=>Zr(e,r)===t)}function Nn(e,t,r){return Et(e,t,r)}function An(e,t){return Pt(e,t)}var le=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ee=/^[\\/]{2}/;function Xt(e,t){return t+e.replace(/\\/g,"/")}var Qt="popstate";function Pe(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function qt(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((c,g)=>d(c,typeof c=="string"?null:c.state,g===0?"default":void 0,typeof c=="string"?void 0:c.mask));let i=s(r??n.length-1),o="POP",l=null;function s(c){return Math.min(Math.max(c,0),n.length-1)}function u(){return n[i]}function d(c,g=null,h,v){let y=Ce(n?u().pathname:"/",c,g,h,v);return k(y.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(c)}`),y}function f(c){return typeof c=="string"?c:z(c)}return{get index(){return i},get action(){return o},get location(){return u()},createHref:f,createURL(c){return new URL(f(c),"http://localhost")},encodeLocation(c){let g=typeof c=="string"?j(c):c;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(c,g){o="PUSH";let h=Pe(c)?c:d(c,g);i+=1,n.splice(i,n.length,h),a&&l&&l({action:o,location:h,delta:1})},replace(c,g){o="REPLACE";let h=Pe(c)?c:d(c,g);n[i]=h,a&&l&&l({action:o,location:h,delta:0})},go(c){o="POP";let g=s(i+c),h=n[g];i=g,l&&l({action:o,location:h,delta:c})},listen(c){return l=c,()=>{l=null}}}}function er(e={}){function t(a,n){let i=n.state?.masked,{pathname:o,search:l,hash:s}=i||a.location;return Ce("",{pathname:o,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",i?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:z(n)}return ea(t,r,null,e)}function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function k(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qr(){return Math.random().toString(36).substring(2,10)}function Zt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ce(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?j(t):t,state:r,key:t&&t.key||a||qr(),mask:n}}function z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function j(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function ea(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:i=!1}=a,o=n.history,l="POP",s=null,u=d();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function d(){return(o.state||{idx:null}).idx}function f(){l="POP";let y=d(),R=y==null?null:y-u;u=y,s&&s({action:l,location:v.location,delta:R})}function c(y,R){l="PUSH";let E=Pe(y)?y:Ce(v.location,y,R);r&&r(E,y),u=d()+1;let P=Zt(E,u),C=v.createHref(E.mask||E);try{o.pushState(P,"",C)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;n.location.assign(C)}i&&s&&s({action:l,location:v.location,delta:1})}function g(y,R){l="REPLACE";let E=Pe(y)?y:Ce(v.location,y,R);r&&r(E,y),u=d();let P=Zt(E,u),C=v.createHref(E.mask||E);o.replaceState(P,"",C),i&&s&&s({action:l,location:v.location,delta:0})}function h(y){return ta(n,y)}let v={get action(){return l},get location(){return e(n,o)},listen(y){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Qt,f),s=y,()=>{n.removeEventListener(Qt,f),s=null}},createHref(y){return t(n,y)},createURL:h,encodeLocation(y){let R=h(y);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:c,replace:g,go(y){return o.go(y)}};return v}function ta(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),$(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:z(t);return n=n.replace(/ $/,"%20"),!r&&Ee.test(n)&&(n=a+n),new URL(n,a)}var ra=F(H(),1);function ar(e,t,r="/"){return aa(e,t,r,!1)}function aa(e,t,r,a,n){let i=O((typeof t=="string"?j(t):t).pathname||"/",r);if(i==null)return null;let o=n??na(e),l=null,s=ur(i);for(let u=0;l==null&&u<o.length;++u)l=ga(o[u],s,a);return l}function nr(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,loaderData:t[r.id],handle:r.handle}}function na(e){let t=or(e);return oa(t),t}function or(e,t=[],r=[],a="",n=!1){let i=(o,l,s=n,u)=>{let d={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(a)&&s)return;$(d.relativePath.startsWith(a),`Absolute route path "${d.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(a.length)}let f=A([a,d.relativePath]),c=r.concat(d);o.children&&o.children.length>0&&($(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),or(o.children,t,c,f,s)),!(o.path==null&&!o.index)&&t.push({path:f,score:ma(f,o.index),routesMeta:c.map((g,h)=>{let[v,y]=sr(g.relativePath,g.caseSensitive,h===c.length-1);return{...g,matcher:v,compiledParams:y}})})};return e.forEach((o,l)=>{if(o.path===""||!o.path?.includes("?"))i(o,l);else for(let s of ir(o.path))i(o,l,!0,s)}),t}function ir(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),i=r.replace(/\?$/,"");if(a.length===0)return n?[i,""]:[i];let o=ir(a.join("/")),l=[];return l.push(...o.map(s=>s===""?i:[i,s].join("/"))),n&&l.push(...o),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function oa(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:pa(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var ia=/^:[\w-]+$/,la=/^:[\w-]+/,sa=3.5,ua=3,ca=2,da=1,fa=10,ha=-2,tr=e=>e==="*";function ma(e,t){let r=e.split("/"),a=r.length;return r.some(tr)&&(a+=ha),t&&(a+=ca),r.filter(n=>!tr(n)).reduce((n,i)=>n+(ia.test(i)?ua:la.test(i)?sa:i===""?da:fa),a)}function pa(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function ga(e,t,r=!1){let{routesMeta:a}=e,n={},i="/",o=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,d=i==="/"?t:t.slice(i.length)||"/",f={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c=s.matcher&&s.compiledParams?lr(f,d,s.matcher,s.compiledParams):ne(f,d),g=s.route;if(!c&&u&&r&&!a[a.length-1].route.index&&(c=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},d)),!c)return null;Object.assign(n,c.params),o.push({params:n,pathname:A([i,c.pathname]),pathnameBase:va(A([i,c.pathnameBase])),route:g}),c.pathnameBase!=="/"&&(i=A([i,c.pathnameBase]))}return o}function ne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=sr(e.path,e.caseSensitive,e.end);return lr(e,t,r,a)}function lr(e,t,r,a){let n=t.match(r);if(!n)return null;let i=n[0],o=$e(i,1),l=n.slice(1);return{params:a.reduce((s,{paramName:u,isOptional:d},f)=>{if(u==="*"){let g=l[f]||"";o=$e(i.slice(0,i.length-g.length),1)}let c=l[f];return d&&!c?s[u]=void 0:s[u]=(c||"").replace(/%2F/g,"/"),s},{}),pathname:i,pathnameBase:o,pattern:e}}function sr(e,t=!1,r=!0){k(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,l,s,u)=>{if(a.push({paramName:o,isOptional:l!=null}),l){let d=u.charAt(s+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/((?:[^/?()[\]*^\\]|\\.)+)\?(?=\/|$|\()/g,"(?:/$1)?");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function ur(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return k(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function O(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function ya(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?j(e):e,i;return r?(r=cr(r),r.startsWith("/")||r.startsWith("\\")?i=rr(r.substring(1),"/"):i=rr(r,t)):i=t,{pathname:i,search:wa(a),hash:Sa(n)}}function rr(e,t){let r=$e(t).split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Be(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ra(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function se(e){let t=Ra(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function Q(e,t,r,a=!1){let n;typeof e=="string"?n=j(e):(n={...e},$(!n.pathname||!n.pathname.includes("?"),Be("?","pathname","search",n)),$(!n.pathname||!n.pathname.includes("#"),Be("#","pathname","hash",n)),$(!n.search||!n.search.includes("#"),Be("#","search","hash",n)));let i=e===""||n.pathname==="",o=i?"/":n.pathname,l;if(o==null)l=r;else{let f=t.length-1;if(!a&&o.startsWith("..")){let c=o.split("/");for(;c[0]==="..";)c.shift(),f-=1;n.pathname=c.join("/")}l=f>=0?t[f]:"/"}let s=ya(n,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||d)&&(s.pathname+="/"),s}var cr=e=>e.replace(/[\\/]{2,}/g,"/"),A=e=>cr(e.join("/"));function $e(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var va=e=>$e(e).replace(/^\/*/,"/"),wa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Sa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Ve=class{status;statusText;data;error;internal;constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function dr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Ke(e){return A(e.map(t=>t.route.path).filter(Boolean))||"/"}var Je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Le(e,t){let r=e;if(typeof r!="string"||!le.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Je)try{let i=new URL(window.location.href),o=Ee.test(r)?new URL(Xt(r,i.protocol)):new URL(r),l=O(o.pathname,t);o.origin===i.origin&&l!=null?r=l+o.search+o.hash:n=!0}catch{k(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var fr=new URL("http://localhost");function ue(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),fr)}catch{return fr}}function Ye(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function ba(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function ce(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let i=new URL(t,r),o=n!=null&&!Ye(n,r),l=!Ye(i,r);if(a==="reject"){if(o||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!ba(e,n)||!Ye(n,i)))throw new Error("External navigation is not allowed")}var hr=["POST","PUT","PATCH","DELETE"],Kn=new Set(hr),xa=["GET",...hr],Jn=new Set(xa);var Yn=Symbol("ResetLoaderData");var Ea=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function mr(e){try{return Ea.includes(new URL(e).protocol)}catch{return!1}}var M=F(H(),1);var Z=M.createContext(null);Z.displayName="DataRouter";var De=M.createContext(null);De.displayName="DataRouterState";var Fe=M.createContext(null);Fe.displayName="DataRouterData";var oe=M.createContext(null);oe.displayName="DataRouterNavigation";var Ge=M.createContext(!1);function Xe(){return M.useContext(Ge)}var ke=M.createContext({isTransitioning:!1});ke.displayName="ViewTransition";var Qe=M.createContext(null);Qe.displayName="Fetchers";var Ze=M.createContext(null);Ze.displayName="Await";var _=M.createContext(null);_.displayName="Navigation";var J=M.createContext(null);J.displayName="Location";var I=M.createContext({outlet:null,matches:[],isDataRoute:!1});I.displayName="Route";var de=M.createContext(!1);de.displayName="IsDataRoute";var fe=M.createContext(void 0);fe.displayName="RouteId";var Me=M.createContext(null);Me.displayName="RouteError";var pr="REACT_ROUTER_ERROR",Pa="REDIRECT",Ca="ROUTE_ERROR_RESPONSE";function gr(e){if(e.startsWith(`${pr}:${Pa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function yr(e){if(e.startsWith(`${pr}:${Ca}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ve(t.status,t.statusText,t.data)}catch{}}var m=F(H(),1);function he(e,{relative:t}={}){$(Y(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=m.useContext(_),{hash:n,pathname:i,search:o}=q(e,{relative:t}),l=i;return r!=="/"&&(l=i==="/"?r:A([r,i])),a.createHref({pathname:l,search:o,hash:n})}function Y(){return m.useContext(J)!=null}function D(){return $(Y(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(J).location}function $a(){return m.useContext(J).navigationType}var vr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function V(){return m.useContext(de)?Na():La()}function La(){$(Y(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(Z),{basename:t,navigator:r}=m.useContext(_),{matches:a}=m.useContext(I),{pathname:n}=D(),i=JSON.stringify(se(a)),o=m.useRef(!1);return m.useLayoutEffect(()=>{o.current=!0}),m.useCallback((l,s={})=>{if(k(o.current,vr),!o.current)return;if(typeof l=="number"){r.go(l);return}let u=Q(l,JSON.parse(i),n,s.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:A([t,u.pathname])),ce(typeof l=="string"?l:z(l),r.createHref(u),ue(r),"reject"),(s.replace?r.replace:r.push)(u,s.state,s)},[t,r,i,n,e])}var io=m.createContext(null);function wr(){let{matches:e}=m.useContext(I);return e[e.length-1]?.params??{}}function q(e,{relative:t}={}){let{matches:r}=m.useContext(I),{pathname:a}=D(),n=JSON.stringify(se(r));return m.useMemo(()=>Q(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function et(e,t){return tt(e,t)}function tt(e,t,r){$(Y(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=m.useContext(_),{matches:n}=m.useContext(I),i=n[n.length-1],o=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let s=D(),u;if(t){let h=typeof t=="string"?j(t):t;$(l==="/"||h.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${h.pathname}" was given in the \`location\` prop.`),u=h}else u=s;let d=u.pathname||"/",f=d;if(l!=="/"){let h=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(h.length).join("/")}let c;r?r.state.matches.length?c=r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):c=r.router.match(r.state.location):c=ar(e,{pathname:f});let g=Sr(c&&c.map(h=>Object.assign({},h,{params:Object.assign({},o,h.params),pathname:A([l,a.encodeLocation?a.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?l:A([l,a.encodeLocation?a.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),n,r);return t&&g?m.createElement(J.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...u},navigationType:"POP"}},g):g}function Da(){let e=at(),t=dr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)}var Fa=m.createElement(Da,null),ka=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Ge;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=yr(e.digest);r&&(e=r)}let t=e!==void 0?m.createElement(I.Provider,{value:this.props.routeContext},m.createElement(de.Provider,{value:this.props.routeContext.isDataRoute},m.createElement(fe.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},m.createElement(Me.Provider,{value:e,children:this.props.component})))):this.props.children;return this.context?m.createElement(Ma,{error:e},t):t}},qe=new WeakMap;function Ma({children:e,error:t}){let{basename:r,navigator:a}=m.useContext(_);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=gr(t.digest);if(n){let i=qe.get(t);if(i)throw i;let o=Le(n.location,r),l=o.absoluteURL||o.to;if(ce(n.location,l,ue(a),"allow-explicit"),mr(l))throw new Error("Invalid redirect location");if(Je&&!qe.get(t))if(o.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw qe.set(t,s),s}return m.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ta({routeContext:e,match:t,children:r}){let a=m.useContext(Z);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(I.Provider,{value:e},m.createElement(de.Provider,{value:e.isDataRoute},m.createElement(fe.Provider,{value:t.route.id},r)))}function Sr(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,i=a?.errors;if(i!=null){let d=n.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);$(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),n=n.slice(0,Math.min(n.length,d+1))}let o=!1,l=-1;if(r&&a){o=a.renderFallback;for(let d=0;d<n.length;d++){let f=n[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(l=d),f.route.id){let{loaderData:c,errors:g}=a,h=f.route.loader&&!c.hasOwnProperty(f.route.id)&&(!g||g[f.route.id]===void 0);if(f.route.lazy||h){r.isStatic&&(o=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(d,f)=>{s(d,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Ke(a.matches),errorInfo:f})}:void 0;return n.reduceRight((d,f,c)=>{let g,h=!1,v=null,y=null;a&&(g=i&&f.route.id?i[f.route.id]:void 0,v=f.route.errorElement||Fa,o&&(l<0&&c===0?(Aa("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,y=null):l===c&&(h=!0,y=f.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,c+1)),E=()=>{let P;return g?P=v:h?P=y:f.route.Component?P=m.createElement(f.route.Component,null):f.route.element?P=f.route.element:P=d,m.createElement(Ta,{match:f,routeContext:{outlet:d,matches:R,isDataRoute:a!=null},children:P})};return a&&(f.route.ErrorBoundary||f.route.errorElement||c===0)?m.createElement(ka,{location:a.location,revalidation:a.revalidation,component:v,error:g,children:E(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:u}):E()},null)}function Te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ee(e){let t=m.useContext(Z);return $(t,Te(e)),t}function me(e){let t=m.useContext(De);return $(t,Te(e)),t}function _e(e){let t=m.useContext(Fe);return $(t,Te(e)),t}function _a(e){let t=m.useContext(oe);return $(t,Te(e)),t}function Ne(e){let t=m.useContext(fe);return $(t,`${e} can only be used on routes that contain a unique "id"`),t}function rt(){let{navigation:e}=_a("useNavigation");return m.useMemo(()=>{let{matches:t,historyAction:r,...a}=e;return a},[e])}function pe(){let{matches:e}=me("useMatches"),{loaderData:t}=_e("useMatches");return m.useMemo(()=>e.map(r=>nr(r,t)),[e,t])}function at(){let e=m.useContext(Me),t=_e("useRouteError"),r=Ne("useRouteError");return e!==void 0?e:t.errors?.[r]}function Na(){let{router:e}=ee("useNavigate"),t=Ne("useNavigate"),r=m.useRef(!1);return m.useLayoutEffect(()=>{r.current=!0}),m.useCallback(async(a,n={})=>{k(r.current,vr),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...n}))},[e,t])}var Rr={};function Aa(e,t,r){!t&&!Rr[e]&&(Rr[e]=!0,k(!1,r))}var Oa={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ua=/[&><\u2028\u2029]/g;function nt(e){return e.replace(Ua,t=>Oa[t])}function br(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function xr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Er(e){return e!=null&&typeof e.page=="string"}function Ha(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Pr(e,t,r){return ja((await Promise.all(e.map(async a=>{let n=t.routes[a.route.id];if(n){let i=await xr(n,r);return i.links?i.links():[]}return[]}))).flat(1).filter(Ha).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function ot(e,t,r,a,n,i){let o=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return i==="assets"?t.filter((s,u)=>o(s,u)||l(s,u)):i==="data"?t.filter((s,u)=>{let d=a.routes[s.route.id];if(!d||!d.hasLoader)return!1;if(o(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let f=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function Cr(e,t,{includeHydrateFallback:r}={}){return Ia(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let i=[n.module];return n.clientActionModule&&(i=i.concat(n.clientActionModule)),n.clientLoaderModule&&(i=i.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(i=i.concat(n.hydrateFallbackModule)),n.imports&&(i=i.concat(n.imports)),i}).flat(1))}function Ia(e){return[...new Set(e)]}function za(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function ja(e,t){let r=new Set,a=new Set(t);return e.reduce((n,i)=>{if(t&&!Er(i)&&i.as==="script"&&i.href&&a.has(i.href))return n;let o=JSON.stringify(za(i));return r.has(o)||(r.add(o),n.push({key:o,link:i})),n},[])}var it=F(H(),1);var po=Symbol("SingleFetchRedirect");function lt(e,t,r){let a=typeof e=="string"?new URL(e,r??(typeof window>"u"?"server://singlefetch/":window.location.origin)):new URL(e);return r&&a.origin!==r&&(a=new URL(a.pathname+a.search+a.hash,r)),a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${t}`:a.pathname=`${a.pathname}.${t}`,a}var S=F(H(),1);var te=S.createContext(void 0);te.displayName="FrameworkContext";function Ae(){let e=S.useContext(te);return br(e,"You must render this element inside a <HydratedRouter> element"),e}function $r(e,t){let r=S.useContext(te),[a,n]=S.useState(!1),[i,o]=S.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,c=S.useRef(null);S.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let v=R=>{R.forEach(E=>{o(E.isIntersecting)})},y=new IntersectionObserver(v,{threshold:.5});return c.current&&y.observe(c.current),()=>{y.disconnect()}}},[e]),S.useEffect(()=>{if(a){let v=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(v)}}},[a]);let g=()=>{n(!0)},h=()=>{n(!1),o(!1)};return r?e!=="intent"?[i,c,{}]:[i,c,{onFocus:ge(l,g),onBlur:ge(s,h),onMouseEnter:ge(u,g),onMouseLeave:ge(d,h),onTouchStart:ge(f,g)}]:[!1,c,{}]}function ge(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Lr({page:e,...t}){let r=Xe(),{nonce:a}=Ae(),{router:n}=ee("PrefetchPageLinks"),i=S.useMemo(()=>n.match(e),[n,n.routes,e]);return i?(t.nonce==null&&a&&(t={...t,nonce:a}),r?S.createElement(Ba,{page:e,matches:i,...t}):S.createElement(Va,{page:e,matches:i,...t})):null}function Wa(e){let{manifest:t,routeModules:r}=Ae(),[a,n]=S.useState([]);return S.useEffect(()=>{let i=!1;return Pr(e,t,r).then(o=>{i||n(o)}),()=>{i=!0}},[e,t,r]),a}function Ba({page:e,matches:t,...r}){let a=D(),{unstable_apiServerOrigin:n}=Ae(),i=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let o=lt(e,"rsc",n),l=!1,s=[];for(let u of t)typeof u.route.shouldRevalidate=="function"?l=!0:s.push(u.route.id);return l&&s.length>0&&o.searchParams.set("_routes",s.join(",")),[n?o.toString():o.pathname+o.search]},[e,a,t,n]);return S.createElement(S.Fragment,null,i.map(o=>S.createElement("link",{key:o,rel:"prefetch",as:"fetch",href:o,...r})))}function Va({page:e,matches:t,...r}){let a=D(),{manifest:n,routeModules:i,unstable_apiServerOrigin:o}=Ae(),{matches:l}=me("PrefetchPageLinks"),{loaderData:s}=_e("PrefetchPageLinks"),u=S.useMemo(()=>ot(e,t,l,n,a,"data"),[e,t,l,n,a]),d=S.useMemo(()=>ot(e,t,l,n,a,"assets"),[e,t,l,n,a]),f=S.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let h=new Set,v=!1;if(t.forEach(R=>{let E=n.routes[R.route.id];!E||!E.hasLoader||(!u.some(P=>P.route.id===R.route.id)&&R.route.id in s&&i[R.route.id]?.shouldRevalidate||E.hasClientLoader?v=!0:h.add(R.route.id))}),h.size===0)return[];let y=lt(e,"data",o);return v&&h.size>0&&y.searchParams.set("_routes",t.filter(R=>h.has(R.route.id)).map(R=>R.route.id).join(",")),[o?y.toString():y.pathname+y.search]},[s,a,n,u,t,e,i,o]),c=S.useMemo(()=>Cr(d,n),[d,n]),g=Wa(d);return S.createElement(S.Fragment,null,f.map(h=>S.createElement("link",{key:h,rel:"prefetch",as:"fetch",href:h,...r})),c.map(h=>S.createElement("link",{key:h,rel:"modulepreload",href:h,...r})),g.map(({key:h,link:v})=>S.createElement("link",{key:h,nonce:r.nonce,...v,crossOrigin:v.crossOrigin??r.crossOrigin})))}function Dr(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var w=F(H(),1),Qa=F(H(),1);var Fo=w.memo(Za);function Za({routes:e,manifest:t,state:r,isStatic:a,onError:n}){let i=w.useContext(Z);$(i,"You must render this element inside a <DataRouterContext.Provider> element");let o=w.useContext(te)?.routeDiscoveryRuntime;return w.useEffect(()=>{r.initialized&&o?.markReady()},[r.initialized,o]),tt(e,void 0,{router:i.router,manifest:t,state:r,isStatic:a,onError:n})}function qa({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let i=w.useRef(null);i.current==null&&(i.current=qt({initialEntries:r,initialIndex:a,v5Compat:!0}));let o=i.current,[l,s]=w.useState({action:o.action,location:o.location}),u=w.useCallback(d=>{n===!1?s(d):w.startTransition(()=>s(d))},[n]);return w.useLayoutEffect(()=>o.listen(u),[o,u]),w.createElement(ye,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}function en({to:e,replace:t,state:r,relative:a}){$(Y(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:i}=w.useContext(_);k(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=w.useContext(I),{pathname:l}=D(),s=V(),u=Q(e,se(o),l,a==="path");ce(typeof e=="string"?e:z(e),i.createHref(u),ue(i),"reject");let d=JSON.stringify(u);return w.useEffect(()=>{s(JSON.parse(d),{replace:t,state:r,relative:a})},[s,d,a,t,r]),null}function Fr(e){$(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ye({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:i=!1,useTransitions:o}){$(!Y(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=w.useMemo(()=>({basename:l,navigator:n,static:i,useTransitions:o,future:{}}),[l,n,i,o]);typeof r=="string"&&(r=j(r));let{pathname:u="/",search:d="",hash:f="",state:c=null,key:g="default",mask:h}=r,v=w.useMemo(()=>{let y=O(u,l);return y==null?null:{location:{pathname:y,search:d,hash:f,state:c,key:g,mask:h},navigationType:a}},[l,u,d,f,c,g,a,h]);return k(v!=null,`<Router basename="${l}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:w.createElement(_.Provider,{value:s},w.createElement(J.Provider,{children:t,value:v}))}function tn({children:e,location:t}){return et(Oe(e),t)}function Oe(e,t=[]){let r=[];return w.Children.forEach(e,(a,n)=>{if(!w.isValidElement(a))return;let i=[...t,n];if(a.type===w.Fragment){r.push.apply(r,Oe(a.props.children,i));return}$(a.type===Fr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`);let o=a.props;$(!o.index||!o.children,"An index route cannot have child routes.");let l={id:o.id||i.join("-"),caseSensitive:o.caseSensitive,element:o.element,Component:o.Component,index:o.index,path:o.path,middleware:o.middleware,loader:o.loader,action:o.action,hydrateFallbackElement:o.hydrateFallbackElement,HydrateFallback:o.HydrateFallback,errorElement:o.errorElement,ErrorBoundary:o.ErrorBoundary,shouldRevalidate:o.shouldRevalidate,handle:o.handle,lazy:o.lazy};o.children&&(l.children=Oe(o.children,i)),r.push(l)}),r}var He="application/x-www-form-urlencoded";function Ie(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function rn(e){return Ie(e)&&e.tagName.toLowerCase()==="button"}function an(e){return Ie(e)&&e.tagName.toLowerCase()==="form"}function nn(e){return Ie(e)&&e.tagName.toLowerCase()==="input"}function on(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kr(e,t){return e.button===0&&(!t||t==="_self")&&!on(e)}function ze(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function Mr(e,t){let r=ze(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(i=>{r.append(n,i)})}),r}var Ue=null;function ln(){if(Ue===null)try{new FormData(document.createElement("form"),0),Ue=!1}catch{Ue=!0}return Ue}var sn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function st(e){return e!=null&&!sn.has(e)?(k(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${He}"`),null):e}function Tr(e,t){let r,a,n,i,o;if(an(e)){let l=e.getAttribute("action");a=l?O(l,t):null,r=e.getAttribute("method")||"get",n=st(e.getAttribute("enctype"))||He,i=new FormData(e)}else if(rn(e)||nn(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?O(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||"get",n=st(e.getAttribute("formenctype"))||st(l.getAttribute("enctype"))||He,i=new FormData(l,e),!ln()){let{name:u,type:d,value:f}=e;if(d==="image"){let c=u?`${u}.`:"";i.append(`${c}x`,"0"),i.append(`${c}y`,"0")}else u&&i.append(u,f)}}else{if(Ie(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r="get",a=null,n=He,o=e}return i&&n==="text/plain"&&(o=i,i=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:i,body:o}}var p=F(H(),1);var dn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dn&&(window.__reactRouterVersion="8")}catch{}function fn({basename:e,children:t,useTransitions:r,window:a}){let n=p.useRef(null);n.current==null&&(n.current=er({window:a,v5Compat:!0}));let i=n.current,[o,l]=p.useState({action:i.action,location:i.location}),s=p.useCallback(u=>{r===!1?l(u):p.startTransition(()=>l(u))},[r]);return p.useLayoutEffect(()=>i.listen(s),[i,s]),p.createElement(ye,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i,useTransitions:r})}function _r({basename:e,children:t,history:r,useTransitions:a}){let[n,i]=p.useState({action:r.action,location:r.location}),o=p.useCallback(l=>{a===!1?i(l):p.startTransition(()=>i(l))},[a]);return p.useLayoutEffect(()=>r.listen(o),[r,o]),p.createElement(ye,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}_r.displayName="unstable_HistoryRouter";var Re=p.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:i,replace:o,mask:l,state:s,target:u,to:d,preventScrollReset:f,viewTransition:c,defaultShouldRevalidate:g,...h},v){let{basename:y,navigator:R,useTransitions:E}=p.useContext(_),P=typeof d=="string"&&le.test(d),C=Le(d,y);d=C.to;let b=he(d,{relative:n}),T=D(),L=null;if(l){let K=Q(l,[],T.mask?T.mask.pathname:"/",!0);y!=="/"&&(K.pathname=K.pathname==="/"?y:A([y,K.pathname])),L=R.createHref(K)}let[U,X,B]=$r(a,h),we=Ur(d,{replace:o,mask:l,state:s,target:u,preventScrollReset:f,relative:n,viewTransition:c,defaultShouldRevalidate:g,useTransitions:E});function re(K){t&&t(K),K.defaultPrevented||we(K)}let Se=!(C.isExternal||i),Rt=p.createElement("a",{...h,...B,href:(Se?L:void 0)||C.absoluteURL||b,onClick:Se?re:t,ref:Dr(v,X),target:u,"data-discover":!P&&r==="render"?"true":void 0});return U&&!P?p.createElement(p.Fragment,null,Rt,p.createElement(Lr,{page:b})):Rt});Re.displayName="Link";var Nr=p.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:i,to:o,viewTransition:l,children:s,...u},d){let f=q(o,{relative:u.relative}),c=D(),g=p.useContext(oe),{navigator:h,basename:v}=p.useContext(_),y=g!=null&&jr(f)&&l===!0,R=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,E=c.pathname,P=g?.navigation.location?g.navigation.location.pathname:null;r||(E=E.toLowerCase(),P=P?P.toLowerCase():null,R=R.toLowerCase()),P&&v&&(P=O(P,v)||P);let C=R!=="/"&&R.endsWith("/")?R.length-1:R.length,b=E===R||!n&&E.startsWith(R)&&E.charAt(C)==="/",T=P!=null&&(P===R||!n&&P.startsWith(R)&&P.charAt(C)==="/"),L={isActive:b,isPending:T,isTransitioning:y},U=b?t:void 0,X;typeof a=="function"?X=a(L):X=[a,b?"active":null,T?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let B=typeof i=="function"?i(L):i;return p.createElement(Re,{...u,"aria-current":U,className:X,ref:d,style:B,to:o,viewTransition:l},typeof s=="function"?s(L):s)});Nr.displayName="NavLink";var Ar=p.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:i,method:o="get",action:l,onSubmit:s,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:c,...g},h)=>{let{useTransitions:v}=p.useContext(_),y=Hr(),R=Ir(l,{relative:u}),E=o.toLowerCase()==="get"?"get":"post",P=typeof l=="string"&&le.test(l);return p.createElement("form",{ref:h,method:E,action:R,onSubmit:a?s:b=>{if(s&&s(b),b.defaultPrevented)return;b.preventDefault();let T=b.nativeEvent.submitter,L=T?.getAttribute("formmethod")||o,U=()=>y(T||b.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:n,state:i,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:c});v&&r!==!1?p.startTransition(()=>U()):U()},...g,"data-discover":!P&&e==="render"?"true":void 0})});Ar.displayName="Form";function Or({getKey:e,storageKey:t,...r}){let a=p.useContext(te),{basename:n}=p.useContext(_),i=D(),o=pe();zr({getKey:e,storageKey:t});let l=p.useMemo(()=>{if(!a||!e)return null;let u=ct(i,o,n,e);return u!==i.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,d)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(u)||"{}")[d||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch(f){console.error(f),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),p.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${nt(JSON.stringify(t||ut))}, ${nt(JSON.stringify(l))})`}})}Or.displayName="ScrollRestoration";function Ur(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let d=V(),f=D(),c=q(e,{relative:o});return p.useCallback(g=>{if(kr(g,t)){g.preventDefault();let h=r!==void 0?r:z(f)===z(c),v=()=>d(e,{replace:h,mask:a,state:n,preventScrollReset:i,relative:o,viewTransition:l,defaultShouldRevalidate:s});u?p.startTransition(()=>v()):v()}},[f,d,c,r,a,n,t,e,i,o,l,s,u])}function dt(e){k(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=p.useRef(ze(e)),r=p.useRef(!1),a=D(),n=p.useMemo(()=>Mr(a.search,r.current?null:t.current),[a.search]),i=V();return[n,p.useCallback((o,l)=>{let s=ze(typeof o=="function"?o(new URLSearchParams(n)):o);r.current=!0,i("?"+s,l)},[i,n])]}var hn=0,mn=()=>`__${String(++hn)}__`;function Hr(){let{router:e}=ee("useSubmit"),{basename:t}=p.useContext(_),r=Ne("useSubmit"),a=e.fetch,n=e.navigate;return p.useCallback(async(i,o={})=>{let{action:l,method:s,encType:u,formData:d,body:f}=Tr(i,t);o.navigate===!1?await a(o.fetcherKey||mn(),r,o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,relative:o.relative,formData:d,body:f,formMethod:o.method||s,formEncType:o.encType||u,flushSync:o.flushSync}):await n(o.action||l,{defaultShouldRevalidate:o.defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,relative:o.relative,formData:d,body:f,formMethod:o.method||s,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[a,n,t,r])}function Ir(e,{relative:t}={}){let{basename:r}=p.useContext(_),a=p.useContext(I);$(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),i={...q(e||".",{relative:t})},o=D();if(e==null){i.search=o.search;let l=new URLSearchParams(i.search),s=l.getAll("index");if(s.some(u=>u==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let u=l.toString();i.search=u?`?${u}`:""}}return(!e||e===".")&&n.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(i.pathname=i.pathname==="/"?r:A([r,i.pathname])),z(i)}var ut="react-router-scroll-positions",je={};function ct(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:O(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function zr({getKey:e,storageKey:t}={}){let{router:r}=ee("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=me("useScrollRestoration"),{basename:i}=p.useContext(_),o=D(),l=pe(),s=rt();p.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),gn(p.useCallback(u=>{u.persisted&&(window.history.scrollRestoration="manual")},[])),pn(p.useCallback(()=>{if(s.state==="idle"){let u=ct(o,l,i,e);je[u]=window.scrollY}try{sessionStorage.setItem(t||ut,JSON.stringify(je))}catch(u){k(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,i,o,l,t])),typeof document<"u"&&(p.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||ut);u&&(je=JSON.parse(u))}catch{}},[t]),p.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(je,()=>window.scrollY,e?(d,f)=>ct(d,f,i,e):void 0);return()=>u&&u()},[r,i,e]),p.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(o.hash){let u=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{k(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[o,a,n]))}function pn(e,t){let{capture:r}=t||{};p.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function gn(e,t){let{capture:r}=t||{};p.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pageshow",e,a),()=>{window.removeEventListener("pageshow",e,a)}},[e,r])}function jr(e,{relative:t}={}){let r=p.useContext(ke);$(r!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=ee("useViewTransitionState"),n=q(e,{relative:t});if(!r.isTransitioning)return!1;let i=O(r.currentLocation.pathname,a)||r.currentLocation.pathname,o=O(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ne(n.pathname,o)!=null||ne(n.pathname,i)!=null}var Wr=F(H(),1),Br=F(Qr(),1);var ve=F(ae(),1);function Vr({context:e,own:t}){return ie(e.store),kt()?(0,ve.jsx)(yn,{context:e,...t?{own:t}:{}}):null}function yn({context:e,own:t}){let r=Ft()?.live??e.store;if(ie(r),!Bt(r.batches().length))return null;let n=(0,ve.jsx)(Wr.Suspense,{fallback:null,children:(0,ve.jsx)(Vt,{remembers:!1})});return t?(0,Br.createPortal)(n,t):(0,ve.jsx)("div",{className:"graview-bar-own",children:n})}var N=F(H(),1);var G=F(H(),1),Rn=(0,G.createContext)(null);function Li(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function Kr(e){let t=(0,G.useContext)(Rn);(0,G.useLayoutEffect)(()=>t?.place(e),[t,e])}function Di(e,t){return(0,G.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Jr=F(H(),1),W=F(ae(),1),ft="var(--graview-text-small)",ht="var(--graview-text-body)",Oi="var(--graview-font-display, var(--graview-font-body, system-ui))",mt={maxWidth:760,margin:"0 auto",padding:"40px var(--graview-page-gutter, 20px) max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},pt=1160,Ui={...mt,maxWidth:pt},Yr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},Hi={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},Ii={margin:0,fontSize:ft,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},zi={margin:0,fontSize:ht,color:"var(--graview-ink-muted)",maxWidth:"60ch"},Gr={color:"var(--graview-ink-muted)",fontSize:ft},ji={borderTop:"1px solid var(--graview-edge)",paddingTop:24},vn={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",columnGap:"0.3em",minHeight:24},Wi={...vn,textDecoration:"none"},Bi={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},Vi=`.graview-list{container-type:inline-size}
|
|
2
|
+
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
3
|
+
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
4
|
+
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
5
|
+
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
6
|
+
.graview-row-title:focus-visible{outline:0}
|
|
7
|
+
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
8
|
+
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
9
|
+
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
10
|
+
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
11
|
+
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
12
|
+
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
13
|
+
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
14
|
+
.graview-chip{display:inline-block;padding:0 .5em;border-radius:var(--graview-radius-sm);background:color-mix(in srgb,var(--graview-ink) 7%,transparent);color:var(--graview-ink);font-weight:500;line-height:1.6;white-space:nowrap}
|
|
15
|
+
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
16
|
+
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
17
|
+
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
18
|
+
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
19
|
+
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
20
|
+
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${bt.raised};background:var(--graview-ground)}}`,Ki={font:"inherit",fontSize:ft,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function Ji({kind:e,brand:t,size:r=10,schema:a}){return(0,W.jsx)(_t,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function Yi(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?vt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function Gi(e,t,r){return wn(e,t,r).map(a=>a.text).join(" \xB7 ")}function wn(e,t,r,a=()=>!1){return At(e,t,{limit:3,said:[r],glance:!0}).map(n=>n.long?{text:Nt(n.stored,{markdown:n.markdown,most:100})}:a(n.key)?{text:n.alone,choice:n.key}:{text:n.alone})}function Xi({runs:e}){return(0,W.jsx)(W.Fragment,{children:e.map((t,r)=>{let a=r===0?"":t.choice===void 0&&e[r-1].choice===void 0?" \xB7 ":" ";return(0,W.jsx)(Jr.Fragment,{children:t.choice!==void 0?(0,W.jsxs)(W.Fragment,{children:[a,(0,W.jsx)("span",{className:"graview-chip","data-graview-field":t.choice,children:t.text})]}):`${a}${t.text}`},r)})})}var Qi=(e,t)=>be(e.schema,t),Sn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},bn=e=>Lt(Sn(e.store,e.principal),e.views?.arrangement?.()?.order),Zi=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return bn(e).filter(r=>!t.has(r))},qi=e=>e.charAt(0).toUpperCase()+e.slice(1);var x=F(ae(),1);function fl({context:e,children:t}){let{store:r,brand:a}=e;ie(r);let n=Dt();return Mt(e.embedded?void 0:St(e.assetsAt??n,wt(a))),Tt(e.embedded?void 0:a),(0,x.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:ht,lineHeight:1.5},children:[e.embedded?null:(0,x.jsx)(En,{context:e}),(0,x.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,x.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...Gr},children:(0,x.jsx)("div",{style:{maxWidth:pt,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,x.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,x.jsx)(Jt,{})]})})}):null]})}var xn=(0,N.createContext)(null);function En({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,i=D(),o=V(),l=he("/").replace(/\/$/,""),s=(0,N.useContext)(xn),u=s?.places===!1?[]:Ot({store:t,principal:e.principal,views:e.views}),d=e.views?.arrangement?.(),f=`${i.pathname}${i.search}`,c=t.violations(n),g=c.length,h=jt(c,"All rules hold"),v=i.pathname.split("/").filter(Boolean),y=v.length===2&&xe(t.schema,v[0])!==void 0&&t.graph.getNode(decodeURIComponent(v[1]))!==void 0;return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(It,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>o("/"),current:i.pathname==="/"},faces:{scene:{label:Ct(d),current:!1,go:()=>window.location.assign(a)},pages:{label:$t(d),current:!0,go:()=>{}}},places:u,current:Ut(u,f),reach:{href:R=>`${l}${R}`,go:R=>o(R.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,x.jsx)(Mn,{context:e})},skips:(0,x.jsx)(Kt,{to:[{label:"Skip to the content",testid:"content",go:()=>{let R=document.querySelector("[data-graview-skip-target]");We(R?.querySelector('[data-graview-choose-box][tabindex="0"]')??R??document.querySelector("main"))}},...y?[{label:"Skip to what can be done",testid:"acts",go:()=>void We(document.querySelector("main [data-affordance]:not([disabled]):not([tabindex='-1'])")??document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Re,{to:"/problems","data-testid":"standing-link","aria-label":h,title:h,style:{...Ht,position:"relative",textDecoration:"none",color:g===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:(0,x.jsx)(Wt,{tone:g===0?"var(--graview-good)":"var(--graview-warn)"})}),s?null:(0,x.jsx)(Vr,{context:e}),e.views?(0,x.jsx)(zt,{...e.signature?{signature:!0}:{}}):null]})})})}function hl({context:e,style:t,bleedTop:r,spans:a,children:n,...i}){let o=e.embedded||e.framed?"section":"main",l=(0,x.jsxs)(o,{style:{...mt,...t},"data-graview-page-main":"",...r?{"data-graview-bleed-top":r==="full"?"full":""}:{},...i,children:[r?(0,x.jsx)("style",{children:r==="full"?Cn:Pn}):null,n]});return a?(0,x.jsx)($n,{children:l}):l}var Pn='@media (max-width:680px){[data-graview-bleed-top=""]:not(:has([data-graview-bleed]>:is([data-worker-view-fallback],[data-graview-view-error]))){padding-top:0 !important}}',Xr="[data-worker-view-fallback],[data-worker-view-failed],[data-graview-view-error]",gt=`[data-graview-bleed-top=full]:not(:has([data-graview-bleed=full] :is(${Xr})))`,Cn=`${gt}:not(:has(>header>:not([data-graview-page-title]))){padding-top:0 !important}${gt}>header:not(:has(>:not([data-graview-page-title]))){position:absolute}${gt} [data-graview-line-over-view]{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}`;function $n({children:e}){return(0,x.jsx)("div",{"data-graview-page-spans":"",style:{containerType:"inline-size",minWidth:0,width:"100%",flex:"1 1 0%"},children:e})}function ml({when:e,full:t,children:r}){return!e&&!t?(0,x.jsx)(x.Fragment,{children:r}):(0,x.jsxs)("div",{"data-graview-bleed":t?"full":"",style:{display:"grid",minWidth:0},children:[(0,x.jsx)("style",{children:t?Ln:Fn}),r]})}var yt=`[data-graview-bleed=full]:not(:has(${Xr}))`,Ln=`${yt}{margin-left:calc(50% - 50cqw + env(safe-area-inset-left,0px));margin-right:calc(50% - 50cqw + env(safe-area-inset-right,0px))}${yt} [data-worker-view-beside-under]{box-sizing:border-box;width:100%;max-width:calc(760px + 2*var(--graview-page-gutter,20px));margin-inline:auto;padding-inline:var(--graview-page-gutter,20px)}${yt} [data-testid="draft-view-line"]{padding-inline:var(--graview-page-gutter,20px)}`,Dn="[data-worker-view-fallback],[data-graview-view-error]",Fn=`@media (max-width:680px){[data-graview-bleed=""]:not(:has(>:is(${Dn}))){margin-left:min(0px,calc(env(safe-area-inset-left,0px) - var(--graview-page-gutter,20px)));margin-right:min(0px,calc(env(safe-area-inset-right,0px) - var(--graview-page-gutter,20px)))}}`,kn={position:"absolute",width:1,height:1,margin:-1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"};function pl({context:e,unseen:t,children:r,...a}){let n=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,x.jsx)(n,{style:t?kn:Yr,"data-graview-page-title":"",...a,children:r})}function Mn({context:e,narrowsLists:t=!0,className:r,size:a}){Kr("find");let n=D(),i=V(),[o,l]=dt(),s=n.pathname.split("/").filter(Boolean),u=t&&s.length===1&&xe(e.store.schema,s[0])!==void 0,d=n.pathname==="/search",f=u||d?o.get("q")??"":"",c=u?`Narrow ${be(e.store.schema,xe(e.store.schema,s[0])).toLowerCase()}\u2026`:"",[g,h]=(0,N.useState)(!0);(0,N.useLayoutEffect)(()=>{let C=R.current;if(!C||!c||typeof ResizeObserver>"u")return;let b=()=>{let L=getComputedStyle(C),U=document.createElement("canvas").getContext("2d");U&&(U.font=`${L.fontWeight} ${L.fontSize} ${L.fontFamily}`,h(U.measureText(c).width<=C.clientWidth-parseFloat(L.paddingLeft)-parseFloat(L.paddingRight)))};b();let T=new ResizeObserver(b);return T.observe(C),()=>T.disconnect()},[c]);let[v,y]=(0,N.useState)(f),R=(0,N.useRef)(null);(0,N.useEffect)(()=>{let C=b=>{if(b.defaultPrevented||b.altKey)return;let T=!b.shiftKey&&(b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="k",L=document.activeElement,U=L instanceof HTMLInputElement||L instanceof HTMLTextAreaElement||L instanceof HTMLSelectElement||L instanceof HTMLElement&&L.isContentEditable,X=b.key==="/"&&!b.metaKey&&!b.ctrlKey&&!U;if(!T&&!X)return;let B=R.current,we=B?.closest("[data-graview-embed]"),re=b.target,Se=re===document.body||re===document.documentElement;!B||!(Se||!we||re instanceof Node&&we.contains(re))||(b.preventDefault(),B.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{B.focus(),B.select()}))};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[]);let E=(0,N.useRef)(new Set([f]));(0,N.useEffect)(()=>{E.current.has(f)||(E.current=new Set([f]),y(f))},[f]);let P=C=>{if(y(C),E.current.add(C),u){let T=new URLSearchParams(o);C.trim()?T.set("q",C):T.delete("q"),l(T,{replace:!0});return}let b=C.trim()?`/search?${new URLSearchParams({q:C}).toString()}`:"/search";i(b,{replace:d})};return(0,x.jsxs)("form",{role:"search","aria-label":u?"Narrow this list":"Find anything",className:Gt("graview-find",r),...Yt(a),onSubmit:C=>{C.preventDefault(),u&&v.trim()&&i(`/search?${new URLSearchParams({q:v}).toString()}`)},children:[(0,x.jsx)("input",{ref:R,type:"search","data-testid":"nav-find",value:v,onChange:C=>P(C.target.value),placeholder:u?g?c:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":u?"Narrow this list":"Find anything",className:"graview-find-box"}),(0,x.jsx)("style",{children:Tn})]})}var Tn=`:where(.graview-find){display:flex;min-width:0;flex:1 1 auto}
|
|
21
|
+
:where(.graview-find[data-size=md]){--graview-control-height:36px}
|
|
22
|
+
:where(.graview-find-box){box-sizing:border-box;width:100%;min-width:0;height:var(--graview-control-height,30px);padding:0 var(--graview-bar-find-end,10px) 0 10px;font:inherit;font-size:.875rem;color:var(--graview-ink);background:var(--graview-ground);border:1px solid var(--graview-edge);border-radius:8px}`;export{Zr as a,xe as b,Nn as c,An as d,he as e,D as f,$a as g,V as h,wr as i,qa as j,en as k,Fr as l,tn as m,fn as n,Re as o,dt as p,ft as q,Oi as r,Ui as s,Hi as t,Ii as u,zi as v,Gr as w,ji as x,vn as y,Wi as z,Bi as A,Vi as B,Ki as C,Ji as D,Yi as E,Gi as F,wn as G,Xi as H,Qi as I,Sn as J,bn as K,Zi as L,qi as M,Vr as N,Rn as O,Li as P,Di as Q,fl as R,xn as S,hl as T,ml as U,pl as V,Mn as W};
|
|
23
|
+
/*! Bundled license information:
|
|
24
|
+
|
|
25
|
+
react-router/dist/production/lib/router/url.js:
|
|
26
|
+
(**
|
|
27
|
+
* react-router v8.5.1
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Remix Software Inc.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
33
|
+
*
|
|
34
|
+
* @license MIT
|
|
35
|
+
*)
|
|
36
|
+
|
|
37
|
+
react-router/dist/production/lib/router/history.js:
|
|
38
|
+
(**
|
|
39
|
+
* react-router v8.5.1
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Remix Software Inc.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
45
|
+
*
|
|
46
|
+
* @license MIT
|
|
47
|
+
*)
|
|
48
|
+
|
|
49
|
+
react-router/dist/production/lib/router/utils.js:
|
|
50
|
+
(**
|
|
51
|
+
* react-router v8.5.1
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*)
|
|
60
|
+
|
|
61
|
+
react-router/dist/production/lib/router/navigation.js:
|
|
62
|
+
(**
|
|
63
|
+
* react-router v8.5.1
|
|
64
|
+
*
|
|
65
|
+
* Copyright (c) Remix Software Inc.
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the MIT license found in the
|
|
68
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
69
|
+
*
|
|
70
|
+
* @license MIT
|
|
71
|
+
*)
|
|
72
|
+
|
|
73
|
+
react-router/dist/production/lib/router/router.js:
|
|
74
|
+
(**
|
|
75
|
+
* react-router v8.5.1
|
|
76
|
+
*
|
|
77
|
+
* Copyright (c) Remix Software Inc.
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the MIT license found in the
|
|
80
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
81
|
+
*
|
|
82
|
+
* @license MIT
|
|
83
|
+
*)
|
|
84
|
+
|
|
85
|
+
react-router/dist/production/lib/context.js:
|
|
86
|
+
(**
|
|
87
|
+
* react-router v8.5.1
|
|
88
|
+
*
|
|
89
|
+
* Copyright (c) Remix Software Inc.
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the MIT license found in the
|
|
92
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
93
|
+
*
|
|
94
|
+
* @license MIT
|
|
95
|
+
*)
|
|
96
|
+
|
|
97
|
+
react-router/dist/production/lib/errors.js:
|
|
98
|
+
(**
|
|
99
|
+
* react-router v8.5.1
|
|
100
|
+
*
|
|
101
|
+
* Copyright (c) Remix Software Inc.
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the MIT license found in the
|
|
104
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
105
|
+
*
|
|
106
|
+
* @license MIT
|
|
107
|
+
*)
|
|
108
|
+
|
|
109
|
+
react-router/dist/production/lib/hooks.js:
|
|
110
|
+
(**
|
|
111
|
+
* react-router v8.5.1
|
|
112
|
+
*
|
|
113
|
+
* Copyright (c) Remix Software Inc.
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the MIT license found in the
|
|
116
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
117
|
+
*
|
|
118
|
+
* @license MIT
|
|
119
|
+
*)
|
|
120
|
+
|
|
121
|
+
react-router/dist/production/lib/dom/ssr/markup.js:
|
|
122
|
+
(**
|
|
123
|
+
* react-router v8.5.1
|
|
124
|
+
*
|
|
125
|
+
* Copyright (c) Remix Software Inc.
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the MIT license found in the
|
|
128
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
129
|
+
*
|
|
130
|
+
* @license MIT
|
|
131
|
+
*)
|
|
132
|
+
|
|
133
|
+
react-router/dist/production/lib/dom/ssr/invariant.js:
|
|
134
|
+
(**
|
|
135
|
+
* react-router v8.5.1
|
|
136
|
+
*
|
|
137
|
+
* Copyright (c) Remix Software Inc.
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the MIT license found in the
|
|
140
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
141
|
+
*
|
|
142
|
+
* @license MIT
|
|
143
|
+
*)
|
|
144
|
+
|
|
145
|
+
react-router/dist/production/lib/dom/ssr/routeModules.js:
|
|
146
|
+
(**
|
|
147
|
+
* react-router v8.5.1
|
|
148
|
+
*
|
|
149
|
+
* Copyright (c) Remix Software Inc.
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the MIT license found in the
|
|
152
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
153
|
+
*
|
|
154
|
+
* @license MIT
|
|
155
|
+
*)
|
|
156
|
+
|
|
157
|
+
react-router/dist/production/lib/dom/ssr/links.js:
|
|
158
|
+
(**
|
|
159
|
+
* react-router v8.5.1
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) Remix Software Inc.
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
165
|
+
*
|
|
166
|
+
* @license MIT
|
|
167
|
+
*)
|
|
168
|
+
|
|
169
|
+
react-router/dist/production/lib/dom/ssr/single-fetch.js:
|
|
170
|
+
(**
|
|
171
|
+
* react-router v8.5.1
|
|
172
|
+
*
|
|
173
|
+
* Copyright (c) Remix Software Inc.
|
|
174
|
+
*
|
|
175
|
+
* This source code is licensed under the MIT license found in the
|
|
176
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
177
|
+
*
|
|
178
|
+
* @license MIT
|
|
179
|
+
*)
|
|
180
|
+
|
|
181
|
+
react-router/dist/production/lib/dom/ssr/components.js:
|
|
182
|
+
(**
|
|
183
|
+
* react-router v8.5.1
|
|
184
|
+
*
|
|
185
|
+
* Copyright (c) Remix Software Inc.
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the MIT license found in the
|
|
188
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
189
|
+
*
|
|
190
|
+
* @license MIT
|
|
191
|
+
*)
|
|
192
|
+
|
|
193
|
+
react-router/dist/production/lib/components.js:
|
|
194
|
+
(**
|
|
195
|
+
* react-router v8.5.1
|
|
196
|
+
*
|
|
197
|
+
* Copyright (c) Remix Software Inc.
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the MIT license found in the
|
|
200
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
201
|
+
*
|
|
202
|
+
* @license MIT
|
|
203
|
+
*)
|
|
204
|
+
|
|
205
|
+
react-router/dist/production/lib/dom/dom.js:
|
|
206
|
+
(**
|
|
207
|
+
* react-router v8.5.1
|
|
208
|
+
*
|
|
209
|
+
* Copyright (c) Remix Software Inc.
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the MIT license found in the
|
|
212
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
213
|
+
*
|
|
214
|
+
* @license MIT
|
|
215
|
+
*)
|
|
216
|
+
|
|
217
|
+
react-router/dist/production/lib/dom/lib.js:
|
|
218
|
+
(**
|
|
219
|
+
* react-router v8.5.1
|
|
220
|
+
*
|
|
221
|
+
* Copyright (c) Remix Software Inc.
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the MIT license found in the
|
|
224
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
225
|
+
*
|
|
226
|
+
* @license MIT
|
|
227
|
+
*)
|
|
228
|
+
|
|
229
|
+
react-router/dist/production/index.js:
|
|
230
|
+
(**
|
|
231
|
+
* react-router v8.5.1
|
|
232
|
+
*
|
|
233
|
+
* Copyright (c) Remix Software Inc.
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the MIT license found in the
|
|
236
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
237
|
+
*
|
|
238
|
+
* @license MIT
|
|
239
|
+
*)
|
|
240
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b,c,d,e,f,g,h}from"./chunk.JNK5WBSU.js";import"./chunk.Q6GEPVQ7.js";import"./chunk.7LPHWJB4.js";import"./chunk.DOJCYXIJ.js";import{o as a}from"./chunk.W332P5T3.js";import"./chunk.PGT4ZQDG.js";import"./chunk.TBY5IR7C.js";import"./chunk.HXRHEPPJ.js";import"./chunk.QNWGDG2Z.js";import"./chunk.BJUUSIQY.js";import"./chunk.SPJ34VHA.js";import"./chunk.XOZU4OFA.js";import"./chunk.KBJ3UUER.js";import"./chunk.U5KJQFAP.js";import"./chunk.MIE4TJRW.js";import"./chunk.3CLTABGP.js";import"./chunk.RD2FSSLV.js";import"./chunk.CVN2XFMF.js";import"./chunk.6TBQV3NO.js";import"./chunk.MT252WP4.js";import"./chunk.VVIQSFM4.js";import"./chunk.TQ3MNB6K.js";import"./chunk.VGYG2IBZ.js";import"./chunk.RJ7VSWTA.js";import"./chunk.P43LPXXJ.js";import"./chunk.JCKIJSW7.js";import"./chunk.SDO3U72B.js";import"./chunk.6L6RUOSF.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{g as Highlighter,h as LOOK,f as SectionCard,b as SectionDrawn,a as SectionOutline,e as drawingFindings,c as placeBeside,d as readPart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{F as g,G as q,H as S,N as C,q as O}from"./chunk.RJ7VSWTA.js";import{G as I,c as V,ga as m,j as k,l as d,m as v,n as u,o as E,v as D,z as B}from"./chunk.JCKIJSW7.js";import{ce as T,de as y,fe as P,ge as R,qa as $}from"./chunk.6L6RUOSF.js";import{b as M}from"./chunk.AJZBJBMO.js";var H=M(I(),1);function N(e,t){try{t.length===0?localStorage.removeItem(g(e)):localStorage.setItem(g(e),JSON.stringify(t))}catch{}}function j(e,t){N(e,[...S(e).filter(o=>o.title!==t.title),t])}function J(e,t){N(e,S(e).filter(o=>o.title!==t))}function U(e,t){for(let o of e.places().filter(n=>n.title===t))e.forget?.(o.kind,o.as)}var Y=e=>e===!0?{written:!0}:typeof e=="object"&&e!==null?{written:e.kept===!0,...e.said?{said:e.said}:{}}:{written:!1},G=e=>({title:e.title,lens:e.lens,on:e.on,...e.bindings?{bindings:e.bindings}:{},...e.options?{options:e.options}:{}});function Z(e,t){let o=n=>t.some(r=>r.title===n||r.as===T(n));if(!o(e))return e;for(let n=2;;n++)if(!o(`${e} ${n}`))return`${e} ${n}`}function ne(e){let{store:t,views:o,brand:n,seatTalk:r,onKeepLens:p}=m(),b=(0,H.useContext)(O),h=q(n,t.schema),L=async f=>{let{edit:i}=f;if(f.written&&p)try{await p({op:"remove-lens",title:i.title,on:i.on})}catch{}J(h,i.title),U(o,i.title),b?.dismiss(`kept:${i.title}`),r.setTurns(l=>[...l.map(s=>s.kept&&s.kept.edit.title===i.title&&!s.kept.taken?{...s,kept:{...s.kept,taken:!0}}:s),{role:"seat",text:`Took \u201C${i.title}\u201D back out of the places.`}]);let a=$(t.schema,i.on);e({to:"kind",kind:i.on,title:a,address:y(t.schema,i.on),said:`Went to ${a}.`})};return{keep:async f=>{let i=Z(f.edit.title,o.places()),a={...f.edit,title:i},l=!1,s;if(p)try{({written:l,said:s}=Y(await p(a)))}catch{l=!1}l||j(h,G(a)),C(o,t.schema,[G(a)]);let K=o.places(),c=K.find(w=>w.title===i),x=s??(l?`Kept \u201C${i}\u201D as a lens: it is in the places now.`:p?`Kept \u201C${i}\u201D as your own lens. Ask the owner to keep it for everyone.`:`Kept \u201C${i}\u201D as your own lens.`),A={edit:a,written:l};r.setDraft(null),r.setTurns(w=>[...w,{role:"seat",text:x,kept:A}]),b?.notify({kind:"toast",id:`kept:${i}`,sentence:x,timeout:1e4,action:{label:"Take back",onSelect:()=>void L(A)}}),c&&e({to:"picture",kind:c.kind,as:c.as,title:i,address:P(c.as,R(c,K)?y(t.schema,c.kind).slice(1):void 0),said:`Went to ${i}.`})},takeBack:L}}var W=M(I(),1);function _(e,t){switch(t.to){case"place":return{view:V("#")};case"picture":return{view:u(B(d(e,"filter",null),t.kind,t.as),[])};case"kind":{let o=E(v({...k(e,D(t.kind)),relation:null},!1),!0);return{view:u(d(d(o,"view",null),"filter",t.filter??null),[])}}case"record":return{view:u(k(v(d(d(e,"view",null),"filter",null),!1),t.id),[t.id])};case"problems":return{pane:"problems"}}}function z(e,{into:t=!1}={}){let o=typeof document>"u"?null:document.querySelector('[data-testid="inbox-button"]');o&&(o.getAttribute("aria-expanded")==="true"!==e&&o.click(),e&&F(60,t))}function F(e,t){let o=document.querySelector('[data-testid="inbox-tab-for-you"]');o&&o.getAttribute("aria-selected")!=="true"&&o.click();let n=o?document.querySelector('[data-testid="inbox-problem-words"]'):null;(n?t&&(n.focus(),!1):e>0)&&setTimeout(()=>F(e-1,t),50)}function le(){let{setView:e,seatTalk:t}=m();return(0,W.useCallback)(o=>{t.get().draft&&t.setDraft(null),z(o.to==="problems"),o.to!=="problems"&&e(n=>{let r=_(n,o);return"view"in r?r.view:n})},[e,t])}export{ne as a,z as b,le as c};
|