graview 0.1.41 → 0.1.43
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.22E4GKYU.js +1 -0
- package/dist/preview/chunk.25VAWLKJ.js +1 -0
- package/dist/preview/chunk.26SI4K3P.js +35 -0
- package/dist/preview/chunk.27QYTMXP.js +1 -0
- package/dist/preview/chunk.2AZTW66C.js +1 -0
- package/dist/preview/chunk.2JMJTREH.js +1 -0
- package/dist/preview/chunk.3B47UX2J.js +2 -0
- package/dist/preview/{chunk.JDRLSVOI.js → chunk.3GQL4K3Q.js} +1 -1
- package/dist/preview/chunk.3HLNRVFY.js +1 -0
- package/dist/preview/chunk.3JATXDSP.js +1 -0
- package/dist/preview/chunk.4C65DXZB.js +1 -0
- package/dist/preview/chunk.4HAGPMY6.js +117 -0
- package/dist/preview/chunk.4IDXQVSW.js +1 -0
- package/dist/preview/{chunk.ZRLXVYPG.js → chunk.4P3LS2OE.js} +1 -1
- package/dist/preview/{chunk.RQGTHRRJ.js → chunk.4YLBGGWT.js} +1 -1
- package/dist/preview/chunk.4ZHUGSJL.js +1 -0
- package/dist/preview/{chunk.D25XEVKO.js → chunk.4ZSHTUNK.js} +1 -1
- package/dist/preview/chunk.5BJW4IPW.js +1 -0
- package/dist/preview/{chunk.BFNVG5JE.js → chunk.5J2HETUO.js} +1 -1
- package/dist/preview/{chunk.V3V47QRE.js → chunk.5TBK44MK.js} +1 -1
- package/dist/preview/chunk.63DI7XNE.js +21 -0
- package/dist/preview/{chunk.VJXXCUKS.js → chunk.64MP7636.js} +1 -1
- package/dist/preview/chunk.6AYTF53S.js +1 -0
- package/dist/preview/chunk.6BU3GCHK.js +1 -0
- package/dist/preview/{chunk.C7JKMOFC.js → chunk.6IEDQHKI.js} +1 -1
- package/dist/preview/chunk.6K4JBLOP.js +1 -0
- package/dist/preview/{chunk.OF34OZ4V.js → chunk.6PF5LWRK.js} +1 -1
- package/dist/preview/{chunk.YWNHCZQ5.js → chunk.6ROYIMQ2.js} +1 -1
- package/dist/preview/{chunk.AIZQBPGU.js → chunk.6XEATXZC.js} +1 -1
- package/dist/preview/chunk.7IXLH7PR.js +1 -0
- package/dist/preview/chunk.7L6LYXCV.js +25 -0
- package/dist/preview/chunk.7MQ7UWVW.js +5 -0
- package/dist/preview/{chunk.Z7LDT55A.js → chunk.7MXQRSNR.js} +1 -1
- package/dist/preview/{chunk.DMF35E7D.js → chunk.7ROWZZN5.js} +1 -1
- package/dist/preview/chunk.7TU2PDYW.js +1 -0
- package/dist/preview/{chunk.WVDKYUF3.js → chunk.7XCBIID7.js} +1 -1
- package/dist/preview/{chunk.VNUHESMZ.js → chunk.A3WOUDOG.js} +1 -1
- package/dist/preview/{chunk.MUKDKVVC.js → chunk.AXJJUCWT.js} +1 -1
- package/dist/preview/chunk.B2KDYES6.js +1 -0
- package/dist/preview/chunk.BBLIT7S7.js +1 -0
- package/dist/preview/{chunk.NGDXH66B.js → chunk.BT6FUNQI.js} +1 -1
- package/dist/preview/chunk.BYVE2NQY.js +1 -0
- package/dist/preview/chunk.BYVLGDVJ.js +1 -0
- package/dist/preview/chunk.C3DX4LWD.js +49 -0
- package/dist/preview/chunk.C3X3R7LP.js +9 -0
- package/dist/preview/{chunk.C2PECN4C.js → chunk.C5NOO4CC.js} +1 -1
- package/dist/preview/{chunk.C4TSM4W5.js → chunk.CO2ZPX3D.js} +2 -2
- package/dist/preview/{chunk.5RABSIF7.js → chunk.CTSPNTDX.js} +1 -1
- package/dist/preview/{chunk.LPNIEPYI.js → chunk.CW6IPHRR.js} +2 -2
- package/dist/preview/chunk.CXJXVBGF.js +1 -0
- package/dist/preview/{chunk.4QPVS2ZM.js → chunk.DJ3BD7AZ.js} +1 -1
- package/dist/preview/{chunk.HB7ELBVK.js → chunk.DQR45N7V.js} +1 -1
- package/dist/preview/{chunk.2RVUDRRY.js → chunk.DYW4D74X.js} +1 -1
- package/dist/preview/chunk.DZN26GKS.js +1 -0
- package/dist/preview/chunk.E2AJ7U5Z.js +1 -0
- package/dist/preview/chunk.E5PHLNXR.js +1 -0
- package/dist/preview/{chunk.42XSBKPO.js → chunk.EBTYR5CZ.js} +1 -1
- package/dist/preview/chunk.EPPAFWP7.js +5 -0
- package/dist/preview/{chunk.UWW6ZEPY.js → chunk.F6CPM7SL.js} +1 -1
- package/dist/preview/chunk.FCPH4YZN.js +1 -0
- package/dist/preview/{chunk.BXT6FDT4.js → chunk.FKLEIR4Y.js} +1 -1
- package/dist/preview/chunk.FLMNHV6A.js +19 -0
- package/dist/preview/chunk.FTF67QE2.js +1 -0
- package/dist/preview/chunk.GNPYSMHA.js +1 -0
- package/dist/preview/chunk.GSZYT6GF.js +1 -0
- package/dist/preview/chunk.GZA5ZNLJ.js +1 -0
- package/dist/preview/chunk.HMABYAZR.js +1 -0
- package/dist/preview/chunk.I4HUBO22.js +1 -0
- package/dist/preview/chunk.IJ2AF3AW.js +1 -0
- package/dist/preview/{chunk.EAH47SCN.js → chunk.IJU322EP.js} +1 -1
- package/dist/preview/chunk.IQ3LUSD6.js +6 -0
- package/dist/preview/chunk.IWUSCCZN.js +1 -0
- package/dist/preview/{chunk.W3FTEJH5.js → chunk.JNCSGUO3.js} +1 -1
- package/dist/preview/{chunk.33KXSD6F.js → chunk.K6SPN4D6.js} +1 -1
- package/dist/preview/chunk.KBMVUIWR.js +6 -0
- package/dist/preview/{chunk.ISXFH3CK.js → chunk.KG5R4GTK.js} +1 -1
- package/dist/preview/chunk.KR3J27IA.js +88 -0
- package/dist/preview/chunk.KWQ67UK2.js +1 -0
- package/dist/preview/chunk.LBIDNJ6G.js +1 -0
- package/dist/preview/{chunk.HKCK3JI4.js → chunk.LDU25CCL.js} +1 -1
- package/dist/preview/{chunk.67WWRC6Y.js → chunk.MBOOUJOE.js} +1 -1
- package/dist/preview/{chunk.ZHLQWMV5.js → chunk.MI2HL3LQ.js} +1 -1
- package/dist/preview/chunk.MXU3VQSQ.js +1 -0
- package/dist/preview/{chunk.PMGXASFI.js → chunk.N3FONYEP.js} +2 -2
- package/dist/preview/chunk.NH6D6TWY.js +1 -0
- package/dist/preview/chunk.NQTCOBOQ.js +1 -0
- package/dist/preview/chunk.O4X5WJIC.js +1 -0
- package/dist/preview/chunk.OH2N3SX7.js +1 -0
- package/dist/preview/chunk.OIJP6PQV.js +1 -0
- package/dist/preview/{chunk.TN5PYGU7.js → chunk.ONSG3OIL.js} +1 -1
- package/dist/preview/chunk.ORKXXLWD.js +1 -0
- package/dist/preview/chunk.OUN2H3TR.js +1 -0
- package/dist/preview/{chunk.6FNMDAX5.js → chunk.OWL5GZ6U.js} +1 -1
- package/dist/preview/chunk.PEXPTDX7.js +1 -0
- package/dist/preview/chunk.PWYMZWAN.js +1 -0
- package/dist/preview/{chunk.QIV65FWE.js → chunk.Q5XICUDZ.js} +1 -1
- package/dist/preview/chunk.QJUFVEAU.js +1 -0
- package/dist/preview/{chunk.N6MVK3KD.js → chunk.QWY54AVN.js} +1 -1
- package/dist/preview/{chunk.XEKLEHC3.js → chunk.QXTLZSBL.js} +1 -1
- package/dist/preview/{chunk.UHI3D7JC.js → chunk.R2B2ZAWI.js} +1 -1
- package/dist/preview/{chunk.UUBYFBPN.js → chunk.R7F6UJVG.js} +1 -1
- package/dist/preview/chunk.RDXDEFOC.js +1 -0
- package/dist/preview/{chunk.JACGQ2PR.js → chunk.RPDTWQKA.js} +3 -3
- package/dist/preview/{chunk.BELCPW66.js → chunk.RQBX7M7Q.js} +2 -2
- package/dist/preview/chunk.RRCPEHM4.js +1 -0
- package/dist/preview/{chunk.2FLPDPEL.js → chunk.RSYFIL2Z.js} +1 -1
- package/dist/preview/{chunk.Z5AB2DBF.js → chunk.RY4E4JRI.js} +1 -1
- package/dist/preview/{chunk.RCM7NOPF.js → chunk.S2MP53RO.js} +1 -1
- package/dist/preview/chunk.S6BZXNMV.js +1 -0
- package/dist/preview/{chunk.HPAGOEZG.js → chunk.SGRKCQ2X.js} +1 -1
- package/dist/preview/chunk.SKB4XSDG.js +1 -0
- package/dist/preview/chunk.T4M4MLOS.js +1 -0
- package/dist/preview/{chunk.I7XSDXQ3.js → chunk.T4Q6OLZU.js} +1 -1
- package/dist/preview/{chunk.L4STJLUV.js → chunk.T4QT5SZY.js} +1 -1
- package/dist/preview/chunk.TMBFLZNH.js +2 -0
- package/dist/preview/chunk.TX65ZO27.js +1 -0
- package/dist/preview/chunk.U3ETEQDO.js +1 -0
- package/dist/preview/chunk.VCOIFBUE.js +1 -0
- package/dist/preview/chunk.VP35BUUZ.js +349 -0
- package/dist/preview/{chunk.N2K25KH3.js → chunk.WH2RYGXR.js} +1 -1
- package/dist/preview/{chunk.LOCSF3BR.js → chunk.WWR7Y2KE.js} +1 -1
- package/dist/preview/chunk.X5WB4GJ4.js +1 -0
- package/dist/preview/chunk.XAXZCOZK.js +1 -0
- package/dist/preview/chunk.XBV4WO7D.js +1 -0
- package/dist/preview/chunk.XFQUVMRI.js +1 -0
- package/dist/preview/{chunk.AKQXF7GW.js → chunk.XGRMQUFB.js} +1 -1
- package/dist/preview/chunk.XVWJD2DG.js +2 -0
- package/dist/preview/{chunk.ZRYSVOLA.js → chunk.YKN2VWWQ.js} +2 -2
- package/dist/preview/chunk.YPEZZLOY.js +1 -0
- package/dist/preview/chunk.YQDIVHCH.js +1 -0
- package/dist/preview/{chunk.TGVUIFKD.js → chunk.Z56L6V6Z.js} +1 -1
- package/dist/preview/{chunk.HI7X6PLZ.js → chunk.ZE4U4JBF.js} +2 -2
- package/dist/preview/chunk.ZE6LJVVN.js +1 -0
- package/dist/preview/{chunk.H5ADMSE7.js → chunk.ZEC64CK6.js} +1 -1
- package/dist/preview/chunk.ZHRW2UF4.js +1 -0
- package/dist/preview/{chunk.VIYECFKZ.js → chunk.ZRICIE6T.js} +1 -1
- package/dist/preview/chunk.ZUJZVK2X.js +1 -0
- package/dist/preview/index.html +46 -45
- package/dist/preview/page.js +6 -6
- package/package.json +6 -6
- package/dist/preview/chunk.242EUAPE.js +0 -1
- package/dist/preview/chunk.2FGYWAID.js +0 -1
- package/dist/preview/chunk.2GQPLTV3.js +0 -1
- package/dist/preview/chunk.2NB7U4EW.js +0 -88
- package/dist/preview/chunk.3Q75TIGL.js +0 -1
- package/dist/preview/chunk.3ZILIZZ6.js +0 -1
- package/dist/preview/chunk.4EEWBCT2.js +0 -1
- package/dist/preview/chunk.4Q7XJJZY.js +0 -1
- package/dist/preview/chunk.53CDFJNM.js +0 -1
- package/dist/preview/chunk.57R2GXXN.js +0 -1
- package/dist/preview/chunk.5P556A7W.js +0 -1
- package/dist/preview/chunk.5QXWMC6C.js +0 -1
- package/dist/preview/chunk.6CRRPXKP.js +0 -1
- package/dist/preview/chunk.6RID3OWK.js +0 -1
- package/dist/preview/chunk.6YPLZNVT.js +0 -19
- package/dist/preview/chunk.7LIKEE5Z.js +0 -1
- package/dist/preview/chunk.7YIFF6BF.js +0 -1
- package/dist/preview/chunk.A4UIM35E.js +0 -1
- package/dist/preview/chunk.B5724ULM.js +0 -1
- package/dist/preview/chunk.BK6RWVRE.js +0 -1
- package/dist/preview/chunk.BQRAIU5R.js +0 -1
- package/dist/preview/chunk.DGCMEDQA.js +0 -1
- package/dist/preview/chunk.DL26BKT7.js +0 -1
- package/dist/preview/chunk.EQ4UAWRB.js +0 -1
- package/dist/preview/chunk.F2MQJH6Y.js +0 -1
- package/dist/preview/chunk.FFZBOP65.js +0 -1
- package/dist/preview/chunk.FOQZADMA.js +0 -25
- package/dist/preview/chunk.GT2BITLW.js +0 -1
- package/dist/preview/chunk.H5HWN7A2.js +0 -1
- package/dist/preview/chunk.H7POIT3V.js +0 -1
- package/dist/preview/chunk.HEVC6HHP.js +0 -1
- package/dist/preview/chunk.HFYUAK5Z.js +0 -6
- package/dist/preview/chunk.HPUN5DKZ.js +0 -117
- package/dist/preview/chunk.I4JBWTZM.js +0 -2
- package/dist/preview/chunk.J2CR4RRH.js +0 -1
- package/dist/preview/chunk.J4IULZFD.js +0 -1
- package/dist/preview/chunk.JHEVGLKB.js +0 -345
- package/dist/preview/chunk.JLBGJSCZ.js +0 -1
- package/dist/preview/chunk.JYJ4LZJJ.js +0 -5
- package/dist/preview/chunk.L3A6YLMT.js +0 -21
- package/dist/preview/chunk.LOSMUESM.js +0 -1
- package/dist/preview/chunk.LOZJQ5ZX.js +0 -1
- package/dist/preview/chunk.LPYVOBWB.js +0 -1
- package/dist/preview/chunk.M4T377LG.js +0 -1
- package/dist/preview/chunk.MSP73H5Z.js +0 -1
- package/dist/preview/chunk.MUPO5S2A.js +0 -47
- package/dist/preview/chunk.O6F3K6CU.js +0 -1
- package/dist/preview/chunk.O75JKQPF.js +0 -1
- package/dist/preview/chunk.OVTCW3AI.js +0 -1
- package/dist/preview/chunk.OW7NSJ4H.js +0 -1
- package/dist/preview/chunk.PMDNFN7Z.js +0 -35
- package/dist/preview/chunk.Q4TZHWQX.js +0 -1
- package/dist/preview/chunk.QHYXXZRD.js +0 -1
- package/dist/preview/chunk.S2U5CEP4.js +0 -1
- package/dist/preview/chunk.SADG5RMV.js +0 -1
- package/dist/preview/chunk.SCYQSXW4.js +0 -1
- package/dist/preview/chunk.SIGC3G7S.js +0 -1
- package/dist/preview/chunk.T3BWINOF.js +0 -1
- package/dist/preview/chunk.TIH2PDFH.js +0 -1
- package/dist/preview/chunk.TNESS3LQ.js +0 -2
- package/dist/preview/chunk.UEXIKCLF.js +0 -1
- package/dist/preview/chunk.USZPOOLZ.js +0 -1
- package/dist/preview/chunk.UTWPZULC.js +0 -1
- package/dist/preview/chunk.V4KLBSC4.js +0 -1
- package/dist/preview/chunk.V5MYKNL7.js +0 -5
- package/dist/preview/chunk.VCX3HEIE.js +0 -1
- package/dist/preview/chunk.VDAMCTNL.js +0 -1
- package/dist/preview/chunk.W4HBRXMY.js +0 -1
- package/dist/preview/chunk.WUKHYLQT.js +0 -9
- package/dist/preview/chunk.XFZKP4IF.js +0 -2
- package/dist/preview/chunk.XOYJ26YB.js +0 -1
- package/dist/preview/chunk.XQTMO5PW.js +0 -1
- package/dist/preview/chunk.YYFLTMNN.js +0 -1
- package/dist/preview/chunk.Z7BCIYDW.js +0 -1
- package/dist/preview/chunk.ZOR6FKNI.js +0 -1
- package/dist/preview/chunk.ZTMEESII.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./chunk.HPUN5DKZ.js";import"./chunk.MUPO5S2A.js";import"./chunk.JYJ4LZJJ.js";import"./chunk.UGFDSE37.js";import{l as m}from"./chunk.USZPOOLZ.js";import"./chunk.C4TSM4W5.js";import"./chunk.XEKLEHC3.js";import"./chunk.53CDFJNM.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.PXQVXBNG.js";import"./chunk.BQRAIU5R.js";import"./chunk.57R2GXXN.js";import"./chunk.BFNVG5JE.js";import"./chunk.AIZQBPGU.js";import"./chunk.V3V47QRE.js";import"./chunk.5P556A7W.js";import"./chunk.QHYXXZRD.js";import"./chunk.BELCPW66.js";import"./chunk.6YPLZNVT.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import"./chunk.QIV65FWE.js";import"./chunk.UT6642FC.js";import"./chunk.ISXFH3CK.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{G as S,R as g}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{od as n}from"./chunk.V5MYKNL7.js";import{b as t}from"./chunk.AJZBJBMO.js";var y=t(S(),1),a=t(g(),1);function E({store:h,auto:f,brand:i,views:u,presence:o,steering:r,overview:s,scope:d,titleLevel:v=2,quickAsk:l,props:e}){let b=(0,y.useMemo)(()=>m({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:f?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:b}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(c,{context:{store:h,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...s?{overview:s}:{},titleLevel:v,views:u,settings:e.app.settings??[],...o?{presence:o}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{E as PagesContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f,h as g}from"./chunk.D25XEVKO.js";import"./chunk.PXQVXBNG.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";export{g as createLinks,f as judgeDestination,e as listsOf,c as nowhere,a as placesSaid,b as quoted,d as whereOfWords};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Ba as Q,Cb as I,E as F,F as Y,H as L,Ja as X,Jb as en,N as O,Q as j,R as B,S as U,T as K,Ua as v,Wa as nn,Z as J,_ as Z,ja as P}from"./chunk.V5MYKNL7.js";var un=1e4,p=class{constructor(a){this.nodes=a}},rn=Symbol.for("@graview/core:far-record"),fn=e=>typeof e=="object"&&e!==null&&e[rn]===!0;function cn(e){let a={...e.fields,id:`@${e.address}/${e.kind}:${e.id}`,kind:`@${e.address}/${e.kind}`,label:e.label};return Object.defineProperty(a,rn,{value:!0}),a}function Nn(e){let a=`the linked record in ${e.ref.address}`;return e.reason==="denied"?`${a} is not one this viewer may open`:`${a} has not been read`}var pn="",f=class extends Error{constructor(g,l){super(g);this.sentence=g;this.at=l}},z=class extends f{},V=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof p)&&typeof e.id=="string",tn=e=>{let a=new Set;return new p(e.filter(g=>!a.has(g.id)&&a.add(g.id)))},w=e=>e===null?"nothing":e instanceof p?"a set of records":Array.isArray(e)?"a list":V(e)?"a record":typeof e=="string"?"a word":typeof e;function on(e,a){let g=a.budget??un,l=(n,s)=>{if(g-=n,g<0)throw new z("this rule looks at too much of the graph to judge in one go",s)},u=a.today??L(),b=a.now??new Date().toISOString(),k=new Map,S=new Set,A=a.bindings,q=(n,s,t,o)=>{let d=`${n?.id}\0${s}`;if(k.has(d))return k.get(d);if(S.has(d))throw new f(`"${s}"${n?` of ${P(n.kind)}`:""} depends on itself`,o);S.add(d);let r=A;A=void 0;try{let i=$(t,n);return k.set(d,i),i}finally{A=r,S.delete(d)}},E=(n,s,t)=>{l(1,t);let o=a.kinds.get(n.kind),d=o?.computed?.get(s);if(d)return q(n,s,d,t);let r=o?.linked?.get(s);if(r){let y=Q(Object.hasOwn(n,s)?n[s]:void 0,r);l(y.length,t);let m=a.linked??X(a.graph),h=y.flatMap(x=>{let C=m?m(x):{unread:!0};return"record"in C?[cn(C.record)]:(a.onUnread?.({relation:s,ref:x,reason:"denied"in C?"denied":"unread"}),[])});return r.cardinality==="one"?h[0]??null:new p(h)}let i=Object.hasOwn(n,s);if(o?.fields.has(s)||i){let y=i?v(n,s,u):void 0;return y===void 0?null:y}let c=o?.edges.get(s);if(c){let y=a.graph.out(n.id,s);return l(y.length,t),c==="one"?y[0]??null:new p(y)}if(s==="id")return n.id;if(fn(n))return null;throw new f(`${P(n.kind)} has no field or relation called "${s}"`,t)},N=(n,s,t)=>{if(n instanceof p)return n;if(n===null)return new p([]);if(V(n))return new p([n]);throw new f(`${t}(\u2026) needs a set of records, and was given ${w(n)}`,s)},G=(n,s,t)=>{if(n===null)return null;if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);throw new f(`${t}(\u2026) needs a word, and was given ${w(n)}`,s)},_=(n,s,t)=>{let o=G(n,s,t);if(o===null)return null;let d=Date.parse(o.length===10?`${o}T00:00:00Z`:o);if(Number.isNaN(d))throw new f(`${t}(\u2026) needs a date, and "${o}" is not one`,s);return d},M=(n,s)=>V(n)&&V(s)?n.id===s.id:V(n)&&typeof s=="string"?n.id===s:typeof n=="string"&&V(s)?n===s.id:Array.isArray(n)&&Array.isArray(s)?n.length===s.length&&n.every((t,o)=>M(t,s[o])):n===s,R=(n,s,t)=>{if(n===null)return!1;if(typeof n=="boolean")return n;throw new f(`${t} must be true or false, and was ${w(n)}`,s)},T=(n,s)=>$(s,n);function $(n,s){switch(l(1,n.at),n.t){case"lit":return n.value;case"list":return n.items.map(t=>$(t,s));case"ident":{let t=A&&Object.hasOwn(A,n.name)?A[n.name]:void 0;if(t!==void 0)return t;if(s)return E(s,n.name,n.at);throw new f(`"${n.name}" means nothing in a rule over the whole graph`,n.at)}case"member":{let t=$(n.object,s);if(t===null)return null;if(V(t))return E(t,n.name,n.at);throw new f(`".${n.name}" needs a record before it, and was given ${w(t)}`,n.at)}case"unary":{let t=$(n.operand,s);if(n.op==="!")return!R(t,n.at,"what follows not");if(t===null)return null;if(typeof t!="number")throw new f(`"-" needs a number, and was given ${w(t)}`,n.at);return-t}case"where":{let t=N($(n.set,s),n.at,"where");return l(t.nodes.length,n.at),new p(t.nodes.filter(o=>R(T(o,n.filter),n.at,"a where condition")))}case"binary":return dn(n,s);case"call":return ln(n,s)}}function dn(n,s){if(n.op==="&&")return R($(n.left,s),n.at,"each side of and")&&R($(n.right,s),n.at,"each side of and");if(n.op==="||")return R($(n.left,s),n.at,"each side of or")||R($(n.right,s),n.at,"each side of or");let t=$(n.left,s),o=$(n.right,s);if(n.op==="&"||n.op==="|"||n.op==="-"&&(t instanceof p||o instanceof p)){let d=N(t,n.at,n.op).nodes,r=N(o,n.at,n.op).nodes;l(d.length+r.length,n.at);let i=new Set(r.map(c=>c.id));return tn(n.op==="|"?[...d,...r]:d.filter(c=>i.has(c.id)===(n.op==="&")))}switch(n.op){case"==":return M(t,o);case"!=":return!M(t,o);case"in":{if(o===null)return!1;if(o instanceof p)return o.nodes.some(d=>M(t,d));if(Array.isArray(o))return o.some(d=>M(t,d));if(typeof o=="string"&&typeof t=="string")return o.includes(t);throw new f(`"in" needs a list or a set on its right, and was given ${w(o)}`,n.at)}case"<":case"<=":case">":case">=":{if(t===null||o===null)return!1;if(!(typeof t=="number"&&typeof o=="number"||typeof t=="string"&&typeof o=="string"))throw new f(`cannot compare ${w(t)} with ${w(o)}`,n.at);return n.op==="<"?t<o:n.op==="<="?t<=o:n.op===">"?t>o:t>=o}default:{if(t===null||o===null)return null;if(n.op==="+"&&(typeof t=="string"||typeof o=="string")){let d=`${G(t,n.at,"+")}${G(o,n.at,"+")}`;if(d.length>1e4)throw new f("that makes a word too long",n.at);return d}if(typeof t!="number"||typeof o!="number")throw new f(`"${n.op}" needs numbers, and was given ${w(t)} and ${w(o)}`,n.at);return(n.op==="/"||n.op==="%")&&o===0?null:n.op==="+"?t+o:n.op==="-"?t-o:n.op==="*"?t*o:n.op==="/"?t/o:t%o}}}function ln(n,s){let t=(r,i=r)=>{if(n.args.length<r||n.args.length>i)throw new f(`${n.fn}(\u2026) takes ${r===i?r:`${r} to ${i}`} argument${i===1?"":"s"}`,n.at)},o=r=>$(n.args[r],s),d=r=>{let i=o(r);if(typeof i!="string")throw new f(`${n.fn}(\u2026) needs a quoted name, like ${n.fn}('name')`,n.at);return i};switch(n.fn){case"out":case"in":{t(1,2);let r=(y,m)=>n.fn==="out"?a.graph.out(y,m):a.graph.in(y,m);if(n.args.length===2){let y=N(o(0),n.at,n.fn).nodes,m=d(1);return tn(y.flatMap(h=>{let x=r(h.id,m);return l(x.length+1,n.at),x}))}let i=d(0);if(!s)throw new f(`${n.fn}('${i}') needs a record to start from`,n.at);let c=r(s.id,i);return l(c.length,n.at),new p(c)}case"all":{t(1,2);let r=a.graph.nodesOfKind(d(0),{archived:n.args.length===2?o(1):!1});return l(r.length,n.at),new p(r)}case"archived":return t(0,1),nn(n.args.length===1?o(0):s);case"count":return t(1),N(o(0),n.at,"count").nodes.length;case"exists":return t(1),N(o(0),n.at,"exists").nodes.length>0;case"every":case"some":{t(2);let r=N(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=c=>R(T(c,n.args[1]),n.at,`the condition in ${n.fn}(\u2026)`);return n.fn==="every"?r.nodes.every(i):r.nodes.some(i)}case"sum":case"min":case"max":{t(2);let r=N(o(0),n.at,n.fn);l(r.nodes.length,n.at);let i=n.args[1],c=i.t==="lit"&&typeof i.value=="string"?i.value:void 0,y=i.t==="ident"?`'${i.name}'`:c!==void 0?`'${c}'`:"\u2026",m=r.nodes.map(h=>i.t==="ident"?E(h,i.name,n.at):c!==void 0?E(h,c,n.at):T(h,i)).filter(h=>{if(h===null)return!1;if(typeof h!="number")throw new f(`${n.fn}(\u2026, ${y}) needs a number for each member, and found ${w(h)}`,n.at);return!0});return n.fn==="sum"?m.reduce((h,x)=>h+x,0):m.length===0?null:n.fn==="min"?Math.min(...m):Math.max(...m)}case"fact":{t(1);let r=d(0),i=a.kinds.get(pn)?.computed?.get(r);if(!i)throw new f(`no fact is called "${r}"`,n.at);return q(null,r,i,n.at)}case"first":return t(1),N(o(0),n.at,"first").nodes[0]??null;case"sort":{t(2,3);let r=N(o(0),n.at,"sort"),i=n.args.length===3?o(2):"asc";if(i!=="asc"&&i!=="desc")throw new f("sort(\u2026) goes 'asc' or 'desc'",n.at);let c=r.nodes.length;l(c+c*Math.ceil(Math.log2(c+1)),n.at);let y=r.nodes.map((h,x)=>({node:h,i:x,key:T(h,n.args[1])})),m=i==="desc"?-1:1;return y.sort((h,x)=>H(h.key,x.key,m,n.at)||h.i-x.i),new p(y.map(h=>h.node))}case"either":{if(n.args.length<1)throw new f("either(\u2026) takes at least one argument",n.at);for(let r=0;r<n.args.length;r++){let i=o(r);if(i!==null&&!(i instanceof p&&i.nodes.length===0))return i}return null}case"present":{t(1);let r=o(0);return r===null||r===""?!1:Array.isArray(r)?r.length>0:r instanceof p?r.nodes.length>0:!0}case"len":{t(1);let r=o(0);if(r===null)return 0;if(typeof r=="string"||Array.isArray(r))return r.length;if(r instanceof p)return r.nodes.length;throw new f(`len(\u2026) needs a word or a list, and was given ${w(r)}`,n.at)}case"contains":case"startsWith":{t(2);let r=o(0),i=o(1);if(r===null||i===null)return!1;if(n.fn==="contains"&&Array.isArray(r))return r.some(m=>M(m,i));let c=G(r,n.at,n.fn),y=G(i,n.at,n.fn);return n.fn==="contains"?c.toLowerCase().includes(y.toLowerCase()):c.startsWith(y)}case"lower":{t(1);let r=G(o(0),n.at,"lower");return r===null?null:r.toLowerCase()}case"today":return t(0),u;case"now":return t(0),b;case"date":{t(1);let r=_(o(0),n.at,"date");return r===null?null:new Date(r).toISOString().slice(0,10)}case"days":case"hours":{t(2);let r=_(o(0),n.at,n.fn),i=_(o(1),n.at,n.fn);if(r===null||i===null)return null;let c=(i-r)/(n.fn==="days"?864e5:36e5);return n.fn==="days"?Math.round(c):c}case"if":return t(3),R(o(0),n.at,"the condition in if(\u2026)")?o(1):o(2);default:throw new f(`"${n.fn}" is not a function the rule language knows`,n.at)}}function H(n,s,t,o){if(n===null||s===null)return n===s?0:n===null?1:-1;if(Array.isArray(n)&&Array.isArray(s)){for(let r=0;r<Math.max(n.length,s.length);r++){let i=H(n[r]??null,s[r]??null,t,o);if(i!==0)return i}return 0}let d=r=>typeof r=="number"||typeof r=="string"||typeof r=="boolean"?typeof r:w(r);if(d(n)!==d(s)||typeof n=="object"||typeof s=="object")throw new f(`sort(\u2026) cannot put ${w(n)} and ${w(s)} in order`,o);return typeof n=="string"?t*(n<s?-1:n>s?1:0):t*(Number(n)-Number(s))}return $(e,a.subject)}var Sn=["out","in","all","count","exists","every","some","sum","min","max","present","len","contains","startsWith","lower","today","now","date","days","hours","if","first","sort","either","fact","archived"];var Vn=(e,a,g,l)=>({severity:"error",code:e,path:a,message:g,...l?{fix:l}:{}}),Gn=(e,a,g,l)=>({severity:"warning",code:e,path:a,message:g,...l?{fix:l}:{}}),Mn=e=>e.some(a=>a.severity==="error");function On(e){return e.map(a=>`${a.severity==="error"?"\u2717":a.severity==="warning"?"!":"\xB7"} ${a.path||"(document)"}: ${a.message}${a.fix?` \u2014 ${a.fix}`:""}`).join(`
|
|
2
|
-
`)}var Cn=["money","percent","date","time","datetime","relative","upper","lower","count","words","and","plural","excerpt"],gn={getNode:()=>{},allNodes:()=>[],allEdges:()=>[],nodesOfKind:()=>[],edgesOfKind:()=>[],out:()=>[],in:()=>[],neighbors:()=>[],has:()=>!1};function jn(e,a,g,l=[],u,b=D){return W(e,a,g,l,u,b)}var yn=(e,a)=>e.capital?J(a):a;function hn(e){return e?a=>{let g=e.tryDefinition(a.kind)?.label;return g?g(a):D(a)}:D}var sn=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],an=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function mn(e,a){return!Number.isInteger(e)||e<0||e>99?K(e,a):e<20?sn[e]:e%10===0?an[e/10]:`${an[Math.floor(e/10)]}-${sn[e%10]}`}function wn(e){return/[^aeiou]y$/i.test(e)?`${e.slice(0,-1)}ies`:/(s|x|z|ch|sh)$/i.test(e)?`${e}es`:`${e}s`}var D=e=>String(e.name??e.title??e.label??e.id);function W(e,a,g,l=[],u,b=D){if(a==="plural"){let k=e instanceof p?e.nodes.length:Array.isArray(e)?e.length:typeof e=="number"?e:null;return k===null||l[0]===void 0?"\u2014":k===1?l[0]:l[1]??wn(l[0])}if(e===null)return"\u2014";if(e instanceof p)return a==="count"?String(e.nodes.length):a==="and"?Z(e.nodes.map(b)):e.nodes.map(b).join(", ");if(Array.isArray(e)){if(a==="count")return String(e.length);let k=e.map(S=>W(S,void 0,g,[],u,b));return a==="and"?Z(k):k.join(", ")}if(typeof e=="object")return b(e);switch(a){case"words":return typeof e=="number"?mn(e,u?.locale):String(e);case"money":return typeof e=="number"?I(e,u):String(e);case"percent":return typeof e=="number"?K(e,u?.locale,{style:"percent",maximumFractionDigits:0}):String(e);case"upper":return String(e).toUpperCase();case"lower":return String(e).toLowerCase();case"excerpt":return en(String(e),Number(l[0])||void 0);case"date":return O(U(String(e),u?.timeZone)??String(e).slice(0,10),u?.locale);case"time":return typeof e=="string"&&F.test(e)?O(e,u?.locale):B(String(e),u?.locale,u?.timeZone);case"datetime":return typeof e=="string"&&F.test(e)?O(e,u?.locale):j(String(e),u?.locale,u?.timeZone);case"relative":{let k=U(String(e),u?.timeZone),S=k===void 0?Date.parse(String(e)):Date.parse(`${k}T00:00:00Z`);if(Number.isNaN(S))return String(e);let A=Math.round((S-Date.parse(`${g}T00:00:00Z`))/864e5);return A===0?"today":A===1?"tomorrow":A===-1?"yesterday":A>0?`in ${A} days`:`${-A} days ago`}default:return typeof e=="string"&&F.test(e)?O(e,u?.locale):typeof e=="string"&&Y.test(e)?j(e,u?.locale,u?.timeZone):String(e)}}function Un(e,a){let g=a.today??L(),l=a.name??hn(a.graph?.schema);return e.map(u=>{if(u.text!==void 0)return u.text;try{let b=on(u.expr,{graph:a.graph??gn,subject:a.node,kinds:a.kinds,today:g,budget:a.budget??500,...a.bindings?{bindings:a.bindings}:{}});return yn(u,W(b,u.format,g,u.formatArgs,a.money,l))}catch(b){if(b instanceof f)return"\u2014";throw b}}).join("")}export{p as a,Nn as b,pn as c,f as d,z as e,on as f,Sn as g,Vn as h,Gn as i,Mn as j,On as k,Cn as l,gn as m,jn as n,yn as o,hn as p,Un as q};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{l as k,n as M,o as I,p as B,s as P}from"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{G as te,R as W,ua as q}from"./chunk.FOQZADMA.js";import{a as L}from"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import{b as h}from"./chunk.AJZBJBMO.js";var r=h(te(),1);var A=h(W(),1),U=q(L(()=>(__graviewPreload(import.meta.url,["./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.DGCMEDQA.js")))),v={Part:U.part((n,t)=>(0,A.jsx)(n.WhenMonth,{...t}),{quiet:!0}),prefetch:()=>U.prefetch()};var o=h(W(),1),z="try \u201Ctomorrow 3pm\u201D, \u201CFri 10:30\u201D or \u201C17 Oct\u201D";function K(n,t,d,p=!1){let S=Date.UTC(+n.day.slice(0,4),+n.day.slice(5,7)-1,+n.day.slice(8,10),0,t?n.minutes??0:0),g={weekday:p?"long":"short",year:"numeric",month:p?"long":"short",day:"numeric",...t?{hour:"numeric",minute:"2-digit"}:{},timeZone:"UTC"},m;try{m=new Intl.DateTimeFormat(d??"en-US",g)}catch{m=new Intl.DateTimeFormat("en-US",g)}return m.format(S).replace(/ /g," ")}function ce({value:n,time:t,instant:d=!1,label:p,name:S,required:g,autoFocus:m,autoSelect:H,locale:s,onChange:j,onLeave:_,onCancel:V,inputRef:w,boxStyle:Z}){let x=(0,r.useId)(),u=(0,r.useRef)(null),D=(0,r.useRef)(null),b=e=>{let a=M(e);return a?K(a,t,s):e??""},[T,C]=(0,r.useState)(()=>b(n)),[F,y]=(0,r.useState)(!1),[G,E]=(0,r.useState)(n),[J,Q]=(0,r.useState)(n);n!==J&&(Q(n),n!==G&&(E(n),C(b(n)))),(0,r.useEffect)(()=>{H&&(u.current?.focus(),u.current?.select())},[H]);let i=t&&d?B(s):void 0,N=T===b(n),l=M(n),c=N?l:P(T,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}}),X=N?n:c?I(c,{time:t,instant:d}):void 0,$=T.trim()==="",f=!$&&c===void 0;(0,r.useEffect)(()=>{u.current?.setCustomValidity(f?`Not a date this reads \u2014 ${z}`:"")},[f]);let O=e=>{E(e),j(e)},Y=e=>{C(e);let a=e.trim()===""?void 0:P(e,{today:k().day,time:t,...l?{base:l}:{},...s?{locale:s}:{}});O(a?I(a,{time:t,instant:d}):void 0)},ee=e=>{let a=t?{day:e,minutes:c?.minutes??l?.minutes??540}:{day:e},R=I(a,{time:t,instant:d});C(b(R)),O(R),y(!1),requestAnimationFrame(()=>{u.current?.focus(),u.current?.select()})},ne=$?`Type a date, or pick one \u2014 ${z}`:f?`Not a date this reads \u2014 ${z}`:c?`${K(c,t,s,!0)}${i?` ${i.short}`:""}`:"";return(0,o.jsxs)("span",{"data-graview-when":t?d?"instant":"moment":"day",style:{display:"inline-flex",flex:"1 1 14rem",flexWrap:"wrap",alignItems:"center",gap:"4px 6px",maxWidth:"100%",minWidth:0},onBlur:e=>{let a=e.relatedTarget;a&&e.currentTarget.contains(a)||!a&&typeof document<"u"&&!document.hasFocus()||(y(!1),_?.(X))},children:[(0,o.jsx)("input",{ref:e=>{u.current=e,typeof w=="function"?w(e):w&&(w.current=e)},type:"text",name:S,required:g,autoFocus:m,"aria-label":p,"aria-describedby":`${x}-said`,"aria-invalid":f||void 0,autoComplete:"off",spellCheck:!1,enterKeyHint:"done",placeholder:t?"tomorrow 3pm":"17 Oct",value:T,"data-graview-part":"control",onChange:e=>Y(e.target.value),onKeyDown:e=>{e.key==="Escape"?(e.preventDefault(),V?.()):e.key==="ArrowDown"&&e.altKey&&(e.preventDefault(),y(!0))},style:{flex:"1 1 12ch",minWidth:"10ch",maxWidth:"100%",boxSizing:"border-box",font:"inherit",...Z}}),(0,o.jsx)("button",{ref:D,type:"button","aria-label":`Pick a date for ${p}`,"aria-expanded":F,"aria-controls":`${x}-month`,"data-graview-part":"when-pick",onClick:()=>y(e=>!e),onPointerEnter:()=>v.prefetch(),style:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:32,minHeight:32,padding:0,borderRadius:6},children:(0,o.jsxs)("svg",{"aria-hidden":"true",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",children:[(0,o.jsx)("rect",{x:"2",y:"3",width:"12",height:"11",rx:"1.5"}),(0,o.jsx)("path",{d:"M2 6.5h12M5.5 1.5v3M10.5 1.5v3"})]})}),(0,o.jsxs)("span",{id:`${x}-said`,"aria-live":"polite","data-graview-part":"when-said",...i?{"data-graview-zone":i.zone,title:`Times are in ${i.zone.replace(/_/g," ")} (${i.short})`}:{},style:{flexBasis:"100%",fontSize:"0.75rem",color:f?"var(--graview-bad)":"var(--graview-ink-faint)"},children:[ne,i&&!f&&!$?(0,o.jsx)("span",{"data-graview-part":"when-zone",children:` \xB7 ${(i.zone.split("/").at(-1)??i.zone).replace(/_/g," ")} time`}):null]}),F?(0,o.jsx)(r.Suspense,{fallback:null,children:(0,o.jsx)(v.Part,{id:`${x}-month`,label:p,selected:c?.day??l?.day,today:k().day,locale:s,onPick:ee,onClose:()=>{y(!1),D.current?.focus()}})}):null]})}export{ce as WhenInput,K as wallAsRead};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as ee}from"./chunk.RCM7NOPF.js";import{o as be,p as Z,s as F,t as Me}from"./chunk.42XSBKPO.js";import{m as j,n as we,o as ke,p as J,q as X}from"./chunk.OJGHDWI6.js";import{c as Se}from"./chunk.2RVUDRRY.js";import{b as pe,c as ve,d as U,e as K,g as ye,o as Ae}from"./chunk.JHEVGLKB.js";import{$ as q,Aa as B,D as z,F as Y,G as O,J as me,O as fe,R as M,_ as A,aa as H,m as ce,sa as ge,ta as he,ua as T,v as ue,ya as _,z as de}from"./chunk.FOQZADMA.js";import{a as E}from"./chunk.SDO3U72B.js";import{Qc as le,ga as ie,pc as ae,uc as se}from"./chunk.V5MYKNL7.js";import{b as v}from"./chunk.AJZBJBMO.js";var P=v(O(),1),D=v(M(),1),te=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.HEVC6HHP.js")))),De=te.part(t=>(0,D.jsx)(t.HoverChipDoor,{}),{quiet:!0}),xe="A",Q=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.5A4AOFOA.js","./chunk.OF34OZ4V.js","./chunk.SIGC3G7S.js","./chunk.JACGQ2PR.js","./chunk.Z7LDT55A.js","./chunk.HJCQ6I3S.js","./chunk.VNUHESMZ.js","./chunk.N2K25KH3.js","./chunk.C2PECN4C.js","./chunk.XFZKP4IF.js","./chunk.AKQXF7GW.js","./chunk.C7JKMOFC.js","./chunk.BFNVG5JE.js","./chunk.V3V47QRE.js","./chunk.QHYXXZRD.js","./chunk.NGDXH66B.js","./chunk.67WWRC6Y.js","./chunk.VJXXCUKS.js","./chunk.Z5AB2DBF.js","./chunk.QIV65FWE.js","./chunk.UT6642FC.js","./chunk.HPAGOEZG.js","./chunk.ISXFH3CK.js","./chunk.TI4OSTQV.js","./chunk.BXT6FDT4.js","./chunk.N6MVK3KD.js","./chunk.I7XSDXQ3.js","./chunk.UHI3D7JC.js","./chunk.WVDKYUF3.js","./chunk.ZHLQWMV5.js","./chunk.TNESS3LQ.js","./chunk.42XSBKPO.js","./chunk.OJGHDWI6.js","./chunk.6FNMDAX5.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.I4JBWTZM.js"))));var Ce=Q.part((t,e)=>(0,D.jsx)(t.InspectorPane,{...e}),{what:"This card's acts"});function Le(t){let e=()=>{(typeof navigator>"u"||navigator.onLine!==!1)&&t()},n=globalThis;if(n.requestIdleCallback){let d=n.requestIdleCallback(e,{timeout:5e3});return()=>n.cancelIdleCallback?.(d)}let o=setTimeout(e,2500);return()=>clearTimeout(o)}var Oe=150,Ne="[data-graview-pick], [data-graview-view], [data-graview-record], [data-graview-act], [data-graview-field], a[href]";function Re(t){if(t.closest("[data-graview-face='pages'], [data-graview-popover]"))return null;let e=t.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??t.closest("[data-graview-view]")?.getAttribute("data-graview-view");return e?{face:"scene",on:e,about:[e]}:null}function We(t){let{store:e,principal:n,providers:o,ai:d}=A(),u=Me(),y=Y(d),s=(0,P.useRef)({aimAt:t,store:e,principal:n,providers:o,prepareSections:u,chipsOn:y});s.current={aimAt:t,store:e,principal:n,providers:o,prepareSections:u,chipsOn:y},(0,P.useEffect)(()=>{if(typeof document>"u")return;let r=null,w=null,k=null,p=g=>{let c=s.current,b=c.chipsOn?c.aimAt(g):null;b&&(k=g,te.load().then(G=>{k===g&&G.restOn(b,g)},()=>{}))},l=()=>{r&&clearTimeout(r.timer),r=null},m=g=>{let c=s.current,b=c.aimAt(g);if(!b)return;let G=JSON.stringify([b.face,b.on,b.about,b.field,b.place,b.act,c.store.log.length]);G!==w&&(w=G,c.prepareSections(b),Q.load().then(Pe=>Pe.prepareActs(c.store,b,{principal:c.principal,providers:c.providers}),()=>{}))},a=g=>g.target instanceof Element?g.target.closest(Ne):null,f=g=>{if(g.pointerType==="touch")return;let c=a(g);c!==null&&c===r?.element||(l(),c!==null&&(r={element:c,timer:setTimeout(()=>{r=null,m(c),p(c)},Oe)}))},h=g=>{let c=g.relatedTarget;k!==null&&!(c instanceof Node&&k.contains(c))&&(k=null,te.current?.leaveRest()),r!==null&&(c instanceof Node&&r.element.contains(c)||l())},S=g=>{if(g.pointerType==="mouse")return;let c=a(g);c&&m(c)},I=g=>{if(!ge())return;let c=a(g);c&&m(c)};return document.addEventListener("pointerover",f,{passive:!0}),document.addEventListener("pointerout",h,{passive:!0}),document.addEventListener("pointerdown",S,{capture:!0,passive:!0}),document.addEventListener("focusin",I),()=>{l(),document.removeEventListener("pointerover",f),document.removeEventListener("pointerout",h),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("focusin",I)}},[])}function rt({placement:t="float",openActs:e,aimAt:n}={}){let{menuAt:o,setMenuAt:d,registerActsDoor:u,ai:y}=A(),{selection:s}=_();We(n??Re),(0,P.useEffect)(()=>{if(Q.current)return;let l=()=>{h(),Q.prefetch()},m=()=>{},a=he(()=>void(m=Le(l))),f=["pointerdown","keydown"];for(let S of f)document.addEventListener(S,l,{capture:!0,passive:!0});function h(){a(),m();for(let S of f)document.removeEventListener(S,l,{capture:!0})}return h},[]),(0,P.useEffect)(()=>{if(t==="menu")return u({key:xe,open:e??(l=>{let m=l.getBoundingClientRect(),a=l.closest("[data-graview-pick]")?.getAttribute("data-graview-pick")??l.closest("[data-graview-view]")?.getAttribute("data-graview-view")??void 0;d({x:Math.round(m.left+Math.min(16,m.width/2)),y:Math.round(Math.min(m.bottom,m.top+36)),...a?{on:a}:{}})})}),()=>u(null)},[t,u,d,e]);let r=o!==null||s.length>0&&e===void 0,[w,k]=(0,P.useState)(r);(0,P.useEffect)(()=>{r&&k(!0)},[r]);let p=Y(y)?(0,D.jsx)(P.Suspense,{fallback:null,children:(0,D.jsx)(De,{})}):null;return!w&&!r?p:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(P.Suspense,{fallback:null,children:(0,D.jsx)(Ce,{placement:t,chosen:e===void 0})}),p]})}var $=v(O(),1),V=v(M(),1),Ge=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.5A4AOFOA.js","./chunk.OF34OZ4V.js","./chunk.SIGC3G7S.js","./chunk.HKCK3JI4.js","./chunk.PMGXASFI.js","./chunk.C4TSM4W5.js","./chunk.XEKLEHC3.js","./chunk.JACGQ2PR.js","./chunk.53CDFJNM.js","./chunk.4QPVS2ZM.js","./chunk.RCM7NOPF.js","./chunk.Z7LDT55A.js","./chunk.HJCQ6I3S.js","./chunk.VNUHESMZ.js","./chunk.N2K25KH3.js","./chunk.C2PECN4C.js","./chunk.XFZKP4IF.js","./chunk.AKQXF7GW.js","./chunk.C7JKMOFC.js","./chunk.BFNVG5JE.js","./chunk.AIZQBPGU.js","./chunk.V3V47QRE.js","./chunk.5P556A7W.js","./chunk.QHYXXZRD.js","./chunk.BELCPW66.js","./chunk.6YPLZNVT.js","./chunk.5RABSIF7.js","./chunk.NGDXH66B.js","./chunk.67WWRC6Y.js","./chunk.VJXXCUKS.js","./chunk.Z5AB2DBF.js","./chunk.QIV65FWE.js","./chunk.UT6642FC.js","./chunk.HPAGOEZG.js","./chunk.ISXFH3CK.js","./chunk.TI4OSTQV.js","./chunk.BXT6FDT4.js","./chunk.WVUJXDXZ.js","./chunk.N6MVK3KD.js","./chunk.I7XSDXQ3.js","./chunk.UHI3D7JC.js","./chunk.WVDKYUF3.js","./chunk.ZHLQWMV5.js","./chunk.TNESS3LQ.js","./chunk.GZHZLJBF.js","./chunk.42XSBKPO.js","./chunk.OJGHDWI6.js","./chunk.6FNMDAX5.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.F2MQJH6Y.js")))),ze=Ge.part((t,e)=>{let n=t.DraftFrame;return(0,V.jsx)(n,{...e})},{what:"The view"});function lt(t){let{seatTalk:e}=A();return(0,$.useSyncExternalStore)(e.subscribe,()=>e.get().draft!==null,()=>!1)?(0,V.jsx)($.Suspense,{fallback:null,children:(0,V.jsx)(ze,{...t})}):null}var C=v(O(),1),x=v(M(),1),Ee=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.67WWRC6Y.js","./chunk.ZRYSVOLA.js","./chunk.QIV65FWE.js","./chunk.UT6642FC.js","./chunk.HPAGOEZG.js","./chunk.ISXFH3CK.js","./chunk.H5ADMSE7.js","./chunk.TI4OSTQV.js","./chunk.I7XSDXQ3.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.O75JKQPF.js")))),qe=Ee.part((t,e)=>{let n=t.QuickAskCard;return(0,x.jsx)(n,{...e})},{what:"The quick ask"});function ft({face:t,on:e=!0}){let{ai:n,aiDesk:o,selection:d,view:u}=A(),y=fe()?.open??!1,s=e&&z(n)&&!y,r=ye(o),w=(0,C.useRef)(null),k=(0,C.useRef)({selection:d,place:u.within?.view});return k.current={selection:d,place:u.within?.view},(0,C.useEffect)(()=>{if(!s)return;let p=ve(o);return p.drawn+=1,U(p),()=>{p.drawn=Math.max(0,p.drawn-1),p.drawn===0&&(p.open=null),U(p)}},[s,o]),(0,C.useEffect)(()=>{if(!s)return;let p=l=>{if(l.defaultPrevented||l.key.toLowerCase()!=="k"||!(l.metaKey||l.ctrlKey)||l.altKey||l.shiftKey)return;let m=w.current?.closest("[data-graview-embed]"),a=l.target,f=!(a instanceof Node)||a===document.body||a===document.documentElement;if(m&&!(f||a instanceof Node&&m.contains(a)))return;l.preventDefault(),Ee.prefetch();let h=document.activeElement,{selection:S,place:I}=k.current;K(o,{pointed:{...S[0]!==void 0?{on:S[0]}:{},about:S,...I?{place:I}:{}},returnTo:h instanceof HTMLElement&&h!==document.body?h:null})};return window.addEventListener("keydown",p,!0),()=>window.removeEventListener("keydown",p,!0)},[s,o]),s?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("span",{ref:w,hidden:!0,"data-graview-quick-ask":t}),r?(0,x.jsx)(C.Suspense,{fallback:null,children:(0,x.jsx)(qe,{face:t,opening:r,close:()=>K(o,null)},r.at)}):null]}):null}var R=v(O(),1),L=v(M(),1),ne=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.ZRYSVOLA.js","./chunk.QIV65FWE.js","./chunk.UT6642FC.js","./chunk.HPAGOEZG.js","./chunk.ISXFH3CK.js","./chunk.H5ADMSE7.js","./chunk.TI4OSTQV.js","./chunk.I7XSDXQ3.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.SCYQSXW4.js")))),He=ne.part((t,e)=>{let n=t.InlineAiMenu;return(0,L.jsx)(n,{...e})},{what:"The AI's suggestions"}),_e=ne.part((t,e)=>{let n=t.GhostTray;return(0,L.jsx)(n,{...e})},{quiet:!0});function Be(){let{ai:t}=A(),e=z(t);return(0,R.useMemo)(()=>e?n=>({id:"inline-ai",heading:"AI",render:o=>(0,L.jsx)(R.Suspense,{fallback:null,children:(0,L.jsx)(He,{target:n,close:o})}),prepare:()=>ne.prefetch()}):null,[e])}var Fe=[];function kt({children:t}){let e=Be(),n=(0,R.useMemo)(()=>e?[e]:Fe,[e]);return(0,L.jsx)(F,{sections:n,children:t})}function St(t){let{ai:e,aiDesk:n}=A(),{ghost:o}=me(n);return o===null||o.onCard||e.off?null:(0,L.jsx)(R.Suspense,{fallback:null,children:(0,L.jsx)(_e,{...t})})}var N=v(O(),1);var Te=v(M(),1),oe=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.33KXSD6F.js"))));function Ve(t){let e=t.about[0];if(t.about.length!==1||!e?.startsWith("aggregate:"))return;let n=e.slice(10).split("+");return n.length===1?n[0]:void 0}function $e(t,e){return t.filter(n=>n.as!==e.as&&!n.hidden&&(n.kind===e.kind||n.over?.includes(e.kind)===!0)).at(-1)}function Ye(t){let e=q(),n=e?.keptViews,o=e?.views,d=(0,N.useContext)(Ae);return(0,N.useMemo)(()=>!n||!o?null:u=>{if(u.place===void 0)return null;let y=n.current(),s=Ve(u),r=o.places().find(l=>l.as===u.place&&(s===void 0||l.kind===s||l.over?.includes(s)===!0));if(!r)return null;let w=le(r,y,n);if(!w)return null;let k=l=>void oe.load().then(m=>m.setHidden(r,w,n,l,d),String);return{id:"tidy-view",items:[r.hidden?{id:"show-view",label:"Show",hint:"Back in the places, for everyone",run:()=>k(!1)}:{id:"hide-view",label:"Hide",hint:"Off the places and the scene, for everyone",run:()=>k(!0)},{id:"delete-view",label:"Delete",hint:`Kept ${30} days under Recently deleted`,run:()=>{let l=$e(o.places(),r);oe.load().then(m=>m.remove(r,w,n,d).then(a=>a&&t?.(r,l)),String)}}],prepare:()=>oe.prefetch()}},[n,o,d,t])}var Ue=[];function Dt({children:t}){let{view:e,go:n}=B(),o=(0,N.useCallback)((y,s)=>{let r=e.within?.view;e.focusId===ue(y.kind)&&(r===void 0||r===y.as)&&n(s?de(e,s.kind,s.as):ce(e,!0))},[e,n]),d=Ye(o),u=(0,N.useMemo)(()=>d?[d]:Ue,[d]);return(0,Te.jsx)(F,{sections:u,children:t})}function Ot(t={}){return t.scope===void 0?ee:pe(ee,t.scope)}var W=v(O(),1),i=v(M(),1);function Ht({inside:t=!1,widthOf:e}={}){let{store:n,view:o,emphasis:d,setEmphasis:u}=A(),y=be(),{selection:s,set:r}=_(),{show:w}=B(),k=H(),p=(0,W.useMemo)(()=>{let a=new Map;for(let f of n.graph.allEdges()){let h=a.get(f.kind)??{count:0,ends:new Set};h.count+=1;for(let S of[f.from,f.to]){let I=n.graph.getNode(S);I&&h.ends.add(`kind:${I.kind}`)}a.set(f.kind,h)}return[...a.entries()].sort(([f],[h])=>f.localeCompare(h)).map(([f,h])=>({kind:f,count:h.count,ends:[...h.ends]}))},[n,k]),l=Math.max(0,...p.map(a=>a.count));if((0,W.useEffect)(()=>()=>u(null),[u]),!o.overview&&!t||p.length===0)return null;let m=new Set;for(let a of s){if(a.startsWith("kind:")){m.add(a);continue}let f=n.graph.getNode(a);f&&m.add(`kind:${f.kind}`)}return(0,i.jsxs)("section",{"aria-label":"What the lines mean",role:t?"group":void 0,"data-testid":"relation-key",style:t?{display:"grid",gap:1}:{position:"absolute",left:16,top:14,zIndex:se("rail"),display:"grid",gap:1,padding:"8px 10px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)",maxWidth:Ke,animation:"graview-settle 380ms 280ms ease backwards"},children:[t?null:(0,i.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.16em",textTransform:"uppercase",color:"var(--graview-ink-faint)",paddingBottom:2},children:p.length===1?"1 relation":`${p.length} relations`}),e?(0,i.jsx)(Je,{aloft:o.overview===!0}):null,p.map(({kind:a,count:f,ends:h})=>{let{connector:S,style:I}=Z(y,a),g=je(n.schema,a),c=d!==null?d===a:m.size===0||h.some(b=>m.has(b));return(0,i.jsxs)("button",{type:"button",title:n.schema.edge(a)?.description===void 0?`${f} of these`:g.words,onMouseEnter:()=>u(a),onMouseLeave:()=>u(null),onFocus:()=>u(a),onBlur:()=>u(null),onClick:()=>{r(h),w(null)},style:{all:"unset",outline:"revert-layer",cursor:"pointer",display:"grid",gridTemplateColumns:"30px 1fr auto",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px",borderRadius:6,opacity:c?1:.4},children:[(0,i.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",style:{display:"block",opacity:S.visible?1:.35},children:o.overview&&e?(0,i.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",className:"graview-key-ribbon",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:e(f,l)}):(0,i.jsx)("path",{d:"M 1 5 L 29 5",fill:"none",stroke:J(I),strokeWidth:X(I,!0),strokeDasharray:j[I.pattern],strokeLinecap:"round"})}),(0,i.jsxs)("span",{style:{display:"grid",minWidth:0},"data-graview-relation-words":a,children:[(0,i.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink)"},children:g.words}),(0,i.jsx)("span",{style:{fontSize:"0.6875rem",color:"var(--graview-ink-faint)"},children:g.ends})]}),S.visible?null:(0,i.jsx)("span",{"data-graview-quiet":a,style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontStyle:"italic"},children:"not drawn"}),(0,i.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",fontVariantNumeric:"tabular-nums"},children:f})]},a)})]})}var Ke="min(280px, calc(100% - 28px))";function je(t,e,n){let o=t.edge(e)?.from??[],d=new Map;for(let s of n!==void 0&&o.includes(n)?[n]:o.length>0?o:[""]){let r=Se(t,s,e,"out");d.set(r,[...d.get(r)??[],s])}let u=s=>s==="*"?"anything":ie(t,s),y=[...d].map(([s,r])=>{let w=r.flatMap(p=>t.tryDefinition(p)?.edges[e]?.to??[]),k=r[0]&&w.length>0?`${r.map(u).join(", ")} \u2192 ${(w.includes("*")?["*"]:[...new Set(w)]).map(u).join(", ")}`:"";return[s.charAt(0).toUpperCase()+s.slice(1),k]});return{words:y.map(([s])=>s).join(" \xB7 "),ends:y.flatMap(([,s])=>s?[s]:[]).join(" \xB7 ")}}function _t({edgeKind:t,kit:e,width:n=30}){let o=q(),d=(0,W.useMemo)(()=>ae(e??o?.brand?.kit),[e,o?.brand?.kit]),{connector:u,style:y}=Z(d,t);return(0,i.jsx)("svg",{width:n,height:"8","aria-hidden":"true","data-testid":"relation-mark","data-graview-relation":t,style:{display:"inline-block",verticalAlign:"middle",opacity:u.visible?1:.35},children:(0,i.jsx)("path",{d:`M 1 4 L ${n-1} 4`,fill:"none",stroke:J(y),strokeWidth:X(y,!0),strokeDasharray:j[y.pattern],strokeLinecap:"round"})})}function Je({aloft:t}){let e={display:"grid",gridTemplateColumns:"30px 1fr",alignItems:"center",gap:8,minHeight:23,padding:"2px 4px"},n={fontSize:"0.75rem",color:"var(--graview-ink-muted)"};return(0,i.jsxs)("div",{role:"group","aria-label":"The lines","data-testid":"line-manners",style:{display:"grid",gap:1,paddingBottom:6,marginBottom:4,borderBottom:"1px solid var(--graview-edge)"},children:[t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{style:e,"data-graview-manner":"ribbon",children:[(0,i.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-ink)",strokeOpacity:.35,strokeWidth:6})}),(0,i.jsx)("span",{style:n,children:"A relation between two districts, as wide as the links along it \u2014 point at one for its words"})]}),(0,i.jsxs)("div",{style:e,"data-graview-manner":"record",children:[(0,i.jsxs)("svg",{width:"30",height:"10","aria-hidden":"true",children:[(0,i.jsx)("path",{d:"M 1 5 L 25 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeLinecap:"round"}),(0,i.jsx)("circle",{cx:26,cy:5,r:3,fill:"var(--graview-accent)"})]}),(0,i.jsx)("span",{style:n,children:"A chosen record's link to another record, labeled with the relation"})]}),(0,i.jsxs)("div",{style:e,"data-graview-manner":"district",children:[(0,i.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeWidth:1.8,strokeDasharray:"5 4"})}),(0,i.jsx)("span",{style:n,children:"A chosen record's links into a district, with how many"})]})]}):null,(0,i.jsxs)("div",{style:e,"data-graview-manner":"unsure",children:[(0,i.jsx)("svg",{width:"30",height:"10","aria-hidden":"true",children:(0,i.jsx)("path",{d:"M 1 5 L 29 5",stroke:"var(--graview-accent)",strokeOpacity:ke,strokeWidth:1.8,strokeDasharray:we,strokeLinecap:"round"})}),(0,i.jsx)("span",{style:n,children:"Unsure: a link its maker was less than sure of, until a person keeps it \u2014 point at its words for what it was based on"})]})]})}var Ie=v(O(),1),re=v(M(),1),Xe=T(E(()=>(__graviewPreload(import.meta.url,["./chunk.AKQXF7GW.js","./chunk.C7JKMOFC.js","./chunk.BFNVG5JE.js","./chunk.V3V47QRE.js","./chunk.QHYXXZRD.js","./chunk.UT6642FC.js","./chunk.TI4OSTQV.js","./chunk.2FLPDPEL.js","./chunk.UUBYFBPN.js","./chunk.2RVUDRRY.js","./chunk.JHEVGLKB.js","./chunk.FOQZADMA.js","./chunk.SDO3U72B.js","./chunk.V5MYKNL7.js","./chunk.AJZBJBMO.js"]),import("./chunk.XOYJ26YB.js")))),Ze=Xe.part(t=>(0,re.jsx)(t.SuggestedTray,{}),{quiet:!0});function Vt(){let{store:t}=A(),e=H();return(0,Ie.useMemo)(()=>t.log.all().some(o=>o.suggests!==void 0&&!o.withheld),[t,e])?(0,re.jsx)(Ze,{}):null}export{rt as a,lt as b,ft as c,Ht as d,Ke as e,_t as f,Be as g,kt as h,St as i,Ye as j,Dt as k,Ot as l,Vt as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk.M4T377LG.js";import"./chunk.57R2GXXN.js";import"./chunk.AKQXF7GW.js";import"./chunk.C7JKMOFC.js";import"./chunk.BFNVG5JE.js";import"./chunk.V3V47QRE.js";import"./chunk.QHYXXZRD.js";import"./chunk.UT6642FC.js";import{b as n}from"./chunk.W3FTEJH5.js";import"./chunk.H5ADMSE7.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.JHEVGLKB.js";import{R as i}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import{b as o}from"./chunk.AJZBJBMO.js";var e=o(i(),1);function g({entries:d,style:l,headingStyle:p,className:r}){return(0,e.jsxs)("section",{...r?{className:r}:{},"data-testid":"record-ai","aria-label":"What AI did here",style:{display:"grid",gap:10,...l},children:[(0,e.jsx)("h2",{style:p??{margin:0,fontSize:"1rem"},children:"What AI did here"}),(0,e.jsx)("ol",{style:{margin:0,padding:0,listStyle:"none",display:"grid",gap:8,fontSize:"0.875rem"},children:d.slice(0,8).map(t=>(0,e.jsx)(n,{entry:t,undo:s=>(0,e.jsx)(a,{batch:s})},t.id))})]})}export{g as RecordInteractions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.JHEVGLKB.js";import{$ as W,G as K,O as E,P as j,R as C}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{Q as R,Va as T,uc as P}from"./chunk.V5MYKNL7.js";import{b as x}from"./chunk.AJZBJBMO.js";function N(a,t){return a.kind==="agent"?"agent":a.kind!=="human"?"app":a.onBehalfOf!==void 0?"person":a.id===void 0||t?.id===void 0||a.id===t.id?"you":"person"}var Y=a=>a.ops.filter(t=>t.withheld!==!0);function z(a,t={}){let r=a.batches().map(e=>{let s=e.ops[0],l=e.ops.at(-1),c=Y(e).length===0;return{seq:l.seq+1,from:s.seq,at:l.at,batch:e.id,maker:c?"person":N(e.author,t.me),author:c?void 0:e.author,said:e.intent,declaration:!1,withheld:c}}),i=[...a.log.epochs().filter(e=>e.change!==void 0).map(e=>({seq:e.seq,sentence:e.change,...e.at?{at:e.at}:{}})),...t.declarations??[]];for(let e of i){if(e.seq<a.log.horizon||e.seq>a.log.length)continue;let s=r.findIndex(l=>l.seq===e.seq);if(s>=0&&!r[s].withheld){r[s]={...r[s],declaration:!0,said:e.sentence};continue}r.push({seq:e.seq,from:e.seq,at:e.at,batch:void 0,maker:e.author?N(e.author,t.me):"app",author:e.author,said:e.sentence,declaration:!0,withheld:!1})}return r.sort((e,s)=>e.seq-s.seq||+(e.batch!==void 0)-+(s.batch!==void 0))}function I(a,t){let r=a.log.all(),i=new Map(r.map(e=>[e.id,e.seq]));return a.batches().filter(e=>!e.undone&&e.ops[0].seq>=t).filter(e=>!e.ops.every(s=>s.undoes!==void 0&&(i.get(s.undoes)??-1)>=t)).map(e=>e.id)}function B(a,t){return a.withheld?"Someone":a.maker==="you"?"you":a.author?T(a.author,t):"the app"}var d=x(K(),1);var o=x(C(),1),_={kind:"human"},G=[1,2,4,8],U=900,q={you:"You",person:"A person",agent:"An agent",app:"The app"},H={you:"var(--graview-accent)",person:"var(--graview-ink-muted)",agent:"var(--graview-activity, var(--graview-good))",app:"var(--graview-edge-bright)"};function X(a,t){return[...new Set([t,...a.map(r=>r.seq)])].sort((r,i)=>r-i)}function J(a,t){let r=0;for(let i=0;i<a.length;i++)a[i]<=t&&(r=i);return r}function Q(a,t,r){let i=I(a,t);if(i.length===0)return null;let e=a.canUndo(i);if(!e.ok)return null;let s=new Set(a.permittedMutations(r).map(l=>l.name));return e.ops.every(l=>l.mutation!==null&&s.has(l.mutation.name))?i:null}function oe({face:a}){let t=E(),r=W(),i=r?.principal??_,e=j(t.live,i),s=e.log.length,l=(0,d.useMemo)(()=>z(e,{me:i,...t.host?.declarations?{declarations:t.host.declarations}:{}}),[e,i,t.host,s]),c=(0,d.useMemo)(()=>X(l,e.log.horizon),[l,e]),f=t.past?.seq??s,h=J(c,f),y=c.length-1,k=[...l].reverse().find(n=>n.seq<=f&&n.seq>(c[h-1]??-1))??[...l].reverse().find(n=>n.seq<=f),[g,v]=(0,d.useState)(!1),[w,L]=(0,d.useState)(1),[A,$]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(!g)return;if(h>=y){v(!1);return}let n=setTimeout(()=>t.show(c[h+1]),U/w);return()=>clearTimeout(n)},[g,h,y,w,c,t]);let D=(0,d.useMemo)(()=>t.past?Q(e,f,i):null,[t.past,e,f,i,s]),M=n=>B(n,{graph:e.graph,schema:e.schema,...r?.seats?{seats:r.seats}:{},...r?.people?{people:r.people}:{}}),u=t.past?t.past.at?R(t.past.at,r?.locale):"the start":null,S=k?`${M(k)==="you"?"You":M(k)}: ${k.said}`:"Nothing had happened yet",O=(0,d.useRef)(null);(0,d.useLayoutEffect)(()=>{let n=O.current,m=n?.parentElement;if(a!=="scene"||!n||!m)return;let p=()=>m.style.setProperty("--graview-sheet",`${Math.ceil(n.getBoundingClientRect().height)+24}px`);p();let b=typeof ResizeObserver>"u"?null:new ResizeObserver(p);return b?.observe(n),()=>{b?.disconnect(),m.style.removeProperty("--graview-sheet")}},[a]);let V=a==="scene"?{position:"absolute",left:"50%",bottom:12,transform:"translateX(-50%)",width:"min(720px, calc(100% - 32px))",zIndex:P("rail")}:{position:"sticky",top:0,zIndex:P("rail"),margin:"0 auto 12px",maxWidth:960,width:"100%"};return(0,o.jsxs)("section",{ref:O,"aria-label":"Timeline","data-testid":"timeline","data-graview-past":t.past?String(t.past.seq):"now","data-graview-offstage":"",style:{...V,boxSizing:"border-box",display:"grid",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",color:"var(--graview-ink)",fontSize:"0.8125rem"},children:[(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"baseline",gap:"4px 12px"},children:[(0,o.jsx)("strong",{"data-testid":"as-of",role:"status",style:{fontWeight:600},children:u?`As of ${u}`:"Now"}),(0,o.jsx)("span",{"data-testid":"timeline-caption",style:{color:"var(--graview-ink-muted)",minWidth:0,overflowWrap:"anywhere"},children:S}),u?(0,o.jsx)("span",{style:{color:"var(--graview-ink-faint)"},"data-testid":"past-read-only",children:"Nothing changes while you look back."}):null]}),(0,o.jsx)("div",{style:{position:"relative",height:22},"aria-hidden":"true",children:c.slice(1).map((n,m)=>{let p=[...l].reverse().find(F=>F.seq===n),b=y===0?0:(m+1)/y*100;return(0,o.jsx)("span",{"data-graview-tick":n,"data-maker":p.maker,...p.declaration?{"data-declaration":""}:{},title:`${q[p.maker]}: ${p.said}`,style:{position:"absolute",left:`calc(${b}% - 1px)`,bottom:0,width:p.declaration?4:2,height:p.declaration?22:12,borderRadius:2,background:p.declaration?"var(--graview-ink)":H[p.maker],opacity:n<=f?1:.45}},`${n}:${p.batch??"declaration"}`)})}),(0,o.jsx)("input",{type:"range","data-testid":"scrubber","aria-label":"Moment",min:0,max:y,step:1,value:h,"aria-valuetext":u?`As of ${u}. ${S}`:`Now. ${S}`,onChange:n=>{v(!1),t.show(c[Number(n.currentTarget.value)]??s)},style:{width:"100%",margin:0,accentColor:"var(--graview-accent)"}}),(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:8},children:[(0,o.jsx)("button",{type:"button","data-testid":"play","aria-pressed":g,onClick:()=>{!g&&h>=y&&t.show(c[0]),v(!g)},style:{minHeight:28,minWidth:64},children:g?"Pause":"Play"}),(0,o.jsxs)("label",{style:{display:"inline-flex",alignItems:"center",gap:6,color:"var(--graview-ink-muted)"},children:["Speed",(0,o.jsx)("select",{"data-testid":"speed",value:w,onChange:n=>L(Number(n.currentTarget.value)),style:{minHeight:28},children:G.map(n=>(0,o.jsxs)("option",{value:n,children:[n,"\xD7"]},n))})]}),(0,o.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",gap:10,color:"var(--graview-ink-faint)",flexWrap:"wrap"},children:Object.keys(q).filter(n=>l.some(m=>m.maker===n)).map(n=>(0,o.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[(0,o.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:H[n]}}),q[n]]},n))}),(0,o.jsxs)("span",{style:{marginLeft:"auto",display:"inline-flex",gap:8},children:[D?(0,o.jsx)("button",{type:"button","data-testid":"restore-here",title:"Take back every change since, as one change you can undo",onClick:()=>{$(null);try{e.undo([...D],{author:i,intent:u?`Restore to ${u}`:"Restore"}),t.show(null)}catch(n){$(n instanceof Error?n.message:String(n))}},style:{minHeight:28},children:"Restore to here"}):null,(0,o.jsx)("button",{type:"button","data-testid":"back-to-now",onClick:()=>t.show(null),style:{minHeight:28},children:"Back to now"})]})]}),A?(0,o.jsx)("span",{role:"alert","data-testid":"restore-refused",style:{color:"var(--graview-warn)"},children:A}):null]})}export{oe as Timeline};
|