graview 0.1.38 → 0.1.40
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.XHWL7QBF.js → chunk.242EUAPE.js} +1 -1
- package/dist/preview/chunk.2CF2XKOS.js +1 -0
- package/dist/preview/chunk.2FGYWAID.js +1 -0
- package/dist/preview/{chunk.MWZK3HVG.js → chunk.2FLPDPEL.js} +1 -1
- package/dist/preview/{chunk.6IHXTT6Z.js → chunk.2GDXNTY5.js} +1 -1
- package/dist/preview/chunk.2JB4Y2ET.js +1 -0
- package/dist/preview/chunk.2NXH7VAI.js +1 -0
- package/dist/preview/chunk.2OSNYF5C.js +1 -0
- package/dist/preview/{chunk.GR5Q4HTW.js → chunk.2RVUDRRY.js} +1 -1
- package/dist/preview/chunk.2WACBAUN.js +9 -0
- package/dist/preview/chunk.35PHXNOC.js +1 -0
- package/dist/preview/chunk.3Q75TIGL.js +1 -0
- package/dist/preview/chunk.42XSBKPO.js +1 -0
- package/dist/preview/chunk.47KHZCNG.js +1 -0
- package/dist/preview/{chunk.Z3ZKYSPN.js → chunk.4QPVS2ZM.js} +1 -1
- package/dist/preview/{chunk.WERYQENC.js → chunk.4VG2KN7G.js} +1 -1
- package/dist/preview/{chunk.ZRQI5VJF.js → chunk.5RABSIF7.js} +1 -1
- package/dist/preview/{chunk.2VIGF4FO.js → chunk.67WWRC6Y.js} +1 -1
- package/dist/preview/chunk.6AVZWLRF.js +1 -0
- package/dist/preview/chunk.6CRRPXKP.js +1 -0
- package/dist/preview/{chunk.FUJM7GDV.js → chunk.6FNMDAX5.js} +1 -1
- package/dist/preview/chunk.6J37UQKG.js +1 -0
- package/dist/preview/chunk.6JEU3ZNE.js +1 -0
- package/dist/preview/chunk.6PSWHBL2.js +1 -0
- package/dist/preview/chunk.74NOI7QN.js +1 -0
- package/dist/preview/chunk.7LIKEE5Z.js +1 -0
- package/dist/preview/chunk.7WPCP2LZ.js +1 -0
- package/dist/preview/{chunk.JWJQ2VXS.js → chunk.ACBUAIDF.js} +1 -1
- package/dist/preview/{chunk.IEDXW36H.js → chunk.AKQXF7GW.js} +1 -1
- package/dist/preview/chunk.AUBGUDO5.js +1 -0
- package/dist/preview/chunk.AVKDWISO.js +1 -0
- package/dist/preview/{chunk.36SQJMEE.js → chunk.AWX7GP72.js} +1 -1
- package/dist/preview/chunk.BFNVG5JE.js +1 -0
- package/dist/preview/chunk.BNVMMOOY.js +1 -0
- package/dist/preview/{chunk.7H5KVW2F.js → chunk.BSAXZQSY.js} +1 -1
- package/dist/preview/{chunk.V2NBJDAX.js → chunk.BXT6FDT4.js} +1 -1
- package/dist/preview/{chunk.TKSGC6XH.js → chunk.C2PECN4C.js} +1 -1
- package/dist/preview/chunk.CL2ZS5EQ.js +1 -0
- package/dist/preview/chunk.CN5WAKHJ.js +5 -0
- package/dist/preview/{chunk.LF7PU77M.js → chunk.CNFL5IN5.js} +1 -1
- package/dist/preview/chunk.D25XEVKO.js +1 -0
- package/dist/preview/chunk.DL26BKT7.js +1 -0
- package/dist/preview/chunk.DPZTW24D.js +1 -0
- package/dist/preview/chunk.ESSSNLEO.js +1 -0
- package/dist/preview/chunk.ETOGQE2V.js +1 -0
- package/dist/preview/chunk.FDE3TSTK.js +1 -0
- package/dist/preview/chunk.FFZBOP65.js +1 -0
- package/dist/preview/chunk.FOQZADMA.js +25 -0
- package/dist/preview/chunk.G6VZNRQ5.js +1 -0
- package/dist/preview/chunk.GAFYE37S.js +3 -0
- package/dist/preview/{chunk.KNJZ2YNJ.js → chunk.GT2BITLW.js} +1 -1
- package/dist/preview/{chunk.ZLXPIEUC.js → chunk.GTV2VZAS.js} +2 -2
- package/dist/preview/{chunk.AZCFXPEL.js → chunk.GY6RYJHM.js} +1 -1
- package/dist/preview/chunk.GZIVMOY4.js +117 -0
- package/dist/preview/{chunk.VKHKYK5L.js → chunk.H5ADMSE7.js} +1 -1
- package/dist/preview/chunk.H5HWN7A2.js +1 -0
- package/dist/preview/chunk.H6XKMLDQ.js +1 -0
- package/dist/preview/chunk.H7POIT3V.js +1 -0
- package/dist/preview/{chunk.SGB6IMWN.js → chunk.HB7ELBVK.js} +1 -1
- package/dist/preview/chunk.HFYUAK5Z.js +6 -0
- package/dist/preview/{chunk.MCVY6RRS.js → chunk.HPAGOEZG.js} +1 -1
- package/dist/preview/{chunk.EUGWV3S6.js → chunk.I7XSDXQ3.js} +1 -1
- package/dist/preview/chunk.IDUPJMJO.js +1 -0
- package/dist/preview/chunk.IFTWVUJO.js +2 -0
- package/dist/preview/{chunk.RZVZG2BQ.js → chunk.ISXFH3CK.js} +1 -1
- package/dist/preview/chunk.J4IULZFD.js +1 -0
- package/dist/preview/chunk.JACGQ2PR.js +4 -0
- package/dist/preview/{chunk.67WL7BGF.js → chunk.JDRLSVOI.js} +1 -1
- package/dist/preview/chunk.JLDBFX6O.js +1 -0
- package/dist/preview/{chunk.RVJYEOFN.js → chunk.JQEYZB5I.js} +1 -1
- package/dist/preview/chunk.L3A6YLMT.js +21 -0
- package/dist/preview/chunk.LLEFYJPJ.js +344 -0
- package/dist/preview/chunk.LOZJQ5ZX.js +1 -0
- package/dist/preview/chunk.LPBM5AES.js +19 -0
- package/dist/preview/chunk.LPE4FLC6.js +6 -0
- package/dist/preview/{chunk.SZWX56WR.js → chunk.MIM2QLF5.js} +2 -2
- package/dist/preview/{chunk.FMVWXSQ7.js → chunk.N2K25KH3.js} +1 -1
- package/dist/preview/{chunk.2EJAIT33.js → chunk.N6MVK3KD.js} +1 -1
- package/dist/preview/{chunk.33GN2NUT.js → chunk.NGDXH66B.js} +1 -1
- package/dist/preview/chunk.O5JKDFDH.js +1 -0
- package/dist/preview/chunk.O6F3K6CU.js +1 -0
- package/dist/preview/{chunk.V5ZT5NSJ.js → chunk.OW7NSJ4H.js} +1 -1
- package/dist/preview/chunk.P5ODICND.js +32 -0
- package/dist/preview/{chunk.YPY5BOEI.js → chunk.PPG2SEIY.js} +1 -1
- package/dist/preview/chunk.PXQVXBNG.js +1 -0
- package/dist/preview/chunk.PYNYHNDS.js +1 -0
- package/dist/preview/{chunk.MVNUWK5Y.js → chunk.Q4TZHWQX.js} +1 -1
- package/dist/preview/chunk.QCWZSSNC.js +1 -0
- package/dist/preview/chunk.QIV65FWE.js +1 -0
- package/dist/preview/chunk.R5WY567U.js +88 -0
- package/dist/preview/{chunk.VNBR4DHD.js → chunk.RCM7NOPF.js} +2 -1
- package/dist/preview/chunk.S2U5CEP4.js +1 -0
- package/dist/preview/chunk.S356ACK2.js +1 -0
- package/dist/preview/chunk.SDO3U72B.js +1 -0
- package/dist/preview/chunk.SHNYYBNW.js +1 -0
- package/dist/preview/{chunk.DL637Q3W.js → chunk.SIGC3G7S.js} +1 -1
- package/dist/preview/chunk.STI447YW.js +1 -0
- package/dist/preview/chunk.T3TYD7QI.js +1 -0
- package/dist/preview/chunk.T73RB7LC.js +1 -0
- package/dist/preview/chunk.TD2LNFUB.js +1 -0
- package/dist/preview/{chunk.5XJEGXDO.js → chunk.TGVUIFKD.js} +1 -1
- package/dist/preview/chunk.TIH2PDFH.js +1 -0
- package/dist/preview/chunk.TKUNRFDE.js +1 -0
- package/dist/preview/{chunk.74RMHUCX.js → chunk.TNESS3LQ.js} +1 -1
- package/dist/preview/chunk.UHI3D7JC.js +1 -0
- package/dist/preview/{chunk.TOWYHWPB.js → chunk.UOPKRN55.js} +1 -1
- package/dist/preview/{chunk.BUVAMSOZ.js → chunk.UTCB3CE7.js} +2 -2
- package/dist/preview/{chunk.3D5T3XIE.js → chunk.UUBYFBPN.js} +1 -1
- package/dist/preview/{chunk.YUJG5SN5.js → chunk.UWW6ZEPY.js} +2 -2
- package/dist/preview/chunk.V5MYKNL7.js +5 -0
- package/dist/preview/{chunk.6UCRL4OF.js → chunk.VDAMCTNL.js} +1 -1
- package/dist/preview/chunk.VF7P3ZVZ.js +35 -0
- package/dist/preview/chunk.VIYECFKZ.js +6 -0
- package/dist/preview/{chunk.5MSO3KRO.js → chunk.VJXXCUKS.js} +1 -1
- package/dist/preview/{chunk.GZ3IXNA4.js → chunk.VNUHESMZ.js} +1 -1
- package/dist/preview/chunk.VZYCILPJ.js +1 -0
- package/dist/preview/chunk.W4HBRXMY.js +1 -0
- package/dist/preview/chunk.W7R2GFBW.js +47 -0
- package/dist/preview/chunk.WBLHCH5M.js +1 -0
- package/dist/preview/{chunk.NPX7SPXM.js → chunk.WVDKYUF3.js} +1 -1
- package/dist/preview/{chunk.LHO7L3CS.js → chunk.XEKLEHC3.js} +1 -1
- package/dist/preview/{chunk.IM7LXLIB.js → chunk.XFZKP4IF.js} +1 -1
- package/dist/preview/chunk.XQHDP5C3.js +1 -0
- package/dist/preview/chunk.XQTMO5PW.js +1 -0
- package/dist/preview/{chunk.UXIFQIHA.js → chunk.XRYTJNA7.js} +1 -1
- package/dist/preview/chunk.YO24NALN.js +1 -0
- package/dist/preview/{chunk.B5ILKGEF.js → chunk.YWNHCZQ5.js} +1 -1
- package/dist/preview/chunk.YWVOACSX.js +5 -0
- package/dist/preview/chunk.YYFLTMNN.js +1 -0
- package/dist/preview/chunk.YYIKSH2F.js +3 -0
- package/dist/preview/{chunk.QYRPELLU.js → chunk.Z5AB2DBF.js} +1 -1
- package/dist/preview/{chunk.6ONRWFA6.js → chunk.Z7LDT55A.js} +1 -1
- package/dist/preview/chunk.ZGCRMNER.js +1 -0
- package/dist/preview/{chunk.OE4QOBJF.js → chunk.ZHLQWMV5.js} +1 -1
- package/dist/preview/{chunk.ROGYDMES.js → chunk.ZJMDLRC5.js} +1 -1
- package/dist/preview/chunk.ZK3X23EU.js +1 -0
- package/dist/preview/chunk.ZOR6FKNI.js +1 -0
- package/dist/preview/chunk.ZRLXVYPG.js +1 -0
- package/dist/preview/index.html +47 -43
- package/dist/preview/page.js +8 -8
- package/package.json +6 -6
- package/dist/preview/chunk.2HFRVWWM.js +0 -1
- package/dist/preview/chunk.3FW4QNGV.js +0 -1
- package/dist/preview/chunk.3RT2GUZ5.js +0 -1
- package/dist/preview/chunk.3ZRHHB7X.js +0 -1
- package/dist/preview/chunk.4DEUD66C.js +0 -6
- package/dist/preview/chunk.4EQSP7I3.js +0 -1
- package/dist/preview/chunk.4Y6BCHV2.js +0 -1
- package/dist/preview/chunk.5VBBQ6Z3.js +0 -1
- package/dist/preview/chunk.6CKBIY7L.js +0 -1
- package/dist/preview/chunk.6XJP7F3I.js +0 -1
- package/dist/preview/chunk.7RSZMIAL.js +0 -1
- package/dist/preview/chunk.AFY35RJP.js +0 -1
- package/dist/preview/chunk.BRHRAVU2.js +0 -3
- package/dist/preview/chunk.DFVVS6C5.js +0 -1
- package/dist/preview/chunk.DQJAEU4V.js +0 -1
- package/dist/preview/chunk.ESSQAMPM.js +0 -1
- package/dist/preview/chunk.EV553KRT.js +0 -1
- package/dist/preview/chunk.EZP4FHDX.js +0 -35
- package/dist/preview/chunk.F6PIK2J2.js +0 -1
- package/dist/preview/chunk.FTJBW25J.js +0 -1
- package/dist/preview/chunk.FYIQZMVF.js +0 -1
- package/dist/preview/chunk.HUSFMFXH.js +0 -1
- package/dist/preview/chunk.HVTGPEVW.js +0 -1
- package/dist/preview/chunk.I3SQJ2L2.js +0 -1
- package/dist/preview/chunk.IU6ISXXC.js +0 -1
- package/dist/preview/chunk.K5KEECHL.js +0 -88
- package/dist/preview/chunk.L34FY7QQ.js +0 -1
- package/dist/preview/chunk.L73VUBXN.js +0 -4
- package/dist/preview/chunk.L7JKEEMM.js +0 -1
- package/dist/preview/chunk.LAW5PQEM.js +0 -1
- package/dist/preview/chunk.LDD3QX7G.js +0 -1
- package/dist/preview/chunk.LU5LSXSW.js +0 -1
- package/dist/preview/chunk.MQ7FNHXG.js +0 -25
- package/dist/preview/chunk.NH5TDAB2.js +0 -1
- package/dist/preview/chunk.NORRCKGN.js +0 -1
- package/dist/preview/chunk.NQQHOSOK.js +0 -1
- package/dist/preview/chunk.NWWMUOZM.js +0 -1
- package/dist/preview/chunk.OEF3GPRM.js +0 -1
- package/dist/preview/chunk.OS3L4ZOF.js +0 -2
- package/dist/preview/chunk.OTL3Z345.js +0 -1
- package/dist/preview/chunk.P3UPCI23.js +0 -1
- package/dist/preview/chunk.PGKIEDYV.js +0 -9
- package/dist/preview/chunk.PKUWET2F.js +0 -1
- package/dist/preview/chunk.POHEWJKZ.js +0 -1
- package/dist/preview/chunk.PUBG2L6F.js +0 -117
- package/dist/preview/chunk.QT4XGC5Z.js +0 -344
- package/dist/preview/chunk.QTTBZJ6W.js +0 -1
- package/dist/preview/chunk.RJDZOF2L.js +0 -1
- package/dist/preview/chunk.SGLJTSTD.js +0 -1
- package/dist/preview/chunk.SITFEJES.js +0 -1
- package/dist/preview/chunk.UF3L6FJO.js +0 -1
- package/dist/preview/chunk.VSYHU5MA.js +0 -1
- package/dist/preview/chunk.VTWFVPKD.js +0 -19
- package/dist/preview/chunk.VV4BPOIK.js +0 -1
- package/dist/preview/chunk.W2HCJQVK.js +0 -32
- package/dist/preview/chunk.WG5NIR23.js +0 -47
- package/dist/preview/chunk.WLPTY4BF.js +0 -5
- package/dist/preview/chunk.XDYAG276.js +0 -1
- package/dist/preview/chunk.XM3NPZLP.js +0 -1
- package/dist/preview/chunk.YAXZNQY6.js +0 -1
- package/dist/preview/chunk.YG423NEB.js +0 -1
- package/dist/preview/chunk.YVR3ZMTV.js +0 -1
- package/dist/preview/chunk.YXH3IWNR.js +0 -1
- package/dist/preview/chunk.ZYCNEOAQ.js +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{Bc as Dn,Da as In,Dc as Nn,Gc as jn,Ha as ft,I as Vn,Ja as Cn,Ua as _n,Vc as Gn,Wb as Ln,id as Wn,nd as Fe,od as pt,qc as Hn}from"./chunk.WLPTY4BF.js";import{a as We,b as C}from"./chunk.AJZBJBMO.js";var ao=We(w=>{"use strict";var bt=Symbol.for("react.transitional.element"),Ar=Symbol.for("react.portal"),kr=Symbol.for("react.fragment"),Pr=Symbol.for("react.strict_mode"),Rr=Symbol.for("react.profiler"),Tr=Symbol.for("react.consumer"),Mr=Symbol.for("react.context"),Or=Symbol.for("react.forward_ref"),Vr=Symbol.for("react.suspense"),Ir=Symbol.for("react.memo"),to=Symbol.for("react.lazy"),Cr=Symbol.for("react.activity"),Xn=Symbol.iterator;function _r(e){return e===null||typeof e!="object"?null:(e=Xn&&e[Xn]||e["@@iterator"],typeof e=="function"?e:null)}var no={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oo=Object.assign,ro={};function ge(e,t,n){this.props=e,this.context=t,this.refs=ro,this.updater=n||no}ge.prototype.isReactComponent={};ge.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ge.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function io(){}io.prototype=ge.prototype;function xt(e,t,n){this.props=e,this.context=t,this.refs=ro,this.updater=n||no}var Et=xt.prototype=new io;Et.constructor=xt;oo(Et,ge.prototype);Et.isPureReactComponent=!0;var Jn=Array.isArray;function vt(){}var O={H:null,A:null,T:null,S:null},so=Object.prototype.hasOwnProperty;function At(e,t,n){var o=n.ref;return{$$typeof:bt,type:e,key:t,ref:o!==void 0?o:null,props:n}}function Lr(e,t){return At(e.type,t,e.props)}function kt(e){return typeof e=="object"&&e!==null&&e.$$typeof===bt}function Hr(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Qn=/\/+/g;function wt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hr(""+e.key):t.toString(36)}function Dr(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(vt,vt):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function me(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case bt:case Ar:s=!0;break;case to:return s=e._init,me(s(e._payload),t,n,o,r)}}if(s)return r=r(e),s=o===""?"."+wt(e,0):o,Jn(r)?(n="",s!=null&&(n=s.replace(Qn,"$&/")+"/"),me(r,t,n,"",function(u){return u})):r!=null&&(kt(r)&&(r=Lr(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Qn,"$&/")+"/")+s)),t.push(r)),1;s=0;var d=o===""?".":o+":";if(Jn(e))for(var a=0;a<e.length;a++)o=e[a],i=d+wt(o,a),s+=me(o,t,n,i,r);else if(a=_r(e),typeof a=="function")for(e=a.call(e),a=0;!(o=e.next()).done;)o=o.value,i=d+wt(o,a++),s+=me(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return me(Dr(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function Xe(e,t,n){if(e==null)return e;var o=[],r=0;return me(e,o,"","",function(i){return t.call(n,i,r++)}),o}function Nr(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var eo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},jr={map:Xe,forEach:function(e,t,n){Xe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Xe(e,function(){t++}),t},toArray:function(e){return Xe(e,function(t){return t})||[]},only:function(e){if(!kt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=Cr;w.Children=jr;w.Component=ge;w.Fragment=kr;w.Profiler=Rr;w.PureComponent=xt;w.StrictMode=Pr;w.Suspense=Vr;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return O.H.useMemoCache(e)}};w.cache=function(e){return function(){return e.apply(null,arguments)}};w.cacheSignal=function(){return null};w.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=oo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!so.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var s=Array(i),d=0;d<i;d++)s[d]=arguments[d+2];o.children=s}return At(e.type,r,o)};w.createContext=function(e){return e={$$typeof:Mr,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Tr,_context:e},e};w.createElement=function(e,t,n){var o,r={},i=null;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)so.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var d=Array(s),a=0;a<s;a++)d[a]=arguments[a+2];r.children=d}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)r[o]===void 0&&(r[o]=s[o]);return At(e,i,r)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:Or,render:e}};w.isValidElement=kt;w.lazy=function(e){return{$$typeof:to,_payload:{_status:-1,_result:e},_init:Nr}};w.memo=function(e,t){return{$$typeof:Ir,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=O.T,n={};O.T=n;try{var o=e(),r=O.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(vt,eo)}catch(i){eo(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),O.T=t}};w.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()};w.use=function(e){return O.H.use(e)};w.useActionState=function(e,t,n){return O.H.useActionState(e,t,n)};w.useCallback=function(e,t){return O.H.useCallback(e,t)};w.useContext=function(e){return O.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return O.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return O.H.useEffect(e,t)};w.useEffectEvent=function(e){return O.H.useEffectEvent(e)};w.useId=function(){return O.H.useId()};w.useImperativeHandle=function(e,t,n){return O.H.useImperativeHandle(e,t,n)};w.useInsertionEffect=function(e,t){return O.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return O.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return O.H.useMemo(e,t)};w.useOptimistic=function(e,t){return O.H.useOptimistic(e,t)};w.useReducer=function(e,t,n){return O.H.useReducer(e,t,n)};w.useRef=function(e){return O.H.useRef(e)};w.useState=function(e){return O.H.useState(e)};w.useSyncExternalStore=function(e,t,n){return O.H.useSyncExternalStore(e,t,n)};w.useTransition=function(){return O.H.useTransition()};w.version="19.2.8"});var N=We((gs,lo)=>{"use strict";lo.exports=ao()});var So=We(et=>{"use strict";var Zr=Symbol.for("react.transitional.element"),Xr=Symbol.for("react.fragment");function ho(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:Zr,type:e,key:o,ref:t!==void 0?t:null,props:n}}et.Fragment=Xr;et.jsx=ho;et.jsxs=ho});var Ce=We((As,wo)=>{"use strict";wo.exports=So()});function Ke(e){let t,n=!1,o,r,i=0;return()=>{if(n)return Promise.resolve(t);if(o)return o;let s=i>0&&r!==void 0?gr(r):e();i+=1;let d=s.then(a=>(t=a,n=!0,o=void 0,a),a=>{throw o=void 0,r??=hr(a),a});return o=d,d}}var Fn=0;function gr(e){return Fn+=1,import(`${e}${e.includes("?")?"&":"?"}retry=${Fn}`)}function hr(e,t=import.meta.url){let n=e instanceof Error?e.message:typeof e=="string"?e:"",o=/^(?:Failed to fetch|error loading) dynamically imported module: ([a-z]+:\/\/[^\s"'<>]+)/.exec(n)?.[1]?.replace(/[.,;:)\]]+$/,""),r=i=>i.split("/",3).join("/");return o&&r(o)===r(t)?o:void 0}var fe={focusId:null,relation:null,expanded:[],pins:{}},Be=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function te(e){let t=new URLSearchParams;e.focusId&&t.set("focus",e.focusId),e.relation&&t.set("relation",e.relation),e.overview&&t.set("overview","1"),e.zoom&&t.set("zoom","1"),e.past&&t.set("past","1"),e.shown&&e.shown.length>0&&t.set("show",[...e.shown].sort().join(",")),e.selection!==void 0&&e.selection.length>0&&t.set("sel",[...e.selection].sort().join(",")),e.expanded.length>0&&t.set("expand",[...e.expanded].sort().join(","));for(let o of Object.keys(e.pins).sort()){let r=e.pins[o];t.set(`pin.${o}`,`${$e(r.x)},${$e(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${$e(e.pan.x)},${$e(e.pan.y)}`);for(let o of Object.keys(e.within??{}).sort()){let r=e.within[o];r.length>0&&t.set(`in.${o}`,r)}e.q&&e.q.trim().length>0&&t.set("q",e.q);let n=t.toString();return n?`#${n}`:"#"}function Sr(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function qe(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[h,p]of n){if(!h.startsWith("pin."))continue;let[g,b]=p.split(","),A=g===void 0?null:Be(g),m=b===void 0?null:Be(b);A===null||m===null||(o[h.slice(4)]={x:A,y:m})}let r=Object.create(null);for(let[h,p]of n)!h.startsWith("in.")||p.length===0||(r[h.slice(3)]=p);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let s=n.get("pan")?.split(",")??[],d=s[0]===void 0?null:Be(s[0]),a=s[1]===void 0?null:Be(s[1]),u=(n.get("sel")??"").split(",").filter(h=>h.length>0).sort(),f=n.get("overview")==="1";return{...u.length>0?{selection:u}:{},...f?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...d!==null&&a!==null?{pan:{x:d,y:a}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:Sr(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(h=>h.length>0&&(f||!h.startsWith("kind:"))).sort(),pins:o}}function Qi(e){let t=qe(e);return te(t)==="#"?{...t,overview:!0}:t}function es(e){let t=te(e);return t==="#overview=1"?"":t}function $e(e){return Math.round(e*100)/100}function Bn(e,t){return te(e)===te(t)}var Kn="edge:";function $n(e){if(!e.startsWith(Kn))return null;let t=e.slice(Kn.length).split(":");if(t.length!==3)return null;let[n,o,r]=t;if(!n||!o||!r)return null;try{return{kind:decodeURIComponent(n),from:decodeURIComponent(o),to:decodeURIComponent(r)}}catch{return null}}function yt(e){let{pan:t,...n}=e;return{...n,pins:{}}}function $(e,t){if(t===e.focusId)return{...e,focusId:t};let n=yt(e);return{...n.within?.q!==void 0?se(n,"q",null):n,focusId:t}}function qn(e,t){return{...e,relation:t}}function se(e,t,n){let o={...e.within??{}};if(n===null?delete o[t]:o[t]=n,Object.keys(o).length===0){let{within:r,...i}=e;return i}return{...e,within:o}}function pe(e,t){if(t!==e.overview&&(e=yt(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function ze(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Ve(e,t){if(t!==(e.zoom===!0)&&(e=yt(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function Ue(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var Ze="aggregate:",Ye="kind:";function mt(e){return`${Ye}${e}`}function ye(e){return e.startsWith(Ye)?e.slice(Ye.length):null}var os="kinds:beyond";function wr(e){let t=ye(e);return t?[t]:ae(e)}function ne(...e){return`${Ze}${[...e].sort().join("+")}`}function zn(e){return e.startsWith(Ze)}function ae(e){return!zn(e)||e.includes("|")?[]:e.slice(Ze.length).split("+").filter(Boolean)}function Un(e,t,n={}){let o=ye(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return Ue(e,t);let r=o!==null?ne(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Ve(e,!1);if(o!==null&&n.carry){let i=pe({...$(e,r),relation:null},!1);return se(Ve(i,!0),"q",n.carry)}return Ve({...$(e,r),relation:null},!0)}function vr(e,t,n){return se(pe($(e,ne(t)),!1),"view",n)}function rs(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Yn="aggregate:";function gt(e){return e.startsWith(Yn)&&e.includes("|")}var ht=e=>e?.off===!0,br=e=>e!==void 0&&!ht(e)&&(e.fast!==void 0||e.thinking!==void 0||e.answer!==void 0||e.decide!==void 0||e.complete!==void 0||e.turn!==void 0),Zn=e=>e!==void 0&&!ht(e)&&(e.fast!==void 0||e.decide!==void 0),xr=e=>e?.suggestOnOpen!==!1&&Zn(e),Er=e=>e?.hoverChips===!0&&Zn(e);var St={};var uo=C(N(),1),Gr={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},co=e=>`graview:seat:${e}`;function Wr(e){if(!e)return{};try{let t=sessionStorage.getItem(e);if(!t)return{};let n=JSON.parse(t);return{...Array.isArray(n.turns)?{turns:n.turns}:{},...Array.isArray(n.outcomes)?{outcomes:new Map(n.outcomes)}:{},...n.draft?.drawn?{draft:n.draft}:{}}}catch{return{}}}function Fr(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Pt(e){let t=e===null?null:co(e),n={...Gr,...Wr(t)},o=new Set,r=(i,s=!0)=>{n=i,s&&Fr(t,n);for(let d of[...o])d()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,s)=>r({...n,outcomes:new Map(n.outcomes).set(i,s)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,s=null)=>r({...n,draft:i,draftNote:s})}}function Kr(e){return(0,uo.useSyncExternalStore)(e.subscribe,e.get,e.get)}var po=C(N(),1),Br={entries:[],ghost:null,loaded:!1};function fo(e,t){let n=new Map(e.map(o=>[o.id,o]));for(let o of t)n.set(o.id,{...n.get(o.id),...o});return[...n.values()].sort((o,r)=>o.at<r.at?1:o.at>r.at?-1:0)}function Rt(e){let t=Br,n=new Set,o=r=>{t=r;for(let i of[...n])i()};return{get:()=>t,subscribe:r=>(n.add(r),()=>n.delete(r)),record:r=>{o({...t,entries:fo(t.entries,[r])}),Promise.resolve(e()?.keep?.(r)).catch(i=>{console.warn("The host did not keep an AI interaction:",i)})},setGhost:r=>o({...t,ghost:r}),load:()=>{if(t.loaded)return;o({...t,loaded:!0});let r=e()?.load;r&&Promise.resolve(r()).then(i=>o({...t,entries:fo(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function $r(e){return(0,po.useSyncExternalStore)(e.subscribe,e.get,e.get)}function yo(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var Je=C(N(),1),Qe=(0,Je.createContext)(void 0),qr=()=>(0,Je.useContext)(Qe);var k=C(N(),1),Ie=(0,k.createContext)(null);function go(){return(0,k.useContext)(Ie)}function zr(e,t){let n=go(),o=(0,k.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,k.useRef)(0),i=(0,k.useCallback)(s=>o.subscribe(()=>{r.current+=1,s()}),[o]);return(0,k.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Ur=Ke(()=>(__graviewPreload(import.meta.url,["./chunk.TI4OSTQV.js","./chunk.AJZBJBMO.js"]),import("./chunk.J2CR4RRH.js"))),mo,Yr=400;function Tt(e,t,n){let o=(0,k.useContext)(Ie),r=o!==null&&o.owns(e,t),[i,s]=(0,k.useState)(null),[d,a]=(0,k.useState)(mo);(0,k.useEffect)(()=>{if(d||r||i===null)return;let E=!0;return Ur().then(R=>{mo=R,E&&a(R)},()=>{}),()=>{E=!1}},[d,r,i]);let[u,f]=(0,k.useState)(0),h=(0,k.useMemo)(()=>r||i===null||i>=e.log.length||!d?void 0:d.askDeclaration(n,i),[r,e,i,n,d,u]),p=h&&"waiting"in h?h.waiting:void 0,[g,b]=(0,k.useState)(void 0);(0,k.useEffect)(()=>{if(!p)return;let E=!0,R=setTimeout(()=>E&&b(p),Yr);return p.then(()=>E&&f(I=>I+1)),()=>{E=!1,clearTimeout(R)}},[p]);let A=p!==void 0&&g!==p,m=(0,k.useMemo)(()=>{if(r||i===null||i>=e.log.length||!d||A)return null;try{let E=d.pastAt(e,i,n);return{seq:i,at:E.past?.at,store:E}}catch{return null}},[r,e,i,n,d,A,u]),v=(0,k.useRef)(null),y=A?v.current:m;(0,k.useEffect)(()=>{v.current=y},[y]);let x=(0,k.useCallback)(E=>s(E===null?null:E>=e.log.length?Number.POSITIVE_INFINITY:E),[e]),P=(0,k.useCallback)((E,R)=>[e,y?.store].some(I=>I!==void 0&&(I===E||I.seenBy(R)===E)),[e,y]),D=i!==null,L=(0,k.useMemo)(()=>({past:y,open:D,show:x,live:e,host:n,owns:P}),[y,D,x,e,n,P]);return r?o:L}var vo=e=>`graview:setting:${e}`;function bo(){return localStorage}function xo(e,t){try{let n=(t??bo()).getItem(vo(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function Eo(e,t,n){try{(n??bo()).setItem(vo(e.name),t)}catch{}}function Ao(e,t){if(typeof document>"u")return;let n=document.documentElement;if(e.honored==="root-font-size"){n.style.fontSize=t===e.initial?"":t;return}let o=`graview${e.name.replace(/-([a-z0-9])/g,(r,i)=>i.toUpperCase()).replace(/^[a-z]/,r=>r.toUpperCase())}`;t===e.initial?delete n.dataset[o]:n.dataset[o]=t}var _=C(N(),1);function Mt(e){return Fe(e)}var Jr=12,Qr=4;function ei(e,t,n){let o=Mt(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var tt=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-Jr);function ko(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Qr)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?mt([...o][0]):n[0]}function Ot(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[s,d]of e)d.mode!=="asking"&&d.mode!=="docked"&&t.at-d.since>=t.holdMs&&o.set(s,{...d,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=ei(e,t.author,t.at),i=s=>o.set(r.participant,{...r,...s,since:t.at});switch(t.type){case"read":{let s=ko(t.ids,n);return i({at:s,mode:"reading",trail:tt(r.trail,s)}),o}case"about-to-write":case"write":{let s=ko(t.ids,n);return i({at:s,mode:"writing",trail:tt(r.trail,s),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:tt(r.trail,t.where)}),o;case"asking":return i({at:t.where??r.at,mode:"asking",say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},trail:tt(r.trail,t.where)}),o;case"said":return i({say:t.say,...t.confidence!==void 0?{confidence:t.confidence}:{confidence:void 0},...t.caption?{caption:t.caption}:{}}),o;case"over":return i({over:t.over}),o;case"home":return i({at:null,mode:"docked",trail:[],say:void 0,confidence:void 0,over:null}),o;default:return o}}var Po="graview:session";function Ro(e){let t=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10);try{let n=e??sessionStorage,o=n.getItem(Po);if(o)return o;let r=t();return n.setItem(Po,r),r}catch{return t()}}var Vt={name:"share-where",title:"Where you are",description:"Whether the others here see which stop you are on.",honored:"root-attribute",options:[{value:"shared",label:"Shown"},{value:"private",label:"Hidden"}],initial:"shared"},It={name:"share-over",title:"What you point at",description:"Whether the others see the thing under your pointer, outlined in your color.",honored:"root-attribute",options:[{value:"private",label:"Kept to yourself"},{value:"shared",label:"Outlined for others"}],initial:"private"},To=[Vt,It],ni=800;function Mo(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:s,seatWho:d,settingValues:a,setView:u,ttlMs:f=1e4,people:h,seats:p}=e,[g,b]=(0,_.useState)(()=>new Map),[A,m]=(0,_.useState)(null),[v,y]=(0,_.useState)(null),[x,P]=(0,_.useState)(null),D=typeof r.id=="string"&&r.id.length>0,L=D&&(a[Vt.name]??Vt.initial)==="shared",E=L&&(a[It.name]??It.initial)==="shared",R=Mt({kind:r.kind,...r.id?{id:r.id}:{},session:i}),I=D?_n(r,{graph:n.graph,schema:n.schema,...p?{seats:p}:{},...h?{people:h}:{}}):"",G=d?s.get(`agent:${d}:${i}`):void 0,W=(0,_.useMemo)(()=>!t||!L?null:{participant:R,kind:r.kind,name:I,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:Ln(r.id??"nobody"),stop:x??te(o),...E?{over:A}:{},...G?{robot:{at:G.at,mode:G.mode}}:{},at:new Date().toISOString()},[t,L,E,R,I,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,x,A,G?.at,G?.mode]);(0,_.useEffect)(()=>{if(!t||!W)return;t.here(W);let V=setInterval(()=>t.here({...W,at:new Date().toISOString()}),ni);return()=>clearInterval(V)},[t,W]),(0,_.useEffect)(()=>t?t.onWho(K=>b(pt(new Map,K,Date.now(),f))):void 0,[t,f]);let Z=g.size>0;(0,_.useEffect)(()=>{if(!Z)return;let V=setInterval(()=>{b(K=>{let Q=pt(K,[],Date.now(),f);return Q.size===K.size?K:Q})},Math.max(250,Math.min(1e3,f/4)));return()=>clearInterval(V)},[Z,f]),(0,_.useEffect)(()=>{if(!t||typeof window>"u")return;let V=()=>t.leave();return window.addEventListener("pagehide",V),()=>window.removeEventListener("pagehide",V)},[t]),(0,_.useEffect)(()=>{if(!E||typeof document>"u")return;let V=null,K=Q=>{let Ee=yo(Q.target);Ee!==V&&(V=Ee,m(Ee))};return document.addEventListener("pointermove",K,{passive:!0}),()=>document.removeEventListener("pointermove",K)},[E]);let X=(0,_.useRef)(null),q=v?g.get(v)??null:null,de=(0,_.useCallback)(V=>{X.current=null,y(V)},[]);return(0,_.useEffect)(()=>{if(v){if(!q){y(null);return}q.stop!==X.current?.stop&&(X.current={stop:q.stop,at:Date.now()},u(qe(q.stop)))}},[v,q,u]),(0,_.useEffect)(()=>{let V=X.current;!v||V===null||Date.now()-V.at<400||Bn(o,qe(V.stop))||y(null)},[o,v]),(0,_.useEffect)(()=>{if(!v||typeof document>"u")return;let V=K=>{K.key==="Escape"&&y(null)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[v]),(0,_.useMemo)(()=>({who:g,sharing:W?{participant:R,name:I}:null,following:q,follow:de,sayWhere:P}),[g,W,R,I,q,de])}var U=C(N(),1);function Oo(e){return Fe(e.author)}function oi(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function Vo(e,t,n,o,r){let i=new Map;for(let[a,u]of e)o-u.at<r&&i.set(a,u);let s=new Set(n.flatMap(a=>a.nodeIds)),d=(a,u,f)=>{let h=i.get(a),p=h?.participants.includes(Oo(u))?h.participants:[...h?.participants??[],Oo(u)];i.set(a,{at:o,manner:oi(p,u.author.kind),intent:u.intent,wrote:(h?.wrote??!1)||(f.wrote??!1),read:(h?.read??!1)||(f.read??!1),broke:(h?.broke??!1)||s.has(a),participants:p})};for(let a of t){for(let u of a.writes)d(u,a,{wrote:!0});for(let u of a.reads)a.writes.includes(u)||d(u,a,{read:!0})}for(let a of n)for(let u of a.nodeIds){let f=i.get(u);i.set(u,{at:o,manner:f?.manner??"rule",intent:f?.intent??a.message,wrote:f?.wrote??!1,read:f?.read??!1,broke:!0,participants:f?.participants??["rule::"]})}return i}var ri=2600;function Io(e,t=ri){let[n,o]=(0,U.useState)(()=>new Map),r=(0,U.useRef)(n);r.current=n;let i=(0,U.useRef)(null),s=(0,U.useCallback)(a=>{r.current=a,o(a),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,U.useEffect)(()=>{let a=e.violations(),u=e.subscribe((f,h)=>{let p=e.violations(),g=jn(e.allInvariants(),a,p).introduces;a=p,s(Vo(r.current,h,g.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{u(),i.current&&clearTimeout(i.current)}},[e,t,s]);let d=(0,U.useCallback)(a=>{a.reads.length!==0&&s(Vo(r.current,[ii(a)],[],Date.now(),t))},[t,s]);return{activity:n,noteAttention:d}}function ii(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],inverse:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var l=C(N(),1);function Co(){let e=null,t=new Set,n=new Set,o=r=>{for(let i of n)i(r)};return{subscribe(r){return t.add(r),t.size===1&&o(!0),()=>{t.delete(r),t.size===0&&(e=null,o(!1))}},snapshot:()=>e,set(r){if(!(e===r||e&&r&&e.x===r.x&&e.y===r.y)){e=r;for(let i of t)i()}},get listeners(){return t.size},onActive(r){return n.add(r),()=>void n.delete(r)}}}var nt=C(N(),1),si=e=>e.definitions.some(t=>In(t).size>0);function _o(e,t,n){let[o,r]=(0,nt.useState)(void 0),i=(n.roles??[]).join("\0");return(0,nt.useEffect)(()=>{if(!t||!si(e.schema)){r(void 0);return}let s=!0,d=!1,a=e.graph,u=()=>{d||(d=!0,queueMicrotask(()=>{d=!1,s&&e.reread()}))},f=Cn(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{}},u);return ft(a,f.read),r(f),e.reread(),()=>{s=!1,ft(a,void 0)}},[e,t,n.kind,n.id,i]),o}function Lo(){let e=!1,t=new Set;return{moving:()=>e,set(n){if(n!==e){e=n;for(let o of t)o()}},subscribe(n){return t.add(n),()=>t.delete(n)}}}var le=C(Ce(),1),ai="graview:place-menu",_e=(0,l.createContext)(null),jo=(0,l.createContext)("scene");function li({mode:e,children:t}){return(0,le.jsx)(jo.Provider,{value:e,children:t})}function di(){return(0,l.useContext)(jo)}var Go={kind:"human"},ui=[],ci=[],fi=[],Ct=[];function Wo(e,t){let n=(0,l.useId)();(0,l.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??Go,r=()=>Nn(e,o,n);r();let i,s=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),s(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var pi={off:!0};function yi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,seats:s=ui,onSeat:d,people:a=ci,memory:u,presenceTtlMs:f,app:h,settings:p=h?.settings??fi,presence:g,brand:b,locale:A,timeZone:m,onKeepLens:v,providers:y,ai:x,files:P,resolveApp:D,history:L,linkedRecords:E,menuSections:R,keptViews:I,subscriptions:G,signIn:W,view:Z,onViewChange:X,children:q}){let de=(0,l.useContext)(_e),V=R??de?.menuSections,K=W??de?.signIn,Q=I??de?.keptViews,[Ee,or]=(0,l.useState)(null),ue=Ee??i??s[0]?.principal??Go,He=Tt(e,ue,L),Yt=He.past&&He.live===e?He.past.store:e,H=(0,l.useMemo)(()=>Yt.seenBy(ue),[Yt,ue]);Wo(e,ue);let[re]=(0,l.useState)(()=>Ro(u)),[Zt,rr]=(0,l.useState)(!1),Xt=(0,l.useCallback)(()=>rr(!0),[]),ie=(0,l.useMemo)(()=>g?[...p,...To]:p,[p,g]),[at]=(0,l.useState)(()=>n??Dt(t,e.schema)),[ir,Jt]=(0,l.useState)(()=>ze(at??fe,r??at?.selection??[])),Ae=(0,l.useRef)(at??fe).current,[Qt,sr]=(0,l.useState)(null),[en,ar]=(0,l.useState)(null),J=(0,l.useContext)(_e),[tn]=(0,l.useState)(()=>J?.seatTalk??Pt(b?.name??e.schema.kinds.join(","))),lt=x??J?.ai??St,De=(0,l.useMemo)(()=>lt.off?pi:lt,[lt]),nn=(0,l.useRef)(De.interactions);nn.current=De.interactions;let[on]=(0,l.useState)(()=>J?.aiDesk??Rt(()=>nn.current)),[lr]=(0,l.useState)(()=>J?.subscriptions??Dn()),rn=G??J?.subscriptions??lr,dt=v??J?.onKeepLens,Ne=h??J?.app,je=A??J?.locale,dr=b?.locale??Ne?.brand?.locale,Ge=m??J?.timeZone;Vn({reader:je,app:dr,readerTimeZone:Ge,appTimeZone:b?.timeZone??Ne?.brand?.timeZone});let sn=(0,l.useRef)(null),an=(0,l.useCallback)(c=>{sn.current=c},[]),ln=(0,l.useCallback)(c=>sn.current?.whereIs(c)??null,[]),[dn]=(0,l.useState)(()=>Co()),[un]=(0,l.useState)(()=>Lo()),[ut,ur]=(0,l.useState)(null),[ke,cn]=(0,l.useState)(()=>new Map),Pe=(0,l.useRef)(ke);Pe.current=ke;let Re=(0,l.useRef)(null),ct=(0,l.useCallback)(c=>H.graph.getNode(c)?.kind,[H]),ee=(0,l.useCallback)(c=>{let S=Ot(Pe.current,c,ct);Pe.current=S,cn(S),Re.current&&clearTimeout(Re.current),[...S.values()].some(M=>M.mode!=="docked"&&M.mode!=="asking")&&(Re.current=setTimeout(()=>{let M=Ot(Pe.current,{type:"rest",at:Date.now(),holdMs:Ht},ct);Pe.current=M,cn(M)},Ht+20))},[ct]),fn=(0,l.useCallback)(c=>ee({...c,at:c.at??Date.now()}),[ee]),pn=(0,l.useCallback)(c=>{ur(c),c&&ee({type:"home",author:{kind:"agent",id:c,session:re},at:Date.now()})},[ee,re]);(0,l.useEffect)(()=>H.subscribe((c,S)=>{for(let T of S)T.author.kind==="agent"&&ee({type:"write",author:T.author,ids:T.writes,at:Date.now()})}),[H,ee]),(0,l.useEffect)(()=>()=>{Re.current&&clearTimeout(Re.current)},[]);let z=(0,l.useMemo)(()=>({...ue,session:re}),[ue,re]),yn=_o(H,E,z),mn=(0,l.useCallback)(c=>{or(c),d?.(c)},[d]),[Te,cr]=(0,l.useState)(()=>Object.fromEntries(ie.map(c=>[c.name,xo(c,u)])));(0,l.useEffect)(()=>{for(let c of ie)Ao(c,Te[c.name]??c.initial)},[ie,Te]);let gn=(0,l.useCallback)((c,S)=>{let T=ie.find(M=>M.name===c);!T||!T.options.some(M=>M.value===S)||(Eo(T,S,u),cr(M=>({...M,[c]:S})))},[ie,u]),[hn,fr]=(0,l.useState)(null),{activity:Sn,noteAttention:wn}=Io(H),vn=(0,l.useCallback)(c=>{wn(c),ee({type:"read",author:c.author,ids:c.reads,at:Date.now()})},[wn,ee]),ce=(0,l.useCallback)(c=>{if(ye(c)!==null||ae(c).length>0||gt(c))return!0;let S=$n(c);return S?H.graph.allEdges().some(T=>T.kind===S.kind&&T.from===S.from&&T.to===S.to):H.graph.getNode(c)!==void 0},[H]),bn=(0,l.useCallback)(c=>{let S=c.selection??Ct,T=S.filter(ce),M=T.length===S.length?c:ze(c,T);return M.focusId!==null&&!ce(M.focusId)&&(M=$(M,null)),M},[ce]),Me=(0,l.useCallback)(c=>{let S=bn(c),T=No(H,z,S.shown);if(S.focusId!==null&&T.size>0){let M=ae(S.focusId),On=H.graph.getNode(S.focusId);(M.length>0?M.every(mr=>T.has(mr)):On?T.has(On.kind):!1)&&(S={...S,focusId:null})}if(!S.overview&&S.focusId===null){let M=Ae.focusId!==null&&!ce(Ae.focusId)?Dt(t,e.schema)??{...fe,overview:!0}:Ae;M.focusId!==null&&ce(M.focusId)?S={...S,focusId:M.focusId}:M.overview===!0&&(S={...S,overview:!0})}return S},[bn,ce,H,Ae,z,t,e.schema]),B=Me(Z??ir),xn=(0,l.useMemo)(()=>No(H,z,B.shown),[H,z,B.shown]),En=(0,l.useMemo)(()=>[...H.modules.administered.entries()].map(([c,S])=>{let T=H.mayAdminister(c,z);return{name:c,...S.description?{description:S.description}:{},kinds:S.kinds??[],canShow:T,shown:T&&(B.shown??[]).includes(c)}}),[H,z,B.shown]),Oe=(0,l.useCallback)(c=>{let S=T=>Me(typeof c=="function"?c(T):c);if(Z!==void 0){X?.(S(Z));return}X&&X(S(B)),Jt(T=>S(T))},[B,X,Z,Me]);(0,l.useEffect)(()=>{Z===void 0&&Jt(c=>{let S=Me(c);return S===c?c:S})},[B,Z,Me]);let An=B.selection??Ct,kn=(0,l.useCallback)(c=>{Oe(S=>ze(S,typeof c=="function"?c(S.selection??Ct):c))},[Oe]),{who:Pn,following:Rn,follow:Tn,sayWhere:pr,sharing:Mn}=Mo({channel:g,store:H,view:B,principal:z,session:re,robots:ke,seatWho:ut,settingValues:Te,setView:Oe,seats:s,people:a,...f!==void 0?{ttlMs:f}:{}}),yr=(0,l.useMemo)(()=>({store:H,scheme:o,views:t,view:B,setView:Oe,homeView:Ae,selection:An,setSelection:kn,menuAt:Qt,setMenuAt:sr,whereIs:ln,pointer:dn,motion:un,registerScene:an,robots:ke,noteSeat:fn,seatWho:ut,registerSeatWho:pn,actsDoor:en,registerActsDoor:ar,seatTalk:tn,aiDesk:on,...u?{memory:u}:{},who:Pn,following:Rn,follow:Tn,sayWhere:pr,sharing:Mn,session:re,ai:De,resolveApp:D,linkedRecords:E,menuSections:V,...Q?{keptViews:Q}:{},subscriptions:rn,signIn:K,linkedReads:yn,movedByHand:Zt,noteMoved:Xt,emphasis:hn,setEmphasis:fr,activity:Sn,noteAttention:vn,principal:z,seats:s,people:a,takeSeat:mn,settings:ie,settingValues:Te,chooseSetting:gn,hiddenKinds:xn,administered:En,...y?{providers:y}:{},...b?{brand:b}:{},...dt?{onKeepLens:dt}:{},app:Ne,...je?{locale:je}:{},...Ge?{timeZone:Ge}:{}}),[H,o,t,B,Oe,An,kn,Qt,ln,dn,un,an,ke,fn,ut,pn,en,tn,on,u,Pn,Rn,Tn,Mn,re,De,D,E,V,Q,rn,K,yn,Zt,Xt,hn,Sn,vn,z,s,a,mn,ie,Te,gn,xn,En,y,b,dt,Ne,je,Ge]);return(0,le.jsx)(_e.Provider,{value:yr,children:(0,le.jsx)(Ie.Provider,{value:He,children:(0,le.jsx)(wi,{children:P?(0,le.jsx)(Qe.Provider,{value:P,children:q}):q})})})}var Fo=(0,l.createContext)(null),_t,Lt=new Set,mi=e=>(Lt.add(e),()=>void Lt.delete(e)),Ho=()=>_t;function gi(e){if(!_t){_t=e;for(let t of[...Lt])t()}}var hi=300;function Si(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,hi)),r===t?e(n,o):[]}}function wi({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:s,ai:d}=oe(),a=ot(),u=n.q,f=n.focusId,h=!!(u&&u.trim().length>0),p=(0,l.useSyncExternalStore)(mi,Ho,Ho),g=(0,l.useMemo)(()=>h&&p?{flagged:new Set(t.violations().flatMap(x=>x.nodeIds)),touched:p.touchWeights(t.log.all())}:null,[t,a,h,p]),b=f?t.graph.getNode(f)?.kind??ye(f)??(ae(f).length===1?ae(f)[0]:void 0):void 0,A=(0,l.useMemo)(()=>d.near&&Si(d.near),[d.near]),m=(0,l.useMemo)(()=>!u||!g||!p?null:p.search(t,u,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(x=>!i.has(x)),from:[...s,...f&&t.graph.has(f)?[f]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:A}),[t,u,r,o,i,s,f,b,g,A]),[v,y]=(0,l.useState)();return(0,l.useEffect)(()=>void m?.later?.then(x=>y([m,x])),[m]),(0,le.jsx)(Fo.Provider,{value:v?.[0]===m?v[1]:m,children:e})}var Do=new WeakMap;function ea(e){let t=Do.get(e);return t||Do.set(e,t=new Set(e.matched)),t}function vi(){return(0,l.useContext)(Fo)}function oe(){let e=(0,l.useContext)(_e);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function Nt(){return(0,l.useContext)(_e)??null}function ot(){let{store:e}=oe(),t=(0,l.useRef)(null),n=(0,l.useRef)(null),o=(0,l.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,l.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,l.useSyncExternalStore)(r,o,o)}function bi(e){let{store:t}=oe(),n=(0,l.useCallback)(r=>t.subscribe(r),[t]),o=(0,l.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,l.useSyncExternalStore)(n,o,o)}function No(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let s of i.kinds??[])o.add(s);return o}var Ht=2600;var Ko=new WeakSet,xi=e=>Ko.has(e),Ei=e=>void Ko.add(e);function Dt(e,t){let n=Wn(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...fe,focusId:ne(n.place.kind),within:{view:n.place.as}}:{...fe,focusId:ne(n.kind)}}var Bo=C(N(),1),Ai=(0,Bo.createContext)(!1);var rt=Symbol.for("graview.default-view");function $o(e){return Object.defineProperty(e,rt,{value:!0,enumerable:!1}),e}function qo(e){return typeof e=="function"&&e[rt]===!0}var jt=Symbol.for("graview.replaces-page");function zo(e){return typeof e=="function"&&e[jt]===!0}function Pi(e){return Gn(e)}function Ri(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homeView?.();return o&&e.home?.(o),e}var F=C(N(),1),Y=C(Ce(),1),Gt=new Set,Uo=!1;function Wt(){for(let e of[...Gt])e()}function Ti(){Uo||typeof window>"u"||(Uo=!0,window.addEventListener("online",Wt))}function Ft(e){let t,n=!1,o=!1,r,i=0,s=new Set,d=()=>{i+=1;for(let p of[...s])p()},a=p=>(s.add(p),()=>void s.delete(p)),u=()=>i,f=()=>void h().catch(()=>{});function h(){if(n)return Promise.resolve(t);if(r)return r;let p=e().then(g=>(t=g,n=!0,o=!1,r=void 0,Gt.delete(f),d(),g),g=>{throw r=void 0,o=!0,Gt.add(f),Ti(),d(),g});return p.catch(()=>{}),r=p,p}return{load:h,prefetch:f,get current(){return t},get failed(){return o},part(p,g={}){let b=g.what??"This part";function A(y){(0,F.useSyncExternalStore)(a,u,u);let x=(0,F.useRef)(null),P=(0,F.useRef)(null),D=(0,F.useRef)(!1);return(0,F.useEffect)(()=>{o&&r===void 0&&f()},[]),n&&typeof document<"u"&&x.current!==null&&document.activeElement===x.current&&(D.current=!0),(0,F.useLayoutEffect)(()=>{if(!(!n||!D.current)){D.current=!1;for(let L=P.current?.nextElementSibling??null;L!==null;L=L.nextElementSibling){let E=L.matches(Yo)?L:L.querySelector(Yo);if(E instanceof HTMLElement){E.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[D.current?(0,Y.jsx)("span",{ref:P,hidden:!0}):null,p(t,y)]}):g.quiet?null:(0,Y.jsx)(Mi,{what:b,button:x,...g.as?{as:g.as}:{}})}let m=(0,F.lazy)(()=>h().then(()=>({default:A}),()=>({default:A})));function v(y){let[x]=(0,F.useState)(()=>n||o);return(0,F.createElement)(x?A:m,y)}return v}}}var Yo="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function Mi({what:e,button:t,as:n="p"}){let r=typeof navigator<"u"&&navigator.onLine===!1?`${e} will load when you're back online.`:`${e} didn't load.`;return(0,Y.jsxs)(n,{"data-testid":"lazy-part-missing",style:{margin:0,fontSize:"0.875rem",color:"var(--graview-ink-muted)"},children:[(0,Y.jsx)("span",{role:"status",children:r})," ",(0,Y.jsx)("button",{ref:t,type:"button","data-testid":"lazy-part-retry",onClick:Wt,style:{font:"inherit",fontWeight:600,color:"var(--graview-ink)",background:"none",border:"1px solid var(--graview-edge)",borderRadius:6,padding:"2px 10px"},children:"Try again"})]})}var Se=C(N(),1);function Oi(){let{selection:e,setSelection:t}=oe();return(0,Se.useMemo)(()=>({selection:e,set:n=>t(n),clear:()=>t([]),toggle:n=>t(o=>o.includes(n)?o.filter(r=>r!==n):[...o,n]),isSelected:n=>e.includes(n)}),[e,t])}function Vi(){let{store:e}=oe(),t=ot();return(0,Se.useMemo)(()=>Ii(e),[e,t])}var Zo=new WeakMap;function Ii(e){let t=Zo.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Zo.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function Ci(){let{view:e,setView:t}=oe();return(0,Se.useMemo)(()=>({view:e,url:te(e),focus:n=>t(o=>$(o,n)),show:n=>t(o=>qn(o,n)),toggle:n=>t(o=>Ue(o,n)),go:n=>t(n)}),[e,t])}var he={at:0,depth:0,listeners:new Set,tell(){for(let e of this.listeners)e()}};typeof window<"u"&&window.addEventListener("popstate",e=>{let t=e.state;he.at=typeof t?.graview=="number"?t.graview:0,he.at>he.depth&&(he.depth=he.at),he.tell()});var j=C(N(),1),Bt={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},_i={position:"fixed",inset:"auto",margin:0,zIndex:Hn("popover"),boxSizing:"border-box"},it=6,we=8,Li=e=>typeof e.showPopover=="function";function st(e){try{return e.matches(":popover-open")}catch{return!1}}function Hi(e){if(typeof e=="function"){let o=e();return o?{left:o.x,right:o.x,top:o.y,bottom:o.y}:null}let t=e.current;if(!t||!t.isConnected)return null;let n=t.getBoundingClientRect();return{left:n.left,right:n.right,top:n.top,bottom:n.bottom}}function $t(e,t,n={}){let o=Hi(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let s=e.getBoundingClientRect(),d=r.height-o.bottom-it-we,a=o.top-it-we,u=s.height<=d||d>=a,f=Math.max(96,Math.floor(u?d:a)),h=Math.min(s.height,f);s.height>f&&(e.style.maxHeight=i?`min(${i}, ${f}px)`:`${f}px`);let p=s.width,g=n.align==="start"?o.left:o.right-p,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&p<=b.right-b.left&&(g<b.left?g=o.left+p<=b.right?o.left:b.left:g+p>b.right&&(g=o.right-p>=b.left?o.right-p:b.right-p));let A=p>=r.width-2*we?Math.max(0,(r.width-p)/2):Math.max(we,Math.min(g,r.width-we-p)),m=u?o.bottom+it:Math.max(we,o.top-it-h);e.style.left=`${Math.round(A)}px`,e.style.top=`${Math.round(m)}px`}function Xo(e,t,n,o={}){let r=o.align??"end";(0,j.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(Li(i)&&!st(i))try{i.showPopover(),Ni()}catch{}let s=0,d=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(s),s=requestAnimationFrame(()=>$t(i,n,{align:r})))};$t(i,n,{align:r}),addEventListener("resize",d),addEventListener("scroll",d,!0);let a=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>d());return a?.observe(i),()=>{if(cancelAnimationFrame(s),removeEventListener("resize",d),removeEventListener("scroll",d,!0),a?.disconnect(),i.isConnected&&st(i))try{i.hidePopover()}catch{}}},[t,e,r])}var qt=new Set;function Di(e){return qt.add(e),()=>qt.delete(e)}function Ni(){for(let e of qt)if(!(!e.isConnected||!st(e)))try{e.hidePopover(),e.showPopover()}catch{}}var ve=null,ji='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Gi(e){for(let t of e.querySelectorAll(ji))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var Kt=()=>{let e=document.activeElement;return e===null||e===document.body};function Wi(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[s,d]=(0,j.useState)(!1),a=t.open??s,u=(0,j.useRef)(null),f=(0,j.useRef)(null),h=(0,j.useCallback)(y=>{u.current=y},[]),p=(0,j.useCallback)(y=>{f.current=y},[]),g=`graview-popover-${(0,j.useId)().replace(/:/g,"")}`,b=(0,j.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let A=(0,j.useCallback)(y=>{b.current.controlled||d(y),b.current.onOpenChange?.(y)},[]),m=(0,j.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??u.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),v=(0,j.useCallback)(y=>{let x=f.current,P=typeof document>"u"?null:document.activeElement,D=P===null||P===document.body||x!==null&&x.contains(P);A(!1),!(!y||!D)&&(m(),requestAnimationFrame(()=>{Kt()&&m()}))},[A,m]);return Xo(f,i&&a,n??u,t.align?{align:t.align}:{}),(0,j.useEffect)(()=>{if(!i||!a)return;let y={name:e,close:()=>v(!1)};if(ve&&ve.close!==y.close&&ve.close(),ve=y,Bt[e].focus==="into"){let R=f.current;R&&!R.contains(document.activeElement)&&Gi(R).focus({preventScroll:!0})}let x=R=>{R.key==="Escape"&&v(!0)},P=R=>{let I=R.target;if(!(I instanceof Node))return;let G=f.current;if(G?.contains(I)||u.current?.contains(I))return;let W=I instanceof Element?I.closest('[role="dialog"], [role="alertdialog"]'):null;W&&!(G&&W.contains(G))||(v(!1),Bt[e].focus==="into"&&requestAnimationFrame(()=>{(Kt()||G!==null&&G.contains(document.activeElement))&&m()}))},D=null,L=null,E=R=>{let I=R.target;if(!(I instanceof Element))return;let G=f.current,W=I.closest('[role="dialog"], [role="alertdialog"]');!W||G&&(G.contains(W)||W.contains(G))||(D=W,v(!1))};return document.addEventListener("keydown",x),document.addEventListener("pointerdown",P,!0),document.addEventListener("focusin",E),()=>{document.removeEventListener("keydown",x),document.removeEventListener("pointerdown",P,!0),document.removeEventListener("focusin",E);let R=D;R&&typeof MutationObserver<"u"&&(L?.disconnect(),L=new MutationObserver(()=>{R.isConnected||(L?.disconnect(),requestAnimationFrame(()=>{(Kt()||document.activeElement.closest("[hidden]")!==null)&&m()}))}),L.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>L?.disconnect(),10*6e4)),ve?.close===y.close&&(ve=null)}},[i,a,e,v,m]),{open:a,setOpen:y=>y?A(!0):v(!0),toggle:()=>a?v(!0):A(!0),trigger:{ref:h,"aria-expanded":a,"aria-controls":g,"data-graview-popover-trigger":e},pane:{ref:p,id:g,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var be=C(N(),1);var Jo=(0,be.createContext)(null);function Fi(){let e=(0,be.useContext)(Jo),t=Nt(),n=(o,r,i)=>t?.setView(s=>se(se(pe($(s,ne(o)),!1),"view",r),"filter",i?.filter??null));return(0,be.useMemo)(()=>e??{record:o=>{t&&(t.setView(r=>$(pe(r,!1),o)),t.setSelection([o]))},place:(o,r)=>{let i=t?.views.places().find(s=>s.as===o);i&&n(i.kind,i.as,r)},list:(o,r)=>n(o,null,r)},[e,t])}var xe=C(N(),1);var Ki=Ft(Ke(()=>(__graviewPreload(import.meta.url,["./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.YAXZNQY6.js"))));function Bi(e,t,n){let o,r=!1,i=()=>{let{hidden:d,removed:a}=t.current();o||r||d.length+a.length===0||(o=()=>{},Ki.load().then(u=>{r||(o=u.watchTidied(e,t,n))},String))};i();let s=t.onChange?.(i);return()=>{r=!0,s?.(),o?.()}}function $i(e,t){let[n,o]=(0,xe.useState)();return(0,xe.useEffect)(()=>t?Bi(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Qo=C(N(),1),qi=(0,Qo.createContext)(!1);var er=C(N(),1),zi=(0,er.createContext)(null);var tr=C(N(),1),zt='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',Ut=e=>e instanceof HTMLElement&&(e.matches(zt)||e.hasAttribute("tabindex")),Le=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Ui(e,t){let n=a=>a.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),s=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!s)return null;let d=e.querySelector(s);return d&&Ut(d)&&Le(d)?d:null}var Yi=e=>e.isConnected&&Ut(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&Le(e);function nr(e,t){let n=t?Ui(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&Le(o))return o;for(let r of e.querySelectorAll(zt))if(Le(r))return r;return Ut(e)&&Le(e)?e:null}function Zi(e){(0,tr.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=m=>{let v=m.target;if(v instanceof Element){n=[];for(let y=v;y&&y!==t.parentElement;y=y.parentElement)n.push(y)}},r=!1,i=!1,s=t.ownerDocument,d=()=>!i&&s.defaultView!==null,a=(m,v)=>void setTimeout(()=>d()&&v(),m),u=m=>void requestAnimationFrame(()=>d()&&m()),f=m=>{if(r=!1,i)return;let v=s.activeElement;if(!(!(v===null||v===s.body||v===s.documentElement)||n.length===0)){if(Yi(n[0])){m&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let x of n.slice(1)){if(!x.isConnected)continue;let P=nr(x,n[0]);if(P){P.focus({preventScroll:!0}),n=[];return}}}},h=(m,v=Date.now()+2500)=>{a(100,()=>{f(m);let y=s.activeElement;(y===null||y===s.body||y===s.documentElement)&&n.length>0&&Date.now()<v&&h(m,v)})},p=()=>{r||n.length===0||(r=!0,a(60,()=>u(()=>{f(!1),h(!1)})))},g=m=>{if(!(m instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(m.key))){if(!(m instanceof KeyboardEvent)){let v=m.target instanceof Element?m.target.closest(zt):null,y=s.activeElement,x=y===null||y===s.body||y===s.documentElement;if(v&&x&&t.contains(v)){n=[];for(let P=v;P&&P!==t.parentElement;P=P.parentElement)n.push(P);a(150,()=>u(()=>{f(!1),h(!1)}));return}}!(m instanceof KeyboardEvent)&&!(m.target instanceof Node&&n[0]?.contains(m.target))||a(150,()=>u(()=>{f(!0),h(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&p()}),A=m=>{m.relatedTarget===null&&p()};return t.addEventListener("focusin",o),t.addEventListener("focusout",A),t.addEventListener("click",g),t.addEventListener("keydown",g),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",A),t.removeEventListener("click",g),t.removeEventListener("keydown",g),b.disconnect()}},[e])}export{Ke as a,fe as b,te as c,qe as d,Qi as e,es as f,Bn as g,Kn as h,$n as i,yt as j,$ as k,qn as l,se as m,pe as n,ze as o,Ve as p,Ue as q,Ze as r,mt as s,ye as t,os as u,wr as v,ne as w,zn as x,ae as y,Un as z,vr as A,rs as B,Yn as C,gt as D,br as E,xr as F,Er as G,N as H,Pt as I,Kr as J,$r as K,yo as L,Qe as M,qr as N,Ie as O,go as P,zr as Q,Tt as R,Ce as S,ai as T,li as U,di as V,Wo as W,yi as X,gi as Y,ea as Z,vi as _,oe as $,Nt as aa,ot as ba,bi as ca,xi as da,Ei as ea,Dt as fa,Jo as ga,Fi as ha,Ai as ia,$o as ja,qo as ka,zo as la,Pi as ma,Ri as na,Ft as oa,$i as pa,qi as qa,zi as ra,Oi as sa,Vi as ta,Ci as ua,he as va,Zi as wa,_i as xa,st as ya,Xo as za,Di as Aa,Wi as Ba};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.QT4XGC5Z.js";import{H as W,S as x}from"./chunk.MQ7FNHXG.js";import"./chunk.WLPTY4BF.js";import{b as D}from"./chunk.AJZBJBMO.js";var g=D(W(),1);var o=D(x(),1),v=864e5,l=t=>Date.UTC(+t.slice(0,4),+t.slice(5,7)-1,+t.slice(8,10)),I=t=>new Date(t).toISOString().slice(0,10),s=(t,i)=>I(l(t)+i*v),m=(t,i)=>{let a=new Date(l(t)),u=a.getUTCMonth()+i,d=Date.UTC(a.getUTCFullYear(),u,1),w=new Date(Date.UTC(a.getUTCFullYear(),u+1,0)).getUTCDate();return I(d+(Math.min(a.getUTCDate(),w)-1)*v)};function p(t,i,a){try{return new Intl.DateTimeFormat(t??"en-US",{...i,timeZone:"UTC"}).format(a)}catch{return new Intl.DateTimeFormat("en-US",{...i,timeZone:"UTC"}).format(a)}}function F(t){try{let i=new Intl.Locale(t??"en-US"),a=i.getWeekInfo?.().firstDay??i.weekInfo?.firstDay;if(a!==void 0)return a%7}catch{return 0}return/^en-US|^en$|-(US|CA|JP|BR|IL|MX|PH)$/.test(t??"en-US")?0:1}function L({id:t,label:i,selected:a,today:u,locale:d,onPick:w,onClose:T}){let[r,f]=(0,g.useState)(a??u),U=(0,g.useRef)(null),y=F(d),b=`${r.slice(0,7)}-01`,M=(new Date(l(b)).getUTCDay()-y+7)%7,P=s(b,-M),A=Array.from({length:6},(e,n)=>Array.from({length:7},(S,c)=>s(P,n*7+c))),$=p(d,{month:"long",year:"numeric"},l(b)),h=(0,g.useRef)(!0);(0,g.useEffect)(()=>{h.current&&U.current?.querySelector(`[data-day="${r}"]`)?.focus(),h.current=!1},[r]);let E=e=>{let n={ArrowLeft:()=>s(r,-1),ArrowRight:()=>s(r,1),ArrowUp:()=>s(r,-7),ArrowDown:()=>s(r,7),PageUp:()=>m(r,e.shiftKey?-12:-1),PageDown:()=>m(r,e.shiftKey?12:1),Home:()=>s(r,-((new Date(l(r)).getUTCDay()-y+7)%7)),End:()=>s(r,6-(new Date(l(r)).getUTCDay()-y+7)%7)};n[e.key]?(e.preventDefault(),h.current=!0,f(n[e.key]())):e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),T())},R=Array.from({length:7},(e,n)=>l("1970-01-04")+(y+n)%7*v),C={minWidth:32,minHeight:32,padding:"0 8px",borderRadius:6};return(0,o.jsxs)("div",{id:t,role:"group","aria-label":`Pick a date for ${i}`,"data-graview-part":"when-month",onKeyDown:e=>{e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),T())},style:{flexBasis:"100%",width:"min(100%, 20rem)",boxSizing:"border-box",padding:8,border:"1px solid var(--graview-edge)",borderRadius:8,background:"var(--graview-panel)",color:"var(--graview-ink)"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:6,marginBottom:6},children:[(0,o.jsx)("button",{type:"button","aria-label":"Previous month",onClick:()=>f(m(r,-1)),style:C,children:"\u2039"}),(0,o.jsx)("span",{id:`${t}-title`,"aria-live":"polite",style:{fontWeight:600,fontSize:"0.875rem"},children:$}),(0,o.jsx)("button",{type:"button","aria-label":"Next month",onClick:()=>f(m(r,1)),style:C,children:"\u203A"})]}),(0,o.jsxs)("table",{ref:U,role:"grid","aria-labelledby":`${t}-title`,onKeyDown:E,style:{width:"100%",borderCollapse:"collapse",tableLayout:"fixed",fontSize:"0.8125rem"},children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:R.map(e=>(0,o.jsx)("th",{scope:"col",abbr:p(d,{weekday:"long"},e),style:{fontWeight:500,color:"var(--graview-ink-faint)",padding:"2px 0"},children:p(d,{weekday:"narrow"},e)},e))})}),(0,o.jsx)("tbody",{children:A.map(e=>(0,o.jsx)("tr",{children:e.map(n=>{let S=n.slice(0,7)===b.slice(0,7),c=n===a,k=n===u;return(0,o.jsx)("td",{role:"gridcell","aria-selected":c||void 0,style:{padding:1,textAlign:"center"},children:(0,o.jsx)("button",{type:"button","data-day":n,tabIndex:n===r?0:-1,"aria-label":`${p(d,{weekday:"long",year:"numeric",month:"long",day:"numeric"},l(n))}${k?", today":""}${c?", selected":""}`,...k?{"aria-current":"date"}:{},onClick:()=>w(n),onFocus:()=>n!==r&&f(n),style:{width:"100%",minHeight:36,padding:0,borderRadius:6,border:k?"1px solid var(--graview-accent)":"1px solid transparent",background:c?"var(--graview-accent)":"transparent",color:c?"var(--graview-accent-ink)":S?"var(--graview-ink)":"var(--graview-ink-faint)",fontWeight:c?600:400},children:Number(n.slice(8,10))})},n)})},e[0]))})]})]})}export{L as WhenMonth};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v,b as m,c as h}from"./chunk.MB7LKKUD.js";import"./chunk.QT4XGC5Z.js";import{Aa as b,H as N,S as u,ya as p}from"./chunk.MQ7FNHXG.js";import{qc as f}from"./chunk.WLPTY4BF.js";import{b as c}from"./chunk.AJZBJBMO.js";var l=c(N(),1);var o=c(u(),1);function z({notices:r,anchor:n,board:a}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(w,{notices:r.filter(i=>i.kind==="banner"),at:"top",anchor:n,board:a}),(0,o.jsx)(w,{notices:r.filter(i=>i.kind==="toast"),at:"foot",anchor:n,board:a})]})}var y={info:"var(--graview-accent)",good:"var(--graview-good)",warn:"var(--graview-warn)",bad:"var(--graview-bad)"};function w({notices:r,at:n,anchor:a,board:i}){let s=(0,l.useRef)(null),t=r.length>0;return(0,l.useLayoutEffect)(()=>{let e=s.current;if(!t||!e)return;if(typeof e.showPopover=="function"&&!p(e))try{e.showPopover()}catch{}let d=()=>(n==="top"?h:m)(e,a());d(),n==="foot"&&i.hold?.(()=>e.matches(":hover, :focus-within"));let S=b(e);addEventListener("resize",d),addEventListener("scroll",d,!0),n==="foot"&&addEventListener(v,d);let g=typeof ResizeObserver=="function"?new ResizeObserver(d):null;return g?.observe(e),()=>{if(S(),g?.disconnect(),removeEventListener("resize",d),removeEventListener("scroll",d,!0),removeEventListener(v,d),e.isConnected&&p(e))try{e.hidePopover()}catch{}}},[t,n,a,i]),t?(0,o.jsx)("div",{ref:s,popover:"manual",role:"region","aria-label":n==="top"?"Notices":"Messages","data-testid":n==="top"?"notices-banners":"notices-toasts","data-graview-offstage":"",style:{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:f("toast"),width:"max-content",height:"auto",maxWidth:"min(560px, calc(100vw - 32px))",display:"grid",gap:8,color:"var(--graview-ink)"},children:r.map(e=>(0,o.jsx)(T,{notice:e,board:i},e.id))}):null}function T({notice:r,board:n}){let a=r.tone??"info",i=[...r.action?[r.action]:[],...r.actions??[]],s=()=>n.dismiss(r.id);return(0,o.jsxs)("div",{"data-testid":"notice","data-kind":r.kind,"data-tone":a,style:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"8px 12px",padding:r.kind==="banner"?"8px 10px 8px 14px":"10px 12px 10px 14px",borderRadius:"var(--graview-radius, 12px)",borderTop:"1px solid var(--graview-edge)",borderRight:"1px solid var(--graview-edge)",borderBottom:"1px solid var(--graview-edge)",borderLeft:`3px solid ${y[a]}`,background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",fontSize:"0.875rem",lineHeight:1.45},children:[(0,o.jsx)("span",{"aria-hidden":"true",style:{width:7,height:7,borderRadius:999,flex:"0 0 auto",background:y[a]}}),(0,o.jsx)("span",{style:{flex:"1 1 16rem",minWidth:0},children:r.sentence}),i.length>0?(0,o.jsx)("span",{style:{display:"flex",flexWrap:"wrap",gap:6},children:i.map((t,e)=>t.href!==void 0?(0,o.jsx)("a",{href:t.href,...t.target?{target:t.target,rel:"noopener"}:{},"data-testid":"notice-action",onClick:()=>{t.onSelect?.(),s()},style:{...x,...e===0?k:{}},children:t.label},t.label):(0,o.jsx)("button",{type:"button","data-testid":"notice-action",onClick:()=>{s(),t.onSelect?.()},style:{...x,...e===0?k:{}},children:t.label},t.label))}):null,(0,o.jsx)("button",{type:"button","data-testid":"notice-dismiss","aria-label":`Dismiss: ${r.sentence}`,title:"Dismiss",onClick:s,style:E,children:"\xD7"})]})}var x={display:"inline-flex",alignItems:"center",minHeight:28,padding:"2px 12px",borderRadius:9,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)",font:"inherit",fontWeight:500,textDecoration:"none",cursor:"pointer"},k={background:"var(--graview-accent)",borderColor:"var(--graview-accent)",color:"var(--graview-accent-ink)"},E={minWidth:28,minHeight:28,padding:0,border:"none",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",fontSize:"1rem",cursor:"pointer"};export{z as NoticeStacks};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.BUVAMSOZ.js";import"./chunk.FTJBW25J.js";import"./chunk.UT6642FC.js";import"./chunk.MCVY6RRS.js";import"./chunk.RZVZG2BQ.js";import"./chunk.VKHKYK5L.js";import"./chunk.TI4OSTQV.js";import"./chunk.EUGWV3S6.js";import"./chunk.MWZK3HVG.js";import"./chunk.3D5T3XIE.js";import"./chunk.GR5Q4HTW.js";import"./chunk.QT4XGC5Z.js";import"./chunk.MQ7FNHXG.js";import"./chunk.WLPTY4BF.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.WVUJXDXZ.js";import{a as k,b as q,c as he}from"./chunk.2EJAIT33.js";import"./chunk.EUGWV3S6.js";import"./chunk.6XJP7F3I.js";import"./chunk.NPX7SPXM.js";import"./chunk.OE4QOBJF.js";import"./chunk.74RMHUCX.js";import"./chunk.GZHZLJBF.js";import{n as pe}from"./chunk.I3SQJ2L2.js";import"./chunk.OJGHDWI6.js";import"./chunk.FUJM7GDV.js";import"./chunk.MWZK3HVG.js";import"./chunk.3D5T3XIE.js";import"./chunk.GR5Q4HTW.js";import"./chunk.QT4XGC5Z.js";import{$ as ce,H as He,N as S,P as de,S as ue,ca as ge}from"./chunk.MQ7FNHXG.js";import{ia as re,la as w,na as oe,oa as E,pa as x,pc as se,qa as le,ra as Y}from"./chunk.WLPTY4BF.js";import{b as U}from"./chunk.AJZBJBMO.js";var h=U(He(),1);async function me(e,n){let i=await createImageBitmap(e);try{let r=Math.min(1,n/Math.max(i.width,i.height)),a=document.createElement("canvas");a.width=Math.max(1,Math.round(i.width*r)),a.height=Math.max(1,Math.round(i.height*r));let l=a.getContext("2d");if(l===null)throw new Error("This browser will not give us a canvas to resize with.");return l.drawImage(i,0,0,a.width,a.height),a}finally{i.close()}}var t=U(ue(),1),Le=2048,Ve=.85;function _(e){return e<1e3?`${e} bytes`:e<1e6?`${Math.round(e/1e3)} KB`:`${(e/1e6).toFixed(e<1e7?1:0)} MB`}function z(e){if(e.type==="application/pdf")return"PDF";let n=/\.([a-z0-9]{2,5})$/i.exec(e.name??"")?.[1];return n?n.toUpperCase():(e.type.split("/")[1]??e.type).replace(/^x-|^vnd\./,"").split(/[.+-]/)[0].toUpperCase()}function we(e){let n=[...new Set(e.map(i=>i==="image/*"?"pictures":i==="video/*"?"videos":i==="*/*"||i==="*"?"any file":`${z({type:i})} files`))];return n.length<=1?n[0]??"no files":`${n.slice(0,-1).join(", ")} and ${n[n.length-1]}`}function ke(e,n){if(e.length===0)return!0;let i=`${n.split("/")[0]}/*`;return e.some(r=>r==="*"||r==="*/*"||r===n||r===i)}var ye=/^image\/hei[cf]$|\.hei[cf]$/i,fe=e=>ye.test(e.type)||ye.test(e.name),Ie={mov:"video/quicktime",mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",ogv:"video/ogg"},De=e=>Ie[/\.([a-z0-9]{2,4})$/i.exec(e)?.[1]?.toLowerCase()??""];async function Be(e,n,i){let r=e.name||(i.camera?"photo.jpg":"file"),a=e.type||(fe({type:"",name:r})?"image/heic":De(r)??"application/octet-stream"),l=fe({type:a,name:r}),u=a.startsWith("image/")||l;if(i.image&&!u)return{refused:`\u201C${r}\u201D isn\u2019t a picture.`};if(i.video)return a.startsWith("video/")?K({blob:e,name:r,type:a},n):{refused:`\u201C${r}\u201D isn\u2019t a video.`};if(l||u&&/^image\/(jpeg|webp)$/.test(a)&&(i.camera||e.size>n.maxBytes||e.size>15e5))try{let c=await me(e,Le),b=await new Promise(p=>c.toBlob(p,"image/jpeg",Ve));if(b)return K({blob:b,name:l?r.replace(/\.hei[cf]$/i,"")+".jpg":r,type:"image/jpeg",width:c.width,height:c.height},n)}catch{if(l&&!ke(n.kinds,a))return{refused:`\u201C${r}\u201D is a HEIC photo, which this browser can\u2019t turn into a JPEG and this host doesn\u2019t take. Save it as a JPEG and try again.`}}let y={};if(u&&!l)try{let c=await createImageBitmap(e);y={width:c.width,height:c.height},c.close()}catch{}return K({blob:e,name:r,type:a,...y},n)}function K(e,n){return ke(n.kinds,e.type)?e.blob.size>n.maxBytes?{refused:`\u201C${e.name}\u201D is ${_(e.blob.size)}; this host takes files up to ${_(n.maxBytes)}.`}:e:{refused:`\u201C${e.name}\u201D is a ${z(e)} file; this host takes ${we(n.kinds)}.`}}async function je(e,n,i,r=!1){let a;try{a=await n.upload(e.blob,e.name)}catch(u){let s=u instanceof Error&&u.message.trim()?u.message.trim():"the host refused it";return{refused:`\u201C${e.name}\u201D wasn\u2019t kept: ${s}`}}return oe(a)?i&&!E(a)?{refused:`\u201C${e.name}\u201D isn\u2019t a picture.`}:r&&!x(a)?{refused:`The host kept \u201C${e.name}\u201D as ${z(a)}, not as a video.`}:{...a,...a.width===void 0&&e.width?{width:e.width}:{},...a.height===void 0&&e.height?{height:e.height}:{}}:{refused:`The host\u2019s answer for \u201C${e.name}\u201D isn\u2019t a file a record can keep.`}}var F="var(--graview-radius, 8px)",P={color:"var(--graview-ink-muted)",fontSize:"0.8125rem"};function Z(e){let n=S(),i=de()?.past!=null,[r,a]=(0,h.useState)(!1),l=n?.kept?_e(n,e.href):!0,[,u]=(0,h.useState)(0);return(0,h.useEffect)(()=>{if(typeof l!="object")return;let s=!0;return l.then(()=>s&&u(y=>y+1)),()=>void(s=!1)},[l]),[l===!1||i&&r,()=>a(!0)]}var J=new WeakMap;function _e(e,n){let i=J.get(e)?.get(n);if(i!==void 0)return i;let r;try{r=e.kept(n)}catch{return!0}if(typeof r=="boolean")return r;let a=J.get(e)??new Map;J.set(e,a);let l=Promise.resolve(r).then(u=>u!==!1,()=>!0);return a.set(n,l),l.then(u=>a.set(n,u)),l}function ee({file:e,style:n}){return(0,t.jsx)("span",{role:"img","aria-label":`${k(e)}, removed later`,"data-graview-removed-later":e.href,style:{display:"grid",placeItems:"center",textAlign:"center",padding:4,boxSizing:"border-box",fontSize:"0.6875rem",lineHeight:1.2,color:"var(--graview-ink-muted)",border:"1px dashed var(--graview-edge-bright)",borderRadius:F,...n},children:"removed later"})}function Q({file:e,size:n=56,style:i}){let r=S(),[a,l]=Z(e);return a?(0,t.jsx)(ee,{file:e,style:{width:n,height:n,flex:"none",...i}}):x(e)?(0,t.jsx)(Oe,{file:e,size:n,...i?{style:i}:{},onError:l}):(0,t.jsx)("img",{onError:l,src:w(r,e.href),alt:k(e),width:n,height:n,loading:"lazy",decoding:"async","data-graview-thumb":e.href,style:{width:n,height:n,objectFit:"cover",borderRadius:F,display:"block",flex:"none",background:"var(--graview-edge)",...i}})}function Fe(e){let[n,i]=(0,h.useState)({}),r=e.duration??n.duration;return[{...r!==void 0?{duration:r}:{},width:e.width??n.width,height:e.height??n.height},u=>{let s=u.currentTarget;i({...Number.isFinite(s.duration)&&s.duration>0?{duration:s.duration}:{},...s.videoWidth>0&&s.videoHeight>0?{width:s.videoWidth,height:s.videoHeight}:{}})}]}var ze=320,$e=(e,n)=>`${k(e)}, ${le({...n!==void 0?{duration:n}:{}})}`,Ne=(0,t.jsx)("span",{"data-graview-play-glyph":"","aria-hidden":"true",style:{position:"absolute",inset:0,display:"grid",placeItems:"center",pointerEvents:"none"},children:(0,t.jsxs)("svg",{viewBox:"0 0 24 24",width:"40%",height:"40%",style:{maxWidth:40,maxHeight:40,filter:"drop-shadow(0 1px 2px rgb(0 0 0 / 0.5))"},children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"11",fill:"rgb(0 0 0 / 0.55)"}),(0,t.jsx)("path",{d:"M9.5 7.5v9l7-4.5z",fill:"#fff"})]})});function Oe({file:e,size:n,style:i,onError:r}){let a=S(),[l,u]=Fe(e),s={width:n,height:n,objectFit:"cover",display:"block",borderRadius:F,background:"var(--graview-edge)"};return(0,t.jsxs)("span",{role:"img","aria-label":$e(e,l.duration),"data-graview-thumb":e.href,"data-graview-video-thumb":"",style:{position:"relative",display:"block",width:n,height:n,flex:"none",...i},children:[e.poster?(0,t.jsx)("img",{src:w(a,e.poster),alt:"",width:n,height:n,loading:"lazy",decoding:"async",onError:r,style:s}):(0,t.jsx)("video",{src:w(a,e.href),preload:"metadata",muted:!0,playsInline:!0,"aria-hidden":"true",tabIndex:-1,width:n,height:n,onLoadedMetadata:u,onError:r,style:s}),Ne,l.duration!==void 0?(0,t.jsx)("span",{"data-graview-video-clock":"","aria-hidden":"true",style:{position:"absolute",right:3,bottom:3,padding:"0 4px",borderRadius:4,background:"rgb(0 0 0 / 0.65)",color:"#fff",fontSize:"0.6875rem",lineHeight:"16px",fontVariantNumeric:"tabular-nums"},children:q(l.duration)}):null]})}function Ae({file:e}){let n=S(),[i,r]=Z(e),[a,l]=Fe(e);if(i)return(0,t.jsx)(ee,{file:e,style:{width:"100%",aspectRatio:"16 / 9"}});let u=a.width!==void 0&&a.height!==void 0;return(0,t.jsxs)("figure",{"data-graview-video-figure":e.href,style:{margin:0,display:"grid",gap:4,minWidth:0},children:[(0,t.jsx)("video",{"data-graview-video":e.href,src:w(n,e.href),...e.poster?{poster:w(n,e.poster)}:{},controls:!0,preload:"metadata",playsInline:!0,...u?{width:a.width,height:a.height}:{},"aria-label":$e(e,a.duration),onLoadedMetadata:l,onError:r,style:{display:"block",width:"100%",maxWidth:u?Math.max(a.width,ze):"100%",height:"auto",maxHeight:"80vh",aspectRatio:u?`${a.width} / ${a.height}`:"16 / 9",borderRadius:F,background:"#000"},children:e.captions?(0,t.jsx)("track",{kind:"captions",src:w(n,e.captions),srcLang:"en",label:"Captions",default:!0}):null}),(0,t.jsx)("figcaption",{"data-graview-video-said":"",style:P,children:[e.caption??e.name,...a.duration!==void 0?[q(a.duration)]:[]].join(" \xB7 ")})]})}function Ge({file:e,onOpen:n}){let i=S(),[r,a]=Z(e);return r?(0,t.jsx)(ee,{file:e,style:{width:"100%",aspectRatio:"1"}}):(0,t.jsx)("button",{type:"button","aria-label":`Open ${k(e)} full size`,onClick:l=>n(l.currentTarget),style:{padding:0,border:0,background:"none",cursor:"zoom-in",display:"block",width:"100%",borderRadius:F},children:(0,t.jsx)("img",{src:w(i,e.href),alt:k(e),loading:"lazy",decoding:"async",onError:a,style:{width:"100%",aspectRatio:"1",objectFit:"cover",borderRadius:F,display:"block",background:"var(--graview-edge)"}})})}function X({files:e,label:n}){let i=S(),r=d=>w(i,d.href),a=e.filter(E),l=e.filter(x),u=e.filter(d=>!E(d)&&!x(d)),[s,y]=(0,h.useState)(null),c=(0,h.useRef)(null),b=(0,h.useRef)(null);(0,h.useEffect)(()=>{let d=c.current;s!==null&&d&&!d.open&&d.showModal?.()},[s]);let p=s===null?void 0:a[s];return(0,t.jsxs)("div",{style:{display:"grid",gap:10,minWidth:0},children:[a.length>0?(0,t.jsx)("ul",{"data-graview-gallery":"","aria-label":n,style:{listStyle:"none",margin:0,padding:0,display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(96px, 1fr))",gap:8},children:a.map((d,T)=>(0,t.jsx)("li",{style:{minWidth:0},children:(0,t.jsx)(Ge,{file:d,onOpen:R=>{b.current=R,y(T)}})},d.href))}):null,l.length>0?(0,t.jsx)("ul",{"data-graview-videos":"","aria-label":n,style:{listStyle:"none",margin:0,padding:0,display:"grid",gap:12},children:l.map(d=>(0,t.jsx)("li",{style:{minWidth:0},children:(0,t.jsx)(Ae,{file:d})},d.href))}):null,u.length>0?(0,t.jsx)("ul",{"data-graview-documents":"",style:{listStyle:"none",margin:0,padding:0,display:"grid",gap:10},children:u.map(d=>(0,t.jsxs)("li",{"data-graview-document":d.type,style:{display:"grid",gap:6,minWidth:0},children:[d.type==="application/pdf"?(0,t.jsx)("object",{data:r(d),type:"application/pdf","aria-label":k(d),style:{width:"100%",height:420,border:"1px solid var(--graview-edge)",borderRadius:F},children:(0,t.jsxs)("p",{style:{margin:0,padding:12},children:["This browser shows no PDF here: ",(0,t.jsxs)("a",{href:r(d),download:d.name,children:["download ",d.name]}),"."]})}):null,(0,t.jsxs)("span",{style:{display:"flex",flexWrap:"wrap",gap:"2px 10px",alignItems:"baseline",minWidth:0,overflowWrap:"anywhere"},children:[(0,t.jsx)("a",{href:r(d),download:d.name,...d.type==="application/pdf"?{target:"_blank",rel:"noopener"}:{},children:d.name}),(0,t.jsxs)("span",{style:P,children:[z(d)," \xB7 ",_(d.bytes)]})]}),d.caption?(0,t.jsx)("span",{style:P,children:d.caption}):null]},d.href))}):null,p?(0,t.jsx)("dialog",{ref:c,"data-graview-full":p.href,"aria-label":k(p),onClose:()=>{y(null),b.current?.focus()},onClick:d=>{d.target===d.currentTarget&&d.currentTarget.close()},style:{padding:0,border:0,borderRadius:F,maxWidth:"min(96vw, 1600px)",maxHeight:"94vh",background:"var(--graview-panel)",color:"var(--graview-ink)"},children:(0,t.jsxs)("figure",{style:{margin:0,display:"grid",gap:8,padding:10},children:[(0,t.jsx)("img",{src:r(p),alt:k(p),style:{maxWidth:"100%",maxHeight:"80vh",objectFit:"contain",display:"block",margin:"0 auto"}}),(0,t.jsxs)("figcaption",{style:{display:"flex",gap:12,alignItems:"center",justifyContent:"space-between"},children:[(0,t.jsx)("span",{children:p.caption??p.name}),(0,t.jsx)("form",{method:"dialog",style:{margin:0},children:(0,t.jsx)("button",{type:"submit",autoFocus:!0,children:"Close"})})]})]})}):null]})}function xe({value:e,onChange:n,several:i,image:r,video:a=!1,label:l,thumbs:u=!0}){let s=S(),y=(0,h.useId)(),c=(0,h.useRef)(null),b=(0,h.useRef)(null),[p,d]=(0,h.useState)(null),[T,R]=(0,h.useState)(null),[te,H]=(0,h.useState)([]),[N,O]=(0,h.useState)(!1),W=r?"image/":a?"video/":void 0,C=s?W?s.kinds.filter(o=>o.startsWith(W)||o==="*"||o==="*/*"):s.kinds:[],Ce=s?s.kinds.length===0||C.length>0:!1,Pe=!a&&(s?s.kinds.length===0||(r?C:s.kinds).some(o=>o.startsWith("image/")||o.startsWith("*")):!1),L=!!s&&(!W||Ce),V=r?"picture":a?"video":"file",ne=i?`${V}s`:`a ${V}`,ae=W?C.length>0?C.join(","):`${W}*`:s?.kinds.join(",")||void 0,Re=typeof matchMedia=="function"&&matchMedia("(pointer: coarse)").matches,A=(0,h.useRef)(e);A.current=e;let ie=(0,h.useRef)(null),I=(0,h.useRef)(null);(0,h.useEffect)(()=>{let o=I.current;if(!o||o.from===e)return;I.current=null;let g=ie.current?.children,f=g?.[Math.min(o.at,g.length-1)];((o.what==="move"?f?.querySelector("[data-graview-file-move]"):null)??f?.querySelector("[data-graview-file-remove]")??c.current?.parentElement?.querySelector("[data-graview-file-choose]"))?.focus()});let D=async(o,g)=>{if(!s||o.length===0)return;let f=i?o:o.slice(0,1),m=[],$=[];f.length<o.length&&$.push(`${l} holds one ${V}, so ${o.slice(1).map(v=>`\u201C${v.name||"the photo"}\u201D`).join(", ")} ${o.length>2?"were":"was"} left out.`),H([]),R(null);for(let v of f){d(`Sending ${v.name||"the photo"}\u2026`);let G=await Be(v,s,{image:r,video:a,camera:g==="camera"});if("refused"in G){$.push(G.refused);continue}let M=await je(G,s,r,a);"refused"in M?$.push(M.refused):[...i?A.current:[],...m].some(Te=>Te.href===M.href)?$.push(`\u201C${M.name}\u201D is already here.`):m.push(M)}if(d(null),H($),m.length!==0)try{n(i?[...A.current,...m]:m.slice(-1)),R(`Added ${m.map(v=>v.name).join(", ")}.`)}catch(v){H([...$,v instanceof Error?v.message:String(v)])}},B=(o,g,f)=>{try{I.current=f?{...f,from:e}:null,n(o),R(g)}catch(m){I.current=null,H([m instanceof Error?m.message:String(m)])}},j=o=>o?Array.from(o):[],We=o=>{let g=j(o.clipboardData?.files);!L||g.length===0||(o.preventDefault(),D(g,"pasted"))},Me=o=>{O(!1),L&&(o.preventDefault(),D(j(o.dataTransfer?.files),"dropped"))};return(0,t.jsxs)("div",{role:"group","aria-labelledby":`${y}-label`,"data-graview-file-editor":"","data-graview-dropping":N?"":void 0,onPaste:We,onDragOver:o=>{L&&(o.preventDefault(),O(!0))},onDragLeave:()=>O(!1),onDrop:Me,style:{display:"grid",gap:8,minWidth:0,padding:N?6:0,outline:N?"2px dashed var(--graview-accent)":"none",borderRadius:F},children:[(0,t.jsx)("span",{id:`${y}-label`,style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap"},children:l}),e.length>0&&(i||e.length>1)?(0,t.jsx)("ul",{ref:ie,style:{listStyle:"none",margin:0,padding:0,display:"grid",gap:6},children:e.map((o,g)=>(0,t.jsxs)("li",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",minWidth:0},children:[u&&(E(o)||x(o))?(0,t.jsx)(Q,{file:o,size:40}):null,(0,t.jsx)("span",{style:{flex:"1 1 8rem",minWidth:0,overflowWrap:"anywhere"},children:o.name}),(0,t.jsx)(ve,{file:o,onCaption:f=>B(e.map((m,$)=>$===g?be(m,f):m),f?`${o.name} now says \u201C${f}\u201D.`:`${o.name} says its name again.`)}),i&&g>0?(0,t.jsx)("button",{type:"button","data-graview-file-move":"","aria-label":`Move ${o.name} earlier`,onClick:()=>B(e.map((f,m)=>m===g-1?o:m===g?e[g-1]:f),`Moved ${o.name} earlier.`,{at:g-1,what:"move"}),children:"\u2191"}):null,i?(0,t.jsx)("button",{type:"button","data-graview-file-remove":"","aria-label":`Remove ${o.name}`,onClick:()=>B(e.filter((f,m)=>m!==g),`Removed ${o.name}.`,{at:g,what:"remove"}),children:"Remove"}):null]},`${g}:${o.href}`))}):e.length===1?(0,t.jsx)(ve,{file:e[0],onCaption:o=>B([be(e[0],o)],o?`${e[0].name} now says \u201C${o}\u201D.`:`${e[0].name} says its name again.`)}):null,L?(0,t.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,alignItems:"center"},children:[(0,t.jsx)("input",{ref:c,type:"file",hidden:!0,multiple:i,...ae?{accept:ae}:{},"data-graview-file-input":"","aria-label":`Choose ${ne}`,onChange:o=>{let g=j(o.currentTarget.files);o.currentTarget.value="",D(g,"picked")}}),(0,t.jsx)("button",{type:"button",disabled:p!==null,onClick:()=>c.current?.click(),"data-graview-file-choose":"",children:e.length>0&&!i?`Replace the ${V}`:`Choose ${ne}`}),Pe?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:b,type:"file",hidden:!0,accept:"image/*",capture:"environment","data-graview-photo-input":"","aria-label":"Take a photo",onChange:o=>{let g=j(o.currentTarget.files);o.currentTarget.value="",D(g,"camera")}}),Re?(0,t.jsx)("button",{type:"button",disabled:p!==null,onClick:()=>b.current?.click(),children:"Take a photo"}):null]}):null,(0,t.jsxs)("span",{style:P,"data-graview-file-takes":"",children:["or drop or paste ",i?"them":"it"," here \xB7 ",s.kinds.length>0?we(C.length>0?C:s.kinds):"any file",", up to ",_(s.maxBytes)]})]}):(0,t.jsx)("p",{style:{...P,margin:0},"data-graview-file-none":"",children:s?`This host doesn\u2019t take ${a?"videos":"pictures"}, so none can be added here.`:"This host doesn\u2019t take files, so none can be added here."}),(0,t.jsx)("p",{"aria-live":"polite",style:{...P,margin:0,minHeight:p||T?void 0:0},"data-graview-file-status":"",children:p??T??""}),te.length>0?(0,t.jsx)("div",{role:"alert","data-graview-file-refused":"",style:{color:"var(--graview-warn)",fontSize:"0.875rem",display:"grid",gap:2},children:te.map((o,g)=>(0,t.jsx)("p",{style:{margin:0},children:o},g))}):null]})}var be=(e,n)=>{let{caption:i,...r}=e;return n?{...r,caption:n}:r};function ve({file:e,onCaption:n}){let[i,r]=(0,h.useState)(e.caption??"");(0,h.useEffect)(()=>r(e.caption??""),[e.caption]);let a=()=>{let l=i.trim().slice(0,500);l!==(e.caption??"")&&n(l)};return(0,t.jsx)("input",{type:"text",value:i,placeholder:E(e)||x(e)?"What it shows":"What it is","aria-label":`What ${e.name} ${E(e)||x(e)?"shows":"is"}`,"data-graview-file-caption":e.href,onChange:l=>r(l.target.value),onBlur:a,onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),a())},style:{flex:"1 1 10rem",minWidth:0,font:"inherit",fontSize:"0.875rem",minHeight:24}})}function Se({field:e,label:n,labelStyle:i,valueStyle:r,style:a,children:l}){return(0,t.jsxs)("div",{"data-graview-files":e,style:{display:"grid",gap:6,minWidth:0,gridColumn:"1 / -1",...a},children:[(0,t.jsx)("dt",{style:i,children:n}),(0,t.jsx)("dd",{style:{margin:0,minWidth:0,display:"grid",gap:10,...r},children:l})]})}function Ee(e){let{nodeId:n,field:i,label:r,files:a}=e,{fields:l,commit:u}=pe(n),s=l.find(p=>p.field===i&&p.takesValue),y=s?.shape,c=y?.type==="several"?y.of:y,b=y?.type==="several";return a.length===0&&c?.type!=="file"?null:(0,t.jsxs)(Se,{...e,children:[(0,t.jsx)(X,{files:a,label:r}),s&&c?.type==="file"?(0,t.jsx)(xe,{value:a,thumbs:!1,several:b,image:c.image===!0,video:c.video===!0,label:r,onChange:p=>{let d=b?p:p[p.length-1];d!==void 0&&u(s,d)}}):null]})}function et(e){switch(e.as){case"field":return e.read?e.files.length>0?(0,t.jsx)(Se,{...e,children:(0,t.jsx)(X,{files:e.files,label:e.label})}):null:(0,t.jsx)(Ee,{...e});case"unfilled":return(0,t.jsx)(Ue,{...e});case"thumb":return(0,t.jsx)(Q,{...e});case"block":return e.files.length>0?(0,t.jsx)("span",{className:"graview-spec-image","data-graview-field":e.field,"data-graview-image":e.view,style:{display:"block",minWidth:0,...e.view==="gallery"?{position:"relative",zIndex:se.raised}:{}},children:e.view==="thumb"?(0,t.jsx)(Q,{file:e.files[0],size:72}):(0,t.jsx)(X,{files:e.files,label:e.label})}):null;case"control":{let n=(0,t.jsx)(xe,{value:Y(e.value),several:e.several,image:e.image,video:e.video===!0,label:e.label,onChange:i=>e.onChange(e.several?i:i[i.length-1])});return e.title===void 0?n:(0,t.jsxs)("fieldset",{"data-graview-part":"group","data-graview-field":e.several?"files":"file",children:[(0,t.jsx)("legend",{"data-graview-part":"label",children:e.title}),n]})}}}function Ue({nodeId:e,skip:n,labels:i,labelStyle:r,style:a}){let{store:l}=ce(),u=ge(e),s=u?l.schema.tryDefinition(u.kind):void 0,y=he(s).filter(c=>!n.includes(c)&&!(s?.display?.hide??[]).includes(c)&&Y(u?.[c]).length===0);return y.length===0?null:(0,t.jsx)("dl",{style:{margin:0,display:"grid",gap:14,minWidth:0},children:y.map(c=>(0,t.jsx)(Ee,{nodeId:e,field:c,label:i?.[c]??re(s,c),files:[],...r?{labelStyle:r}:{},...a?{style:a}:{}},c))})}export{xe as FilesEditor,Le as SEND_EDGE,et as drawFiles,we as kindsWords,Be as prepare,je as send,_ as sizeWords,ke as takes,z as typeWords};
|
|
@@ -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{H as k,S as n,a as t,oa as o}from"./chunk.MQ7FNHXG.js";import{b as p}from"./chunk.AJZBJBMO.js";var f=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.WVUJXDXZ.js","./chunk.2EJAIT33.js","./chunk.EUGWV3S6.js","./chunk.6XJP7F3I.js","./chunk.NPX7SPXM.js","./chunk.OE4QOBJF.js","./chunk.74RMHUCX.js","./chunk.GZHZLJBF.js","./chunk.I3SQJ2L2.js","./chunk.OJGHDWI6.js","./chunk.FUJM7GDV.js","./chunk.MWZK3HVG.js","./chunk.3D5T3XIE.js","./chunk.GR5Q4HTW.js","./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.NWWMUOZM.js")))),y=f.part((e,r)=>e.drawFiles(r),{quiet:!0});var d=o(t(()=>(__graviewPreload(import.meta.url,["./chunk.GZHZLJBF.js","./chunk.I3SQJ2L2.js","./chunk.OJGHDWI6.js","./chunk.FUJM7GDV.js","./chunk.MWZK3HVG.js","./chunk.3D5T3XIE.js","./chunk.GR5Q4HTW.js","./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.HVTGPEVW.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.GZHZLJBF.js","./chunk.I3SQJ2L2.js","./chunk.OJGHDWI6.js","./chunk.FUJM7GDV.js","./chunk.MWZK3HVG.js","./chunk.3D5T3XIE.js","./chunk.GR5Q4HTW.js","./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.SITFEJES.js")))),E=m.part((e,r)=>(0,s.jsx)(e.RepeatPicker,{...r}),{quiet:!0}),W=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.MWZK3HVG.js","./chunk.3D5T3XIE.js","./chunk.GR5Q4HTW.js","./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.DFVVS6C5.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,E as d,W as e,M as f,N as g};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as J,b as We}from"./chunk.5A4AOFOA.js";import"./chunk.KSXB4LDF.js";import"./chunk.DL637Q3W.js";import{i as $e,j as Re,k as Le}from"./chunk.L73VUBXN.js";import"./chunk.6ONRWFA6.js";import"./chunk.HJCQ6I3S.js";import"./chunk.GZ3IXNA4.js";import"./chunk.FMVWXSQ7.js";import"./chunk.TKSGC6XH.js";import"./chunk.IM7LXLIB.js";import"./chunk.IEDXW36H.js";import{a as Pe,b as k}from"./chunk.7RSZMIAL.js";import"./chunk.6IHXTT6Z.js";import"./chunk.OEF3GPRM.js";import"./chunk.33GN2NUT.js";import"./chunk.2VIGF4FO.js";import"./chunk.5MSO3KRO.js";import"./chunk.QYRPELLU.js";import"./chunk.FTJBW25J.js";import{b as ze,c as Ee}from"./chunk.UT6642FC.js";import"./chunk.MCVY6RRS.js";import"./chunk.RZVZG2BQ.js";import"./chunk.TI4OSTQV.js";import"./chunk.V2NBJDAX.js";import"./chunk.2EJAIT33.js";import"./chunk.EUGWV3S6.js";import"./chunk.6XJP7F3I.js";import"./chunk.NPX7SPXM.js";import"./chunk.OE4QOBJF.js";import"./chunk.74RMHUCX.js";import{u as Ie}from"./chunk.I3SQJ2L2.js";import"./chunk.OJGHDWI6.js";import"./chunk.FUJM7GDV.js";import{g as Ce}from"./chunk.MWZK3HVG.js";import"./chunk.3D5T3XIE.js";import{c as Me}from"./chunk.GR5Q4HTW.js";import{m as He}from"./chunk.QT4XGC5Z.js";import{$ as N,Ba as Te,H as tt,S as Se,i as xe,sa as Q,v as ke,xa as Ae}from"./chunk.MQ7FNHXG.js";import{Ub as ye,Vb as we,ja as K,ka as W,qc as be,tb as ve}from"./chunk.WLPTY4BF.js";import{b as G}from"./chunk.AJZBJBMO.js";var o=G(tt(),1);var t=G(Se(),1);function mt(d,r,a){let p=r.on??r.about[r.about.length-1];$e(d,r.about,{...a,pins:J(),...p===void 0?{}:{focus:p}})}function ft({placement:d="float",chosen:r=!0}={}){let{menuAt:a}=N();return d==="menu"&&a===null?r?(0,t.jsx)(nt,{}):null:(0,t.jsx)(it,{placement:d})}function nt(){let{store:d,setMenuAt:r,view:a}=N(),{selection:p}=Q(),h=(0,o.useRef)(null),[H,v]=(0,o.useState)(null);(0,o.useLayoutEffect)(()=>{let b=h.current?.offsetParent??h.current?.parentElement;if(!b)return;let m=Math.round(b.getBoundingClientRect().width);m!==H&&v(m)});let y=p.length===1&&!a.overview?d.graph.getNode(p[0]):void 0;return!y||H===null||H>=De?(0,t.jsx)("span",{ref:h,hidden:!0}):(0,t.jsx)("button",{type:"button",ref:h,"data-testid":"chosen-acts","aria-label":`What can be done with ${k(d,y.id)}`,"aria-haspopup":"menu",onClick:b=>{let m=b.currentTarget.getBoundingClientRect();r({x:Math.round(m.right),y:Math.round(m.bottom+4),on:y.id})},style:{position:"absolute",right:"calc(14px + var(--graview-dock, 0px))",top:98,zIndex:"var(--graview-layer-overview, 10)",minHeight:30,padding:"0 12px",borderRadius:8,fontSize:"0.8125rem",background:"var(--graview-float)",boxShadow:"var(--graview-lift-low)"},children:"Acts\u2026"})}var De=564;function it({placement:d}){let{store:r,menuAt:a,setMenuAt:p,view:h,signIn:H}=N(),v=(0,o.useRef)(null),y=(0,o.useRef)(null),b=(0,o.useRef)(null),m=(0,o.useRef)(null);a?.returnTo&&(m.current=a.returnTo);let Oe=e=>{let i=e.closest("[data-graview-asking]")?.getAttribute("data-graview-asking"),n=e.getAttribute("data-pin-for"),g=i??e.getAttribute("data-affordance")??(n===null?null:`pin:${n}`)??e.getAttribute("data-menu-item");y.current=g===null?null:{key:g,element:e}};(0,o.useEffect)(()=>{let e=v.current,i=y.current;if(i===null||document.activeElement!==document.body||i.element.isConnected)return;let n=i.key;if(!e){y.current=null;let I=m.current;m.current=null,(I?.isConnected?I:b.current)?.focus();return}((n.startsWith("pin:")?e.querySelector(`[data-pin-for="${CSS.escape(n.slice(4))}"]`):null)??e.querySelector(`[data-affordance="${CSS.escape(n)}"]:not([disabled])`)??e).focus()});let[Fe,qe]=(0,o.useState)(null);(0,o.useLayoutEffect)(()=>{let e=v.current?.offsetParent??v.current?.parentElement;if(e instanceof HTMLElement&&(b.current=e),!e)return;let i=e.getBoundingClientRect();qe(n=>n&&n.left===i.left&&n.top===i.top&&n.width===i.width&&n.height===i.height?n:{left:i.left,top:i.top,width:i.width,height:i.height})});let{selection:Be,set:je,clear:_e}=Q(),s=a?.about??Be,[D,Ue]=(0,o.useState)(()=>J()),O=a?.on??s[s.length-1],F=a?.about,Ve=(0,o.useMemo)(()=>({pins:D,...O===void 0?{}:{focus:O},...F?{about:F}:{}}),[D,O,F]),Ye=(0,o.useMemo)(()=>new Set(r.allMutations().filter(e=>e.pinned).map(e=>e.name)),[r]),{affordances:c,withheld:X,observations:Z}=Re(Ve),M=we(X,H),f=M?rt:X,Ge=a===null?null:{face:a.face??"scene",on:a.on,about:s,field:a.field,place:a.place,href:a.href,act:a.act,element:a.returnTo},ee=Ie(Ge),te=Z.some(e=>e.id.startsWith("schema:waits:")),{apply:Ke,preview:Qe}=Le(),[C,z]=(0,o.useState)(null),[Je,ne]=(0,o.useState)(!1),[ie,re]=(0,o.useState)(!1),[P,$]=(0,o.useState)(""),[ae,q]=(0,o.useState)(null),B=(0,o.useRef)([]),j=(e,i)=>{try{return Qe(e,i),Ke(e,i),q(null),p(null),B.current=[],!0}catch(n){return q(Ce(r.schema,r.allMutations(),n)),B.current=n instanceof ve?n.issues.map(g=>String(g.path[0]??"")).filter(Boolean):[],!1}},R=[...new Set(s.flatMap(e=>{let i=r.graph.getNode(e);return i?[i.kind]:[]}))],x=R.length>0?R:[...new Set(s.flatMap(e=>ke(e)))],u=s.length===1?xe(s[0]):null,_=u?{from:r.graph.getNode(u.from),to:r.graph.getNode(u.to)}:null,oe=u?Ee(r,u):void 0,le=oe?.provisional?oe:void 0,se=u?(()=>{let e=r.schema.tryDefinition(r.graph.getNode(u.from)?.kind??"")?.edges?.[u.kind],i=r.graph.getNode(u.to);return e?.inverse&&i?`From ${k(r,i.id)}: ${e.inverse}`:null})():null;(0,o.useEffect)(()=>{z(null),ne(!1),re(!1),q(null),$("")},[s,a?.about]);let l=a!==null,Xe=d==="menu"&&!l,S=(0,o.useRef)(a);S.current=a;let de=Te("acts",{open:l&&d==="menu",onOpenChange:e=>{e||p(null)},at:()=>S.current?{x:S.current.x,y:S.current.y}:null,returnTo:()=>{let e=S.current?.returnTo;if(e?.isConnected)return e;let i=S.current?.on;return i?document.querySelector(`[data-graview-view="${CSS.escape(i)}"]`):null},align:"start"}),ue=(Fe?.width??Number.POSITIVE_INFINITY)<De;if((0,o.useLayoutEffect)(()=>{let e=v.current?.offsetParent;if(!e||!ue||l)return;let i=v.current?.getBoundingClientRect().height??0,n=`${Math.round(i)+20}px`;if(e.style.paddingBottom===n)return;let g=e.style.paddingBottom;return e.style.paddingBottom=n,()=>{e.style.paddingBottom=g}}),s.length===0&&!l)return null;let pe=a?.title!==void 0||s.length>0&&!(s.length===1&&s[0]===h.focusId),ce=Math.max(1,Math.min(9,c.length)),A=[...c.filter(e=>e.provider==="invariant"&&!e.destructive),...c.filter(e=>e.pinned&&e.provider!=="invariant"&&!e.destructive),...c.filter(e=>!e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...c.filter(e=>e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...c.filter(e=>e.destructive)],ge=A.length>ce&&!l,he=P.trim().toLowerCase(),w=ge&&he.length>0?A.filter(e=>`${e.label} ${e.why}`.toLowerCase().includes(he)):null,U=w??(Je||l?A:A.slice(0,ce)),me=w?0:A.length-U.length,L=[];for(let e of U){let i=!l&&e.provider==="invariant",n=!l&&!i&&e.pinned!==void 0&&!e.destructive,g=!l&&!i&&!n&&e.ties===!0&&!e.destructive,I=i?e.why:n?"pinned":g?"its ties":null,et=i?"violation":n||g?"ties":null,Y=L[L.length-1];Y&&Y.heading===I?Y.items.push(e):L.push({heading:I,tone:et,items:[e]})}let V=c.find(e=>e.id===C),E=s.length===1?k(r,s[0]):null,fe=e=>{if(!E)return e;let i=e.startsWith(`"${E}"`)?e.slice(E.length+2):e.startsWith(E)?e.slice(E.length):null;if(i===null)return e;let n=i.trimStart();return n.length===0?e:n[0].toUpperCase()+n.slice(1)},Ze=new Set(l?[]:U.filter(e=>e.provider==="invariant").map(e=>e.why)),T=Z.filter(e=>!Ze.has(e.text)).map(e=>({...e,text:fe(e.text)}));return Xe?null:(0,t.jsxs)("section",{...l?de.pane:{},ref:e=>{v.current=e,l&&de.pane.ref(e)},"aria-label":"Inspector","data-graview-offstage":"","data-testid":l?"context-menu":"inspector-strip",tabIndex:-1,onFocus:e=>Oe(e.target),onBlur:e=>{e.relatedTarget!==null&&(y.current=null)},onMouseDown:e=>e.stopPropagation(),style:{...l?Ae:{position:"absolute",zIndex:be("rail")},boxSizing:"border-box",display:"flex",flexDirection:"column",gap:7,padding:"9px 12px",borderRadius:"var(--graview-radius, 12px)",border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)",...l?{width:300,maxHeight:"min(52cqh, 420px)",overflow:"auto"}:ue?{left:10,right:10,width:"auto",bottom:10,maxHeight:"min(42cqh, 300px)",overflow:"auto"}:{left:14,top:h.overview?"min(296px, 38cqh)":44,width:236,maxHeight:h.overview?"calc(100cqh - min(296px, 38cqh) - 20px)":"calc(68cqh - 94px)",overflow:"auto"}},children:[(0,t.jsx)("h2",{style:{...He,margin:0},children:"Inspector"}),(0,t.jsxs)("div",{style:{display:pe||!l?"flex":"none",alignItems:"baseline",flexWrap:"wrap",gap:"2px 8px",minWidth:0,paddingRight:l?0:24},children:[pe?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{style:{fontSize:"0.9375rem",whiteSpace:"nowrap"},children:a?.title??(s.length===1?k(r,s[0]):`${s.length} selected`)}),R.length>0||u?(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",whiteSpace:"nowrap"},children:u?"relation":R.map(e=>W(r.schema.tryDefinition(e),e)).join(" \xB7 ")}):null,s.length===1&&!u&&a?.face!=="pages"?(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",whiteSpace:"nowrap"},children:h.expanded.includes(s[0])?"\xB7 double-click closes":"\xB7 double-click opens"}):null]}):null,(0,t.jsx)("span",{style:{flex:"1 1 auto"}})]}),l?null:(0,t.jsx)("button",{type:"button",onClick:()=>{p(null),_e()},"aria-label":"Clear selection",title:"Clear selection",style:{position:"absolute",top:6,right:6,flex:"0 0 auto",width:24,height:24,display:"grid",placeItems:"center",padding:0,fontSize:"0.875rem",lineHeight:1,borderRadius:7},children:"\xD7"}),u&&_?(0,t.jsxs)("div",{style:{display:"grid",gap:6},children:[se?(0,t.jsx)("p",{"data-testid":"edge-said",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:se}):null,le?(0,t.jsx)("p",{"data-testid":"edge-provisional",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:ze(le)}):null,(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[["from",_.from],["to",_.to]].map(([e,i],n)=>(0,t.jsxs)(o.Fragment,{children:[n===1?(0,t.jsx)("span",{"aria-hidden":"true",style:{color:"var(--graview-ink-faint)"},children:"\u2192"}):null,i?(0,t.jsx)("button",{type:"button","data-testid":`edge-${e}`,onClick:()=>je([i.id]),title:`Select ${k(r,i.id)}`,style:{fontSize:"0.8125rem",padding:"3px 9px",borderRadius:6},children:k(r,i.id)}):(0,t.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-faint)"},children:"gone"})]},e))})]}):null,!u&&s.length===1&&ye(r,s[0])?(0,t.jsx)("p",{"data-testid":"left-alone",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:"Left alone: nothing automated changes it."}):null,T.length>0?(0,t.jsx)("div",{"data-testid":"observations",title:T.map(e=>e.text).join(`
|
|
2
|
-
`),style:{display:"grid",gap:3},children:T.slice(0,2).map(e=>(0,t.jsxs)("p",{style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:[e.text,e===T[1]&&T.length>2?(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" +",T.length-2]}):null]},e.id))}):null,l?ee.start.map(e=>(0,t.jsx)(Ne,{section:e,close:()=>p(null)},e.id)):null,ae?(0,t.jsx)("p",{"data-testid":"refused",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-warn)"},children:ae}):null,ge?(0,t.jsx)("input",{"data-testid":"action-filter",value:P,onChange:e=>$(e.target.value),placeholder:`Filter ${A.length} actions\u2026`,"aria-label":"Filter actions",onKeyDown:e=>{if(e.key==="Escape"){e.stopPropagation(),P.length>0?$(""):e.currentTarget.blur();return}if(e.key==="Enter"&&w?.length===1){let i=w[0];if(i.destructive)return;i.open.length>0?z(i.id):j(i)&&$("")}},style:{font:"inherit",fontSize:"0.875rem",padding:"5px 9px",borderRadius:8,border:"1px solid var(--graview-edge)",background:"var(--graview-panel)",color:"var(--graview-ink)"}}):null,w!==null&&w.length===0?(0,t.jsxs)("p",{"data-testid":"no-matches",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:["Nothing offered here matches \u201C",P.trim(),"\u201D."]}):null,M&&c.length===0||c.length===0&&!te&&s.length===0?null:c.length===0&&!te?(0,t.jsx)("p",{"data-testid":"no-affordances",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:f.length>0?`Nothing you may do with ${u?"this relation":x.length===1?K(W(r.schema.tryDefinition(x[0]),x[0])):"this mix of kinds"} \u2014 ${f.length} action${f.length===1?"":"s"} withheld.`:u?`Nothing can be done with this line yet \u2014 nothing this app declares makes or breaks \u201C${Me(r.schema,r.graph.getNode(u.from)?.kind??"",u.kind,"out")}\u201D.`:`Nothing can be done with ${x.length===1?K(W(r.schema.tryDefinition(x[0]),x[0])):"this mix of kinds"} yet \u2014 nothing this app declares acts on ${x.length===1?"it":"them"}.`}):(0,t.jsxs)("ol",{"data-testid":"affordances",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:2},children:[L.map((e,i)=>(0,t.jsxs)(o.Fragment,{children:[e.heading?(0,t.jsxs)("li",{"data-graview-heading":e.tone,style:{fontSize:"0.75rem",lineHeight:1.4,color:e.tone==="violation"?"var(--graview-warn)":"var(--graview-ink-faint)",...e.tone!=="violation"?{letterSpacing:"0.12em",textTransform:"uppercase",fontSize:"0.75rem"}:{},padding:"2px 2px 1px",marginTop:i>0?6:0},children:[e.tone==="violation"?"\u26A0 ":"",e.tone==="violation"?fe(e.heading):e.heading]}):i>0?(0,t.jsx)("li",{"aria-hidden":"true",style:{borderTop:"1px solid var(--graview-edge)",margin:"6px 0 3px"}}):null,e.items.map(n=>(0,t.jsxs)("li",{style:{display:"flex",gap:2,alignItems:"stretch"},children:[(0,t.jsxs)("button",{type:"button","data-affordance":n.id,"data-rank":n.rank,"data-graview-destructive":n.destructive||void 0,"aria-pressed":C===n.id,title:n.why,style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left",borderWidth:1,borderStyle:"solid",borderColor:C===n.id?"var(--graview-accent)":l?"transparent":"var(--graview-edge)",background:l?"none":"var(--graview-panel)",boxShadow:"none",...n.destructive?{color:"var(--graview-warn)"}:{},...C===n.id?{color:"var(--graview-accent)"}:{}},onClick:()=>{if(n.open.length>0){z(C===n.id?null:n.id);return}j(n)},children:[n.label,n.open.length>0?(0,t.jsx)("span",{style:{color:"var(--graview-ink-faint)"},children:" \u2026"}):null,w?.length===1&&w[0]?.id===n.id&&!n.destructive?(0,t.jsx)("span",{"aria-hidden":"true",title:"Enter runs it",style:{float:"right",color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:"\u21B5"}):null]}),(0,t.jsx)("button",{type:"button","data-testid":"pin-toggle","data-pin-for":n.mutation,"aria-pressed":n.pinned!==void 0,"aria-label":n.pinned!==void 0?`Unpin ${n.label}`:`Pin ${n.label}`,title:n.pinned==="declared"?"Pinned by the app \u2014 unpin it for yourself":n.pinned==="user"?"Unpin":"Pin to the top",onClick:()=>Ue(We(D,n.mutation,Ye.has(n.mutation))),style:{flex:"0 0 auto",width:24,minHeight:24,display:"grid",placeItems:"center",padding:0,fontSize:"0.75rem",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7,color:n.pinned==="user"?"var(--graview-accent)":n.pinned==="declared"?"var(--graview-ink-muted)":"var(--graview-ink-faint)"},children:n.pinned!==void 0?"\u2605":"\u2606"})]},n.id))]},`${e.heading??"plain"}-${i}`)),me>0?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>ne(!0),title:`Show all ${c.length} actions`,style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8},children:["Show ",me," more"]})}):null]}),M?(0,t.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>{p(null),M.run()},style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left"},children:M.label}):null,f.length>0?(0,t.jsxs)("ul",{"data-testid":"withheld",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:2},children:[f.slice(0,l||ie?f.length:3).map(e=>(0,t.jsxs)("li",{style:{display:"grid",gap:2},children:[(0,t.jsx)("button",{type:"button",disabled:!0,"data-affordance":e.id,"data-rank":e.rank,"data-withheld":e.refusal.wouldNeed.join(",")||"nobody",style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8,borderStyle:"dashed",width:"100%",textAlign:"left",background:"none"},children:(0,t.jsx)("s",{children:e.label})}),(0,t.jsx)("span",{"data-testid":"withheld-why",style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-ink-muted)",padding:"0 10px"},children:e.refusal.message})]},e.id)),!l&&!ie&&f.length>3?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-testid":"withheld-more",onClick:()=>re(!0),title:`Show all ${f.length} actions this seat may not take`,style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8},children:["Show ",f.length-3," more withheld"]})}):null]}):null,l?ee.end.map(e=>(0,t.jsx)(Ne,{section:e,close:()=>p(null)},e.id)):null,V?(0,t.jsx)(Pe,{affordance:V,onApply:e=>{if(j(V,e))z(null);else return B.current},onCancel:()=>z(null)}):null]})}var rt=[];function Ne({section:d,close:r}){return(0,t.jsxs)("div",{"data-menu-section":d.id,...d.heading?{role:"group","aria-label":d.heading}:{},style:{display:"grid",gap:2,borderTop:"1px solid var(--graview-edge)",paddingTop:5},children:[d.heading?(0,t.jsx)("p",{"aria-hidden":"true",style:{margin:0,padding:"2px 2px 1px",fontSize:"0.75rem",lineHeight:1.4,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:d.heading}):null,d.items&&d.items.length>0?(0,t.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:2},children:d.items.map(a=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-menu-item":a.id,onClick:()=>{r(),a.run()},style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left",borderWidth:1,borderStyle:"solid",borderColor:"transparent",background:"none",boxShadow:"none"},children:[a.label,a.hint?(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",a.hint]}):null]})},a.id))}):null,d.render?.(r)]})}export{ft as InspectorPane,mt as prepareActs};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as J,C as Q,E as X,I as Y,K as ee,N as ne,a as I,i as Z,l as z,p as D,s as W,t as _,x as j,y as U}from"./chunk.QT4XGC5Z.js";import{$ as T,H as se,S as N,ba as $,na as G,pa as K,wa as q}from"./chunk.MQ7FNHXG.js";import{Ic as V,Xb as M,ec as P,gc as O}from"./chunk.WLPTY4BF.js";import{b as A}from"./chunk.AJZBJBMO.js";var o=A(se(),1);function ce(e){let t=[e?.typography?.body,e?.typography?.display,e?.typography?.mono],n=[];for(let a of t){let r=a?.split(",")[0]?.trim().replace(/^["']|["']$/g,"");!r||O(r)||r.toLowerCase()!==M.toLowerCase()&&(n.includes(r)||n.push(r))}return n}function te(e){let t=ce(e);return t.length===0?null:`https://fonts.googleapis.com/css2?${t.map(a=>`family=${encodeURIComponent(a).replace(/%20/g,"+")}:wght@400;500;600;700`).join("&")}&display=swap`}var l=A(N(),1);function Se({rootRef:e,firstLook:t,app:n}){let a=(0,o.useCallback)(()=>e.current,[e]);return t?(0,l.jsx)(ne,{firstLook:t,root:a,app:n}):null}function ve(e,t){let{app:n}=e,a=(0,o.useMemo)(()=>{let r=Y(t(n.schema,n.viewSpecs),n),i=e.views?G(r,e.views(n.schema,r)):r;return ee(i,n.schema,Q(e.brand??n.brand,n.schema)),i},[e.views,n.schema,n.viewSpecs,n.lenses,n.pages,n.home]);return K(a,e.keptViews)}function de(e,t){return new V({schema:e.schema,mutations:e.mutations??[],invariants:e.invariants??[],...t?{snapshot:t}:{},...e.policy?{policy:e.policy}:{},...e.intelligence?{intelligence:e.intelligence}:{},...e.brand?.timeZone?{timeZone:e.brand.timeZone}:{}})}function re(e){if(typeof document>"u")return e==="dark"?"dark":"light";let t=document.documentElement.dataset.theme;return t==="dark"||t==="light"?t:e==="dark"||e==="light"?e:typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function le(e,t){let[n,a]=(0,o.useState)(()=>re(t));return(0,o.useEffect)(()=>{if(!e||typeof document>"u")return;let r=()=>a(re(t));r();let i=new MutationObserver(r);i.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});let d=typeof matchMedia=="function"?matchMedia("(prefers-color-scheme: dark)"):null;return d?.addEventListener?.("change",r),()=>{i.disconnect(),d?.removeEventListener?.("change",r)}},[e,t]),n}var x=e=>e?e.getBoundingClientRect().height:0;function we(e,t,n){let a=(0,o.useRef)(n);a.current=n;let r=n!==void 0;(0,o.useLayoutEffect)(()=>{let i=e.current;if(!i||!r)return;let d=()=>{let u=[...i.children],b=u.find(S=>S.hasAttribute("data-graview-app-bar")),y=u.find(S=>S.hasAttribute("data-embed-content")),h=y?.querySelector("[data-embed-measure]")??null,c=u.find(S=>S.hasAttribute("data-graview-place-line"));return{strip:b,line:c,content:y,measure:h}},s=-1,f=()=>{let{strip:u,line:b,content:y,measure:h}=d(),c=Math.ceil(x(u)+x(b)+x(h||y));c!==s&&(s=c,a.current?.(c))};if(f(),typeof ResizeObserver>"u")return;let m=new ResizeObserver(f),E=()=>{m.disconnect();let{strip:u,line:b,content:y,measure:h}=d();for(let c of[i,u,b,y,h])c&&m.observe(c)};E();let g=new MutationObserver(()=>{E(),f()});return g.observe(i,{childList:!0}),()=>{m.disconnect(),g.disconnect()}},[e,t,r])}var Ee=480,ue=0;function Re(e){let{app:t,seed:n,scheme:a="auto",brand:r=t.brand,fonts:i=!0,height:d="100%",label:s}=e,f=(0,o.useRef)(null);q(f);let m=d==="viewport"?"100dvh":d,E=z(typeof m=="string"&&/vh\b/.test(m)),g=(0,o.useMemo)(()=>`graview-embed-${++ue}`,[]),u=(0,o.useMemo)(()=>e.store??e.remote?.store??de(t,n),[e.store,e.remote,t,n]),b=e.presence??e.remote?.presence,y=e.hostContext?.theme,h=le(a==="auto"&&y===void 0,r?.scheme),c=a==="auto"?y??h:a,S=(0,o.useMemo)(()=>I(c,r,{scope:`.${g}`}),[c,r,g]);Z(e.favicon?P(r):void 0),(0,o.useEffect)(()=>{if(!i||typeof document>"u")return;let w=te(r);if(!w||document.querySelector(`link[href="${w}"]`))return;let p=document.createElement("link");p.rel="stylesheet",p.href=w,document.head.appendChild(p)},[r,i]);let L=(0,o.useRef)(void 0);(0,o.useLayoutEffect)(()=>{let w=f.current,p=L.current;if(L.current=s,!w||!s)return;let ie=v=>{let R=v.getAttribute("aria-label")??"",k=p&&p!==s?R.startsWith(`${p} \xB7 `)?R.slice(p.length+3):R===p?"":R:R;k===s&&(v.getAttribute("role")==="region"||v.tagName==="SECTION"&&!v.hasAttribute("role"))&&v.setAttribute("role","group");let B=k.startsWith(`${s} \xB7 `)||k===s?k:k?`${s} \xB7 ${k}`:s;B!==R&&v.setAttribute("aria-label",B)},H=()=>w.querySelectorAll("aside, nav, main, header, footer, section[aria-label]:not([role]), [role=region], [role=complementary], [role=navigation], [role=search]").forEach(v=>{v.hasAttribute("data-graview-named-by-lens")||ie(v)});H();let C=new MutationObserver(H);return C.observe(w,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-label"]}),()=>C.disconnect()},[s]);let ae=E?`${m}`.replace(/([\d.]+)[sdl]?vh\b/g,(w,p)=>`${+p*E/100}px`):m;return{rootRef:f,scope:g,css:S,scheme:c,store:u,presence:b,brand:r,auto:d==="auto",height:ae}}function ke({rootRef:e,board:t}){let n=(0,o.useCallback)(()=>e.current?.querySelector("[data-embed-content]")??e.current,[e]);return(0,l.jsx)(D,{board:t,anchor:n})}function xe(e,t,n){return{brand:n,locale:e.locale,timeZone:e.timeZone,principal:e.principal,seats:e.seats,presence:t,people:e.people,memory:e.memory,presenceTtlMs:e.presenceTtlMs,onKeepLens:e.onKeepLens,ai:e.ai,files:e.files,resolveApp:e.resolveApp,history:e.history,linkedRecords:e.linkedRecords,subscriptions:e.subscriptions,keptViews:e.keptViews,signIn:e.signIn,menuSections:e.menuSections,app:e.app}}function Ae({name:e,heading:t,faces:n,at:a,without:r,home:i,reach:d,standing:s,hostActions:f,keeping:m,onFind:E,switch:g}){let{brand:u,store:b,principal:y,views:h}=T();$();let c=r?.has("places")?[]:W({store:b,principal:y,views:h}),S=J();return(0,l.jsx)(j,{brand:u,name:e,description:u?.subtitle,heading:t,faces:n,home:i,places:c,current:a===null?null:_(c,a),reach:d,onFind:E,...g?{switch:g}:{},...n?{scenePlaces:S}:{},tools:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(X,{clean:s}),(0,l.jsx)(U,{...f?{hostActions:f}:{},...m?{keeping:m}:{}})]})})}var Fe=e=>e===!1?2:Math.min(e+1,6);function Le(e){let[t,n]=(0,o.useState)(e),a=(0,o.useRef)(void 0),r=(0,o.useRef)(void 0),i=(0,o.useMemo)(()=>({go:a,at:n,pending:r}),[]),d=(0,o.useCallback)(s=>{if(a.current){a.current(s);return}r.current=s,n(s)},[]);return{at:t,setAt:n,steering:i,steer:d}}function me(e){let t=typeof e=="object"&&e!==null?e.name:void 0;return{name:typeof t=="string"&&t.length>0?t:typeof e=="object"?"Error":typeof e}}var F=()=>typeof performance<"u"?performance.now():Date.now();function He(e,t){let n=(0,o.useRef)({onError:e,face:t});return n.current={onError:e,face:t},(0,o.useCallback)((a,r)=>n.current.onError?.(me(a),{module:r.module,face:n.current.face}),[])}function Ce(e,t){let n=(0,o.useRef)(null);n.current===null&&(n.current=F());let a=(0,o.useRef)({onReady:e,face:t});a.current={onReady:e,face:t};let r=(0,o.useRef)(!1);return(0,o.useCallback)(i=>{r.current||(r.current=!0,a.current.onReady?.({ms:Math.max(0,F()-(n.current??F())),face:i}))},[])}var oe=class extends o.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(t,n){console.error(`[graview] ${this.props.module} threw while rendering`,t,n.componentStack),this.props.report(t,{module:this.props.module})}render(){return this.state.failed?(0,l.jsxs)("div",{role:"alert","data-graview-face-error":this.props.module,...this.props.content?{"data-embed-content":""}:{},style:this.props.content?{flex:"1 1 auto",display:"grid",alignContent:"center",justifyItems:"center",gap:8,padding:24,background:"var(--graview-ground)",color:"var(--graview-ink)",fontSize:"0.9375rem"}:{display:"inline-flex",alignItems:"center",gap:6,fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:[(0,l.jsx)("span",{children:this.props.content?"This part of the app could not draw.":"Could not draw."}),(0,l.jsx)("button",{type:"button",onClick:()=>this.setState({failed:!1}),style:{padding:"3px 11px",fontSize:"0.8125rem"},children:"Try again"})]}):this.props.children}};export{Se as a,ve as b,de as c,we as d,Ee as e,Re as f,ke as g,xe as h,Ae as i,Fe as j,Le as k,He as l,Ce as m,oe as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r,b as m,d as k,e as h}from"./chunk.UGFDSE37.js";import"./chunk.QT4XGC5Z.js";import"./chunk.MQ7FNHXG.js";import"./chunk.WLPTY4BF.js";import"./chunk.AJZBJBMO.js";var o="way-back",b='[data-testid="notices-toasts"]';function g(t){let a=document.activeElement;a!==null&&a!==document.body&&!a.closest(b)||(t??document).querySelector('[data-graview-app-bar] [data-testid="app-home"]')?.focus({preventScroll:!0})}function w(t,a,i,d,y){if(t.past)return i?.dismiss(o),()=>{};let c=y?.closest("[data-graview-embed]"),s,f=e=>{if(e!==void 0&&r(t,a)?.batch!==e)return!1;try{let n=k(t,a);return n&&i?.notify({kind:"toast",id:o,sentence:`Took back \u201C${n.intent}\u201D`}),n!==void 0}catch(n){return i?.notify({kind:"toast",id:o,tone:"warn",sentence:n instanceof Error?n.message:String(n)}),!0}},u=()=>{let e=m(t,a,d);if(d=t.batches().length,e){let n=s=e.batch;i?.notify({kind:"toast",id:o,sentence:e.intent,timeout:1e4,action:{label:"Take back",onSelect:()=>(g(c),f(n))}})}else s&&r(t,a)?.batch!==s&&(s=void 0,i?.dismiss(o))},l=e=>{h(e)&&(!c||c.contains(e.target))&&f()&&e.preventDefault()};u();let p=t.subscribe(u);return document.addEventListener("keydown",l),(e=!1)=>{p(),document.removeEventListener("keydown",l),e&&s&&i?.dismiss(o)}}export{w as sceneWay};
|
|
@@ -1,9 +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{b as ae}from"./chunk.RJDZOF2L.js";import{a as Y,c as H,d as X,e as J}from"./chunk.AFY35RJP.js";import"./chunk.POHEWJKZ.js";import"./chunk.IEDXW36H.js";import"./chunk.7RSZMIAL.js";import"./chunk.ROGYDMES.js";import"./chunk.6IHXTT6Z.js";import"./chunk.OEF3GPRM.js";import"./chunk.UT6642FC.js";import"./chunk.TI4OSTQV.js";import"./chunk.GZHZLJBF.js";import"./chunk.I3SQJ2L2.js";import"./chunk.OJGHDWI6.js";import"./chunk.FUJM7GDV.js";import"./chunk.MWZK3HVG.js";import"./chunk.3D5T3XIE.js";import"./chunk.GR5Q4HTW.js";import"./chunk.QT4XGC5Z.js";import{$ as b,Ba as U,G as V,H as q,S as x,T as F,a as N,d as W,oa as z,xa as K,y as j}from"./chunk.MQ7FNHXG.js";import{Ua as _,ba as I,da as G,ga as B,ob as D}from"./chunk.WLPTY4BF.js";import{b as w}from"./chunk.AJZBJBMO.js";var re=w(q(),1);function P(e){return{minHeight:24,padding:"3px 10px",borderRadius:6,fontSize:"0.875rem",borderWidth:1,borderStyle:"solid",borderColor:e?"transparent":"var(--graview-edge)",color:e?"var(--graview-ink)":"var(--graview-ink-muted)",fontWeight:e?600:400,background:e?"color-mix(in srgb, var(--graview-accent) 16%, transparent)":"transparent"}}var M=w(x(),1);function Q(){let{seats:e,principal:t,takeSeat:i}=b();return e.length<2?null:(0,M.jsxs)("div",{role:"group","aria-label":"Seat","data-testid":"seats",style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:6,rowGap:4},children:[(0,M.jsx)("span",{style:{fontSize:"0.75rem",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},children:"As"}),e.map(a=>{let l=ie(t,a.principal);return(0,M.jsx)("button",{type:"button","aria-pressed":l,"data-testid":`seat-${a.principal.id??a.label}`,title:`Sit down as ${a.label}: the acts, the kinds and the pages narrow to what this seat may do`,onClick:()=>i(a.principal),style:{...P(l),whiteSpace:"nowrap"},children:a.label},a.principal.id??a.label)})]})}function ie(e,t){return e.kind===t.kind&&e.id===t.id}var L=w(q(),1),c=w(x(),1),oe=`
|
|
2
|
-
.graview-here{display:flex;flex:none}
|
|
3
|
-
.graview-here>button{display:inline-flex;align-items:center;gap:4px;height:30px;margin:0;padding:0 4px;border:1px solid transparent;border-radius:8px;background:none;box-shadow:none;font:inherit;font-size:.75rem;color:var(--graview-ink-muted);cursor:pointer}
|
|
4
|
-
.graview-here-mark{display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;width:24px;height:24px;border-radius:50%;border:1.5px solid hsl(var(--graview-hue) 50% 48%);background:var(--graview-panel-muted);color:var(--graview-ink);font-size:.75rem;font-weight:600;box-shadow:0 0 0 2px var(--graview-bar)}
|
|
5
|
-
.graview-here-mark+.graview-here-mark{margin-left:-10px}
|
|
6
|
-
.graview-here-mark[data-agent]{border-radius:5px}
|
|
7
|
-
.graview-here-mark[data-counted]{--graview-hue:0;border-color:var(--graview-edge)}
|
|
8
|
-
.graview-here small{display:block;font-size:.75rem;color:var(--graview-ink-muted)}
|
|
9
|
-
.graview-bar[data-finding] .graview-here{display:none}`,se={position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"};function le(e,t){let i=t.id===void 0?null:`${t.kind}:${t.id}`,a=new Map;for(let l of e.values()){let d=l.participant.slice(0,l.participant.lastIndexOf(":"));if(d===i)continue;let s=d.endsWith(":")?l.participant:d,o=a.get(s);(!o||o.at<l.at)&&a.set(s,l)}return[...a.values()]}var Z=e=>e.name&&e.onBehalfOfName?`${e.name}, for ${e.onBehalfOfName}`:e.name??"",ee=e=>e===1?"1 viewer":`${e} viewers`;function de(e){let t=e.map(Z).filter(Boolean),i=t.length<e.length?[...t,ee(e.length-t.length)]:t,a=i.pop();return`${i.length>0?`${i.join(", ")} and ${a}`:a} ${e.length===1?"is":"are"} here`}function pe(e,t){let{store:i,hidden:a,pictures:l}=t,d=W(e),s=i.kindsKeptFrom(t.principal),o=u=>!a.has(u)&&!s.has(u)&&!i.modules.disabledKinds.has(u),g=l.find(u=>u.as===d.within?.view&&o(u.kind));if(g)return g.title;if(!d.focusId)return d.overview?"the whole thing":null;let p=j(d.focusId);if(p.length>0)return p.every(o)?p.map(u=>B(i.schema,u)).join(" and "):null;let h=i.graph.getNode(d.focusId);return h&&o(h.kind)?I(i.schema.tryDefinition(h.kind),h):null}function ce(e,t){let i=o=>o.id!==void 0&&(o.id===t.principal.id||o.onBehalfOf?.id===t.principal.id),a=e.filter(o=>!D(o)&&o.author.kind!=="system"&&!i(o.author)),l=a[0];if(!l)return null;let d=_(l.author,{graph:t.store.graph,schema:t.store.schema,...t.seats?{seats:t.seats}:{},...t.people?{people:t.people}:{}}),s=[...new Set(a.map(o=>o.intent))].join("; ");return`${d}: ${s}`}function ue(e,t,i){let a=ce(e,t);a&&(i(""),setTimeout(()=>i(a),50))}function ge({scene:e,compact:t}){let{who:i,principal:a,store:l,views:d,hiddenKinds:s,follow:o}=b(),g=U("here"),p=le(i,a),h=p.length===0?"":de(p),[u,S]=(0,L.useState)("");if((0,L.useEffect)(()=>S(h),[h]),p.length===0)return null;let f=p.filter(r=>r.name),y=f.slice(0,t?2:3),m=p.length-y.length,k=p.length-f.length,T=d.places();return(0,c.jsxs)("div",{className:"graview-here","data-testid":"here",children:[(0,c.jsx)("style",{children:oe}),(0,c.jsx)("span",{role:"status","aria-live":"polite",style:se,children:u}),(0,c.jsxs)("button",{type:"button","data-testid":"here-open",...g.trigger,onClick:g.toggle,"aria-label":`${h} \u2014 who and where`,title:h,children:[y.length>0?(0,c.jsx)("span",{style:{display:"flex"},children:y.map(r=>(0,c.jsx)(E,{one:r},r.participant))}):(0,c.jsx)(E,{count:m}),y.length>0&&m>0?(0,c.jsxs)("span",{"aria-hidden":"true",children:["+",m]}):null]}),(0,c.jsxs)("ul",{...g.pane,"aria-label":"Who is here","data-testid":"here-list",hidden:!g.open,className:"graview-bar-list",style:K,children:[f.map(r=>{let v=pe(r.stop,{store:l,principal:a,hidden:s,pictures:T}),A=Z(r);return(0,c.jsx)("li",{children:(0,c.jsxs)(e?"button":"span",{className:"graview-bar-item","data-testid":"here-one",...e?{type:"button",title:`Go where ${A} is`,onClick:()=>{g.setOpen(!1),o(r.participant)}}:{style:{cursor:"default"}},children:[(0,c.jsx)(E,{one:r}),(0,c.jsxs)("span",{children:[A,v?(0,c.jsxs)("small",{children:["On ",v]}):null]})]})},r.participant)}),k>0?(0,c.jsx)("li",{children:(0,c.jsxs)("span",{className:"graview-bar-item","data-testid":"here-viewers",style:{cursor:"default"},children:[(0,c.jsx)(E,{count:k}),(0,c.jsxs)("span",{children:[ee(k),(0,c.jsx)("small",{children:"Not signed in"})]})]})}):null]})]})}function E({one:e,count:t}){return(0,c.jsx)("span",{className:"graview-here-mark","aria-hidden":"true",...e?{style:{"--graview-hue":Math.round(e.hue)}}:{"data-counted":""},...e?.kind==="agent"?{"data-agent":""}:{},children:e?(e.name??"").trim().charAt(0).toUpperCase():t})}function he(e){let t=/^(?:place|scene):([^:]+):(.+)$/.exec(e.key);return t?{place:t[2],about:[`aggregate:${t[1]}`],title:e.label}:{about:e.group==="lists"&&e.kind?[`aggregate:${e.kind}`]:[],title:e.label}}function O(e,t,i,a,l,d){let s=he(t),o=e.getBoundingClientRect(),g={...s,face:i?"scene":"pages",x:Math.round(l??o.left+Math.min(16,o.width/2)),y:Math.round(d??Math.min(o.bottom,o.top+36)),returnTo:e},p=i?null:e.closest("[data-graview-embed], [data-graview-shell]")?.querySelector("[data-graview-face='pages']")??document.querySelector("[data-graview-face='pages']");p?p.dispatchEvent(new CustomEvent(F,{detail:g})):a(g)}var R={on:null,at:0},te=500,me=10;function ye(e,t,i,a,l,d,s){let o=t.getAttribute("data-testid")??"",g=o==="app-places-open"?a:o.slice(10),p=i.find(m=>m.key===g);if(!p)return;if(e.type==="keydown")return R={on:t,at:Date.now()},O(t,p,l,d);let{clientX:h,clientY:u}=e;if(e.type==="contextmenu")return R.on===t&&Date.now()-R.at<700?void 0:h===0&&u===0?O(t,p,l,d):O(t,p,l,d,h,u);let S=Date.now()-Math.max(0,performance.now()-e.timeStamp),f=!1,y=m=>{Math.hypot(m.clientX-h,m.clientY-u)>me&&(f=!0)};document.addEventListener("pointermove",y),setTimeout(()=>{document.removeEventListener("pointermove",y),!(f||s.at!==0&&s.at-S<te)&&(R={on:t,at:Date.now()},t.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation()},{capture:!0,once:!0}),O(t,p,l,d,h,u))},Math.max(0,te-(Date.now()-S)))}var n=w(x(),1),Ie=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.LF7PU77M.js")))).part((e,t)=>(0,n.jsx)(e.TidyGroups,{...t}),{quiet:!0}),fe=z(N(()=>(__graviewPreload(import.meta.url,["./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.DQJAEU4V.js")))).part((e,t)=>(0,n.jsx)(e.HoverChipsSwitch,{...t}),{quiet:!0});function Be({violations:e,pick:t}){let{store:i,brand:a,setMenuAt:l}=b(),d=Y(i,e);return(0,n.jsx)(n.Fragment,{children:d.map((s,o)=>{let g=J(s),p=s.repairs.length>0?`${s.repairs.length} ${s.repairs.length===1?"way":"ways"} to fix`:"";return(0,n.jsx)("li",{style:{borderTop:o===0?"none":"1px solid var(--graview-edge)"},children:(0,n.jsxs)("button",{type:"button",onClick:h=>{let u=h.currentTarget.closest("ol").getBoundingClientRect();t(s),l({x:u.left,y:u.top,on:s.subjectId})},...H(s)!==void 0?{title:H(s)}:{},style:{width:"100%",textAlign:"left",fontSize:"0.8125rem",lineHeight:1.4,padding:"7px 8px",border:"1px solid transparent",background:"none",boxShadow:"none",borderRadius:7},children:[s.line?(0,n.jsx)(X,{line:s.line,schema:i.schema,...a?{brand:a}:{},stacked:!0,style:{display:"block",color:"var(--graview-ink)"}}):(0,n.jsx)("span",{style:{display:"block",color:"var(--graview-ink)"},children:s.message}),g||p?(0,n.jsx)("span",{style:{color:"var(--graview-ink-faint)",fontSize:"0.75rem"},children:[g,p].filter(Boolean).join(" \xB7 ")}):null]})},`${s.invariant}:${o}`)})})}function _e({name:e,me:t,scheme:i,onScheme:a,profileHref:l,hostActions:d,close:s,part:o,signature:g=!1}){let{principal:p,seats:h,settings:u,settingValues:S,chooseSetting:f,sharing:y,ai:m}=b(),k=p.roles??[],T={setOpen:r=>s()};return(0,n.jsx)(n.Fragment,{children:o==="top"?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{style:{display:"grid",gap:3},children:[(0,n.jsx)("span",{style:$,children:"Signed in as"}),(0,n.jsx)("strong",{style:{fontSize:"1rem",fontWeight:550},children:e}),(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:k.length>0?k.map(r=>G(r)).join(", "):t===void 0?"This app has no sign-in; everything here is yours.":"No role in particular"}),t!==void 0&&l!==void 0?(0,n.jsx)("a",{href:l(t.id),"data-testid":"profile-record",style:{display:"inline-flex",alignItems:"center",minHeight:24,justifySelf:"start",fontSize:"0.875rem",color:"var(--graview-accent)"},children:"Your record \u2197"}):null,y?(0,n.jsxs)("span",{"data-testid":"profile-seen-as",style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:["Seen by others as ",y.name]}):null]}),d.length>0?(0,n.jsx)("ul",{role:"list","aria-label":"From the host","data-testid":"host-actions",style:{...C,margin:0,paddingLeft:0,listStyle:"none",display:"grid",gap:2},children:d.map(r=>(0,n.jsx)("li",{children:r.href!==void 0?(0,n.jsx)("a",{href:r.href,"data-testid":"host-action",className:"graview-host-action",...r.target?{target:r.target,rel:"noopener"}:{},onClick:()=>{r.onSelect?.(),T.setOpen(!1)},style:ne,children:r.label}):(0,n.jsx)("button",{type:"button","data-testid":"host-action",className:"graview-host-action",onClick:()=>{T.setOpen(!1),r.onSelect?.()},style:{...ne,width:"100%",textAlign:"left",border:"none",background:"none",boxShadow:"none",font:"inherit",cursor:"pointer"},children:r.label})},r.label))}):null]}):(0,n.jsxs)(n.Fragment,{children:[h.length>1?(0,n.jsxs)("div",{style:{display:"grid",gap:6,...C},children:[(0,n.jsx)("span",{style:$,children:"Sit as somebody else"}),(0,n.jsx)(Q,{})]}):null,u.length>0?(0,n.jsx)("div",{style:{display:"grid",gap:10,...C},children:u.map(r=>(0,n.jsxs)("fieldset",{"data-testid":`setting-${r.name}`,style:{border:0,margin:0,padding:0,display:"grid",gap:5},children:[(0,n.jsx)("legend",{style:{...$,padding:0},children:r.title}),r.description?(0,n.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-muted)"},children:r.description}):null,(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:r.options.map(v=>{let A=(S[r.name]??r.initial)===v.value;return(0,n.jsx)("button",{type:"button","aria-pressed":A,"data-testid":`setting-${r.name}-${v.value}`,onClick:()=>f(r.name,v.value),style:P(A),children:v.label},v.value)})})]},r.name))}):null,V(m)?(0,n.jsx)(re.Suspense,{fallback:null,children:(0,n.jsx)(fe,{legend:$,style:C,choice:P})}):null,i!==void 0&&a!==void 0?(0,n.jsxs)("div",{style:{display:"grid",gap:5,...C},children:[(0,n.jsx)("span",{style:$,children:"Scheme"}),(0,n.jsx)("div",{style:{display:"flex",gap:4},children:["light","dark"].map(r=>(0,n.jsx)("button",{type:"button","aria-pressed":i===r,"data-testid":`profile-scheme-${r}`,onClick:()=>a(r),style:P(i===r),children:r==="light"?"\u2600 Light":"\u263E Dark"},r))})]}):null,g?(0,n.jsxs)("p",{"data-testid":"graview-signature",style:{...C,margin:0,display:"flex",alignItems:"center",gap:6,fontSize:"0.75rem",color:"var(--graview-ink-faint)"},children:["Built with",(0,n.jsxs)("a",{href:"https://graview.dev",target:"_blank",rel:"noopener",style:{display:"inline-flex",alignItems:"center",gap:4,minHeight:24,color:"var(--graview-ink-muted)",fontWeight:600,textDecoration:"none"},children:[(0,n.jsx)("span",{"data-testid":"graview-mark",style:{display:"inline-flex",lineHeight:0},dangerouslySetInnerHTML:{__html:ve}}),"Graview"]})]}):null]})})}var ve='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="14" height="14" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="2.4" stroke-linejoin="round"><path d="M13 11 L3 8 L14 3 H29 L21 9"/><path d="M10 18 L3 23 L16.5 28 L29 21 L22 19"/><path d="M16.5 18.5 V23.5" stroke-linecap="round"/></g><circle cx="16.5" cy="13.5" r="2" fill="var(--graview-mark-point, currentColor)"/></svg>',ne={display:"flex",alignItems:"center",minHeight:28,padding:"2px 8px",borderRadius:7,fontSize:"0.875rem",color:"var(--graview-ink)",textDecoration:"none"},$={fontSize:"0.75rem",letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--graview-ink-faint)"},C={paddingTop:10,borderTop:"1px solid var(--graview-edge)"};export{ae as ActivityRail,ge as Here,Be as ProblemRows,_e as ProfilePane,Ie as TidyFoot,ye as placeGesture,ue as sayTheirChange};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as I,c as x}from"./chunk.36SQJMEE.js";import"./chunk.QT4XGC5Z.js";import{c as b,d as A,k as v,r as w,t as O,w as G}from"./chunk.MQ7FNHXG.js";import{Qc as k,ed as E,kd as S,ld as W}from"./chunk.WLPTY4BF.js";import"./chunk.AJZBJBMO.js";var F=(e,i)=>k(e,i).slice(1);function j(e,i){let l=e.split("/").filter(Boolean);return l.length===i.length&&l.every((s,h)=>s.startsWith(":")||s==="*"||s===i[h])}var $=["problems","search","map","places"];function R(e,i,l,s,h=[]){let{schema:r}=i,o=r.kinds,f=t=>{if(t.startsWith(w))return(t.slice(w.length).split("|")[0]??"").split("+").every(V=>o.includes(V));let y=O(t);return y!==null?o.includes(y):t.startsWith("edge:")||l.graph.getNode(t)!==void 0},[p="/",u]=e.path.split("?"),n=p.split("/").filter(Boolean),m=u?`?${u}`:"",d=n.length>0&&!$.includes(n[0])?o.find(t=>F(r,t)===n[0]):void 0,c=e.path;if(n[0]==="places"&&n.length===2)`/places/${n[1]}`!==E&&!s.some(t=>t.as===decodeURIComponent(n[1]))&&(c="/");else if(d){let t=n[1]===void 0?void 0:decodeURIComponent(n[1]);c=`/${F(r,d)}${t!==void 0&&l.graph.getNode(t)?.kind===d?`/${n[1]}`:""}${m}`}else n.length>0&&n.length<=2&&!$.includes(n[0])&&!h.some(t=>j(t.path,n))&&(c="/");let g=A(e.stop),P=g.within?.view,U=P!==void 0&&!s.some(t=>t.as===P),a=g;if(U){let{view:t,...y}=g.within??{};a={...a,within:y}}if(g.focusId&&!f(g.focusId)){let t=e.kind&&o.includes(e.kind)?G(e.kind):null;a={...v(a,t),zoom:!1}}return a={...a,relation:a.relation&&(o.includes(a.relation)||r.edgeKinds.includes(a.relation))?a.relation:null,expanded:a.expanded.filter(f),pins:Object.fromEntries(Object.entries(a.pins).filter(([t])=>f(t))),...a.selection?{selection:a.selection.filter(f)}:{}},{face:e.face,path:c,stop:b(a),...e.kind?{kind:e.kind}:{}}}function B(e,i,l){let s=e.at,h=e.pages?.routes()??[];if(e.routing!=="address"||typeof window>"u")return R(s,e.app,i,l,h);let{pathname:r,search:o,hash:f}=window.location,p=W(r,e.basePath),u=I({routing:"address",...e.basePath===void 0?{}:{basePath:e.basePath},face:s.face}),n=u==="pages",m={...s,face:u,...p===null?{}:n?{path:p+o}:{stop:x(e.basePath)??s.stop}},d=R(m,e.app,i,l,h),c=n?d.path===m.path?null:S(d.path,e.basePath===void 0?{}:{basePath:e.basePath}):d.stop===b(A(m.stop))?null:r+o+d.stop;return p!==null&&c!==null&&c!==r+o+f&&window.history.replaceState(window.history.state,"",c),d}export{R as settle,B as settleAt};
|
|
@@ -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{s as P}from"./chunk.I3SQJ2L2.js";import{$ as m,H as M,P as w,S as y,a as p,aa as I,oa as S,t as b,x as T,y as A}from"./chunk.MQ7FNHXG.js";import{b as f}from"./chunk.AJZBJBMO.js";var C=f(M(),1),h=f(y(),1),x=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.LAW5PQEM.js")))),O=x.part((e,n)=>(0,h.jsx)(e.Timeline,{...n}),{what:"The timeline"}),q=()=>x.prefetch();function K({face:e}){return w()?.open?(0,h.jsx)(C.Suspense,{fallback:null,children:(0,h.jsx)(O,{face:e})}):null}var i=f(M(),1),u=f(y(),1),v=new WeakMap,D=e=>{let n=v.get(e);return n||v.set(e,n={ask:null,doors:[],listeners:new Set}),n},k=e=>{for(let n of e.listeners)n()};function g(e,n){let t=D(e);t.ask=n,k(t)}var N=S(p(()=>(__graviewPreload(import.meta.url,["./chunk.SGB6IMWN.js","./chunk.NPX7SPXM.js","./chunk.OE4QOBJF.js","./chunk.74RMHUCX.js","./chunk.QT4XGC5Z.js","./chunk.MQ7FNHXG.js","./chunk.WLPTY4BF.js","./chunk.AJZBJBMO.js"]),import("./chunk.L7JKEEMM.js")))),B=N.part((e,n)=>{let t=e.NotifySheet;return(0,u.jsx)(t,{...n})},{what:"Notify me"}),W=N.part((e,n)=>{let t=e.NotifiedList;return(0,u.jsx)(t,{...n})},{quiet:!0}),E=(e,n)=>n===void 0&&(e.onBehalfOf??e).id!==void 0;function F(e,n,t){let c=d=>t.tryDefinition(d)?.noun??d.replace(/[-_]+/g," "),o=e.on!==void 0?e.on:e.about.length===1?e.about[0]:void 0;if(e.act!==void 0){let d=o!==void 0&&n(o)!==void 0?o:void 0;return{label:"Notify me when someone does this\u2026",choices:[{on:"act",act:e.act,...d!==void 0?{record:d}:{}},...d!==void 0?[{on:"act",act:e.act}]:[]]}}if(o===void 0)return null;let s=n(o);if(s!==void 0)return{label:"Notify me when this changes\u2026",choices:[{on:"changed",record:o},{on:"act",record:o},{on:"reaches",kind:s,condition:"",record:o}]};let r=b(o)!==null?[b(o)]:T(o)?A(o):[];if(r.length!==1||!t.kinds.includes(r[0]))return null;let l=r[0],a=c(l);return{label:`Notify me when ${/^[aeiou]/i.test(a)?"an":"a"} ${a} is added\u2026`,choices:[{on:"created",kind:l},{on:"changed",kind:l},{on:"reaches",kind:l,condition:""}]}}function L(){let{store:e,principal:n,subscriptions:t,signIn:c}=m(),o=E(n,c);return(0,i.useMemo)(()=>o?s=>{let r=F(s,a=>e.graph.getNode(a)?.kind,e.schema);return r?{id:"notify",items:[{id:"notify-me",label:r.label,run:()=>g(t,{choices:r.choices,returnTo:s.element??null})}],prepare:()=>N.prefetch()}:null}:null,[o,e,t])}var z=[];function U({children:e}){let n=L(),t=(0,i.useMemo)(()=>n?[n]:z,[n]);return(0,u.jsx)(P,{sections:t,children:e})}function V(){let{subscriptions:e}=m(),n=(0,i.useId)(),t=D(e);(0,i.useEffect)(()=>(t.doors.push(n),k(t),()=>{t.doors.splice(t.doors.indexOf(n),1),k(t)}),[t,n]);let c=(0,i.useMemo)(()=>r=>(t.listeners.add(r),()=>void t.listeners.delete(r)),[t]),o=(0,i.useSyncExternalStore)(c,()=>t.ask,()=>null),s=(0,i.useSyncExternalStore)(c,()=>t.doors[0]===n,()=>!1);return!o||!s?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(B,{ask:o,close:()=>g(e,null)})})}function X({choices:e,label:n="Notify me",style:t,className:c,testId:o="notify-me"}){let{principal:s,subscriptions:r,signIn:l}=m();return E(s,l)?(0,u.jsx)("button",{type:"button","data-testid":o,className:c,onClick:a=>g(r,{choices:e,returnTo:a.currentTarget}),style:t,children:n}):null}function G(){let e=I(),n=e?.subscriptions,t=e?(e.principal.onBehalfOf??e.principal).id:void 0,[c,o]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(t===void 0||!n)return;let s=!0,r=()=>void Promise.resolve(n.list(t)).then(a=>s&&o(a.length),()=>s&&o(0));r();let l=n.onChange?.(r);return()=>{s=!1,l?.()}},[n,t]),c}function Y({style:e}){return G()===0?null:(0,u.jsx)(i.Suspense,{fallback:null,children:(0,u.jsx)(W,{...e?{style:e}:{}})})}export{q as a,K as b,L as c,U as d,V as e,X as f,G as g,Y as h};
|