graview 0.1.68 → 0.1.69
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.ODYJEDIW.js → chunk.26RYER7Y.js} +1 -1
- package/dist/preview/{chunk.TRNJKHIA.js → chunk.2AL26ZPJ.js} +1 -1
- package/dist/preview/chunk.2WFOKJB4.js +1 -0
- package/dist/preview/chunk.3D37E2G5.js +1 -0
- package/dist/preview/chunk.3PT3BU6K.js +1 -0
- package/dist/preview/{chunk.7ZTGB4O7.js → chunk.3TKIZGC7.js} +1 -1
- package/dist/preview/{chunk.AQ2PI6MR.js → chunk.3VNOTHA5.js} +1 -1
- package/dist/preview/{chunk.QWLK3GKG.js → chunk.3XTIYX6M.js} +1 -1
- package/dist/preview/{chunk.GF3ZCX46.js → chunk.447RWLS7.js} +2 -2
- package/dist/preview/{chunk.E423JCOS.js → chunk.47VEV4BX.js} +1 -1
- package/dist/preview/{chunk.NRCWMYLH.js → chunk.4FJ4OPSJ.js} +1 -1
- package/dist/preview/{chunk.XFH6GHBQ.js → chunk.4O7WYLCK.js} +1 -1
- package/dist/preview/{chunk.MSUZAJ2K.js → chunk.4R7H3GIL.js} +2 -2
- package/dist/preview/{chunk.EB7PZJEO.js → chunk.4RPKCW4J.js} +1 -1
- package/dist/preview/{chunk.YM6SWEUI.js → chunk.523EFGHU.js} +1 -1
- package/dist/preview/chunk.5DU6FA5R.js +1 -0
- package/dist/preview/{chunk.LFFJB6D3.js → chunk.5MOXQUZH.js} +1 -1
- package/dist/preview/chunk.5TWRTGP6.js +1 -0
- package/dist/preview/{chunk.AWV57UBJ.js → chunk.66TRDXYR.js} +1 -1
- package/dist/preview/{chunk.AYZL3LCR.js → chunk.6BNSDPZE.js} +3 -3
- package/dist/preview/chunk.6BR2SUAE.js +1 -0
- package/dist/preview/{chunk.32JE2WS7.js → chunk.6TDVNWFU.js} +1 -1
- package/dist/preview/{chunk.UAMPR4MD.js → chunk.6XBQDXT6.js} +1 -1
- package/dist/preview/{chunk.TVWK3SGD.js → chunk.6ZFYFT5A.js} +1 -1
- package/dist/preview/{chunk.N5Z34V7U.js → chunk.7L3I776Z.js} +1 -1
- package/dist/preview/chunk.7OLKVOS6.js +1 -0
- package/dist/preview/{chunk.MKL4THIV.js → chunk.7T2P42VW.js} +1 -1
- package/dist/preview/{chunk.QM54TGU6.js → chunk.AG7WJYM5.js} +2 -2
- package/dist/preview/{chunk.ECNGVD25.js → chunk.AHYMIVBX.js} +1 -1
- package/dist/preview/chunk.AMAOZVEO.js +1 -0
- package/dist/preview/chunk.AMV2ILR6.js +1 -0
- package/dist/preview/{chunk.RQG672MJ.js → chunk.AUNQNTKY.js} +1 -1
- package/dist/preview/{chunk.HXTKBISQ.js → chunk.AZRICZKT.js} +1 -1
- package/dist/preview/{chunk.L7XKYGV7.js → chunk.B422DSYN.js} +1 -1
- package/dist/preview/{chunk.XDZDNZ7B.js → chunk.B5EFNTDA.js} +1 -1
- package/dist/preview/{chunk.F5GNNVSQ.js → chunk.BO32A3W5.js} +1 -1
- package/dist/preview/{chunk.ZLEBOR5T.js → chunk.BQORHDAH.js} +1 -1
- package/dist/preview/{chunk.4GVKKBQL.js → chunk.BSQI3KM2.js} +1 -1
- package/dist/preview/{chunk.BPNW5KCP.js → chunk.C6CT6F4C.js} +1 -1
- package/dist/preview/{chunk.JV432T4Q.js → chunk.CA2SYEYE.js} +1 -1
- package/dist/preview/{chunk.64LCHHZB.js → chunk.CCCONK73.js} +1 -1
- package/dist/preview/{chunk.GONZB3J3.js → chunk.CDSHUWSK.js} +1 -1
- package/dist/preview/{chunk.NFTPJAMJ.js → chunk.CKSRW3LA.js} +1 -1
- package/dist/preview/{chunk.LOKGUALC.js → chunk.CLIC2QBA.js} +1 -1
- package/dist/preview/{chunk.PLIV3IQK.js → chunk.CLZYNFFH.js} +1 -1
- package/dist/preview/{chunk.GKTQ5CZA.js → chunk.CSVDBDRZ.js} +2 -2
- package/dist/preview/{chunk.GJTEV6CK.js → chunk.CUEIGKFG.js} +1 -1
- package/dist/preview/{chunk.IPGLITWA.js → chunk.CYEPHT7V.js} +1 -1
- package/dist/preview/{chunk.BQAFFEOA.js → chunk.D3SWJ7OS.js} +1 -1
- package/dist/preview/{chunk.ACNOP2IU.js → chunk.D5JZQZ74.js} +1 -1
- package/dist/preview/{chunk.6AANHELP.js → chunk.DHPXRDT5.js} +5 -5
- package/dist/preview/{chunk.R3GE37OI.js → chunk.DKUEZPGR.js} +1 -1
- package/dist/preview/{chunk.2TUEBU7X.js → chunk.DO3FQM6R.js} +1 -1
- package/dist/preview/{chunk.G2BDEWJC.js → chunk.DRAPVGQZ.js} +1 -1
- package/dist/preview/{chunk.6WB2TYK7.js → chunk.DU76ASS4.js} +1 -1
- package/dist/preview/{chunk.AENP662H.js → chunk.EEUCRZA3.js} +1 -1
- package/dist/preview/{chunk.WC5WE34A.js → chunk.EK3JXEZL.js} +1 -1
- package/dist/preview/{chunk.2BMZPALF.js → chunk.EL7XXGQY.js} +1 -1
- package/dist/preview/{chunk.2KCDLCB2.js → chunk.EP7YT7LT.js} +1 -1
- package/dist/preview/{chunk.SS6KL5NT.js → chunk.EQZPEOIW.js} +1 -1
- package/dist/preview/{chunk.VW632VNJ.js → chunk.F4CDJBDS.js} +1 -1
- package/dist/preview/{chunk.O5FTWXA2.js → chunk.FE3SINPK.js} +1 -1
- package/dist/preview/{chunk.JULD4XFB.js → chunk.FIY4RUK5.js} +1 -1
- package/dist/preview/{chunk.3VEZ5MOC.js → chunk.FWXW4T4I.js} +1 -1
- package/dist/preview/{chunk.FSW535EA.js → chunk.G43YUGNW.js} +1 -1
- package/dist/preview/{chunk.QYPU444Y.js → chunk.GF5CZPZ7.js} +1 -1
- package/dist/preview/{chunk.4TT3ZHSJ.js → chunk.GPBHUIZQ.js} +1 -1
- package/dist/preview/{chunk.YL2RBZFE.js → chunk.GTF6EMVE.js} +1 -1
- package/dist/preview/chunk.GVFGS2HY.js +1 -0
- package/dist/preview/{chunk.EGSOHTZZ.js → chunk.HCX6KPRF.js} +1 -1
- package/dist/preview/{chunk.4YAO3A5Q.js → chunk.HGH27XZG.js} +3 -3
- package/dist/preview/{chunk.7WPVLEX2.js → chunk.HMJXB6KC.js} +2 -2
- package/dist/preview/chunk.HTEQCRVP.js +1 -0
- package/dist/preview/{chunk.VTDOWXCP.js → chunk.HU3KEWFO.js} +1 -1
- package/dist/preview/{chunk.DZ6UDZOB.js → chunk.I4H2GS4O.js} +2 -2
- package/dist/preview/{chunk.UD7VLXPM.js → chunk.I7KN732Z.js} +1 -1
- package/dist/preview/{chunk.YBQ5GVAX.js → chunk.I7OFRF6N.js} +2 -2
- package/dist/preview/{chunk.ZKXIZBCN.js → chunk.IAVIYJTL.js} +1 -1
- package/dist/preview/{chunk.CNN32262.js → chunk.IO5VFTXC.js} +1 -1
- package/dist/preview/{chunk.PIMAG4WT.js → chunk.IPKESOIU.js} +2 -2
- package/dist/preview/{chunk.42KHFGN6.js → chunk.IRNEWNUB.js} +1 -1
- package/dist/preview/{chunk.XRE7SHLD.js → chunk.ISZFRLNJ.js} +1 -1
- package/dist/preview/{chunk.GRTBEA7O.js → chunk.IY3DV52G.js} +1 -1
- package/dist/preview/{chunk.VES4XMZX.js → chunk.IYHY4VEC.js} +1 -1
- package/dist/preview/{chunk.HWFJQ42Y.js → chunk.J2N7EKMX.js} +1 -1
- package/dist/preview/{chunk.IT5DVKXY.js → chunk.J7O23NKZ.js} +2 -2
- package/dist/preview/chunk.JDUA5PH2.js +1 -0
- package/dist/preview/{chunk.DCLF4WWZ.js → chunk.JHAMSDAI.js} +1 -1
- package/dist/preview/{chunk.IKKKHHRN.js → chunk.JN3WZGJY.js} +1 -1
- package/dist/preview/{chunk.H4VNIAHN.js → chunk.JPAE6K4E.js} +1 -1
- package/dist/preview/{chunk.DGDW54KE.js → chunk.JQEXH23N.js} +1 -1
- package/dist/preview/{chunk.MPWLDQOG.js → chunk.KEGL6NBD.js} +1 -1
- package/dist/preview/{chunk.EGVM24ND.js → chunk.KHKCTVHD.js} +1 -1
- package/dist/preview/{chunk.VV5JAM5W.js → chunk.KKFKSJUN.js} +1 -1
- package/dist/preview/{chunk.Q6H5HESF.js → chunk.KLEKC4ZX.js} +1 -1
- package/dist/preview/chunk.KVQYOFDV.js +1 -0
- package/dist/preview/{chunk.ZLNUZ6LR.js → chunk.KW7PHJYX.js} +1 -1
- package/dist/preview/{chunk.PPCDPYYU.js → chunk.LAVLPYSC.js} +1 -1
- package/dist/preview/{chunk.FZELUSK5.js → chunk.LGNGFG5V.js} +1 -1
- package/dist/preview/{chunk.SADR3MQI.js → chunk.LKM2R5UF.js} +1 -1
- package/dist/preview/{chunk.42C3FIKK.js → chunk.LMZ2WMGH.js} +1 -1
- package/dist/preview/{chunk.KAM73WVF.js → chunk.MATUPDZ3.js} +1 -1
- package/dist/preview/{chunk.Z2X7BFCB.js → chunk.MD3N26BC.js} +2 -2
- package/dist/preview/{chunk.TFJA4QV4.js → chunk.MH3AQO2R.js} +1 -1
- package/dist/preview/chunk.MHHNO3O2.js +1 -0
- package/dist/preview/{chunk.DMZRFXH7.js → chunk.MKN7ADJB.js} +1 -1
- package/dist/preview/{chunk.ND3DEDWB.js → chunk.ML5EHDZG.js} +1 -1
- package/dist/preview/{chunk.Q4VFLLUT.js → chunk.MUWI54IP.js} +1 -1
- package/dist/preview/{chunk.PZQ5P6WK.js → chunk.MV27WMNW.js} +1 -1
- package/dist/preview/{chunk.6DMCEBSO.js → chunk.N7A3T5QU.js} +1 -1
- package/dist/preview/{chunk.H3IGXHZR.js → chunk.NLZHNPDU.js} +2 -2
- package/dist/preview/{chunk.4DXPPM6T.js → chunk.NRECR3NQ.js} +1 -1
- package/dist/preview/{chunk.LZ6MSQ5O.js → chunk.NSAGOOJW.js} +1 -1
- package/dist/preview/{chunk.LMTG5NPG.js → chunk.O7NYSO6F.js} +1 -1
- package/dist/preview/{chunk.2ME4DVBI.js → chunk.OD5QZHRC.js} +1 -1
- package/dist/preview/{chunk.QUETLFBJ.js → chunk.P26ATAAI.js} +1 -1
- package/dist/preview/{chunk.3JMQKANL.js → chunk.PJL3I2IW.js} +1 -1
- package/dist/preview/{chunk.6IR5LBJU.js → chunk.POKGLN4T.js} +1 -1
- package/dist/preview/{chunk.IXMIU4D4.js → chunk.PZ3KM3TY.js} +1 -1
- package/dist/preview/{chunk.MIOLBZBS.js → chunk.QEBD7SC4.js} +1 -1
- package/dist/preview/{chunk.DPHH5ZVL.js → chunk.QK7EUIPL.js} +1 -1
- package/dist/preview/{chunk.7TDML5YU.js → chunk.QNC2OKLF.js} +1 -1
- package/dist/preview/{chunk.QOQ26NXM.js → chunk.QRNKGPAD.js} +1 -1
- package/dist/preview/{chunk.QZP3ARLH.js → chunk.QVCKTDG3.js} +1 -1
- package/dist/preview/{chunk.2U6HB4XU.js → chunk.R7POSVUK.js} +1 -1
- package/dist/preview/{chunk.UFURYU4R.js → chunk.RNAL35ID.js} +1 -1
- package/dist/preview/{chunk.KUCBNMIY.js → chunk.ROYCJXPE.js} +1 -1
- package/dist/preview/chunk.RZ73YG5K.js +1 -0
- package/dist/preview/{chunk.JLDJZET2.js → chunk.S2NQRD6W.js} +1 -1
- package/dist/preview/{chunk.O32F6LGK.js → chunk.SAWASNDO.js} +1 -1
- package/dist/preview/{chunk.CFE3MHWZ.js → chunk.SCVKHGO3.js} +1 -1
- package/dist/preview/chunk.SM37MNS2.js +1 -0
- package/dist/preview/{chunk.DLSS56EU.js → chunk.T2BZBR7S.js} +1 -1
- package/dist/preview/{chunk.OQ4ZO3YY.js → chunk.T3PELB6I.js} +1 -1
- package/dist/preview/{chunk.TR4YFVZN.js → chunk.TAJBXG5U.js} +1 -1
- package/dist/preview/{chunk.3DEWQDP7.js → chunk.TLPCYKLW.js} +1 -1
- package/dist/preview/{chunk.7K2V5FUB.js → chunk.TQQDUJLX.js} +1 -1
- package/dist/preview/{chunk.CGBOPPNL.js → chunk.TQRC5VAM.js} +1 -1
- package/dist/preview/chunk.U563J5IM.js +1 -0
- package/dist/preview/{chunk.GRBWXTST.js → chunk.UAEOCWSG.js} +1 -1
- package/dist/preview/{chunk.Y7OGJOPA.js → chunk.UHJSZ2XZ.js} +1 -1
- package/dist/preview/{chunk.JGRSUTPJ.js → chunk.UPOYRCKI.js} +1 -1
- package/dist/preview/{chunk.I63462I3.js → chunk.VBBH5R5T.js} +1 -1
- package/dist/preview/chunk.VBYJBW32.js +1 -0
- package/dist/preview/{chunk.HH4D3JEI.js → chunk.VEQIH7HR.js} +1 -1
- package/dist/preview/chunk.VHLL6VC6.js +1 -0
- package/dist/preview/{chunk.VLXLBGMY.js → chunk.VQDL4EEP.js} +1 -1
- package/dist/preview/{chunk.UODTUBQ7.js → chunk.VQOYFBEV.js} +1 -1
- package/dist/preview/{chunk.H3W5C3XQ.js → chunk.VR553M6J.js} +1 -1
- package/dist/preview/{chunk.ENLIIZF2.js → chunk.VXPEXUQF.js} +1 -1
- package/dist/preview/{chunk.Z67LBSQO.js → chunk.W3WXI5B3.js} +1 -1
- package/dist/preview/{chunk.5JKUT2OM.js → chunk.W43XWQRC.js} +1 -1
- package/dist/preview/{chunk.BHJRT57H.js → chunk.WFJCC6G3.js} +1 -1
- package/dist/preview/{chunk.I34BWUB4.js → chunk.WJHLE73Y.js} +1 -1
- package/dist/preview/{chunk.MK5RPEB2.js → chunk.WQ7K5O2I.js} +1 -1
- package/dist/preview/{chunk.EP5JS7ZH.js → chunk.WV6SP6IJ.js} +1 -1
- package/dist/preview/{chunk.XXCHO2A5.js → chunk.YJ4PFOPC.js} +1 -1
- package/dist/preview/{chunk.JCETQQ7J.js → chunk.YZKHTBTC.js} +1 -1
- package/dist/preview/{chunk.CE3NKAF7.js → chunk.ZE5RSKXF.js} +1 -1
- package/dist/preview/{chunk.WV45KLXC.js → chunk.ZQYHNFRZ.js} +1 -1
- package/dist/preview/{chunk.TOUSIUJF.js → chunk.ZT3ZG52B.js} +1 -1
- package/dist/preview/{chunk.O2VXTYUJ.js → chunk.ZU3RPI34.js} +1 -1
- package/dist/preview/index.html +55 -55
- package/dist/preview/page.js +2 -2
- package/package.json +6 -6
- package/dist/preview/chunk.3WPCS6KP.js +0 -1
- package/dist/preview/chunk.5L4ADKTW.js +0 -1
- package/dist/preview/chunk.6ZENHSTQ.js +0 -1
- package/dist/preview/chunk.7OL6H4LF.js +0 -1
- package/dist/preview/chunk.ARS4HJD2.js +0 -1
- package/dist/preview/chunk.C2QKA6XY.js +0 -1
- package/dist/preview/chunk.FHQ25SWY.js +0 -1
- package/dist/preview/chunk.MBTEOF4R.js +0 -1
- package/dist/preview/chunk.N64RVSH3.js +0 -1
- package/dist/preview/chunk.PI4RFOBU.js +0 -1
- package/dist/preview/chunk.Q42R2KW4.js +0 -1
- package/dist/preview/chunk.R66ZVMWB.js +0 -1
- package/dist/preview/chunk.RYA7A4NA.js +0 -1
- package/dist/preview/chunk.SUG6LIOX.js +0 -1
- package/dist/preview/chunk.U7PAFLUM.js +0 -1
- package/dist/preview/chunk.WN7SAAH6.js +0 -1
- package/dist/preview/chunk.ZMADWPJO.js +0 -1
- package/dist/preview/chunk.ZO6VMEPP.js +0 -1
- package/dist/preview/chunk.ZUG7U7AT.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as H,e as R,f as k}from"./chunk.
|
|
1
|
+
import{d as H,e as R,f as k}from"./chunk.3VNOTHA5.js";import{b as L}from"./chunk.VR553M6J.js";import{b as C}from"./chunk.DU76ASS4.js";import"./chunk.BJUUSIQY.js";import"./chunk.7L3I776Z.js";import{a as S}from"./chunk.GTF6EMVE.js";import"./chunk.CLIC2QBA.js";import"./chunk.UPOYRCKI.js";import"./chunk.XOZU4OFA.js";import"./chunk.WV6SP6IJ.js";import"./chunk.ZE5RSKXF.js";import"./chunk.MH3AQO2R.js";import"./chunk.J2N7EKMX.js";import"./chunk.P26ATAAI.js";import"./chunk.FIY4RUK5.js";import"./chunk.IY3DV52G.js";import"./chunk.NLZHNPDU.js";import"./chunk.QNC2OKLF.js";import{G as T,Va as E,W as b}from"./chunk.FWXW4T4I.js";import"./chunk.SDO3U72B.js";import{td as x}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as g}from"./chunk.AJZBJBMO.js";var t=g(T(),1);var c=g(b(),1);function N(n){if(!n||n.interaction.outcome==="failed")return null;let s=n.offers[0],o=s?n.interaction.offered.find(i=>i.id===s.id)?.confidence:void 0;return s&&o!==void 0&&o>=.6?{offer:s,confidence:o}:null}function V({rest:n,hold:s,leave:o}){let i=S(),u=(0,t.useMemo)(()=>C(n.target,e=>i.store.graph.has(e)),[n.target,i.store]),l=u.on==="record"&&L(i.ai)!==void 0,m=l?H(i,u):void 0,p=JSON.stringify(u),[y,I]=(0,t.useState)(null);(0,t.useEffect)(()=>{if(!l||m!==void 0)return;let e=!0;return R(i,u).then(r=>{e&&I({key:p,result:r})}),()=>{e=!1}},[p,l]);let w=m??(y?.key===p?y.result:void 0),f=l?N(w):null,v=f?.offer.id??null,h=(0,t.useRef)(null);if((0,t.useEffect)(()=>{if(v===null)return;let e=r=>{r.target instanceof Node&&h.current?.contains(r.target)||o(!0)};return document.addEventListener("pointerdown",e,{capture:!0,passive:!0}),document.addEventListener("contextmenu",e,{capture:!0,passive:!0}),addEventListener("scroll",e,{capture:!0,passive:!0}),addEventListener("resize",e,{passive:!0}),()=>{document.removeEventListener("pointerdown",e,{capture:!0}),document.removeEventListener("contextmenu",e,{capture:!0}),removeEventListener("scroll",e,{capture:!0}),removeEventListener("resize",e)}},[v,o]),(0,t.useLayoutEffect)(()=>{let e=h.current;if(!e)return;if(typeof e.showPopover=="function"&&!E(e))try{e.showPopover()}catch{}let r=n.element.getBoundingClientRect(),d=e.getBoundingClientRect(),O=r.top-d.height-4>=4?r.top-d.height-4:Math.min(innerHeight-d.height-4,r.top+4),A=Math.max(4,Math.min(innerWidth-d.width-4,r.right-d.width));e.style.top=`${Math.round(O)}px`,e.style.left=`${Math.round(A)}px`},[v,n.element]),!f)return null;let{offer:a,confidence:P}=f,M=a.type==="panel"?"a panel":a.type==="place"?"go there":a.type==="record"?"open it":"suggested";return(0,c.jsxs)("button",{ref:h,type:"button",popover:"manual","data-testid":"hover-chip","data-ai-offer":a.id,"data-ai-offer-type":a.type,"data-graview-overlay":"","data-graview-popover":"","aria-label":`Suggested by AI: ${a.label}`,title:`Suggested by AI, ${Math.round(P*100)}% sure`,onPointerEnter:s,onPointerLeave:()=>o(),onClick:()=>{n.element.closest("[tabindex], a[href], button")?.focus({preventScroll:!0}),o(!0),k(i,w,a)},style:$,children:[(0,c.jsxs)("span",{"aria-hidden":"true",style:{color:"var(--graview-accent)"},children:["\u2726"," "]}),a.label,(0,c.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",M]})]})}var $={position:"fixed",inset:"auto",top:0,left:0,margin:0,zIndex:x("toast"),boxSizing:"border-box",width:"max-content",maxWidth:"min(320px, calc(100vw - 8px))",height:"auto",minHeight:24,padding:"2px 10px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",borderRadius:999,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",color:"var(--graview-ink)",boxShadow:"var(--graview-lift-high)",font:"inherit",fontSize:"0.75rem",cursor:"pointer"};export{V as HoverChip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"./chunk.
|
|
1
|
+
import{a as h}from"./chunk.IY3DV52G.js";import{D as g,Da as a,Ga as b,H as k,K as w,cc as x}from"./chunk.DHPXRDT5.js";var s=i=>i?._zod?.def,O=Symbol.for("@graview/core:collaborative"),v=/^\^\\d\{4\}-\\d\{2\}-\\d\{2\}\$$/;function R(i){let t=s(i),u=!0,f;for(let e=0;t&&e<4;e++){if(t.type==="optional"||t.type==="nullable")u=!1;else if(t.type==="default")u=!1,f=t.defaultValue;else break;t=s(t.innerType)}if(!t)return{why:"it is not a zod field"};let l=g(i),r={...u?{required:!0}:{},...f!==void 0?{default:f}:{},...l?{description:l}:{}},p=(t.checks??[]).map(e=>s(e)),c=a(i);if(c)return{spec:{type:c,...r}};if(b(i))return{spec:{type:"app-link",...r}};let d;for(let e=s(i),n=0;e&&d===void 0&&n<4;e=s(e.innerType),n++)d=e[O];let m=e=>d!==void 0&&d===1!=(e==="text")?{collaborative:d===1}:{};if(h(i))return{spec:{type:"text",format:"markdown",...r,...m("text")}};let y=x(i);if(y)return{spec:{type:y,...r}};switch(t.type){case"string":{let e=t.format;return e==="email"?{spec:{type:"email",...r}}:e==="url"?{spec:{type:"url",...r}}:e==="date"?{spec:{type:"date",...r}}:e==="datetime"||p.some(n=>n?.fn===w)?{spec:{type:"datetime",...r}}:p.some(n=>n?.format==="regex"&&(v.test(String(n?.pattern?.source??""))||n?.pattern?.source===k.source))?{spec:{type:"date",...r}}:{spec:{type:"string",...r,...m("string")}}}case"number":{let e={};for(let n of p){let o=n?.value;typeof o=="number"&&(n?.check==="greater_than"&&n.inclusive?e.min=Math.max(e.min??o,o):n?.check==="less_than"&&n.inclusive?e.max=Math.min(e.max??o,o):n?.check==="multiple_of"&&(e.step=o))}return{spec:{type:p.some(n=>n?.format==="safeint"||n?.format==="int")?"integer":"number",...e,...r}}}case"boolean":return{spec:{type:"boolean",...r}};case"enum":{let e=Object.keys(t.entries??{});return e.length>0?{spec:{type:"enum",options:e,...r}}:{why:"it is an enum with no options"}}case"array":{let e=s(t.element);if(e?.type==="enum"){let o=Object.keys(e.entries??{});return o.length>0?{spec:{type:"enum",multiple:!0,options:o,...r}}:{why:"it is a list of an enum with no options"}}let n=a(t.element)??(e?.type==="number"?"number":e?.type==="string"?"string":void 0);return n?{spec:{type:"list",of:n,...r}}:{why:`it is a list of ${String(e?.type??"something")}, and a document lists words, numbers, dates, images, videos or files`}}default:return{why:`it is a ${String(t.type)}, which a document has no field type for`}}}function T(i){let t=R(i);return"spec"in t?t.spec:void 0}export{T as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fb as a,la as l,ra as p}from"./chunk.
|
|
1
|
+
import{Fb as a,la as l,ra as p}from"./chunk.DHPXRDT5.js";import{c}from"./chunk.FQLNBIQ5.js";function m(e){if(e.withheld===!0||e.undoes!==void 0||e.mutation?.name!==a)return;let{node:n,field:r}=e.mutation.args??{};return typeof n=="string"&&typeof r=="string"?{node:n,field:r}:void 0}function R(e,n){return e.kind!==n.kind?!1:e.id!==void 0||n.id!==void 0?e.id===n.id&&e.onBehalfOf===n.onBehalfOf:(e.name??"")===(n.name??"")}var f=e=>{let n=0;for(let r of e)n++;return n};function k(e){if(e.length===0)return;let n=m(e[0]);if(!n)return;let r=0,o=0;for(let i of e){let d=m(i);if(!d||d.node!==n.node||d.field!==n.field)return;for(let t of i.primitives)if(t.op==="splice-text"&&t.id===n.node&&t.field===n.field)r+=f(t.inserted),o+=f(t.removed);else if(t.op==="patch-node"&&t.id===n.node&&Object.prototype.hasOwnProperty.call(t.after,n.field)){let s=t.before[n.field],u=t.after[n.field];r+=typeof u=="string"?f(u):0,o+=typeof s=="string"&&!c(s)?f(s):0}}return{...n,inserted:r,removed:o}}var T=(e,n)=>({node:e.node,field:e.field,inserted:e.inserted+n.inserted,removed:e.removed+n.removed});function y(e){return`(${[...e.inserted>0||e.removed===0?[`+${e.inserted}`]:[],...e.removed>0?[`\u2212${e.removed}`]:[]].join(" ")})`}function w(e,n,r,o=!0){let i=r?.getNode(e.node),d=i?n.tryDefinition(i.kind):void 0,t=p(d,e.field);return`Wrote in ${i&&o?`${l(d,i)}'s ${t.toLowerCase()}`:t} ${y(e)}`}export{R as a,k as b,T as c,w as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk.QDVGHI7R.js";import{a as x,c as T,d as w}from"./chunk.
|
|
1
|
+
import{a as A}from"./chunk.QDVGHI7R.js";import{a as x,c as T,d as w}from"./chunk.ROYCJXPE.js";import{L as S,P as v,S as $}from"./chunk.DHPXRDT5.js";function M(e,t,n){let r=e.schema.tryDefinition(t)?.fields?.shape?.[n];return r===void 0?void 0:A(r)}function I(e,t){if(e===void 0)return[];if(!Array.isArray(e))return[`The view's accepts is a list of { "kind": <a kind>, "field": <its image, video or file field> }.`];let n=[],i=new Set(t.schema.kinds);for(let r of e){let{kind:c,field:o}=r??{};typeof c!="string"||typeof o!="string"?n.push(`Each of the view's accepts is { "kind": <a kind>, "field": <its image, video or file field> }.`):i.has(c)?M(t,c,o)?t.allMutations().some(a=>(a.creates??[]).includes(c)&&Object.hasOwn(a.input?.shape??{},o))||n.push(`No act of this app makes a "${c}" with its "${o}", so a file dropped could become nothing.`):n.push(`The view accepts files into ${c}'s "${o}", which holds no picture, video or file.`):n.push(`The view accepts files for "${c}", which is no kind of this app.`)}return n}function E(e,t,n){if(e===void 0||e===!0)return[];let i=`The view's pictures is true; the kinds whose pictures it draws, ["circuit"]; or { "width": <the widest it draws a picture, in pixels> } with the fields it draws them from, by kind, { "circuit": "photo" }.`;if(typeof e!="object"||e===null)return[i];let r=new Set([...n.attach==="home"?[]:[n.attach],...n.reads?.kinds??[]]),c=new Set(t.schema.kinds),o=[],a=d=>{if(!c.has(d))return void o.push(`The view's pictures chooses "${d}", which is no kind of this app.`);r.has(d)||o.push(`The view's pictures chooses "${d}", whose records it is not handed: add "${d}" to its reads.kinds.`)};if(Array.isArray(e)){if(e.length===0||!e.every(d=>typeof d=="string"))return[i];for(let d of e)a(d);return o}for(let[d,l]of Object.entries(e)){if(d==="width"&&typeof l!="string"&&!Array.isArray(l)){Number.isInteger(l)&&l>=16&&l<=4096||o.push("The view's pictures width is a whole number of pixels from 16 to 4096.");continue}let f=typeof l=="string"?[l]:Array.isArray(l)&&l.length>0&&l.every(u=>typeof u=="string")?l:void 0;if(!f){o.push(`The view's pictures says "${d}": beside "width", it names a kind and the field it draws pictures from, "circuit": "photo", or its fields, "circuit": ["photo", "map"].`);continue}let y=o.length;if(a(d),!(o.length>y))for(let u of f){let p=M(t,d,u);p?p.as==="video"&&o.push(`The view's pictures chooses ${d}'s "${u}", which holds videos: the host plays a video where the view places it, and hands no picture of it.`):o.push(`The view's pictures chooses ${d}'s "${u}", which holds no picture.`)}}return o}function F(e){if(e===void 0)return[];if(typeof e!="object"||e===null||Array.isArray(e))return[`The view's scene is { "maxHeight": <the tallest its preview on the Scene is drawn, in pixels> }.`];let{maxHeight:t,...n}=e,i=[];return Object.keys(n).length>0&&i.push(`The view's scene says ${Object.keys(n).map(r=>`"${r}"`).join(", ")}: only "maxHeight" is read.`),t!==void 0&&!(Number.isInteger(t)&&t>=80&&t<=4e3)&&i.push("The view's scene maxHeight is a whole number of pixels from 80 to 4000."),i}function j(e){return(e.acts??[]).map(t=>typeof t=="string"?{act:t}:t)}function C(e,t){let n=[],i=new Set(t.schema.kinds),r=new Set(t.schema.edgeKinds),c=new Set(t.allMutations().map(a=>a.name));(typeof e.name!="string"||!/^[a-z0-9][a-z0-9-]{0,62}$/.test(e.name))&&n.push(`The view's name "${String(e.name)}" is not lower-case letters, digits and hyphens.`),e.title!==void 0&&(typeof e.title!="string"||e.title.trim()===""||e.title.length>80)&&n.push("The view's title is empty or longer than 80 characters."),e.attach!=="home"&&!i.has(e.attach)&&n.push(`The view attaches to "${e.attach}", which is no kind of this app.`),e.cardinality!=="one"&&e.cardinality!=="many"&&n.push(`The view's cardinality is "${String(e.cardinality)}", not one or many.`),e.attach==="home"&&e.cardinality!=="many"&&n.push("A view of the home draws many records: its cardinality is many."),e.replaces!==void 0&&e.replaces!=="page"?n.push(`The view's replaces is "${String(e.replaces)}": the one thing a view replaces is "page", or leave it out to draw the view above the record's own fields.`):e.replaces==="page"&&e.attach==="home"&&n.push(`The home's view is the home already: replaces "page" is for a view of a kind, of one record (its page) or of many (its list).`),e.gestures!==void 0&&typeof e.gestures!="boolean"&&n.push(`The view's gestures is "${String(e.gestures)}": it is true, or left out.`),e.bleed!==void 0&&typeof e.bleed!="boolean"&&n.push(`The view's bleed is "${String(e.bleed)}": it is true, or left out.`),e.heading!==void 0&&(e.heading!=="own"||e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push(`The view's heading is "${String(e.heading)}": it is "own" on a view that is a place (a title, cardinality many), or left out.`),e.flows!==void 0&&typeof e.flows!="boolean"?n.push(`The view's flows is "${String(e.flows)}": it is false for a view that keeps its place's frame, or left out.`):e.flows===!1&&(e.attach==="home"||e.cardinality!=="many"||e.title===void 0)&&n.push("Only a view that is a place keeps a frame: flows false needs a title and cardinality many on a kind."),n.push(...F(e.scene)),e.scene!==void 0&&(e.attach==="home"||e.cardinality!=="many")&&n.push("Only a view of a kind's members is drawn on the Scene as a card: scene needs cardinality many on a kind."),n.push(...E(e.pictures,t,e)),n.push(...I(e.accepts,t));for(let a of e.reads?.kinds??[])i.has(a)||n.push(`The view reads "${a}", which is no kind of this app.`);for(let a of e.reads?.edges??[])r.has(a)||n.push(`The view reads the edge "${a}", which no kind of this app declares.`);let o=new Set;for(let a of j(e)){c.has(a.act)||n.push(`The view asks for the act "${a.act}", which this app does not declare.`);let d=a.as??a.act;o.has(d)&&n.push(`Two of the view's acts are called "${d}".`),o.add(d)}return n}function H(e,t,n){let i=[...new Set([...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]])];if(i.length<2)return[];let r=new Set(t.reads?.edges??[]),c=o=>new RegExp(`(["'\`])${o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\1`).test(n);return e.schema.edgeKinds.filter(o=>{let a=e.schema.edge(o);return!r.has(o)&&a!==void 0&&a.from.some(d=>i.includes(d))&&(a.to==="*"||a.to.some(d=>i.includes(d)))&&c(o)})}function z(e,t,n){let i=H(e,t,n);if(i.length===0)return;let r=(c,o)=>c.length<2?c[0]??"":`${c.slice(0,-1).join(", ")} ${o} ${c[c.length-1]}`;return`"${t.name}" names ${r(i,"and")} but does not read ${i.length>1?"them":"it"}, so the view is handed no such links: add ${r(i.map(c=>`"${c}"`),"and")} to its manifest's reads.edges.`}function D(e,t){return[...t.attach==="home"?[]:[t.attach],...t.reads?.kinds??[]].some(i=>Object.keys(e.schema.tryDefinition(i)?.computed??{}).length>0)}function Z(e,t,n){let{manifest:i}=n,r=n.input??{},o=e.seenBy(t).graph,a=i.attach==="home"?void 0:i.attach,d=a&&i.cardinality==="one"&&r.node?o.getNode(r.node.id):void 0,l=d&&d.kind===a?[d]:[],f=a&&i.cardinality==="many"?r.nodes?r.nodes.flatMap(s=>{let h=o.getNode(s.id);return h&&h.kind===a?[h]:[]}):o.nodesOfKind(a):[],y=new Set([...l,...f].map(s=>s.id)),u=x(o,y,{kinds:(i.reads?.kinds??[]).filter(s=>s!==a||i.cardinality==="one"),edges:i.reads?.edges??[]}),p=new Map;for(let s of[...f,...u.nodes])l.some(h=>h.id===s.id)||p.set(s.id,s);let P=new Set([...l.map(s=>s.id),...p.keys()]),G=[...u.edges],O=new Set(j(i).map(s=>s.act)),V=e.permittedMutations(t).filter(s=>O.has(s.name)).map(s=>({name:s.name,title:s.title??s.name,...s.description!==void 0?{description:s.description}:{},...s.subject?{subject:{kinds:s.subject.kinds,arg:s.subject.arg}}:{}})),m=s=>s?.filter(h=>P.has(h)),k=n.computed,b=s=>k?{...w(e,s),...k(o,s)}:w(e,s);return{view:i.name,...l[0]?{node:b(l[0])}:{},nodes:[...p.values()].map(b),edges:G,...i.title!==void 0?{label:i.title}:r.label!==void 0?{label:r.label}:{},cardinality:i.cardinality,...r.fidelity!==void 0?{fidelity:r.fidelity}:{},...r.mode!==void 0?{mode:r.mode}:{},...r.selected!==void 0?{selected:r.selected}:{},...r.implicated?{implicated:m(r.implicated)}:{},...r.flagged?{flagged:m(r.flagged)}:{},acts:V,...n.theme?{theme:n.theme}:{},locale:v(),timeZone:$(),today:e.today()??S(),...T(e.schema,[...l,...p.values()]),...n.places?{places:n.places.filter((s,h,g)=>g.findIndex(W=>W.as===s.as)===h).map(({as:s,title:h,kind:g})=>({as:s,title:h,kind:g}))}:{}}}export{M as a,j as b,C as c,H as d,z as e,D as f,Z as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as $}from"./chunk.
|
|
1
|
+
import{e as $}from"./chunk.CCCONK73.js";import{a as C}from"./chunk.7L3I776Z.js";import{l as M}from"./chunk.P26ATAAI.js";import{Ob as x,la as k,ma as v,na as j}from"./chunk.DHPXRDT5.js";function N(a,s){let c=a.tryDefinition(s),r=Object.keys(c?.fields?.shape??{}),m=[c?.lifecycle?.field,...r.filter(l=>/^(status|stage|state|phase)$/i.test(l))].filter(l=>l!==void 0&&r.includes(l));return[...new Set(m)].slice(0,1)}function P(a,s){return a.tryDefinition(s)?.fieldRoles?.title??"label"}function V(a,s,c={}){let r=s.map(e=>a.graph.getNode(e)).filter(e=>e!==void 0);if(r.length===0)return{acts:[],withheld:[]};let u=c.principal??{kind:"human"},m=C(a,r.map(e=>e.id),{...c.derive,principal:u,...c.context?{context:c.context}:{}}),l=new Map(a.allMutations().map(e=>[e.name,e])),g=[...new Set(r.map(e=>e.kind))],p=new Set(g.map(e=>P(a.schema,e))),h=new Set(m.affordances.filter(e=>e.provider==="schema").map(e=>e.mutation)),o=e=>{let n=l.get(e.mutation);if(!n?.subject)return;let t=r.length===1&&e.provider==="invariant"&&!h.has(e.mutation)&&e.args[n.subject.arg]===r[0].id;if(!(e.provider!=="schema"&&!t)&&!(r.length>1&&e.batch?.length!==r.length)&&n.derived?.act!=="edit"&&!e.open.some(i=>p.has(i.name)))return n},y=[],b=new Set;for(let e of m.affordances){let n=o(e);if(!n||b.has(n.name))continue;b.add(n.name);let{[n.subject.arg]:t,...i}=e.args;y.push({id:e.id,label:v(n),mutation:n.name,subject:n.subject.arg,args:i,open:e.open,...e.destructive||e.setsAside?{more:!0}:{},...e.destructive?{destructive:!0}:{},affordance:{...e,label:v(n)}})}if(g.length===1){let e=g[0];for(let n of N(a.schema,e))for(let t of $(a.schema,[...l.values()],e,n)){if(t.by==="none"||r.every(d=>d[n]===t.value))continue;let i=r.find(d=>d[n]!==t.value),f=t.acts.find(d=>{let D=t.by==="step"?{[d.subject.arg]:i.id}:{[d.subject.arg]:i.id,[n]:t.value};return a.permits({name:d.name,args:D},u).ok});if(!f)continue;let w=t.by==="step"?{}:{[n]:t.value};if(t.by==="step"&&y.some(d=>d.mutation===f.name))continue;let R=t.by==="step"?v(f):`Move to ${t.label}`,O=`set:${n}:${t.value}`;y.push({id:O,label:R,mutation:f.name,subject:f.subject.arg,args:w,open:[],affordance:{id:O,label:R,provider:"schema",mutation:f.name,args:{[f.subject.arg]:i.id,...w},open:[],score:0,why:`every one is ${e}`,nodeIds:r.map(d=>d.id)}})}}let S=[...y.filter(e=>!e.more),...y.filter(e=>e.more)],A=m.withheld.filter(e=>{let n=l.get(e.mutation);return n?.subject!==void 0&&n.derived?.act!=="edit"&&(r.length===1||e.batch?.length===r.length)}).map(e=>({label:v(l.get(e.mutation)),message:e.refusal.message}));return{acts:S,withheld:A}}function _(a,s,c,r={}){let u=r.author,m=a.allMutations().find(e=>e.name===s.mutation),l=e=>M(a.schema,a.allMutations(),e),g=e=>{let n=a.graph.getNode(e);return n?k(a.schema.tryDefinition(n.kind),n):e},p=[],h=[],o=[];for(let e of[...new Set(c)]){let n={name:s.mutation,args:{...s.args,[s.subject]:e}};if(!m){p.push({id:e,label:g(e),message:`There is no act \u201C${s.mutation}\u201D.`,reason:"invalid"});continue}let t=a.permits(n,u);if(!t.ok){p.push({id:e,label:g(e),message:t.refusal.message,reason:"forbidden"});continue}if(!a.wouldChange(n,u)){h.push(e);continue}o.push({id:e,call:n})}let y=e=>a.previewAll(e,{...u?{author:u}:{},...r.context?{context:r.context}:{}});for(let e=0;o.length>0;e+=1)try{y(o.map(n=>n.call));break}catch(n){let t=[];for(let i of o)try{y([i.call]),t.push(i)}catch(f){p.push({id:i.id,label:g(i.id),message:l(f),reason:x(f).reason})}if(t.length===o.length||e>o.length){for(let i of t)p.push({id:i.id,label:g(i.id),message:l(n),reason:x(n).reason});o=[];break}o=t}if(o.length===0)return{applied:[],unchanged:h,refused:p};let b=s.label??(m?v(m):s.mutation),S=[...new Set(o.map(e=>a.graph.getNode(e.id)?.kind))],A=`${b} \u2014 ${S.length===1&&S[0]?j(a.schema,S[0],o.length):`${o.length} records`}`;try{let e=a.applyAll(o.map(n=>n.call),{intent:A,...u?{author:u}:{},...r.via?{via:r.via}:{}});return{batch:e.batch,intent:A,applied:o.map(n=>n.id),unchanged:h,refused:p,result:e}}catch(e){let n=l(e),t=x(e).reason;return{applied:[],unchanged:h,refused:[...p,...o.map(i=>({id:i.id,label:g(i.id),message:n,reason:t}))],allOrNothing:!0}}}export{V as a,_ as b};
|
package/dist/preview/index.html
CHANGED
|
@@ -5,72 +5,72 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Graview preview</title>
|
|
7
7
|
<link rel="preload" href="/graview/document" as="fetch" crossorigin="anonymous">
|
|
8
|
-
<link rel="modulepreload" href="/chunk.
|
|
9
|
-
<link rel="modulepreload" href="/chunk.
|
|
10
|
-
<link rel="modulepreload" href="/chunk.
|
|
11
|
-
<link rel="modulepreload" href="/chunk.
|
|
12
|
-
<link rel="modulepreload" href="/chunk.
|
|
8
|
+
<link rel="modulepreload" href="/chunk.VXPEXUQF.js">
|
|
9
|
+
<link rel="modulepreload" href="/chunk.PZ3KM3TY.js">
|
|
10
|
+
<link rel="modulepreload" href="/chunk.NSAGOOJW.js">
|
|
11
|
+
<link rel="modulepreload" href="/chunk.CA2SYEYE.js">
|
|
12
|
+
<link rel="modulepreload" href="/chunk.6ZFYFT5A.js">
|
|
13
13
|
<link rel="modulepreload" href="/chunk.Q5WEOX3Q.js">
|
|
14
|
-
<link rel="modulepreload" href="/chunk.
|
|
15
|
-
<link rel="modulepreload" href="/chunk.
|
|
16
|
-
<link rel="modulepreload" href="/chunk.
|
|
17
|
-
<link rel="modulepreload" href="/chunk.
|
|
18
|
-
<link rel="modulepreload" href="/chunk.
|
|
14
|
+
<link rel="modulepreload" href="/chunk.SAWASNDO.js">
|
|
15
|
+
<link rel="modulepreload" href="/chunk.TLPCYKLW.js">
|
|
16
|
+
<link rel="modulepreload" href="/chunk.NLZHNPDU.js">
|
|
17
|
+
<link rel="modulepreload" href="/chunk.QNC2OKLF.js">
|
|
18
|
+
<link rel="modulepreload" href="/chunk.FWXW4T4I.js">
|
|
19
19
|
<link rel="modulepreload" href="/chunk.SDO3U72B.js">
|
|
20
|
-
<link rel="modulepreload" href="/chunk.
|
|
20
|
+
<link rel="modulepreload" href="/chunk.DHPXRDT5.js">
|
|
21
21
|
<link rel="modulepreload" href="/chunk.FQLNBIQ5.js">
|
|
22
22
|
<link rel="modulepreload" href="/chunk.AJZBJBMO.js">
|
|
23
|
-
<link rel="modulepreload" href="/chunk.
|
|
24
|
-
<link rel="modulepreload" href="/chunk.
|
|
25
|
-
<link rel="modulepreload" href="/chunk.
|
|
26
|
-
<link rel="modulepreload" href="/chunk.
|
|
27
|
-
<link rel="modulepreload" href="/chunk.
|
|
23
|
+
<link rel="modulepreload" href="/chunk.KVQYOFDV.js">
|
|
24
|
+
<link rel="modulepreload" href="/chunk.HGH27XZG.js">
|
|
25
|
+
<link rel="modulepreload" href="/chunk.NRECR3NQ.js">
|
|
26
|
+
<link rel="modulepreload" href="/chunk.T2BZBR7S.js">
|
|
27
|
+
<link rel="modulepreload" href="/chunk.HMJXB6KC.js">
|
|
28
28
|
<link rel="modulepreload" href="/chunk.Q355UPFG.js">
|
|
29
|
-
<link rel="modulepreload" href="/chunk.
|
|
30
|
-
<link rel="modulepreload" href="/chunk.
|
|
31
|
-
<link rel="modulepreload" href="/chunk.
|
|
32
|
-
<link rel="modulepreload" href="/chunk.
|
|
33
|
-
<link rel="modulepreload" href="/chunk.
|
|
34
|
-
<link rel="modulepreload" href="/chunk.
|
|
35
|
-
<link rel="modulepreload" href="/chunk.
|
|
36
|
-
<link rel="modulepreload" href="/chunk.
|
|
37
|
-
<link rel="modulepreload" href="/chunk.
|
|
38
|
-
<link rel="modulepreload" href="/chunk.
|
|
39
|
-
<link rel="modulepreload" href="/chunk.
|
|
40
|
-
<link rel="modulepreload" href="/chunk.
|
|
29
|
+
<link rel="modulepreload" href="/chunk.JQEXH23N.js">
|
|
30
|
+
<link rel="modulepreload" href="/chunk.O7NYSO6F.js">
|
|
31
|
+
<link rel="modulepreload" href="/chunk.I7OFRF6N.js">
|
|
32
|
+
<link rel="modulepreload" href="/chunk.4RPKCW4J.js">
|
|
33
|
+
<link rel="modulepreload" href="/chunk.IRNEWNUB.js">
|
|
34
|
+
<link rel="modulepreload" href="/chunk.AUNQNTKY.js">
|
|
35
|
+
<link rel="modulepreload" href="/chunk.KLEKC4ZX.js">
|
|
36
|
+
<link rel="modulepreload" href="/chunk.PJL3I2IW.js">
|
|
37
|
+
<link rel="modulepreload" href="/chunk.LMZ2WMGH.js">
|
|
38
|
+
<link rel="modulepreload" href="/chunk.OD5QZHRC.js">
|
|
39
|
+
<link rel="modulepreload" href="/chunk.YJ4PFOPC.js">
|
|
40
|
+
<link rel="modulepreload" href="/chunk.LKM2R5UF.js">
|
|
41
41
|
<link rel="modulepreload" href="/chunk.MB7LKKUD.js">
|
|
42
|
-
<link rel="modulepreload" href="/chunk.
|
|
43
|
-
<link rel="modulepreload" href="/chunk.
|
|
44
|
-
<link rel="modulepreload" href="/chunk.
|
|
45
|
-
<link rel="modulepreload" href="/chunk.
|
|
46
|
-
<link rel="modulepreload" href="/chunk.
|
|
47
|
-
<link rel="modulepreload" href="/chunk.
|
|
48
|
-
<link rel="modulepreload" href="/chunk.
|
|
49
|
-
<link rel="modulepreload" href="/chunk.
|
|
50
|
-
<link rel="modulepreload" href="/chunk.
|
|
42
|
+
<link rel="modulepreload" href="/chunk.26RYER7Y.js">
|
|
43
|
+
<link rel="modulepreload" href="/chunk.CYEPHT7V.js">
|
|
44
|
+
<link rel="modulepreload" href="/chunk.5MOXQUZH.js">
|
|
45
|
+
<link rel="modulepreload" href="/chunk.MKN7ADJB.js">
|
|
46
|
+
<link rel="modulepreload" href="/chunk.I4H2GS4O.js">
|
|
47
|
+
<link rel="modulepreload" href="/chunk.FE3SINPK.js">
|
|
48
|
+
<link rel="modulepreload" href="/chunk.MUWI54IP.js">
|
|
49
|
+
<link rel="modulepreload" href="/chunk.3D37E2G5.js">
|
|
50
|
+
<link rel="modulepreload" href="/chunk.IO5VFTXC.js">
|
|
51
51
|
<link rel="modulepreload" href="/chunk.BJUUSIQY.js">
|
|
52
|
-
<link rel="modulepreload" href="/chunk.
|
|
53
|
-
<link rel="modulepreload" href="/chunk.
|
|
52
|
+
<link rel="modulepreload" href="/chunk.7L3I776Z.js">
|
|
53
|
+
<link rel="modulepreload" href="/chunk.CLIC2QBA.js">
|
|
54
54
|
<link rel="modulepreload" href="/chunk.XOZU4OFA.js">
|
|
55
|
-
<link rel="modulepreload" href="/chunk.
|
|
55
|
+
<link rel="modulepreload" href="/chunk.WV6SP6IJ.js">
|
|
56
56
|
<link rel="modulepreload" href="/chunk.WVUJXDXZ.js">
|
|
57
|
-
<link rel="modulepreload" href="/chunk.
|
|
58
|
-
<link rel="modulepreload" href="/chunk.
|
|
59
|
-
<link rel="modulepreload" href="/chunk.
|
|
60
|
-
<link rel="modulepreload" href="/chunk.
|
|
61
|
-
<link rel="modulepreload" href="/chunk.
|
|
57
|
+
<link rel="modulepreload" href="/chunk.B422DSYN.js">
|
|
58
|
+
<link rel="modulepreload" href="/chunk.ZE5RSKXF.js">
|
|
59
|
+
<link rel="modulepreload" href="/chunk.DKUEZPGR.js">
|
|
60
|
+
<link rel="modulepreload" href="/chunk.EP7YT7LT.js">
|
|
61
|
+
<link rel="modulepreload" href="/chunk.I7KN732Z.js">
|
|
62
62
|
<link rel="modulepreload" href="/chunk.MIE4TJRW.js">
|
|
63
|
-
<link rel="modulepreload" href="/chunk.
|
|
63
|
+
<link rel="modulepreload" href="/chunk.SCVKHGO3.js">
|
|
64
64
|
<link rel="modulepreload" href="/chunk.RD2FSSLV.js">
|
|
65
|
-
<link rel="modulepreload" href="/chunk.
|
|
66
|
-
<link rel="modulepreload" href="/chunk.
|
|
67
|
-
<link rel="modulepreload" href="/chunk.
|
|
68
|
-
<link rel="modulepreload" href="/chunk.
|
|
69
|
-
<link rel="modulepreload" href="/chunk.
|
|
70
|
-
<link rel="modulepreload" href="/chunk.
|
|
71
|
-
<link rel="modulepreload" href="/chunk.
|
|
72
|
-
<link rel="modulepreload" href="/chunk.
|
|
73
|
-
<script>(()=>{const later=["/chunk.
|
|
65
|
+
<link rel="modulepreload" href="/chunk.AZRICZKT.js">
|
|
66
|
+
<link rel="modulepreload" href="/chunk.MH3AQO2R.js">
|
|
67
|
+
<link rel="modulepreload" href="/chunk.J2N7EKMX.js">
|
|
68
|
+
<link rel="modulepreload" href="/chunk.P26ATAAI.js">
|
|
69
|
+
<link rel="modulepreload" href="/chunk.FIY4RUK5.js">
|
|
70
|
+
<link rel="modulepreload" href="/chunk.IY3DV52G.js">
|
|
71
|
+
<link rel="modulepreload" href="/chunk.6BR2SUAE.js">
|
|
72
|
+
<link rel="modulepreload" href="/chunk.F4CDJBDS.js">
|
|
73
|
+
<script>(()=>{const later=["/chunk.HTEQCRVP.js","/chunk.66TRDXYR.js","/chunk.4R7H3GIL.js","/chunk.CCCONK73.js","/chunk.HJCQ6I3S.js","/chunk.EL7XXGQY.js","/chunk.CDSHUWSK.js","/chunk.WFJCC6G3.js","/chunk.BIDL7GQD.js","/chunk.MATUPDZ3.js","/chunk.HCX6KPRF.js","/chunk.RZ73YG5K.js","/chunk.BQORHDAH.js","/chunk.MD3N26BC.js","/chunk.6XBQDXT6.js","/chunk.JN3WZGJY.js","/chunk.U5P23GO7.js","/chunk.JHAMSDAI.js","/chunk.B5EFNTDA.js","/chunk.47VEV4BX.js","/chunk.TAJBXG5U.js"],first=[...document.querySelectorAll('link[rel="modulepreload"]')];let left=first.length;const go=()=>{for(const href of later){const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};if(left===0)return go();const one=()=>{if(--left===0)go()};for(const link of first){link.addEventListener("load",one,{once:true});link.addEventListener("error",one,{once:true})}})()</script>
|
|
74
74
|
<style>html,body{margin:0;height:100%}#graview-app{min-height:100dvh}</style>
|
|
75
75
|
</head>
|
|
76
76
|
<body>
|
package/dist/preview/page.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as _t,b as sr,c as cr,d as dr,e as lr,f as Wt,g as ur,h as Dt}from"./chunk.ENLIIZF2.js";import{a as lo}from"./chunk.IXMIU4D4.js";import{a as fr,b as pr,c as qt,d as mr,e as zt,f as yr,g as gr,h as wr,i as Gt,j as vr,k as br,l as Sr,m as Ar,n as Pr,o as Rr,p as Er,q as kr,r as Tr,s as xr,t as Fr,u as Ye}from"./chunk.LZ6MSQ5O.js";import{b as hr}from"./chunk.JV432T4Q.js";import{c as jt}from"./chunk.TVWK3SGD.js";import{a as Ft}from"./chunk.Q5WEOX3Q.js";import{b as Ot,i as Bn}from"./chunk.O32F6LGK.js";import{k as ct}from"./chunk.3DEWQDP7.js";import{C as It,F as rr,K as or,O as ar,P as ir,k as Qn,n as Zn,o as Xn,p as $t,q as er,s as tr,w as nr}from"./chunk.H3IGXHZR.js";import{c as co}from"./chunk.7TDML5YU.js";import{Ba as Dn,Ca as jn,Da as qn,Ea as zn,Fa as Gn,G as Nn,Ha as Un,Ia as Kn,Ka as Jn,La as Vt,Oa as Yn,Ra as ut,W as Vn,a as Mn,aa as $n,b as dt,c as lt,j as Hn,ja as In,ka as _n,m as Nt,ma as Wn}from"./chunk.3VEZ5MOC.js";import{a as Me}from"./chunk.SDO3U72B.js";import{Ae as Ln,Be as Ht,Ed as En,Fb as Sn,Fd as kn,Nd as Tn,Ob as An,Pd as xn,Qb as Pn,Qd as Fn,Sd as st,mb as qe,oe as Te,pe as On,qe as Cn,ve as Lt,we as Bt,xb as it,xc as Ct,xe as Mt,yc as Rn}from"./chunk.6AANHELP.js";import"./chunk.FQLNBIQ5.js";import{b as je}from"./chunk.AJZBJBMO.js";async function ft(t,r={}){let o=t.compiled===void 0||!fo(t.compiled,t.document)?void 0:Bn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await uo();return i(t.document,r)}var Or,uo=()=>Or??=(__graviewPreload(import.meta.url,["./chunk.KAM73WVF.js","./chunk.O32F6LGK.js","./chunk.R3GE37OI.js","./chunk.UD7VLXPM.js","./chunk.3DEWQDP7.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ZO6VMEPP.js")).catch(t=>{throw Or=void 0,t});function fo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,i=r;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ft(Ot(o).document)===Ft(Ot(i).document)}var d=je(Nn(),1);var mt=je(Nn(),1),Ut="data-graview-drawn",po=200,Cr=50,mo=1e4,pt=()=>typeof performance<"u"?performance.now():Date.now();function ho(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function yo(t,r){if(t.ownerDocument.fonts?.status==="loading"||Dn()>0||Gn(r)>0||t.querySelector('[aria-busy="true"]')||ho(t).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of t.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Lr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function go(t,r,o,i){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let p=pt(),c=p,b=Lr(t),h=!1,k,O=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(C=>!(C.target===t&&C.attributeName===Ut))&&(c=pt())});O?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let I=()=>{h=!0,O?.disconnect(),k!==void 0&&clearTimeout(k)},S=x=>{let C=!1,re=()=>{C||(C=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(re,0)),setTimeout(re,100)},T=()=>{if(h)return;let x=Lr(t);x!==b&&(b=x,c=pt());let C=pt();if(yo(t,i)&&C-c>=po||C-p>=mo){S(()=>{h||(I(),t.setAttribute(Ut,r),Kn(),o())});return}k=setTimeout(T,Cr)};return k=setTimeout(T,Cr),I}function Br(t,r,o,i,l){Un();let p=(0,mt.useRef)({place:o,onDrawn:i});p.current={place:o,onDrawn:i},(0,mt.useLayoutEffect)(()=>{l&&zn(l);let c=k=>go(k,p.current.place.path,()=>p.current.onDrawn?.(p.current.place),l);if(t.current)return c(t.current);let b,h=!1;return queueMicrotask(()=>{!h&&t.current&&(b=c(t.current))}),()=>{h=!0,b?.()}},[r,t,l])}var Nr=je(lo(),1);var F=je(co(),1);var w=je(Vn(),1);function ht(t,r={}){let o=Vt(t);return{Face:o.part((l,p)=>(0,d.createElement)(l,p),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Yt=t=>Promise.all([t,ar()]).then(([r])=>r),Vr=Me(()=>(__graviewPreload(import.meta.url,["./chunk.DGDW54KE.js","./chunk.EB7PZJEO.js","./chunk.MSUZAJ2K.js","./chunk.RQG672MJ.js","./chunk.3JMQKANL.js","./chunk.XXCHO2A5.js","./chunk.SADR3MQI.js","./chunk.HJCQ6I3S.js","./chunk.2BMZPALF.js","./chunk.GONZB3J3.js","./chunk.UAMPR4MD.js","./chunk.IKKKHHRN.js","./chunk.IPGLITWA.js","./chunk.U5P23GO7.js","./chunk.DCLF4WWZ.js","./chunk.XDZDNZ7B.js","./chunk.E423JCOS.js","./chunk.O5FTWXA2.js","./chunk.Q4VFLLUT.js","./chunk.6ZENHSTQ.js","./chunk.BHJRT57H.js","./chunk.BIDL7GQD.js","./chunk.CNN32262.js","./chunk.N5Z34V7U.js","./chunk.LOKGUALC.js","./chunk.LZ6MSQ5O.js","./chunk.JV432T4Q.js","./chunk.Q5WEOX3Q.js","./chunk.KAM73WVF.js","./chunk.O32F6LGK.js","./chunk.EGSOHTZZ.js","./chunk.R3GE37OI.js","./chunk.2KCDLCB2.js","./chunk.UD7VLXPM.js","./chunk.3DEWQDP7.js","./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.AYZL3LCR.js"))),wo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.4YAO3A5Q.js","./chunk.4DXPPM6T.js","./chunk.DLSS56EU.js","./chunk.7WPVLEX2.js","./chunk.Q355UPFG.js","./chunk.DGDW54KE.js","./chunk.LMTG5NPG.js","./chunk.YBQ5GVAX.js","./chunk.EB7PZJEO.js","./chunk.42KHFGN6.js","./chunk.RQG672MJ.js","./chunk.Q6H5HESF.js","./chunk.3JMQKANL.js","./chunk.42C3FIKK.js","./chunk.2ME4DVBI.js","./chunk.XXCHO2A5.js","./chunk.SADR3MQI.js","./chunk.MB7LKKUD.js","./chunk.ODYJEDIW.js","./chunk.IPGLITWA.js","./chunk.LFFJB6D3.js","./chunk.DMZRFXH7.js","./chunk.DZ6UDZOB.js","./chunk.O5FTWXA2.js","./chunk.Q4VFLLUT.js","./chunk.6ZENHSTQ.js","./chunk.CNN32262.js","./chunk.BJUUSIQY.js","./chunk.N5Z34V7U.js","./chunk.LOKGUALC.js","./chunk.XOZU4OFA.js","./chunk.EP5JS7ZH.js","./chunk.WVUJXDXZ.js","./chunk.L7XKYGV7.js","./chunk.CE3NKAF7.js","./chunk.R3GE37OI.js","./chunk.2KCDLCB2.js","./chunk.UD7VLXPM.js","./chunk.3DEWQDP7.js","./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.R66ZVMWB.js"))),vo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.4YAO3A5Q.js","./chunk.4DXPPM6T.js","./chunk.DLSS56EU.js","./chunk.7WPVLEX2.js","./chunk.Q355UPFG.js","./chunk.DGDW54KE.js","./chunk.LMTG5NPG.js","./chunk.YBQ5GVAX.js","./chunk.EB7PZJEO.js","./chunk.42KHFGN6.js","./chunk.RQG672MJ.js","./chunk.Q6H5HESF.js","./chunk.3JMQKANL.js","./chunk.42C3FIKK.js","./chunk.2ME4DVBI.js","./chunk.XXCHO2A5.js","./chunk.SADR3MQI.js","./chunk.MB7LKKUD.js","./chunk.ODYJEDIW.js","./chunk.IPGLITWA.js","./chunk.LFFJB6D3.js","./chunk.DMZRFXH7.js","./chunk.DZ6UDZOB.js","./chunk.O5FTWXA2.js","./chunk.Q4VFLLUT.js","./chunk.6ZENHSTQ.js","./chunk.CNN32262.js","./chunk.BJUUSIQY.js","./chunk.N5Z34V7U.js","./chunk.LOKGUALC.js","./chunk.XOZU4OFA.js","./chunk.EP5JS7ZH.js","./chunk.WVUJXDXZ.js","./chunk.L7XKYGV7.js","./chunk.CE3NKAF7.js","./chunk.R3GE37OI.js","./chunk.2KCDLCB2.js","./chunk.UD7VLXPM.js","./chunk.3DEWQDP7.js","./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MBTEOF4R.js"))),$r=ht(()=>Yt(Vr().then(t=>t.SceneFace)),{what:"This view"}),Ir=ht(()=>Vr().then(t=>t.SceneKeeping),{quiet:!0}),_r=ht(()=>Yt(wo().then(t=>t.PagesContent)),{what:"This page"}),Wr=ht(()=>Yt(vo().then(t=>t.PictureFace)),{what:"This picture"}),bo=$r.Face,So=Ir.Face,Ao=_r.Face,Po=Wr.Face;jt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.EGVM24ND.js","./chunk.CEQQIW7Z.js","./chunk.CGBOPPNL.js","./chunk.LMTG5NPG.js","./chunk.32SHA3EY.js","./chunk.GG47EIKO.js","./chunk.NYLKG25K.js","./chunk.PLIV3IQK.js","./chunk.MK5RPEB2.js","./chunk.TOUSIUJF.js","./chunk.QDVGHI7R.js","./chunk.KUCBNMIY.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.BHJRT57H.js","./chunk.CNN32262.js","./chunk.EGSOHTZZ.js","./chunk.HWFJQ42Y.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.IT5DVKXY.js"))));function He(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(Dr));return Promise.all([...[...o].map(i=>i.fetch()),tr()]).then(()=>{},()=>{})}var Dr=t=>t==="pages"?[_r]:t==="picture"?[Wr]:[$r,Ir],jr=t=>Dr(t).every(r=>r.here()),Ro=150,Kt=0;function Mr(t,r){if(jr(t))return r();let o=++Kt,i=()=>{o===Kt&&(Kt+=1,r())};He(t).then(i),setTimeout(i,Ro)}var Eo=768;function ko(t,r){let o=r!==null&&r>=Eo;(0,d.useEffect)(()=>{if(!o||t==="picture")return;let i=t==="pages"?"scene":"pages";if(jr(i))return;let l=globalThis,p=()=>void He(i),c=()=>{},b=Jn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(p,{timeout:4e3});c=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(p,1500);c=()=>clearTimeout(h)}});return()=>(b(),c())},[t,o])}function To({asked:t,shown:r,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function xo({auto:t,scene:r}){return(0,w.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Fo=Vt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,w.jsx)(t.StudioPlace,{...r}),{quiet:!0});function qr(t,r,o,i,l){return Wt(t,lr(r?lt(r):l??Mn,i),o)}function Qt(t){return t&<(t).overview?"graview":"scene"}function Hr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function zr(t){let[,r]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>r(!0),[]),i=(0,d.useRef)(!1);return t.at&&!yt?(0,w.jsx)(qt,{onReady:o,fetch:Zt}):!i.current&&pr(t.draftView)?(0,w.jsx)(qt,{onReady:o,fetch:fr}):(i.current=!0,(0,w.jsx)(Oo,{...t}))}function Oo(t){let{app:r,stop:o,bar:i=!0,standing:l="Everything is in order",principal:p,heading:c=2}=t,{rootRef:b,scope:h,css:k,scheme:O,store:I,presence:S,brand:T,auto:x,height:C}=vr(t),re=mr(t.draftView),E=gr(t,ir,re.over),[de]=(0,d.useState)(qn),u=t.basePath===void 0?{}:{basePath:t.basePath},[V]=(0,d.useState)($t),$=t.notices??V,z=g=>Lt(g,u),ae={...t.routing?{routing:t.routing}:{},...u},[ie]=(0,d.useState)(()=>{let g=t.at?.face;if(g)return g;let Z=o===void 0&&Hr(r,E)?"pages":Qt(o),J=_t({...ae,face:Z});return t.face===void 0&&t.onOpening?.(J),J}),[ve,H]=(0,d.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&sr(ae)&&Hr(r,E)),be=(0,d.useRef)(t.onFace);be.current=t.onFace,(0,d.useLayoutEffect)(()=>{ve&&(be.current?.("pages"),H(!1))},[ve]);let P=ve?"pages":t.face??ie,R=r.schema.kinds,N=t.routing==="address",Se=(0,d.useMemo)(()=>t.at?yt.settleAt(t,I.seenBy(p??{kind:"human"}),E.places()):void 0,[]),L=(0,d.useMemo)(()=>_n(E,r.schema),[E,r.schema]),pe=(0,d.useMemo)(()=>{let g=Se?.stop??(N?cr(t.basePath):void 0)??o;return P==="scene"&&g===void 0&&L===void 0&&(t.path===void 0||Jt(t.path))?Dt(void 0):qr(P,g,R,E.places(),L)},[]),[_]=(0,d.useState)(P);(0,d.useEffect)(()=>{_!=="pages"&&In(E)},[_,E]);let B=(0,d.useRef)(void 0),j=g=>g===void 0||Jt(g)?"/":g;B.current??={path:j(Se?.path??(N?P==="pages"?(Bt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==B.current.asked&&(B.current={path:j(t.path),asked:t.path});let X=(0,d.useRef)(t.onNavigate);X.current=t.onNavigate;let Fe=(0,d.useCallback)((g,Z)=>{B.current.path=g,X.current?.(g,Z)},[]),{at:me,setAt:D,steering:G,steer:oe}=Tr(B.current.path),M=(0,d.useContext)(Gr);M&&(M.pages=()=>B.current.path);let[Ne]=(0,d.useState)(()=>({})),Y=M??Ne,se=(0,d.useMemo)(()=>Zn($),[$]),q=(0,d.useRef)(void 0),Ae=(0,d.useCallback)(g=>void(B.current.path=g),[]),U=Qn(b),[Oe,Pe]=(0,d.useState)(!1),Ve=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview")&&!Oe,v=Ve?"pages":P,he=(0,d.useRef)(!1);he.current=Oe&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview"),M&&(M.shown=v);let Ce=(0,d.useRef)(P==="graview"?"graview":"scene");(v==="scene"||v==="graview")&&(Ce.current=v),(0,d.useState)(()=>{if(!N||typeof window>"u"||v==="pages"||v==="picture")return;let{pathname:g,search:Z,hash:J}=window.location;Bt(g,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Z}${J}`)}),wr(b,v,t.onIntrinsicHeight),ko(v,U);let ee=xr(t.onError,v),Le=Fr(t.onReady,v),Re=(0,d.useRef)(t.onFaceDrawn);Re.current=t.onFaceDrawn;let Ze=(0,d.useCallback)((g,Z)=>{Le(Z),Re.current?.(g)},[Le]),[$e,St]=(0,d.useState)(null),Xe=E.places(),Ie=(0,d.useRef)({shown:v,onFace:t.onFace});Ie.current={shown:v,onFace:t.onFace};let W=(0,d.useCallback)((g,Z,J)=>{if(N){q.current?.(g,Z,J);return}Ie.current.onFace?.(g),X.current?.(g==="pages"?Z??B.current.path:Te,"push")},[N]),[ye,K]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v==="pages"&&K(void 0)},[v]);let _e=(0,d.useRef)(o);(0,d.useEffect)(()=>{_e.current!==o&&(_e.current=o,K(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){if(Pe(!0),K(g),P==="scene"||P==="graview"){Mr(P,()=>{N?window.history.pushState(null,"",`${z(Te)}${g??""}`):X.current?.(Te,"push")});return}Mr(Ce.current,()=>W(Ce.current,void 0,g))}},[N,P,t.basePath,W]),Be=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){G.go.current||(B.current.path=g),oe(g);return}if(B.current.path=g,D(g),he.current){Pe(!1),N?window.history.pushState(null,"",z(g)):X.current?.(g,"push");return}W("pages",g)},[G,oe,D,W,N,t.basePath]),Ke=E.arrangement?.(),le=v==="pages",ke=t.hrefOf,We=ke??(N?z:void 0),Q=(0,d.useMemo)(()=>({open:Be,...ke?{href:ke}:N?{href:g=>Lt(g,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[Be,N,t.basePath,ke]);return(0,w.jsxs)("section",{ref:b,className:h,"aria-label":t.label??r.name,"data-graview-embed":v,"data-graview-scheme":O,...Ve?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:C,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,w.jsx)("style",{children:k}),(0,w.jsxs)(Yn.Provider,{value:ee,children:[(0,w.jsx)(br,{rootRef:b,board:$,onReport:t.onReport,where:()=>v==="pages"?Sr(me):v==="picture"?{place:"picture"}:Xn(Y.view?.focusId)}),(0,w.jsx)(yr,{rootRef:b,firstLook:t.firstLook,app:rr(T??{name:r.name},r.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:ee,content:!0,children:(0,w.jsx)(jn.Provider,{value:de,children:(0,w.jsx)($n,{store:I,views:E,initialView:pe,scheme:O,...Ar(t,S,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,w.jsxs)(er.Provider,{value:se,children:[(0,w.jsx)(Mo,{face:v,stop:ye??o,kinds:R,places:Xe,opens:L}),(0,w.jsx)(Co,{into:Y}),(0,w.jsx)(Lo,{rootRef:b,face:P,shown:v,path:me,stop:o,draft:re.n,onDrawn:t.onDrawn,parts:de}),N?(0,w.jsx)(dr,{pagesWere:Se?.path,basePath:t.basePath,shown:v,onFace:t.onFace,toggle:q,kinds:R,places:Xe,opens:L,landed:Ae}):null,i&&v!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:ee,children:(0,w.jsx)(Pr,{name:T?.name??r.name,heading:c,named:zt(i).name!==!1,faces:zt(i).faces===!1?void 0:{scene:{label:On(Ke),current:!le,go:()=>Ee(),reach:()=>void He(Ce.current)},pages:{label:Cn(Ke),current:le,go:()=>Be(B.current.path),reach:()=>void He("pages")}},at:le?me:null,without:t.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>Be("/"),current:le&&me.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:g=>Be(g.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:le?void 0:(0,w.jsx)(Ho,{app:r,studio:t.studio,report:ee}),onFind:St})}):null,(0,w.jsx)(nr.Provider,{value:$e,children:(0,w.jsx)(Ye,{module:v==="pages"||v==="picture"?"@graview/pages":"@graview/react",report:ee,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(xo,{auto:x,scene:v!=="pages"&&v!=="picture"}),children:[v==="picture"?(0,w.jsx)(Po,{scope:h,store:I,views:E,as:(o?lt(o).within?.view:void 0)??""}):v==="pages"?(0,w.jsx)(Ao,{store:I,views:E,presence:S,auto:x,brand:T,steering:G,overview:Ee,scope:h,titleLevel:kr(c),quickAsk:It(t.quickAsk),props:{...t,onNavigate:Fe,...N?{}:{path:B.current.path}}}):(0,w.jsx)(Wn.Provider,{value:Q,children:(0,w.jsx)(bo,{address:N,auto:x,scheme:O,scope:h,quickAsk:It(t.quickAsk)})}),(0,w.jsx)(To,{asked:P,shown:v,onDrawn:Ze})]})},v)})]})})})})]})]})}var Jt=t=>t.split(/[?#]/)[0]===Te,Gr=(0,d.createContext)(null);function Co({into:t}){return t.view=ut().view,null}function Lo({rootRef:t,face:r,shown:o,path:i,stop:l,draft:p,onDrawn:c,parts:b}){let{view:h}=ut(),k=o==="scene"||o==="graview",O=dt(h),{pan:I,...S}=h,T=h.pan?dt(S):O,x={face:r,path:k?Te:o==="picture"?l??"#":i,stop:O};return Br(t,`${o} ${k?T:x.path} ${p}`,x,c,b),null}var yt,Bo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.ENLIIZF2.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6IR5LBJU.js"))),Zt=()=>Bo().then(t=>void(yt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Zt));function Mo({face:t,stop:r,kinds:o,places:i,opens:l}){let{view:p,go:c}=ut(),b=(0,d.useRef)({face:t,stop:r});return(0,d.useLayoutEffect)(()=>{let h=b.current.stop!==r,k=b.current.face!==t,O=b.current.face==="pages";if(b.current={face:t,stop:r},!h&&!k||t==="pages"||t==="picture")return;let I=(h||O)&&r!==void 0?qr(t,r,o,i):O&&ur(p)?Wt(t,Dt(l),o):t==="graview"?Nt(p,!0):p.overview?Hn(Nt(p,!1),or(p,o)):p;c(I)},[t,r,o,p,c,l]),null}function Ho({app:t,studio:r,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(So,{})}),r!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(No,{app:t,studio:r})}):null]})}function No({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},i=r?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Fo,{...o})})}function Vo({path:t,stop:r,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Xt(t,r){let o=r.store??r.remote?.store??hr(r.app,r.seed),i=r.notices??$t(),l=null,p={},c=0,b=r.label,h=r.app,k=Promise.resolve(),O=r.at?.face??r.face,I=O===void 0?void 0:_t({...r,face:O}),S=I??Qt(r.stop),T=null,x=[],C=u=>{if(T=u,u!==S)return;let V=x;x=[];for(let $ of V)$()};function re(){let[u,V]=(0,d.useState)(I),[$,z]=(0,d.useState)(r.stop),[ae,ie]=(0,d.useState)(r.path),[ve,H]=(0,d.useState)(r.scheme??"auto"),[be,P]=(0,d.useState)(r.principal),[R,N]=(0,d.useState)(r.seats),[Se,L]=(0,d.useState)(r.quickAsk),[pe,_]=(0,d.useState)(r.people),[B,j]=(0,d.useState)(r.hostContext),[X,Fe]=(0,d.useState)(r.brand),[me,D]=(0,d.useState)(r.whileAway),[G,oe]=(0,d.useState)(r.label),[M,Ne]=(0,d.useState)(r.hostActions),[Y,se]=(0,d.useState)(r.barActions),[q,Ae]=(0,d.useState)(()=>Rr(r)),[U,Oe]=(0,d.useState)(void 0),[Pe,Ve]=(0,d.useState)(r.draftView);return l={app:v=>{Oe(v),ie(void 0),z(void 0)},face:V,stop:z,path:ie,scheme:H,seat:P,seats:N,quickAsk:L,people:_,hostContext:j,brand:Fe,whileAway:D,label:oe,hostActions:Ne,barActions:se,hostBar:v=>Ae(he=>({...he,...v})),draft:Ve},(0,w.jsx)(Gr.Provider,{value:p,children:(0,w.jsx)(zr,{...U?Vo(r,U):r,store:o,notices:i,...u!==void 0?{face:u}:{},onOpening:v=>{S=v},...$!==void 0?{stop:$}:{},...ae!==void 0?{path:ae}:{},...be?{principal:be}:{},...R?{seats:R}:{},...Se!==void 0?{quickAsk:Se}:{},...pe?{people:pe}:{},...B?{hostContext:B}:{},...X?{brand:X}:{},whileAway:me,label:G,hostActions:M,barActions:Y,...Er(q),draftView:Pe,scheme:ve,onFace:v=>{S=v,V(v)},onSeat:P,onFaceDrawn:C},U?.n??0)})}let E=()=>{let u=p.view?.focusId,V=u?o.graph.getNode(u)?.kind:void 0,$=(p.shown??S)==="scene"||(p.shown??S)==="graview";return{face:S,path:$?Te:p.pages?.()??r.path??"/",stop:p.view?dt(p.view):r.stop??"#",...V?{kind:V}:{}}},de=(0,Nr.createRoot)(t);return(0,F.flushSync)(()=>de.render((0,w.jsx)(re,{}))),{get store(){return o},where:E,setApp:(u,V,$)=>{let z="graph"in V?{store:V}:V,ae=()=>{let ie=E();o=z.store,b=$?.label??(b===h.name?u.name:b),h=u,(0,F.flushSync)(()=>{l?.label(b),l?.app({app:u,remote:z,at:ie,n:++c})})};yt?ae():k=k.then(Zt).then(ae)},setFace:u=>{S=u,(0,F.flushSync)(()=>l?.face(u))},setStop:u=>(0,F.flushSync)(()=>l?.stop(u)),setPath:u=>(0,F.flushSync)(()=>{if(Jt(u)){(S==="pages"||S==="picture")&&(S="scene",l?.face("scene"));return}l?.path(u),S!=="pages"&&(S="pages",l?.face("pages"))}),setScheme:u=>(0,F.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,F.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,F.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,F.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,F.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,F.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,F.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,F.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,F.flushSync)(()=>l?.draft(u)),setLabel:u=>{b=u,(0,F.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,F.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,F.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,F.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,F.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,F.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,F.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,F.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>k.then(()=>T===S?void 0:new Promise(u=>x.push(u))),notify:u=>{let V;return(0,F.flushSync)(()=>{V=i.notify(u)}),V},unmount:()=>de.unmount()}}var gt=t=>`s${(t+1).toString(36)}`;var we={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function wt(t,r={}){try{let o=new URL(t),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Ur="/graview/friction";var Kr="/graview/live",en="graview.ship",tn=`${en}.${it}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},xe=t=>t?.lineage?{lineage:t.lineage}:{},$o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
|
|
2
|
-
`)[0]??"":String(r)})`;function Io(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},_o={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},fe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},Wo=new Set([502,503,504]);async function Do(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function jo(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var qo=1,zo=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function vt(t){return(await Jr(t,Io(t.carry),"This app was updated while your changes were on the way.",zo())).remote}async function Jr(t,r,o,i){let{key:l,...p}=wt(t.url,t.headers),c={...t,...p},b=c.fetch??fetch,h={"content-type":"application/json",...c.headers??{}},k={...bt(c.principal),[we.via]:c.via??"web"};Object.assign(h,k);let O=c.live===!0,I=c.presenceEveryMs,S=c.visible??Ko,T="connecting",x=i.statuses,C=i.tally,re=[],E,de=[],u=()=>T==="online"&&E!==void 0?"held":T,V=()=>{let e=u();if(i.told!==e){i.told=e;for(let n of[...x])n(e)}},$=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&C.reconnects++,T=e,V(),e==="online"))for(let n of re.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,s=n!==E;if(E=n,ae(),!!s&&(V(),n===void 0)){for(let a of de.splice(0))a();te&&clearTimeout(te),sn()}},ae=()=>{if(i.toldHeld!==E){i.toldHeld=E;for(let e of[...i.helds])e(E??null)}},ie=async(e,n)=>{let s;try{s=await b(e,n)}catch(a){throw Q()||$("offline"),new Qe(a instanceof Error?a.message:String(a))}if(s.status===503&&await Do(s))return $("online"),s;if(Wo.has(s.status))throw Q()||$("offline"),new Qe(`The server is away (${s.status})`);return $("online"),s},ve=async(e=!1)=>{let n=`${c.url}/graview/state?opFormat=${qe.op}`,s=e?await b(n,{headers:h}):await ie(n,{headers:h});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await ve(!0);O||(T="online"),E=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ae();let be=H.enabledModules??c.enabledModules,P=c.localApp?c.localApp(c.app):c.app,R=new Fn({schema:P.schema,mutations:P.mutations??[],invariants:P.invariants??[],...P.policy?{policy:P.policy}:{},...P.publishing?{publishing:P.publishing}:{},...P.tidying?{tidying:P.tidying}:{},...P.modules?{modules:P.modules}:{},...be?{enabledModules:be}:{},...P.intelligence?{intelligence:P.intelligence}:{},...P.brand?.timeZone?{timeZone:P.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:jo(),...c.storeOptions??{}});Pn.served.add(R);let N=c.friction!==!1&&c.principal?.kind!=="visitor";N&&En(R,e=>{N&&b(`${c.url}${Ur}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(N=n.status!==404&&n.status!==410),()=>{})});let Se=Tn(R),L=H.log.at(-1)?.seq??(H.horizon??0)-1,pe=Ct.of(H.log,{horizon:H.horizon??0}),_=null,B,j=new Map,X=i.who,Fe=!1,me=e=>{if(ce)return;Fe=!0;let n=Ln(new Map,e,Date.now(),Mt,_?.participant);B!==void 0&&n.delete(B);let s=n.size!==j.size;if(!s)for(let[a,f]of n)Ht(f,j.get(a))||(s=!0);if(j=n,!!s)for(let a of[...X])a([...j.values()])},D=[],G=new Set,oe=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},M=new Map,Ne=(e,n)=>{let s=M.get(e);s&&(M.delete(e),s.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,se=[],q=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return se.push({ops:e,drop:n}),[];let s=Math.min(...e.filter(m=>m.seq>L).map(m=>m.seq));if(Number.isFinite(s)&&s>L+1)return se.push({ops:e,drop:n}),Ae(),[];let a=D.filter(m=>e.some(ne=>ne.batch===m)),f=[...new Set([...n,...a])].filter(m=>G.has(m)),y,A=D.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(m){if(!(m instanceof xn))throw m;return se.push({ops:e,drop:n}),Ae(),[]}for(let m of a)oe(m);e.some(m=>m.seq>L)&&A.some(m=>!f.includes(m))&&C.rebases++,e.length>0&&(L=Math.max(L,...e.map(m=>m.seq)),pe.note(e));for(let m of f)G.delete(m);for(let m of a)Ne(m,e);return y},Ae=()=>{Y||(Y=Re(ve().then(e=>{if(U(e)){se=[];return}let n=new Set(e.log.map(f=>f.batch)),s=D.filter(f=>n.has(f));for(let f of s)oe(f);let a=R.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);L=e.log.at(-1)?.seq??(e.horizon??0)-1,pe=Ct.of(e.log,{horizon:e.horizon??0}),C.resyncs++;for(let f of s)Ne(f,e.log)}).then(()=>{Y=void 0;let e=se;se=[];for(let{ops:n,drop:s}of e)q(n,s)},()=>{Y=void 0,se=[]})))},U=e=>(typeof e.build=="string"&&dn(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===H.version?!1:(Rt(e.version),!0)),Oe=async e=>{let s=await(await ie(`${c.url}/graview/since?seq=${gt(e)}&opFormat=${qe.op}`,{headers:h})).json();return U(s)?[]:s.reset===!0?(Ae(),[]):s.ops??[]},Pe=async()=>{let e=await Ve();return Y&&await Y,e},Ve=async()=>{if(_&&!Q()&&S()){let n=await(await ie(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:_,seq:gt(L)})})).json();return U(n)?[]:(typeof n.participant=="string"&&(B=n.participant),me(n.who??[]),q(n.ops??[]))}return q(await Oe(L))},v=new Map,he=new Map,Ce=new Set,ee=new Map,Le=new Set,Re=e=>(Le.add(e),e.finally(()=>Le.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),$e=0,St=(e,n)=>{let s=Ze.then(()=>Ie(e,n));return Ze=s.catch(()=>{}),s},Xe=()=>new Promise((e,n)=>re.push({again:e,give:n})),Ie=async(e,n)=>{let s,a;for(;;){try{s=await ie(`${c.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:qe.op})})}catch(m){if(!(m instanceof Qe)||K)throw m;if(await Xe(),Q())return et(e,n);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!K){if(typeof a.version=="number"?U(a):(z(a.held),!1))break;if(E!==void 0&&(xt>0||O)){if(await new Promise(m=>de.push(m)),K)throw new Ge("The client closed.");if(Q())return et(e,n);continue}}let A;if(s.status===503&&a.reason==="unavailable"&&!K)A=nn(c.backoff,$e++);else{if($e=0,s.status!==429||K)break;A=Go(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,A)),Q())return et(e,n)}if(ce||U(a))throw new Ge("The app was changed.");if(!s.ok){let A=a.error??`The server refused (${s.status})`;throw a.conflict?new fe(A,a.conflicts??[]):new Ue({reason:a.reason??_o[s.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>L+1&&(f=await Oe(L)),n!==void 0&&(a.batch&&v.set(n,a.batch),oe(n)),q(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ye=!1,K=!1,_e=0,Ee,Be=0,Ke=0,le=null,ke=()=>{},We=new Promise(e=>{ke=e}),Q=()=>O&&ye&&W?.readyState===qo,g=e=>{if(!Q())return!1;try{return W.send(JSON.stringify(e)),!0}catch{return!1}},Z=(e=!1)=>{!_||!Q()||!S()||!e&&le&&Ht(_,le)&&(I===void 0||Date.now()-Ke<I)||g({t:"here",presence:_})&&(le=_,Ke=Date.now())},J=new Set,te,sn=()=>{if(te=void 0,E!==void 0)return;let e=[...M.entries()].filter(([n])=>J.has(n));J.clear();for(let[,n]of e)g(n.message)},cn=(e,n)=>{M.has(e)&&(J.add(e),te&&clearTimeout(te),te=setTimeout(sn,Math.max(0,n)))},Zr=e=>{M.has(e)&&J.add(e)},et=(e,n)=>new Promise((s,a)=>{let f=n??`send-${++Be}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...xe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...xe(e)};if(M.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:s,reject:a}),J.size>0||E!==void 0){J.add(f);return}g(y)}),tt=(e,n)=>Q()?et(e,n):St(e,n),Xr=e=>{switch(e.t){case"welcome":{if(dn(e.build),typeof e.version=="number"&&e.version!==H.version){Rt(e.version);return}if(ye=!0,_e=0,typeof e.participant=="string"&&(B=e.participant),z(e.held),e.state?Ae():q(e.ops??[]),J.clear(),te&&clearTimeout(te),te=void 0,E!==void 0)for(let n of M.keys())J.add(n);else for(let n of M.values())g(n.message);Z(!0),$("online"),ke();return}case"ops":q(e.ops??[]);return;case"ack":{let n=M.get(e.cid);if(!n){q(e.ops??[]);return}M.delete(e.cid),$e=0,n.mine!==void 0&&(v.set(n.mine,e.batch),oe(n.mine)),q(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=M.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){E!==void 0?Zr(e.cid):cn(e.cid,nn(c.backoff,$e++));return}M.delete(e.cid),n.reject(e.t==="conflict"?new fe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":me(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==H.version&&Rt(e.version);return;case"reload":pn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&W){let n=W;hn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=i.declarations,Pt=i.builds,dn=e=>{if(!(ce||i.otherBuild!==void 0||!c.build||typeof e!="string"||e.length===0||e===c.build)){i.otherBuild=e;for(let n of[...Pt])n(e)}},ln=()=>{let e=[],n=0;for(let s of D){let a=ee.get(s);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):n++}return{carried:e,undos:n}},un=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,fn=e=>{ce=!0,_=null;let n=new Ge(e);for(let a of M.values())a.reject(n);M.clear(),ot&&clearInterval(ot),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let a of re.splice(0))a.give(n);for(let a of de.splice(0))a();let s=W;W=void 0,ye=!1;try{s?.close(1e3,e)}catch{}ke()};async function Rt(e){if(ce)return;if(!c.resolveApp){pn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:s}=ln(),a=c.resolveApp,f=_;fn("The app was changed.");try{let y=await a(e),{state:A,...m}=c,ne=await Jr({...m,app:y},n,"The app was changed while your changes were on the way.",i);f&&ne.remote.presence.here(f);for(let at of[...At])at(ne.remote,e);let ue=[...s>0?[nt(un(s,"The app was changed"))]:[],...ne.unheard()];for(let at of ue)for(let so of De)so(at.sentence,at)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let m of De)m(A,nt(A))}}function pn(e){if(ce)return;let{carried:n,undos:s}=ln();fn(e);let a=!1;if(c.carry&&n.length>0)try{c.carry.storage.setItem(c.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(un(s,"This app was updated"));for(let y of f)for(let A of De)A(y,nt(y));(c.reloadPage??Uo)()}let mn=()=>{if(K||!O)return;let e=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Kr}`,{"content-type":n,...s}=h,a;try{a=c.socket?c.socket(e,s,[tn]):io(e,s)}catch{return yn()}W=a,ye=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:gt(L),protocol:it,wire:en,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(W!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}Xr(y)},a.onclose=()=>hn(a),a.onerror=()=>{}},ge,eo=()=>{Fe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Fe||K)return;let e=new Map([...j].filter(([,n])=>n.held!=="socket"));if(e.size!==j.size){j=e;for(let n of X)n([...j.values()])}},Mt),ge.unref?.()};function hn(e){if(W!==e)return;let n=ye;W=void 0,ye=!1,le=null,n&&($("offline"),eo()),yn()}let yn=()=>{if(K)return;let e=nn(c.backoff,_e);_e++,Ee=setTimeout(mn,e)},gn=R.applyAll.bind(R),to=R.undo.bind(R),no=R.previewAll.bind(R);R.previewAll=(e,n)=>no(e,{...c.principal?{author:c.principal}:{},...n});let De=i.refusals,Je=[],nt=e=>({reason:"invalid",sentence:e}),rt=i.conflicts,Et=!1,wn,kt=async(e,n)=>{if(n instanceof Ge||ce)return;let s=n instanceof Ue?n.refusal:An(n),a=s.sentence,f=n instanceof fe?wn?.yoursOf(R,ee.get(e)?.calls??[]):void 0;oe(e);try{q([],[e])}catch{}let y=ee.get(e);ee.delete(e);let A=y?.calls[0];if(A&&!(n instanceof fe)){let m=R.allMutations().find(ue=>ue.name===A.name)?.subject?.arg,ne=m&&R.graph.getNode(A.args[m])?.kind;kn(R,{type:"refused",act:A.name,code:s.reason,...ne?{kind:ne}:{}},c.principal)}if(n instanceof fe&&C.conflicts++,n instanceof fe&&!Q()&&await Pe().catch(()=>[]),n instanceof fe&&Y&&await Y,n instanceof fe&&rt.size>0){let m=!1,ne={sentence:a,conflicts:f?n.conflicts.map(ue=>ue.node===f.node&&ue.field===f.field?{...ue,yours:f.yours}:ue):n.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Et=!0;try{R.applyAll(f?[f.over(L)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Et=!1}}}};for(let ue of rt)ue(ne);return}for(let m of De)m(a,s)},ro=(e,n)=>e.flatMap(s=>s.mutation?.name===Sn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:L}]:[]));R.applyAll=(e,n)=>{let s=Rn(R.log.all().filter(A=>G.has(A.batch))),a=gn(e,{...c.principal?{author:c.principal}:{},...n}),f=e.map((A,m)=>{let ne=a.minted?.[m];return ne===void 0||A.args?.id!==void 0?A:{...A,mintedHint:ne}});D.push(a.batch),G.add(a.batch),ee.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...xe(n)});let y=Et?[]:[...pe.baseFor(a.ops,s,(A,m)=>R.collaborative(A,m)),...ro(a.ops,s)];return he.set(a.batch,Re(tt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...xe(n)},a.batch).catch(A=>kt(a.batch,A)))),a},R.apply=(e,n)=>R.applyAll([e],n),R.undo=(e,n)=>{let s=typeof e=="string"?[e]:e,a=to(s.map(y=>v.get(y)??y),{...c.principal?{author:c.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>he.get(y)));return he.set(a.batch,Re(f.then(()=>{let y=s.filter(A=>!Ce.has(A));if(y.length===0){oe(a.batch),ee.delete(a.batch),q([],[a.batch]);return}return tt({undo:y.map(A=>v.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...xe(n)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let oo=async(e,n={})=>{Tt++;try{return(await Re(tt({calls:e,...n}))).ops}finally{Tt--}},Tt=0,vn={here(e){_=e,Z()},onWho(e){return X.add(e),j.size>0&&e([...j.values()]),()=>{X.delete(e)}},leave(){if(!_)return;let e=JSON.stringify({participant:B??_.participant});if(_=null,g({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):b(`${c.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},xt=c.pollMs??800,ot=xt>0&&typeof setInterval=="function"?setInterval(()=>{Q()||Pe().catch(()=>{})},xt):null;if(O){mn();let e;await Promise.race([We,new Promise(n=>e=setTimeout(n,c.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(R.log.all().map(s=>s.batch));for(let s of r)if(!(s.batch!==void 0&&n.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){e.push($o(s,a))}e.length>0&&Je.push(nt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let bn=new Map,ao=()=>({store:R,author:c.principal,appliedAll:gn,pending:D,provisional:G,asked:ee,answers:he,letGo:Ce,sent:(e,n)=>Re(tt({calls:n,batch:e},e).catch(s=>kt(e,s))),settle:oe,land:q,seen:()=>L,gone:()=>K||ce});return{remote:{store:R,typing(e,n){let s=`${e}\0${n}`,a=bn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.WV45KLXC.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.WC5WE34A.js")).then(f=>(wn=f,f.typingOf(e,n,f.wireOf(ao())))),bn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:oo,pull:Pe,onRefusal(e){De.add(e);let n=Je;Je=[];for(let s of n)e(s.sentence,s);return()=>De.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Pt.add(e),i.otherBuild!==void 0&&e(i.otherBuild),()=>Pt.delete(e)},onConflict(e){return rt.add(e),()=>rt.delete(e)},revision:(e,n)=>pe.of(e,n),seq:()=>L,participant:()=>B,transport:()=>Q()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>E,onHeld(e){return i.helds.add(e),E!==void 0&&e(E),()=>i.helds.delete(e)},counters:()=>({...C}),who:()=>[...j.values()],pending:()=>D.length+Tt,async settled(){for(;Le.size>0;)await Promise.allSettled([...Le])},presence:vn,close(){ot&&clearInterval(ot),Se(),vn.leave(),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let n of re.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of de.splice(0))n();let e=W;W=void 0,ye=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function io(e,n){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[tn]:[];if(!a)try{return new s(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,m]of Object.entries(k))y.searchParams.set(A,m);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Go(t,r,o=Date.now()){let i,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let b=Date.parse(l);Number.isFinite(b)&&(i=Math.max(0,b-o))}let p=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,c=p!==void 0&&p<50&&i!==void 0&&Math.abs(p*1e3-i)<1e3;return p!==void 0&&!c?p:i??1e3}function Uo(){globalThis.location?.reload?.()}function Ko(){return globalThis.document?.visibilityState!=="hidden"}function nn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:i=1e4,factor:l=2}=t??{};return Math.min(i,o*l**r)*(.75+Math.random()*.5)}function bt(t){let r={};if(!t)return r;t.id&&(r[we.seat]=t.id),t.roles?.length&&(r[we.roles]=t.roles.join(",")),t.kind!=="human"&&(r[we.kind]=t.kind),t.name&&(r[we.name]=encodeURIComponent(t.name));let o=t.onBehalfOf;return o?.id&&(r[we.for]=o.id),o?.roles?.length&&(r[we.forRoles]=o.roles.join(",")),o?.name&&(r[we.forName]=encodeURIComponent(o.name)),r}var Yr="/graview/views";function rn(t){let r=t.fetch??fetch,o=wt(t.url,t.headers),i=o.url,l={"content-type":"application/json",...t.principal?bt(t.principal):{},...o.headers},p=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??st.may}:st,c=new Set,b=S=>{if(JSON.stringify(S)!==JSON.stringify(p)){p=S;for(let T of c)T()}},h=async(S,T)=>{let x=await r(`${i}${t.path??Yr}`,{method:S,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),C=await x.json();if(!x.ok)throw new Error(C.error??`The store answered ${x.status}.`);b({hidden:C.hidden??[],removed:C.removed??[],may:C.may??st.may})},k=()=>h("GET"),O=t.state?Promise.resolve():k().catch(()=>{}),I=t.pollMs?setInterval(()=>void k().catch(()=>{}),t.pollMs):void 0;return{ready:O,refresh:k,close:()=>clearInterval(I),current:()=>p,onChange(S){return c.add(S),()=>void c.delete(S)},hide:S=>h("POST",{hide:S}),show:S=>h("POST",{show:S}),remove:(S,T)=>h("POST",{remove:S,...T?{about:T}:{}}),async restore(S){let T=p.removed.find(x=>x.name===S)?.lens;await h("POST",{restore:S}),T&&await t.onDeclaration?.()},async lens(S){await h("POST",{lens:S}),await t.onDeclaration?.()}}}var an=document.getElementById("graview-app"),on=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Qr=on?(__graviewPreload(import.meta.url,["./chunk.4DXPPM6T.js","./chunk.6ZENHSTQ.js","./chunk.XOZU4OFA.js","./chunk.EP5JS7ZH.js","./chunk.IXMIU4D4.js","./chunk.JV432T4Q.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MPWLDQOG.js")):He("pages");try{on?await Jo(decodeURIComponent(on[1])):await Yo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),an.replaceChildren(r),window.__graviewFailed=r.textContent}async function Jo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let i=await ft(o);if(!i.ok)throw new Error(ct(i.findings));let l=i.app,p=o.principal,c=await vt({app:l,url:location.origin,principal:p,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:b}=await Qr;window.__graview=b(an,{app:l,form:t,principal:p,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Yo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),i=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let k=await ft(h);if(!k.ok)throw new Error(ct(k.findings));return k.app})(r);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,p=await vt({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,b=rn({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let k=await ft(h);k.ok&&c?.setApp(k.app,p)}});await Promise.all([Qr,b.ready]),c=Xt(an,{app:i,remote:p,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:b,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=c,c.drawn().then(()=>{window.__graviewReady=!0})}
|
|
1
|
+
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as _t,b as sr,c as cr,d as dr,e as lr,f as Wt,g as ur,h as Dt}from"./chunk.VXPEXUQF.js";import{a as lo}from"./chunk.PZ3KM3TY.js";import{a as fr,b as pr,c as qt,d as mr,e as zt,f as yr,g as gr,h as wr,i as Gt,j as vr,k as br,l as Sr,m as Ar,n as Pr,o as Rr,p as Er,q as kr,r as Tr,s as xr,t as Fr,u as Ye}from"./chunk.NSAGOOJW.js";import{b as hr}from"./chunk.CA2SYEYE.js";import{c as jt}from"./chunk.6ZFYFT5A.js";import{a as Ft}from"./chunk.Q5WEOX3Q.js";import{b as Ot,i as Bn}from"./chunk.SAWASNDO.js";import{k as ct}from"./chunk.TLPCYKLW.js";import{C as It,F as rr,K as or,O as ar,P as ir,k as Qn,n as Zn,o as Xn,p as $t,q as er,s as tr,w as nr}from"./chunk.NLZHNPDU.js";import{c as co}from"./chunk.QNC2OKLF.js";import{Ba as Dn,Ca as jn,Da as qn,Ea as zn,Fa as Gn,G as Nn,Ha as Un,Ia as Kn,Ka as Jn,La as Vt,Oa as Yn,Ra as ut,W as Vn,a as Mn,aa as $n,b as dt,c as lt,j as Hn,ja as In,ka as _n,m as Nt,ma as Wn}from"./chunk.FWXW4T4I.js";import{a as Me}from"./chunk.SDO3U72B.js";import{Ae as Ln,Be as Ht,Ed as En,Fb as Sn,Fd as kn,Nd as Tn,Ob as An,Pd as xn,Qb as Pn,Qd as Fn,Sd as st,mb as qe,oe as Te,pe as On,qe as Cn,ve as Lt,we as Bt,xb as it,xc as Ct,xe as Mt,yc as Rn}from"./chunk.DHPXRDT5.js";import"./chunk.FQLNBIQ5.js";import{b as je}from"./chunk.AJZBJBMO.js";async function ft(t,r={}){let o=t.compiled===void 0||!fo(t.compiled,t.document)?void 0:Bn(t.compiled,r);if(o?.ok)return o;let{compileDocumentWithoutCheck:i}=await uo();return i(t.document,r)}var Or,uo=()=>Or??=(__graviewPreload(import.meta.url,["./chunk.MATUPDZ3.js","./chunk.SAWASNDO.js","./chunk.DKUEZPGR.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.MHHNO3O2.js")).catch(t=>{throw Or=void 0,t});function fo(t,r){let o=typeof t=="object"&&t!==null?t.document:void 0,i=r;if(typeof i=="string")try{i=JSON.parse(i)}catch{return!1}return o!==void 0&&Ft(Ot(o).document)===Ft(Ot(i).document)}var d=je(Nn(),1);var mt=je(Nn(),1),Ut="data-graview-drawn",po=200,Cr=50,mo=1e4,pt=()=>typeof performance<"u"?performance.now():Date.now();function ho(t){let r=[...t.querySelectorAll("img")];for(let o of t.querySelectorAll("[data-worker-view]"))o.shadowRoot&&r.push(...o.shadowRoot.querySelectorAll("img"));return r}function yo(t,r){if(t.ownerDocument.fonts?.status==="loading"||Dn()>0||Gn(r)>0||t.querySelector('[aria-busy="true"]')||ho(t).some(i=>!i.complete&&i.loading!=="lazy"))return!1;for(let i of t.querySelectorAll("[data-worker-view-place]"))if(!i.querySelector("[data-worker-view][data-worker-view-drawn], [data-worker-view][data-worker-view-failed]"))return!1;return!0}function Lr(t){let r=t.querySelector("[data-embed-content]"),o=[...t.querySelectorAll("[data-worker-view]")].map(i=>`${i.offsetWidth}x${i.offsetHeight}`);return`${t.scrollWidth}x${t.scrollHeight}|${r?`${r.scrollWidth}x${r.scrollHeight}`:""}|${o.join(",")}`}function go(t,r,o,i){t.removeAttribute(Ut);let l=t.ownerDocument.defaultView;if(!l)return()=>{};let p=pt(),c=p,b=Lr(t),h=!1,k,O=typeof MutationObserver>"u"?void 0:new MutationObserver(x=>{x.some(C=>!(C.target===t&&C.attributeName===Ut))&&(c=pt())});O?.observe(t,{childList:!0,subtree:!0,characterData:!0,attributes:!0});let I=()=>{h=!0,O?.disconnect(),k!==void 0&&clearTimeout(k)},S=x=>{let C=!1,re=()=>{C||(C=!0,x())};typeof l.requestAnimationFrame=="function"&&l.requestAnimationFrame(()=>setTimeout(re,0)),setTimeout(re,100)},T=()=>{if(h)return;let x=Lr(t);x!==b&&(b=x,c=pt());let C=pt();if(yo(t,i)&&C-c>=po||C-p>=mo){S(()=>{h||(I(),t.setAttribute(Ut,r),Kn(),o())});return}k=setTimeout(T,Cr)};return k=setTimeout(T,Cr),I}function Br(t,r,o,i,l){Un();let p=(0,mt.useRef)({place:o,onDrawn:i});p.current={place:o,onDrawn:i},(0,mt.useLayoutEffect)(()=>{l&&zn(l);let c=k=>go(k,p.current.place.path,()=>p.current.onDrawn?.(p.current.place),l);if(t.current)return c(t.current);let b,h=!1;return queueMicrotask(()=>{!h&&t.current&&(b=c(t.current))}),()=>{h=!0,b?.()}},[r,t,l])}var Nr=je(lo(),1);var F=je(co(),1);var w=je(Vn(),1);function ht(t,r={}){let o=Vt(t);return{Face:o.part((l,p)=>(0,d.createElement)(l,p),r),fetch:()=>o.load().then(()=>{}),here:()=>o.current!==void 0||o.failed}}var Yt=t=>Promise.all([t,ar()]).then(([r])=>r),Vr=Me(()=>(__graviewPreload(import.meta.url,["./chunk.JQEXH23N.js","./chunk.4RPKCW4J.js","./chunk.4R7H3GIL.js","./chunk.AUNQNTKY.js","./chunk.PJL3I2IW.js","./chunk.YJ4PFOPC.js","./chunk.LKM2R5UF.js","./chunk.HJCQ6I3S.js","./chunk.EL7XXGQY.js","./chunk.CDSHUWSK.js","./chunk.6XBQDXT6.js","./chunk.JN3WZGJY.js","./chunk.CYEPHT7V.js","./chunk.U5P23GO7.js","./chunk.JHAMSDAI.js","./chunk.B5EFNTDA.js","./chunk.47VEV4BX.js","./chunk.FE3SINPK.js","./chunk.MUWI54IP.js","./chunk.3D37E2G5.js","./chunk.WFJCC6G3.js","./chunk.BIDL7GQD.js","./chunk.IO5VFTXC.js","./chunk.7L3I776Z.js","./chunk.CLIC2QBA.js","./chunk.NSAGOOJW.js","./chunk.CA2SYEYE.js","./chunk.Q5WEOX3Q.js","./chunk.MATUPDZ3.js","./chunk.SAWASNDO.js","./chunk.HCX6KPRF.js","./chunk.DKUEZPGR.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.MIE4TJRW.js","./chunk.SCVKHGO3.js","./chunk.RD2FSSLV.js","./chunk.AZRICZKT.js","./chunk.MH3AQO2R.js","./chunk.J2N7EKMX.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.6BNSDPZE.js"))),wo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.HGH27XZG.js","./chunk.NRECR3NQ.js","./chunk.T2BZBR7S.js","./chunk.HMJXB6KC.js","./chunk.Q355UPFG.js","./chunk.JQEXH23N.js","./chunk.O7NYSO6F.js","./chunk.I7OFRF6N.js","./chunk.4RPKCW4J.js","./chunk.IRNEWNUB.js","./chunk.AUNQNTKY.js","./chunk.KLEKC4ZX.js","./chunk.PJL3I2IW.js","./chunk.LMZ2WMGH.js","./chunk.OD5QZHRC.js","./chunk.YJ4PFOPC.js","./chunk.LKM2R5UF.js","./chunk.MB7LKKUD.js","./chunk.26RYER7Y.js","./chunk.CYEPHT7V.js","./chunk.5MOXQUZH.js","./chunk.MKN7ADJB.js","./chunk.I4H2GS4O.js","./chunk.FE3SINPK.js","./chunk.MUWI54IP.js","./chunk.3D37E2G5.js","./chunk.IO5VFTXC.js","./chunk.BJUUSIQY.js","./chunk.7L3I776Z.js","./chunk.CLIC2QBA.js","./chunk.XOZU4OFA.js","./chunk.WV6SP6IJ.js","./chunk.WVUJXDXZ.js","./chunk.B422DSYN.js","./chunk.ZE5RSKXF.js","./chunk.DKUEZPGR.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.MIE4TJRW.js","./chunk.SCVKHGO3.js","./chunk.RD2FSSLV.js","./chunk.AZRICZKT.js","./chunk.MH3AQO2R.js","./chunk.J2N7EKMX.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KVQYOFDV.js"))),vo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.HGH27XZG.js","./chunk.NRECR3NQ.js","./chunk.T2BZBR7S.js","./chunk.HMJXB6KC.js","./chunk.Q355UPFG.js","./chunk.JQEXH23N.js","./chunk.O7NYSO6F.js","./chunk.I7OFRF6N.js","./chunk.4RPKCW4J.js","./chunk.IRNEWNUB.js","./chunk.AUNQNTKY.js","./chunk.KLEKC4ZX.js","./chunk.PJL3I2IW.js","./chunk.LMZ2WMGH.js","./chunk.OD5QZHRC.js","./chunk.YJ4PFOPC.js","./chunk.LKM2R5UF.js","./chunk.MB7LKKUD.js","./chunk.26RYER7Y.js","./chunk.CYEPHT7V.js","./chunk.5MOXQUZH.js","./chunk.MKN7ADJB.js","./chunk.I4H2GS4O.js","./chunk.FE3SINPK.js","./chunk.MUWI54IP.js","./chunk.3D37E2G5.js","./chunk.IO5VFTXC.js","./chunk.BJUUSIQY.js","./chunk.7L3I776Z.js","./chunk.CLIC2QBA.js","./chunk.XOZU4OFA.js","./chunk.WV6SP6IJ.js","./chunk.WVUJXDXZ.js","./chunk.B422DSYN.js","./chunk.ZE5RSKXF.js","./chunk.DKUEZPGR.js","./chunk.EP7YT7LT.js","./chunk.I7KN732Z.js","./chunk.TLPCYKLW.js","./chunk.MIE4TJRW.js","./chunk.SCVKHGO3.js","./chunk.RD2FSSLV.js","./chunk.AZRICZKT.js","./chunk.MH3AQO2R.js","./chunk.J2N7EKMX.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.5TWRTGP6.js"))),$r=ht(()=>Yt(Vr().then(t=>t.SceneFace)),{what:"This view"}),Ir=ht(()=>Vr().then(t=>t.SceneKeeping),{quiet:!0}),_r=ht(()=>Yt(wo().then(t=>t.PagesContent)),{what:"This page"}),Wr=ht(()=>Yt(vo().then(t=>t.PictureFace)),{what:"This picture"}),bo=$r.Face,So=Ir.Face,Ao=_r.Face,Po=Wr.Face;jt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.KHKCTVHD.js","./chunk.CEQQIW7Z.js","./chunk.TQRC5VAM.js","./chunk.O7NYSO6F.js","./chunk.32SHA3EY.js","./chunk.GG47EIKO.js","./chunk.NYLKG25K.js","./chunk.CLZYNFFH.js","./chunk.WQ7K5O2I.js","./chunk.ZT3ZG52B.js","./chunk.QDVGHI7R.js","./chunk.ROYCJXPE.js","./chunk.M5FP4Y4Q.js","./chunk.RSMCTI2N.js","./chunk.WFJCC6G3.js","./chunk.IO5VFTXC.js","./chunk.HCX6KPRF.js","./chunk.J2N7EKMX.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.J7O23NKZ.js"))));function He(...t){let r=t.length>0?t:["scene","pages","picture"],o=new Set(r.flatMap(Dr));return Promise.all([...[...o].map(i=>i.fetch()),tr()]).then(()=>{},()=>{})}var Dr=t=>t==="pages"?[_r]:t==="picture"?[Wr]:[$r,Ir],jr=t=>Dr(t).every(r=>r.here()),Ro=150,Kt=0;function Mr(t,r){if(jr(t))return r();let o=++Kt,i=()=>{o===Kt&&(Kt+=1,r())};He(t).then(i),setTimeout(i,Ro)}var Eo=768;function ko(t,r){let o=r!==null&&r>=Eo;(0,d.useEffect)(()=>{if(!o||t==="picture")return;let i=t==="pages"?"scene":"pages";if(jr(i))return;let l=globalThis,p=()=>void He(i),c=()=>{},b=Jn(()=>{if(l.requestIdleCallback&&l.cancelIdleCallback){let h=l.requestIdleCallback(p,{timeout:4e3});c=()=>l.cancelIdleCallback?.(h)}else{let h=setTimeout(p,1500);c=()=>clearTimeout(h)}});return()=>(b(),c())},[t,o])}function To({asked:t,shown:r,onDrawn:o}){return(0,d.useLayoutEffect)(()=>o(t,r),[t,r,o]),null}function xo({auto:t,scene:r}){return(0,w.jsx)("div",{"data-embed-content":"","aria-busy":"true",style:{flex:t?r?`0 0 ${Gt}px`:"0 0 auto":"1 1 auto",minHeight:0,background:"var(--graview-ground)"}})}var Fo=Vt(Me(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.5JNXQHN4.js")))).part((t,r)=>(0,w.jsx)(t.StudioPlace,{...r}),{quiet:!0});function qr(t,r,o,i,l){return Wt(t,lr(r?lt(r):l??Mn,i),o)}function Qt(t){return t&<(t).overview?"graview":"scene"}function Hr(t,r){if(r.homeView?.()===void 0)return!1;let o=t.pages?.first?.trim();return o===void 0||o===""||o==="/"||o.toLowerCase()==="home"}function zr(t){let[,r]=(0,d.useState)(!1),o=(0,d.useCallback)(()=>r(!0),[]),i=(0,d.useRef)(!1);return t.at&&!yt?(0,w.jsx)(qt,{onReady:o,fetch:Zt}):!i.current&&pr(t.draftView)?(0,w.jsx)(qt,{onReady:o,fetch:fr}):(i.current=!0,(0,w.jsx)(Oo,{...t}))}function Oo(t){let{app:r,stop:o,bar:i=!0,standing:l="Everything is in order",principal:p,heading:c=2}=t,{rootRef:b,scope:h,css:k,scheme:O,store:I,presence:S,brand:T,auto:x,height:C}=vr(t),re=mr(t.draftView),E=gr(t,ir,re.over),[de]=(0,d.useState)(qn),u=t.basePath===void 0?{}:{basePath:t.basePath},[V]=(0,d.useState)($t),$=t.notices??V,z=g=>Lt(g,u),ae={...t.routing?{routing:t.routing}:{},...u},[ie]=(0,d.useState)(()=>{let g=t.at?.face;if(g)return g;let Z=o===void 0&&Hr(r,E)?"pages":Qt(o),J=_t({...ae,face:Z});return t.face===void 0&&t.onOpening?.(J),J}),[ve,H]=(0,d.useState)(()=>t.face!==void 0&&t.face!=="pages"&&!t.at&&o===void 0&&sr(ae)&&Hr(r,E)),be=(0,d.useRef)(t.onFace);be.current=t.onFace,(0,d.useLayoutEffect)(()=>{ve&&(be.current?.("pages"),H(!1))},[ve]);let P=ve?"pages":t.face??ie,R=r.schema.kinds,N=t.routing==="address",Se=(0,d.useMemo)(()=>t.at?yt.settleAt(t,I.seenBy(p??{kind:"human"}),E.places()):void 0,[]),L=(0,d.useMemo)(()=>_n(E,r.schema),[E,r.schema]),pe=(0,d.useMemo)(()=>{let g=Se?.stop??(N?cr(t.basePath):void 0)??o;return P==="scene"&&g===void 0&&L===void 0&&(t.path===void 0||Jt(t.path))?Dt(void 0):qr(P,g,R,E.places(),L)},[]),[_]=(0,d.useState)(P);(0,d.useEffect)(()=>{_!=="pages"&&In(E)},[_,E]);let B=(0,d.useRef)(void 0),j=g=>g===void 0||Jt(g)?"/":g;B.current??={path:j(Se?.path??(N?P==="pages"?(Bt(window.location.pathname,t.basePath)??"/")+window.location.search:"/":t.path)),asked:t.path},t.path!==B.current.asked&&(B.current={path:j(t.path),asked:t.path});let X=(0,d.useRef)(t.onNavigate);X.current=t.onNavigate;let Fe=(0,d.useCallback)((g,Z)=>{B.current.path=g,X.current?.(g,Z)},[]),{at:me,setAt:D,steering:G,steer:oe}=Tr(B.current.path),M=(0,d.useContext)(Gr);M&&(M.pages=()=>B.current.path);let[Ne]=(0,d.useState)(()=>({})),Y=M??Ne,se=(0,d.useMemo)(()=>Zn($),[$]),q=(0,d.useRef)(void 0),Ae=(0,d.useCallback)(g=>void(B.current.path=g),[]),U=Qn(b),[Oe,Pe]=(0,d.useState)(!1),Ve=t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview")&&!Oe,v=Ve?"pages":P,he=(0,d.useRef)(!1);he.current=Oe&&t.pagesBelow!==void 0&&U!==null&&U<t.pagesBelow&&(P==="scene"||P==="graview"),M&&(M.shown=v);let Ce=(0,d.useRef)(P==="graview"?"graview":"scene");(v==="scene"||v==="graview")&&(Ce.current=v),(0,d.useState)(()=>{if(!N||typeof window>"u"||v==="pages"||v==="picture")return;let{pathname:g,search:Z,hash:J}=window.location;Bt(g,t.basePath)==="/"&&window.history.replaceState(window.history.state,"",`${z(Te)}${Z}${J}`)}),wr(b,v,t.onIntrinsicHeight),ko(v,U);let ee=xr(t.onError,v),Le=Fr(t.onReady,v),Re=(0,d.useRef)(t.onFaceDrawn);Re.current=t.onFaceDrawn;let Ze=(0,d.useCallback)((g,Z)=>{Le(Z),Re.current?.(g)},[Le]),[$e,St]=(0,d.useState)(null),Xe=E.places(),Ie=(0,d.useRef)({shown:v,onFace:t.onFace});Ie.current={shown:v,onFace:t.onFace};let W=(0,d.useCallback)((g,Z,J)=>{if(N){q.current?.(g,Z,J);return}Ie.current.onFace?.(g),X.current?.(g==="pages"?Z??B.current.path:Te,"push")},[N]),[ye,K]=(0,d.useState)(void 0);(0,d.useEffect)(()=>{v==="pages"&&K(void 0)},[v]);let _e=(0,d.useRef)(o);(0,d.useEffect)(()=>{_e.current!==o&&(_e.current=o,K(void 0))},[o]);let Ee=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){if(Pe(!0),K(g),P==="scene"||P==="graview"){Mr(P,()=>{N?window.history.pushState(null,"",`${z(Te)}${g??""}`):X.current?.(Te,"push")});return}Mr(Ce.current,()=>W(Ce.current,void 0,g))}},[N,P,t.basePath,W]),Be=(0,d.useCallback)(g=>{if(Ie.current.shown==="pages"){G.go.current||(B.current.path=g),oe(g);return}if(B.current.path=g,D(g),he.current){Pe(!1),N?window.history.pushState(null,"",z(g)):X.current?.(g,"push");return}W("pages",g)},[G,oe,D,W,N,t.basePath]),Ke=E.arrangement?.(),le=v==="pages",ke=t.hrefOf,We=ke??(N?z:void 0),Q=(0,d.useMemo)(()=>({open:Be,...ke?{href:ke}:N?{href:g=>Lt(g,t.basePath===void 0?{}:{basePath:t.basePath})}:{}}),[Be,N,t.basePath,ke]);return(0,w.jsxs)("section",{ref:b,className:h,"aria-label":t.label??r.name,"data-graview-embed":v,"data-graview-scheme":O,...Ve?{"data-graview-embed-narrow":""}:{},style:{position:"relative",isolation:"isolate",height:C,minHeight:x?0:320,display:"flex",flexDirection:"column",overflow:"hidden",borderRadius:"var(--graview-radius, 12px)"},children:[(0,w.jsx)("style",{children:k}),(0,w.jsxs)(Yn.Provider,{value:ee,children:[(0,w.jsx)(br,{rootRef:b,board:$,onReport:t.onReport,where:()=>v==="pages"?Sr(me):v==="picture"?{place:"picture"}:Xn(Y.view?.focusId)}),(0,w.jsx)(yr,{rootRef:b,firstLook:t.firstLook,app:rr(T??{name:r.name},r.schema)}),(0,w.jsx)(Ye,{module:"@graview/react",report:ee,content:!0,children:(0,w.jsx)(jn.Provider,{value:de,children:(0,w.jsx)($n,{store:I,views:E,initialView:pe,scheme:O,...Ar(t,S,T),...t.onSeat?{onSeat:t.onSeat}:{},children:(0,w.jsxs)(er.Provider,{value:se,children:[(0,w.jsx)(Mo,{face:v,stop:ye??o,kinds:R,places:Xe,opens:L}),(0,w.jsx)(Co,{into:Y}),(0,w.jsx)(Lo,{rootRef:b,face:P,shown:v,path:me,stop:o,draft:re.n,onDrawn:t.onDrawn,parts:de}),N?(0,w.jsx)(dr,{pagesWere:Se?.path,basePath:t.basePath,shown:v,onFace:t.onFace,toggle:q,kinds:R,places:Xe,opens:L,landed:Ae}):null,i&&v!=="picture"?(0,w.jsx)(Ye,{module:"@graview/embed",report:ee,children:(0,w.jsx)(Pr,{name:T?.name??r.name,heading:c,named:zt(i).name!==!1,faces:zt(i).faces===!1?void 0:{scene:{label:On(Ke),current:!le,go:()=>Ee(),reach:()=>void He(Ce.current)},pages:{label:Cn(Ke),current:le,go:()=>Be(B.current.path),reach:()=>void He("pages")}},at:le?me:null,without:t.pages?.without(),home:{...We?.("/")!==void 0?{href:We("/")}:{},go:()=>Be("/"),current:le&&me.split("?")[0]==="/"},reach:{...We?{href:We}:{},go:g=>Be(g.path)},standing:l,hostActions:t.hostActions,barActions:t.barActions,appMenu:t.appMenu,schemeChoice:t.schemeChoice,share:t.share,status:t.status,keeping:le?void 0:(0,w.jsx)(Ho,{app:r,studio:t.studio,report:ee}),onFind:St})}):null,(0,w.jsx)(nr.Provider,{value:$e,children:(0,w.jsx)(Ye,{module:v==="pages"||v==="picture"?"@graview/pages":"@graview/react",report:ee,content:!0,children:(0,w.jsxs)(d.Suspense,{fallback:(0,w.jsx)(xo,{auto:x,scene:v!=="pages"&&v!=="picture"}),children:[v==="picture"?(0,w.jsx)(Po,{scope:h,store:I,views:E,as:(o?lt(o).within?.view:void 0)??""}):v==="pages"?(0,w.jsx)(Ao,{store:I,views:E,presence:S,auto:x,brand:T,steering:G,overview:Ee,scope:h,titleLevel:kr(c),quickAsk:It(t.quickAsk),props:{...t,onNavigate:Fe,...N?{}:{path:B.current.path}}}):(0,w.jsx)(Wn.Provider,{value:Q,children:(0,w.jsx)(bo,{address:N,auto:x,scheme:O,scope:h,quickAsk:It(t.quickAsk)})}),(0,w.jsx)(To,{asked:P,shown:v,onDrawn:Ze})]})},v)})]})})})})]})]})}var Jt=t=>t.split(/[?#]/)[0]===Te,Gr=(0,d.createContext)(null);function Co({into:t}){return t.view=ut().view,null}function Lo({rootRef:t,face:r,shown:o,path:i,stop:l,draft:p,onDrawn:c,parts:b}){let{view:h}=ut(),k=o==="scene"||o==="graview",O=dt(h),{pan:I,...S}=h,T=h.pan?dt(S):O,x={face:r,path:k?Te:o==="picture"?l??"#":i,stop:O};return Br(t,`${o} ${k?T:x.path} ${p}`,x,c,b),null}var yt,Bo=Me(()=>(__graviewPreload(import.meta.url,["./chunk.VXPEXUQF.js","./chunk.NLZHNPDU.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.POKGLN4T.js"))),Zt=()=>Bo().then(t=>void(yt=t),()=>new Promise(t=>{let r=()=>{window.removeEventListener("online",r),clearTimeout(o),t()},o=setTimeout(r,1e4);window.addEventListener("online",r)}).then(Zt));function Mo({face:t,stop:r,kinds:o,places:i,opens:l}){let{view:p,go:c}=ut(),b=(0,d.useRef)({face:t,stop:r});return(0,d.useLayoutEffect)(()=>{let h=b.current.stop!==r,k=b.current.face!==t,O=b.current.face==="pages";if(b.current={face:t,stop:r},!h&&!k||t==="pages"||t==="picture")return;let I=(h||O)&&r!==void 0?qr(t,r,o,i):O&&ur(p)?Wt(t,Dt(l),o):t==="graview"?Nt(p,!0):p.overview?Hn(Nt(p,!1),or(p,o)):p;c(I)},[t,r,o,p,c,l]),null}function Ho({app:t,studio:r,report:o}){return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(So,{})}),r!==!1?(0,w.jsx)(Ye,{module:"@graview/studio",report:o,children:(0,w.jsx)(No,{app:t,studio:r})}):null]})}function No({app:t,studio:r}){let o={app:t,within:"box",...r?{onApply:r.onApply}:{},...r?.landmark?{landmark:r.landmark}:{},...r?.offered!==void 0?{offered:r.offered}:{}},i=r?.place;return i?(0,w.jsx)(i,{...o}):(0,w.jsx)(d.Suspense,{fallback:null,children:(0,w.jsx)(Fo,{...o})})}function Vo({path:t,stop:r,...o},i){return{...o,app:i.app,at:i.at,remote:i.remote,...i.remote.presence?{presence:i.remote.presence}:{}}}function Xt(t,r){let o=r.store??r.remote?.store??hr(r.app,r.seed),i=r.notices??$t(),l=null,p={},c=0,b=r.label,h=r.app,k=Promise.resolve(),O=r.at?.face??r.face,I=O===void 0?void 0:_t({...r,face:O}),S=I??Qt(r.stop),T=null,x=[],C=u=>{if(T=u,u!==S)return;let V=x;x=[];for(let $ of V)$()};function re(){let[u,V]=(0,d.useState)(I),[$,z]=(0,d.useState)(r.stop),[ae,ie]=(0,d.useState)(r.path),[ve,H]=(0,d.useState)(r.scheme??"auto"),[be,P]=(0,d.useState)(r.principal),[R,N]=(0,d.useState)(r.seats),[Se,L]=(0,d.useState)(r.quickAsk),[pe,_]=(0,d.useState)(r.people),[B,j]=(0,d.useState)(r.hostContext),[X,Fe]=(0,d.useState)(r.brand),[me,D]=(0,d.useState)(r.whileAway),[G,oe]=(0,d.useState)(r.label),[M,Ne]=(0,d.useState)(r.hostActions),[Y,se]=(0,d.useState)(r.barActions),[q,Ae]=(0,d.useState)(()=>Rr(r)),[U,Oe]=(0,d.useState)(void 0),[Pe,Ve]=(0,d.useState)(r.draftView);return l={app:v=>{Oe(v),ie(void 0),z(void 0)},face:V,stop:z,path:ie,scheme:H,seat:P,seats:N,quickAsk:L,people:_,hostContext:j,brand:Fe,whileAway:D,label:oe,hostActions:Ne,barActions:se,hostBar:v=>Ae(he=>({...he,...v})),draft:Ve},(0,w.jsx)(Gr.Provider,{value:p,children:(0,w.jsx)(zr,{...U?Vo(r,U):r,store:o,notices:i,...u!==void 0?{face:u}:{},onOpening:v=>{S=v},...$!==void 0?{stop:$}:{},...ae!==void 0?{path:ae}:{},...be?{principal:be}:{},...R?{seats:R}:{},...Se!==void 0?{quickAsk:Se}:{},...pe?{people:pe}:{},...B?{hostContext:B}:{},...X?{brand:X}:{},whileAway:me,label:G,hostActions:M,barActions:Y,...Er(q),draftView:Pe,scheme:ve,onFace:v=>{S=v,V(v)},onSeat:P,onFaceDrawn:C},U?.n??0)})}let E=()=>{let u=p.view?.focusId,V=u?o.graph.getNode(u)?.kind:void 0,$=(p.shown??S)==="scene"||(p.shown??S)==="graview";return{face:S,path:$?Te:p.pages?.()??r.path??"/",stop:p.view?dt(p.view):r.stop??"#",...V?{kind:V}:{}}},de=(0,Nr.createRoot)(t);return(0,F.flushSync)(()=>de.render((0,w.jsx)(re,{}))),{get store(){return o},where:E,setApp:(u,V,$)=>{let z="graph"in V?{store:V}:V,ae=()=>{let ie=E();o=z.store,b=$?.label??(b===h.name?u.name:b),h=u,(0,F.flushSync)(()=>{l?.label(b),l?.app({app:u,remote:z,at:ie,n:++c})})};yt?ae():k=k.then(Zt).then(ae)},setFace:u=>{S=u,(0,F.flushSync)(()=>l?.face(u))},setStop:u=>(0,F.flushSync)(()=>l?.stop(u)),setPath:u=>(0,F.flushSync)(()=>{if(Jt(u)){(S==="pages"||S==="picture")&&(S="scene",l?.face("scene"));return}l?.path(u),S!=="pages"&&(S="pages",l?.face("pages"))}),setScheme:u=>(0,F.flushSync)(()=>l?.scheme(u)),setSeat:u=>(0,F.flushSync)(()=>l?.seat(u)),setSeats:u=>(0,F.flushSync)(()=>l?.seats(u)),setQuickAsk:u=>(0,F.flushSync)(()=>l?.quickAsk(u)),setPeople:u=>(0,F.flushSync)(()=>l?.people(u)),setHostContext:u=>(0,F.flushSync)(()=>l?.hostContext(u)),setBrand:u=>(0,F.flushSync)(()=>l?.brand(u)),setWhileAway:u=>(0,F.flushSync)(()=>l?.whileAway(u)),setDraftView:u=>(0,F.flushSync)(()=>l?.draft(u)),setLabel:u=>{b=u,(0,F.flushSync)(()=>l?.label(u))},setHostActions:u=>(0,F.flushSync)(()=>l?.hostActions(u)),setBarActions:u=>(0,F.flushSync)(()=>l?.barActions(u)),setAppMenu:u=>(0,F.flushSync)(()=>l?.hostBar({appMenu:u})),setShare:u=>(0,F.flushSync)(()=>l?.hostBar({share:u})),setStatus:u=>(0,F.flushSync)(()=>l?.hostBar({status:u})),setSchemeChoice:u=>(0,F.flushSync)(()=>l?.hostBar({schemeChoice:u})),setNotifications:u=>(0,F.flushSync)(()=>l?.hostBar({notifications:u})),drawn:()=>k.then(()=>T===S?void 0:new Promise(u=>x.push(u))),notify:u=>{let V;return(0,F.flushSync)(()=>{V=i.notify(u)}),V},unmount:()=>de.unmount()}}var gt=t=>`s${(t+1).toString(36)}`;var we={seat:"x-graview-seat",roles:"x-graview-roles",kind:"x-graview-kind",name:"x-graview-name",for:"x-graview-for",forRoles:"x-graview-for-roles",forName:"x-graview-for-name",via:"x-graview-via"},ze={header:"x-graview-key",param:"graview_key",cookie:"graview_key"};function wt(t,r={}){try{let o=new URL(t),i=o.searchParams.get(ze.param);if(i)return o.searchParams.delete(ze.param),{url:o.origin+o.pathname.replace(/\/$/,"")+o.search,key:i,headers:{[ze.header]:i,...r}}}catch{}return{url:t.replace(/\/$/,""),headers:r}}var Ur="/graview/friction";var Kr="/graview/live",en="graview.ship",tn=`${en}.${it}`;var Ge=class extends Error{constructor(r){super(r),this.name="Superseded"}},xe=t=>t?.lineage?{lineage:t.lineage}:{},$o=(t,r)=>`${t.calls.map(o=>o.name.replace(/-/g," ")).join(", ")} (${r instanceof Error?r.message.split(`
|
|
2
|
+
`)[0]??"":String(r)})`;function Io(t){if(!t)return[];try{let r=t.storage.getItem(t.key);if(r===null)return[];t.storage.removeItem(t.key);let o=JSON.parse(r);return Array.isArray(o)?o.filter(i=>!!i&&Array.isArray(i.calls)):[]}catch{return[]}}var Ue=class extends Error{constructor(o){super(o.sentence);this.refusal=o;this.name="RemoteRefusedError"}},_o={401:"forbidden",403:"forbidden",404:"missing",413:"limit"},fe=class extends Error{constructor(o,i){super(o);this.conflicts=i;this.name="StaleWrite"}},Qe=class extends Error{constructor(r){super(r),this.name="Unreached"}},Wo=new Set([502,503,504]);async function Do(t){try{return(await t.clone().json()).reason==="unavailable"}catch{return!1}}function jo(){let t=Math.random().toString(36).slice(2,8),r=0;return()=>`local-${t}-${++r}`}var qo=1,zo=()=>({refusals:new Set,conflicts:new Set,statuses:new Set,helds:new Set,builds:new Set,who:new Set,declarations:new Set,tally:{reconnects:0,rebases:0,conflicts:0,resyncs:0}});async function vt(t){return(await Jr(t,Io(t.carry),"This app was updated while your changes were on the way.",zo())).remote}async function Jr(t,r,o,i){let{key:l,...p}=wt(t.url,t.headers),c={...t,...p},b=c.fetch??fetch,h={"content-type":"application/json",...c.headers??{}},k={...bt(c.principal),[we.via]:c.via??"web"};Object.assign(h,k);let O=c.live===!0,I=c.presenceEveryMs,S=c.visible??Ko,T="connecting",x=i.statuses,C=i.tally,re=[],E,de=[],u=()=>T==="online"&&E!==void 0?"held":T,V=()=>{let e=u();if(i.told!==e){i.told=e;for(let n of[...x])n(e)}},$=e=>{if(!(e===T||ce)&&(T==="offline"&&e==="online"&&C.reconnects++,T=e,V(),e==="online"))for(let n of re.splice(0))n.again()},z=e=>{if(ce)return;let n=typeof e=="string"&&e.length>0?e:void 0,s=n!==E;if(E=n,ae(),!!s&&(V(),n===void 0)){for(let a of de.splice(0))a();te&&clearTimeout(te),sn()}},ae=()=>{if(i.toldHeld!==E){i.toldHeld=E;for(let e of[...i.helds])e(E??null)}},ie=async(e,n)=>{let s;try{s=await b(e,n)}catch(a){throw Q()||$("offline"),new Qe(a instanceof Error?a.message:String(a))}if(s.status===503&&await Do(s))return $("online"),s;if(Wo.has(s.status))throw Q()||$("offline"),new Qe(`The server is away (${s.status})`);return $("online"),s},ve=async(e=!1)=>{let n=`${c.url}/graview/state?opFormat=${qe.op}`,s=e?await b(n,{headers:h}):await ie(n,{headers:h});if(!s.ok)throw new Error((await s.json().catch(()=>({}))).error??`The server refused (${s.status})`);return await s.json()},H=c.state??await ve(!0);O||(T="online"),E=typeof H.held=="string"&&H.held.length>0?H.held:void 0,ae();let be=H.enabledModules??c.enabledModules,P=c.localApp?c.localApp(c.app):c.app,R=new Fn({schema:P.schema,mutations:P.mutations??[],invariants:P.invariants??[],...P.policy?{policy:P.policy}:{},...P.publishing?{publishing:P.publishing}:{},...P.tidying?{tidying:P.tidying}:{},...P.modules?{modules:P.modules}:{},...be?{enabledModules:be}:{},...P.intelligence?{intelligence:P.intelligence}:{},...P.brand?.timeZone?{timeZone:P.brand.timeZone}:{},snapshot:H.snapshot,log:H.log,...H.horizon!==void 0?{horizon:H.horizon}:{},ids:jo(),...c.storeOptions??{}});Pn.served.add(R);let N=c.friction!==!1&&c.principal?.kind!=="visitor";N&&En(R,e=>{N&&b(`${c.url}${Ur}`,{method:"POST",headers:h,body:JSON.stringify({event:e})}).then(n=>void(N=n.status!==404&&n.status!==410),()=>{})});let Se=Tn(R),L=H.log.at(-1)?.seq??(H.horizon??0)-1,pe=Ct.of(H.log,{horizon:H.horizon??0}),_=null,B,j=new Map,X=i.who,Fe=!1,me=e=>{if(ce)return;Fe=!0;let n=Ln(new Map,e,Date.now(),Mt,_?.participant);B!==void 0&&n.delete(B);let s=n.size!==j.size;if(!s)for(let[a,f]of n)Ht(f,j.get(a))||(s=!0);if(j=n,!!s)for(let a of[...X])a([...j.values()])},D=[],G=new Set,oe=e=>{let n=D.indexOf(e);n>=0&&D.splice(n,1)},M=new Map,Ne=(e,n)=>{let s=M.get(e);s&&(M.delete(e),s.resolve({ops:n.filter(a=>a.batch===e),batch:e}))},Y,se=[],q=(e,n=[])=>{if(e.length===0&&n.length===0)return[];if(Y)return se.push({ops:e,drop:n}),[];let s=Math.min(...e.filter(m=>m.seq>L).map(m=>m.seq));if(Number.isFinite(s)&&s>L+1)return se.push({ops:e,drop:n}),Ae(),[];let a=D.filter(m=>e.some(ne=>ne.batch===m)),f=[...new Set([...n,...a])].filter(m=>G.has(m)),y,A=D.filter(m=>!a.includes(m));try{y=R.rebase({confirmed:e,pending:A,drop:f}).confirmed}catch(m){if(!(m instanceof xn))throw m;return se.push({ops:e,drop:n}),Ae(),[]}for(let m of a)oe(m);e.some(m=>m.seq>L)&&A.some(m=>!f.includes(m))&&C.rebases++,e.length>0&&(L=Math.max(L,...e.map(m=>m.seq)),pe.note(e));for(let m of f)G.delete(m);for(let m of a)Ne(m,e);return y},Ae=()=>{Y||(Y=Re(ve().then(e=>{if(U(e)){se=[];return}let n=new Set(e.log.map(f=>f.batch)),s=D.filter(f=>n.has(f));for(let f of s)oe(f);let a=R.adopt({snapshot:e.snapshot,log:e.log,...e.horizon!==void 0?{horizon:e.horizon}:{},pending:[...D],drop:[...G].filter(f=>!D.includes(f))});G.clear();for(let f of a.pending)G.add(f.batch);L=e.log.at(-1)?.seq??(e.horizon??0)-1,pe=Ct.of(e.log,{horizon:e.horizon??0}),C.resyncs++;for(let f of s)Ne(f,e.log)}).then(()=>{Y=void 0;let e=se;se=[];for(let{ops:n,drop:s}of e)q(n,s)},()=>{Y=void 0,se=[]})))},U=e=>(typeof e.build=="string"&&dn(e.build),typeof e.version=="number"&&z(e.held),typeof e.version!="number"||e.version===H.version?!1:(Rt(e.version),!0)),Oe=async e=>{let s=await(await ie(`${c.url}/graview/since?seq=${gt(e)}&opFormat=${qe.op}`,{headers:h})).json();return U(s)?[]:s.reset===!0?(Ae(),[]):s.ops??[]},Pe=async()=>{let e=await Ve();return Y&&await Y,e},Ve=async()=>{if(_&&!Q()&&S()){let n=await(await ie(`${c.url}/graview/here?opFormat=${qe.op}`,{method:"POST",headers:h,body:JSON.stringify({presence:_,seq:gt(L)})})).json();return U(n)?[]:(typeof n.participant=="string"&&(B=n.participant),me(n.who??[]),q(n.ops??[]))}return q(await Oe(L))},v=new Map,he=new Map,Ce=new Set,ee=new Map,Le=new Set,Re=e=>(Le.add(e),e.finally(()=>Le.delete(e)).catch(()=>{}),e),Ze=Promise.resolve(),$e=0,St=(e,n)=>{let s=Ze.then(()=>Ie(e,n));return Ze=s.catch(()=>{}),s},Xe=()=>new Promise((e,n)=>re.push({again:e,give:n})),Ie=async(e,n)=>{let s,a;for(;;){try{s=await ie(`${c.url}/graview/ops`,{method:"POST",headers:h,body:JSON.stringify({...e,opFormat:qe.op})})}catch(m){if(!(m instanceof Qe)||K)throw m;if(await Xe(),Q())return et(e,n);continue}if(a=await s.json().catch(()=>({})),s.status===503&&a.reason==="unavailable"&&typeof a.held=="string"&&!K){if(typeof a.version=="number"?U(a):(z(a.held),!1))break;if(E!==void 0&&(xt>0||O)){if(await new Promise(m=>de.push(m)),K)throw new Ge("The client closed.");if(Q())return et(e,n);continue}}let A;if(s.status===503&&a.reason==="unavailable"&&!K)A=nn(c.backoff,$e++);else{if($e=0,s.status!==429||K)break;A=Go(s.headers.get("retry-after"),a.retryAfter)}if(await new Promise(m=>setTimeout(m,A)),Q())return et(e,n)}if(ce||U(a))throw new Ge("The app was changed.");if(!s.ok){let A=a.error??`The server refused (${s.status})`;throw a.conflict?new fe(A,a.conflicts??[]):new Ue({reason:a.reason??_o[s.status]??"invalid",sentence:A,...a.wouldNeed?.length?{wouldNeed:a.wouldNeed}:{}})}let f=a.ops??[],y=f[0]?.seq;return y!==void 0&&y>L+1&&(f=await Oe(L)),n!==void 0&&(a.batch&&v.set(n,a.batch),oe(n)),q(f,n!==void 0?[n]:[]),{ops:a.ops??[],...a.batch?{batch:a.batch}:{}}},W,ye=!1,K=!1,_e=0,Ee,Be=0,Ke=0,le=null,ke=()=>{},We=new Promise(e=>{ke=e}),Q=()=>O&&ye&&W?.readyState===qo,g=e=>{if(!Q())return!1;try{return W.send(JSON.stringify(e)),!0}catch{return!1}},Z=(e=!1)=>{!_||!Q()||!S()||!e&&le&&Ht(_,le)&&(I===void 0||Date.now()-Ke<I)||g({t:"here",presence:_})&&(le=_,Ke=Date.now())},J=new Set,te,sn=()=>{if(te=void 0,E!==void 0)return;let e=[...M.entries()].filter(([n])=>J.has(n));J.clear();for(let[,n]of e)g(n.message)},cn=(e,n)=>{M.has(e)&&(J.add(e),te&&clearTimeout(te),te=setTimeout(sn,Math.max(0,n)))},Zr=e=>{M.has(e)&&J.add(e)},et=(e,n)=>new Promise((s,a)=>{let f=n??`send-${++Be}`,y=e.undo?{t:"undo",cid:f,batches:e.undo,...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.via?{via:e.via}:{},...xe(e)}:{t:"call",cid:f,calls:e.calls??[],...e.intent?{intent:e.intent}:{},...e.batch?{batch:e.batch}:{},...e.base?.length?{base:e.base}:{},...e.via?{via:e.via}:{},...xe(e)};if(M.set(f,{message:y,...n!==void 0?{mine:n}:{},resolve:s,reject:a}),J.size>0||E!==void 0){J.add(f);return}g(y)}),tt=(e,n)=>Q()?et(e,n):St(e,n),Xr=e=>{switch(e.t){case"welcome":{if(dn(e.build),typeof e.version=="number"&&e.version!==H.version){Rt(e.version);return}if(ye=!0,_e=0,typeof e.participant=="string"&&(B=e.participant),z(e.held),e.state?Ae():q(e.ops??[]),J.clear(),te&&clearTimeout(te),te=void 0,E!==void 0)for(let n of M.keys())J.add(n);else for(let n of M.values())g(n.message);Z(!0),$("online"),ke();return}case"ops":q(e.ops??[]);return;case"ack":{let n=M.get(e.cid);if(!n){q(e.ops??[]);return}M.delete(e.cid),$e=0,n.mine!==void 0&&(v.set(n.mine,e.batch),oe(n.mine)),q(e.ops??[],n.mine!==void 0?[n.mine]:[]),n.resolve({ops:e.ops??[],batch:e.batch});return}case"refused":case"conflict":{let n=M.get(e.cid);if(!n)return;if(e.t==="refused"&&e.reason==="unavailable"){E!==void 0?Zr(e.cid):cn(e.cid,nn(c.backoff,$e++));return}M.delete(e.cid),n.reject(e.t==="conflict"?new fe(e.sentence,e.conflicts??[]):new Ue({reason:e.reason??"invalid",sentence:e.sentence,...e.wouldNeed?.length?{wouldNeed:[...e.wouldNeed]}:{}}));return}case"busy":typeof e.cid=="string"&&cn(e.cid,typeof e.retryAfter=="number"?e.retryAfter:1e3);return;case"presence":me(e.who??[]);return;case"held":z(e.sentence);return;case"declaration":typeof e.version=="number"&&e.version!==H.version&&Rt(e.version);return;case"reload":pn(typeof e.reason=="string"?e.reason:"This app was updated.");return;case"error":if(e.reopen===!0&&W){let n=W;hn(n);try{n.close(1e3,"Opening again.")}catch{}}return;default:return}},ce=!1,At=i.declarations,Pt=i.builds,dn=e=>{if(!(ce||i.otherBuild!==void 0||!c.build||typeof e!="string"||e.length===0||e===c.build)){i.otherBuild=e;for(let n of[...Pt])n(e)}},ln=()=>{let e=[],n=0;for(let s of D){let a=ee.get(s);a?e.push({calls:a.calls,...a.intent?{intent:a.intent}:{},...a.via?{via:a.via}:{},...xe(a),batch:s}):n++}return{carried:e,undos:n}},un=(e,n)=>`${n} while ${e===1?"an undo of yours was":"undos of yours were"} on the way; ${e===1?"it was":"they were"} not made.`,fn=e=>{ce=!0,_=null;let n=new Ge(e);for(let a of M.values())a.reject(n);M.clear(),ot&&clearInterval(ot),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let a of re.splice(0))a.give(n);for(let a of de.splice(0))a();let s=W;W=void 0,ye=!1;try{s?.close(1e3,e)}catch{}ke()};async function Rt(e){if(ce)return;if(!c.resolveApp){pn(`This app was changed on its server (version ${e}); reload the page to carry on.`);return}let{carried:n,undos:s}=ln(),a=c.resolveApp,f=_;fn("The app was changed.");try{let y=await a(e),{state:A,...m}=c,ne=await Jr({...m,app:y},n,"The app was changed while your changes were on the way.",i);f&&ne.remote.presence.here(f);for(let at of[...At])at(ne.remote,e);let ue=[...s>0?[nt(un(s,"The app was changed"))]:[],...ne.unheard()];for(let at of ue)for(let so of De)so(at.sentence,at)}catch(y){let A=`The app was changed, but the new version could not be opened: ${y instanceof Error?y.message:String(y)}`;for(let m of De)m(A,nt(A))}}function pn(e){if(ce)return;let{carried:n,undos:s}=ln();fn(e);let a=!1;if(c.carry&&n.length>0)try{c.carry.storage.setItem(c.carry.key,JSON.stringify(n)),a=!0}catch{}let f=[];!a&&n.length>0&&f.push(`${e} ${n.length===1?"A change of yours was":`${n.length} changes of yours were`} not sent; make ${n.length===1?"it":"them"} again after the page reloads.`),s>0&&f.push(un(s,"This app was updated"));for(let y of f)for(let A of De)A(y,nt(y));(c.reloadPage??Uo)()}let mn=()=>{if(K||!O)return;let e=`${c.url.replace(/^http/,"ws").replace(/\/$/,"")}${Kr}`,{"content-type":n,...s}=h,a;try{a=c.socket?c.socket(e,s,[tn]):io(e,s)}catch{return yn()}W=a,ye=!1,a.onopen=()=>{W===a&&a.send(JSON.stringify({t:"hello",seq:gt(L),protocol:it,wire:en,opFormat:qe.op,...c.build?{build:c.build.slice(0,64)}:{},...c.hostProtocol!==void 0?{hostProtocol:c.hostProtocol}:{}}))},a.onmessage=f=>{if(W!==a)return;let y;try{y=JSON.parse(String(f.data))}catch{return}Xr(y)},a.onclose=()=>hn(a),a.onerror=()=>{}},ge,eo=()=>{Fe=!1,ge&&clearTimeout(ge),ge=setTimeout(()=>{if(ge=void 0,Fe||K)return;let e=new Map([...j].filter(([,n])=>n.held!=="socket"));if(e.size!==j.size){j=e;for(let n of X)n([...j.values()])}},Mt),ge.unref?.()};function hn(e){if(W!==e)return;let n=ye;W=void 0,ye=!1,le=null,n&&($("offline"),eo()),yn()}let yn=()=>{if(K)return;let e=nn(c.backoff,_e);_e++,Ee=setTimeout(mn,e)},gn=R.applyAll.bind(R),to=R.undo.bind(R),no=R.previewAll.bind(R);R.previewAll=(e,n)=>no(e,{...c.principal?{author:c.principal}:{},...n});let De=i.refusals,Je=[],nt=e=>({reason:"invalid",sentence:e}),rt=i.conflicts,Et=!1,wn,kt=async(e,n)=>{if(n instanceof Ge||ce)return;let s=n instanceof Ue?n.refusal:An(n),a=s.sentence,f=n instanceof fe?wn?.yoursOf(R,ee.get(e)?.calls??[]):void 0;oe(e);try{q([],[e])}catch{}let y=ee.get(e);ee.delete(e);let A=y?.calls[0];if(A&&!(n instanceof fe)){let m=R.allMutations().find(ue=>ue.name===A.name)?.subject?.arg,ne=m&&R.graph.getNode(A.args[m])?.kind;kn(R,{type:"refused",act:A.name,code:s.reason,...ne?{kind:ne}:{}},c.principal)}if(n instanceof fe&&C.conflicts++,n instanceof fe&&!Q()&&await Pe().catch(()=>[]),n instanceof fe&&Y&&await Y,n instanceof fe&&rt.size>0){let m=!1,ne={sentence:a,conflicts:f?n.conflicts.map(ue=>ue.node===f.node&&ue.field===f.field?{...ue,yours:f.yours}:ue):n.conflicts,keepTheirs(){m=!0},useMine(){if(!(m||!y)){m=!0,Et=!0;try{R.applyAll(f?[f.over(L)]:y.calls,{...y.intent?{intent:y.intent}:{},...y.via?{via:y.via}:{},...xe(y)})}finally{Et=!1}}}};for(let ue of rt)ue(ne);return}for(let m of De)m(a,s)},ro=(e,n)=>e.flatMap(s=>s.mutation?.name===Sn?[]:s.primitives.flatMap(a=>a.op==="splice-text"&&!n.has(a.id)&&!n.has(`${a.id}\0${a.field}`)?[{node:a.id,field:a.field,rev:L}]:[]));R.applyAll=(e,n)=>{let s=Rn(R.log.all().filter(A=>G.has(A.batch))),a=gn(e,{...c.principal?{author:c.principal}:{},...n}),f=e.map((A,m)=>{let ne=a.minted?.[m];return ne===void 0||A.args?.id!==void 0?A:{...A,mintedHint:ne}});D.push(a.batch),G.add(a.batch),ee.set(a.batch,{calls:f,...n?.intent?{intent:n.intent}:{},...n?.via?{via:n.via}:{},...xe(n)});let y=Et?[]:[...pe.baseFor(a.ops,s,(A,m)=>R.collaborative(A,m)),...ro(a.ops,s)];return he.set(a.batch,Re(tt({calls:f,...n?.intent?{intent:n.intent}:{},batch:a.batch,...y.length>0?{base:y}:{},...n?.via?{via:n.via}:{},...xe(n)},a.batch).catch(A=>kt(a.batch,A)))),a},R.apply=(e,n)=>R.applyAll([e],n),R.undo=(e,n)=>{let s=typeof e=="string"?[e]:e,a=to(s.map(y=>v.get(y)??y),{...c.principal?{author:c.principal}:{},...n});D.push(a.batch),G.add(a.batch);let f=Promise.allSettled(s.map(y=>he.get(y)));return he.set(a.batch,Re(f.then(()=>{let y=s.filter(A=>!Ce.has(A));if(y.length===0){oe(a.batch),ee.delete(a.batch),q([],[a.batch]);return}return tt({undo:y.map(A=>v.get(A)??A),...n?.intent?{intent:n.intent}:{},batch:a.batch,...n?.via?{via:n.via}:{},...xe(n)},a.batch)}).catch(y=>kt(a.batch,y)))),a};let oo=async(e,n={})=>{Tt++;try{return(await Re(tt({calls:e,...n}))).ops}finally{Tt--}},Tt=0,vn={here(e){_=e,Z()},onWho(e){return X.add(e),j.size>0&&e([...j.values()]),()=>{X.delete(e)}},leave(){if(!_)return;let e=JSON.stringify({participant:B??_.participant});if(_=null,g({t:"bye"}))return;let n=globalThis.navigator?.sendBeacon;n?n.call(globalThis.navigator,`${c.url}/graview/leave${l!==void 0?`?${ze.param}=${encodeURIComponent(l)}`:""}`,e):b(`${c.url}/graview/leave`,{method:"POST",headers:h,body:e}).catch(()=>{})}},xt=c.pollMs??800,ot=xt>0&&typeof setInterval=="function"?setInterval(()=>{Q()||Pe().catch(()=>{})},xt):null;if(O){mn();let e;await Promise.race([We,new Promise(n=>e=setTimeout(n,c.openTimeoutMs??3e3))]),clearTimeout(e)}if(r.length>0&&!ce){let e=[],n=new Set(R.log.all().map(s=>s.batch));for(let s of r)if(!(s.batch!==void 0&&n.has(s.batch)))try{R.applyAll(s.calls,{...s.intent?{intent:s.intent}:{},...s.batch?{batch:s.batch}:{},...s.via?{via:s.via}:{},...xe(s)})}catch(a){e.push($o(s,a))}e.length>0&&Je.push(nt(`${o} ${e.length===1?"One no longer fits and was not made":`${e.length} no longer fit and were not made`}: ${e.join("; ")}.`))}let bn=new Map,ao=()=>({store:R,author:c.principal,appliedAll:gn,pending:D,provisional:G,asked:ee,answers:he,letGo:Ce,sent:(e,n)=>Re(tt({calls:n,batch:e},e).catch(s=>kt(e,s))),settle:oe,land:q,seen:()=>L,gone:()=>K||ce});return{remote:{store:R,typing(e,n){let s=`${e}\0${n}`,a=bn.get(s);return a||(a=(__graviewPreload(import.meta.url,["./chunk.ZQYHNFRZ.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.EK3JXEZL.js")).then(f=>(wn=f,f.typingOf(e,n,f.wireOf(ao())))),bn.set(s,a)),a},version:H.version,migrated:H.migrated??[],send:oo,pull:Pe,onRefusal(e){De.add(e);let n=Je;Je=[];for(let s of n)e(s.sentence,s);return()=>De.delete(e)},onDeclaration(e){return At.add(e),()=>At.delete(e)},onBuild(e){return Pt.add(e),i.otherBuild!==void 0&&e(i.otherBuild),()=>Pt.delete(e)},onConflict(e){return rt.add(e),()=>rt.delete(e)},revision:(e,n)=>pe.of(e,n),seq:()=>L,participant:()=>B,transport:()=>Q()?"socket":"poll",status:u,onStatus(e){return x.add(e),()=>x.delete(e)},held:()=>E,onHeld(e){return i.helds.add(e),E!==void 0&&e(E),()=>i.helds.delete(e)},counters:()=>({...C}),who:()=>[...j.values()],pending:()=>D.length+Tt,async settled(){for(;Le.size>0;)await Promise.allSettled([...Le])},presence:vn,close(){ot&&clearInterval(ot),Se(),vn.leave(),K=!0,Ee&&clearTimeout(Ee),te&&clearTimeout(te),ge&&clearTimeout(ge);for(let n of re.splice(0))n.give(new Error("The client closed before the server could be reached."));for(let n of de.splice(0))n();let e=W;W=void 0,ye=!1;try{e?.close(1e3,"Closed.")}catch{}}},unheard(){let e=Je;return Je=[],e}};function io(e,n){let s=globalThis.WebSocket;if(!s)throw new Error("This runtime has no WebSocket; the client polls instead.");let a=typeof globalThis.document<"u",f=c.subprotocol?[tn]:[];if(!a)try{return new s(e,{headers:n,...f.length>0?{protocols:f}:{}})}catch{}let y=new URL(e);for(let[A,m]of Object.entries(k))y.searchParams.set(A,m);return l!==void 0&&y.searchParams.set(ze.param,l),f.length>0?new s(y.toString(),f):new s(y.toString())}}function Go(t,r,o=Date.now()){let i,l=t?.trim();if(l)if(/^\d+(\.\d+)?$/.test(l))i=Number(l)*1e3;else{let b=Date.parse(l);Number.isFinite(b)&&(i=Math.max(0,b-o))}let p=typeof r=="number"&&Number.isFinite(r)&&r>=0?r:void 0,c=p!==void 0&&p<50&&i!==void 0&&Math.abs(p*1e3-i)<1e3;return p!==void 0&&!c?p:i??1e3}function Uo(){globalThis.location?.reload?.()}function Ko(){return globalThis.document?.visibilityState!=="hidden"}function nn(t,r){if(typeof t=="function")return Math.max(0,t(r));let{min:o=250,max:i=1e4,factor:l=2}=t??{};return Math.min(i,o*l**r)*(.75+Math.random()*.5)}function bt(t){let r={};if(!t)return r;t.id&&(r[we.seat]=t.id),t.roles?.length&&(r[we.roles]=t.roles.join(",")),t.kind!=="human"&&(r[we.kind]=t.kind),t.name&&(r[we.name]=encodeURIComponent(t.name));let o=t.onBehalfOf;return o?.id&&(r[we.for]=o.id),o?.roles?.length&&(r[we.forRoles]=o.roles.join(",")),o?.name&&(r[we.forName]=encodeURIComponent(o.name)),r}var Yr="/graview/views";function rn(t){let r=t.fetch??fetch,o=wt(t.url,t.headers),i=o.url,l={"content-type":"application/json",...t.principal?bt(t.principal):{},...o.headers},p=t.state?{hidden:t.state.hidden??[],removed:t.state.removed??[],may:t.state.may??st.may}:st,c=new Set,b=S=>{if(JSON.stringify(S)!==JSON.stringify(p)){p=S;for(let T of c)T()}},h=async(S,T)=>{let x=await r(`${i}${t.path??Yr}`,{method:S,headers:l,...T!==void 0?{body:JSON.stringify(T)}:{}}),C=await x.json();if(!x.ok)throw new Error(C.error??`The store answered ${x.status}.`);b({hidden:C.hidden??[],removed:C.removed??[],may:C.may??st.may})},k=()=>h("GET"),O=t.state?Promise.resolve():k().catch(()=>{}),I=t.pollMs?setInterval(()=>void k().catch(()=>{}),t.pollMs):void 0;return{ready:O,refresh:k,close:()=>clearInterval(I),current:()=>p,onChange(S){return c.add(S),()=>void c.delete(S)},hide:S=>h("POST",{hide:S}),show:S=>h("POST",{show:S}),remove:(S,T)=>h("POST",{remove:S,...T?{about:T}:{}}),async restore(S){let T=p.removed.find(x=>x.name===S)?.lens;await h("POST",{restore:S}),T&&await t.onDeclaration?.()},async lens(S){await h("POST",{lens:S}),await t.onDeclaration?.()}}}var an=document.getElementById("graview-app"),on=/^\/forms\/([^/]+)\/?$/.exec(location.pathname),Qr=on?(__graviewPreload(import.meta.url,["./chunk.NRECR3NQ.js","./chunk.3D37E2G5.js","./chunk.XOZU4OFA.js","./chunk.WV6SP6IJ.js","./chunk.PZ3KM3TY.js","./chunk.CA2SYEYE.js","./chunk.MH3AQO2R.js","./chunk.J2N7EKMX.js","./chunk.P26ATAAI.js","./chunk.FIY4RUK5.js","./chunk.IY3DV52G.js","./chunk.QNC2OKLF.js","./chunk.FWXW4T4I.js","./chunk.SDO3U72B.js","./chunk.DHPXRDT5.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.KEGL6NBD.js")):He("pages");try{on?await Jo(decodeURIComponent(on[1])):await Yo()}catch(t){let r=document.createElement("pre");r.setAttribute("role","alert"),r.style.cssText="margin:2rem;font:14px/1.5 ui-monospace,monospace;white-space:pre-wrap",r.textContent=t instanceof Error?t.message:String(t),an.replaceChildren(r),window.__graviewFailed=r.textContent}async function Jo(t){let r=await fetch(`/graview/document?form=${encodeURIComponent(t)}`),o=await r.json();if(!r.ok)throw new Error(o.error??`The preview server did not hand over the form (${r.status}).`);let i=await ft(o);if(!i.ok)throw new Error(ct(i.findings));let l=i.app,p=o.principal,c=await vt({app:l,url:location.origin,principal:p,...o.state?{state:o.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=l.forms?.[t]?.title??l.name;let{mount:b}=await Qr;window.__graview=b(an,{app:l,form:t,principal:p,remote:c,height:"100dvh",onSubmitted:()=>window.__graviewSubmitted=!0}),window.__graviewReady=!0}async function Yo(){let t=await fetch("/graview/document");if(!t.ok)throw new Error(`The preview server did not hand over the document (${t.status}).`);let r=await t.json(),i=await(async h=>{if(typeof h.module=="string")return(await import(h.module)).app;let k=await ft(h);if(!k.ok)throw new Error(ct(k.findings));return k.app})(r);if(!i||typeof i!="object"||!("schema"in i))throw new Error("The app module the preview server handed does not export an app.");let l=r.principal,p=await vt({app:i,url:location.origin,principal:l,live:!0,subprotocol:!0,pollMs:1200,...r.state?{state:r.state,openTimeoutMs:0}:{openTimeoutMs:3e3}});document.title=i.name;let c,b=rn({url:location.origin,principal:l,...r.views?{state:r.views}:{},onDeclaration:async()=>{let h=await(await fetch("/graview/document")).json();if(typeof h.module=="string")return;let k=await ft(h);k.ok&&c?.setApp(k.app,p)}});await Promise.all([Qr,b.ready]),c=Xt(an,{app:i,remote:p,principal:l,studio:!1,face:"pages",routing:"address",bar:!0,height:"100dvh",label:i.name,heading:1,keptViews:b,...r.draftView?{draftView:r.draftView}:{}}),window.__graview=c,c.drawn().then(()=>{window.__graviewReady=!0})}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graview",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The Graview command line: start a product, check its declaration, write its agent docs, serve its store, preview a document with no product and photograph its places, say whether a product is on one release, host it for an agent over MCP, apply an act to it, sync its seed, install the authoring skills. The tool; @graview/* is the framework.",
|
|
6
6
|
"keywords": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@graview/
|
|
33
|
-
"@graview/
|
|
34
|
-
"@graview/
|
|
35
|
-
"@graview/
|
|
36
|
-
"@graview/
|
|
32
|
+
"@graview/guest": "0.1.69",
|
|
33
|
+
"@graview/skills": "0.1.69",
|
|
34
|
+
"@graview/tools": "0.1.69",
|
|
35
|
+
"@graview/core": "0.1.69",
|
|
36
|
+
"@graview/ship": "0.1.69"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=22"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk.64LCHHZB.js";import"./chunk.CNN32262.js";import"./chunk.EP5JS7ZH.js";import"./chunk.L7XKYGV7.js";import"./chunk.CE3NKAF7.js";import"./chunk.R3GE37OI.js";import"./chunk.2KCDLCB2.js";import"./chunk.UD7VLXPM.js";import"./chunk.3DEWQDP7.js";import"./chunk.QUETLFBJ.js";import"./chunk.JULD4XFB.js";import"./chunk.GRTBEA7O.js";import"./chunk.6AANHELP.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{g as columnActs,d as columnChoices,c as columnMoves,b as columnOf,e as columnReach,f as columnSteps,j as describePlace,k as placeText,h as resolveFor,i as shadowedPageSlots,a as statusColumns};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as b,b as c,c as d,d as e,e as f,f as g,g as h,h as i,i as j,j as k,k as l,l as m,m as n,n as o,o as p}from"./chunk.VTDOWXCP.js";import"./chunk.G4JJXA63.js";import{a}from"./chunk.TBY5IR7C.js";import"./chunk.BHJRT57H.js";import"./chunk.BIDL7GQD.js";import"./chunk.CNN32262.js";import"./chunk.JGRSUTPJ.js";import"./chunk.XOZU4OFA.js";import"./chunk.EP5JS7ZH.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.KAM73WVF.js";import"./chunk.O32F6LGK.js";import"./chunk.EGSOHTZZ.js";import"./chunk.WVUJXDXZ.js";import"./chunk.L7XKYGV7.js";import"./chunk.CE3NKAF7.js";import"./chunk.R3GE37OI.js";import"./chunk.2KCDLCB2.js";import"./chunk.UD7VLXPM.js";import"./chunk.3DEWQDP7.js";import"./chunk.TFJA4QV4.js";import"./chunk.HWFJQ42Y.js";import"./chunk.QUETLFBJ.js";import"./chunk.JULD4XFB.js";import"./chunk.GRTBEA7O.js";import"./chunk.6AANHELP.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{j as draftAnswer,i as draftFromLens,c as draftSight,m as draftView,b as isDraftFailure,d as judgeLens,e as lensEditOf,g as lensFromSpec,a as mayChangeDeclaration,k as recipeDraft,h as recipeOfLens,n as refineDraft,p as runDraftTool,f as takeBackEditOf,l as templateDraft,o as withReaderLenses};
|
|
@@ -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{G as k,La as o,W as n}from"./chunk.3VEZ5MOC.js";import{a as t}from"./chunk.SDO3U72B.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.L7XKYGV7.js","./chunk.CE3NKAF7.js","./chunk.R3GE37OI.js","./chunk.2KCDLCB2.js","./chunk.UD7VLXPM.js","./chunk.3DEWQDP7.js","./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.QOQ26NXM.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.ACNOP2IU.js")))),I=d.part((e,r)=>e.drawLinkedRecord(r),{quiet:!0}),w=d.part((e,r)=>e.drawLinkedPicker(r),{what:"Picking a linked record"});var s=p(n(),1),m=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.MIE4TJRW.js","./chunk.CFE3MHWZ.js","./chunk.RD2FSSLV.js","./chunk.HXTKBISQ.js","./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.DPHH5ZVL.js")))),g=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),E=m.part((e,r)=>(0,s.jsx)(e.RepeatEditor,{...r}),{quiet:!0});var a=p(k(),1),i=p(n(),1),c=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.TFJA4QV4.js","./chunk.HWFJQ42Y.js","./chunk.QUETLFBJ.js","./chunk.JULD4XFB.js","./chunk.GRTBEA7O.js","./chunk.H3IGXHZR.js","./chunk.7TDML5YU.js","./chunk.3VEZ5MOC.js","./chunk.SDO3U72B.js","./chunk.6AANHELP.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.TR4YFVZN.js")))),l=c.part((e,r)=>(0,i.jsx)(e.WhenInput,{...r}),{quiet:!0});function M(e){return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)("span",{"data-graview-when-arriving":"",style:{display:"inline-block",minHeight:24}}),children:(0,i.jsx)(l,{...e})})}var N=()=>c.load().then(()=>{},()=>{});export{y as a,I as b,w as c,g as d,E as e,M as f,N as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b}from"./chunk.AWV57UBJ.js";import"./chunk.YBQ5GVAX.js";import"./chunk.EB7PZJEO.js";import"./chunk.MSUZAJ2K.js";import"./chunk.64LCHHZB.js";import"./chunk.42KHFGN6.js";import"./chunk.RQG672MJ.js";import"./chunk.Q6H5HESF.js";import"./chunk.3JMQKANL.js";import"./chunk.42C3FIKK.js";import"./chunk.2ME4DVBI.js";import"./chunk.XXCHO2A5.js";import"./chunk.SADR3MQI.js";import"./chunk.HJCQ6I3S.js";import"./chunk.2BMZPALF.js";import"./chunk.GONZB3J3.js";import"./chunk.LFFJB6D3.js";import"./chunk.DMZRFXH7.js";import"./chunk.DZ6UDZOB.js";import"./chunk.Q4VFLLUT.js";import"./chunk.6ZENHSTQ.js";import"./chunk.BHJRT57H.js";import"./chunk.BIDL7GQD.js";import"./chunk.CNN32262.js";import"./chunk.N5Z34V7U.js";import"./chunk.LOKGUALC.js";import"./chunk.EP5JS7ZH.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.KAM73WVF.js";import"./chunk.O32F6LGK.js";import"./chunk.EGSOHTZZ.js";import"./chunk.WVUJXDXZ.js";import"./chunk.L7XKYGV7.js";import"./chunk.CE3NKAF7.js";import"./chunk.R3GE37OI.js";import"./chunk.2KCDLCB2.js";import"./chunk.UD7VLXPM.js";import"./chunk.3DEWQDP7.js";import"./chunk.MIE4TJRW.js";import"./chunk.CFE3MHWZ.js";import"./chunk.RD2FSSLV.js";import"./chunk.HXTKBISQ.js";import"./chunk.TFJA4QV4.js";import"./chunk.HWFJQ42Y.js";import"./chunk.QUETLFBJ.js";import"./chunk.JULD4XFB.js";import"./chunk.GRTBEA7O.js";import"./chunk.H3IGXHZR.js";import"./chunk.7TDML5YU.js";import"./chunk.3VEZ5MOC.js";import"./chunk.SDO3U72B.js";import"./chunk.6AANHELP.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{b as declaredLensView,a as formatFor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.WVUJXDXZ.js";import{k as m,m as i}from"./chunk.L7XKYGV7.js";import"./chunk.CE3NKAF7.js";import"./chunk.R3GE37OI.js";import"./chunk.2KCDLCB2.js";import"./chunk.UD7VLXPM.js";import"./chunk.3DEWQDP7.js";import"./chunk.JULD4XFB.js";import"./chunk.GRTBEA7O.js";import"./chunk.6AANHELP.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";function a(t){let r=new Map;return(s,o)=>{let e=o.kind,n=r.get(e);return n===void 0&&r.set(e,n=i(t,e).length),n===0?{}:m(t,s,o).values}}export{a as computedOn};
|