graview 0.1.62 → 0.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/preview/chunk.2D7K2IJQ.js +4 -0
- package/dist/preview/{chunk.UFDJXQQQ.js → chunk.2DH42I7L.js} +6 -6
- package/dist/preview/chunk.2E62YCMZ.js +1 -0
- package/dist/preview/{chunk.GX4G4BX3.js → chunk.2G5WLG3Z.js} +1 -1
- package/dist/preview/chunk.2HV5FF6O.js +1 -0
- package/dist/preview/{chunk.LGRLVJGS.js → chunk.2JDAUKSN.js} +3 -3
- package/dist/preview/{chunk.ZN3PUM2I.js → chunk.2JEN2RCB.js} +1 -1
- package/dist/preview/{chunk.66P5IDTH.js → chunk.2TCOLAL2.js} +1 -1
- package/dist/preview/{chunk.OWOOKLIU.js → chunk.2V7QTIAV.js} +1 -1
- package/dist/preview/{chunk.IQ3PRWGO.js → chunk.2VIS2NAT.js} +2 -2
- package/dist/preview/{chunk.UQQKDBIH.js → chunk.2VYGDY5Z.js} +1 -1
- package/dist/preview/{chunk.WEOVK2T4.js → chunk.37I45R6V.js} +1 -1
- package/dist/preview/chunk.3FKKH2XU.js +74 -0
- package/dist/preview/chunk.3J7XLJP2.js +1 -0
- package/dist/preview/chunk.3OEODIHB.js +1 -0
- package/dist/preview/{chunk.WPXPVD33.js → chunk.3RD4JHVG.js} +1 -1
- package/dist/preview/{chunk.CHHYIMB7.js → chunk.3RUV4HE4.js} +1 -1
- package/dist/preview/chunk.3SAESG6X.js +1 -0
- package/dist/preview/{chunk.4HEFUOLV.js → chunk.47N2G7A5.js} +1 -1
- package/dist/preview/{chunk.A3ZC2JBO.js → chunk.4DZOAB4D.js} +1 -1
- package/dist/preview/chunk.4HTB6TX2.js +1 -0
- package/dist/preview/chunk.4Q5PCMGZ.js +18 -0
- package/dist/preview/{chunk.DPEIT3TW.js → chunk.4U45EY5M.js} +1 -1
- package/dist/preview/{chunk.2B6P4GPS.js → chunk.4VRX7FCO.js} +1 -1
- package/dist/preview/{chunk.JT3MFPRD.js → chunk.4XCYZRZ3.js} +1 -1
- package/dist/preview/chunk.52MBXPEK.js +1 -0
- package/dist/preview/chunk.5AD2QHWH.js +3 -0
- package/dist/preview/{chunk.MDEX6ZVE.js → chunk.5B7NG6WH.js} +1 -1
- package/dist/preview/chunk.5HJ2GTKZ.js +1 -0
- package/dist/preview/chunk.5IEZF433.js +2 -0
- package/dist/preview/{chunk.QGU5QTR6.js → chunk.5PPCK7QT.js} +1 -1
- package/dist/preview/chunk.6NRWLCIZ.js +5 -0
- package/dist/preview/chunk.75JQCTR6.js +1 -0
- package/dist/preview/{chunk.KMV6PJFL.js → chunk.77JI5T4F.js} +1 -1
- package/dist/preview/chunk.77MLXWZV.js +35 -0
- package/dist/preview/chunk.7AOEZJRM.js +1 -0
- package/dist/preview/{chunk.QIPASE42.js → chunk.7CLKGKSF.js} +1 -1
- package/dist/preview/{chunk.BZMQDEIY.js → chunk.7SRSE5IS.js} +1 -1
- package/dist/preview/{chunk.2GEJNG2U.js → chunk.7VAHHEDX.js} +1 -1
- package/dist/preview/{chunk.VJBBVLGZ.js → chunk.7ZG77OI3.js} +1 -1
- package/dist/preview/chunk.7ZHH7WBN.js +1 -0
- package/dist/preview/chunk.AJEK3I5X.js +6 -0
- package/dist/preview/chunk.APRWUIE3.js +1 -0
- package/dist/preview/{chunk.QHY5NVYH.js → chunk.APUQIELA.js} +1 -1
- package/dist/preview/{chunk.Y4FZKUOK.js → chunk.ATHLE33D.js} +1 -1
- package/dist/preview/chunk.B2YTHEX5.js +1 -0
- package/dist/preview/{chunk.ELOFPE25.js → chunk.B6JR7EQO.js} +1 -1
- package/dist/preview/{chunk.5ODHHH35.js → chunk.BN42H3C6.js} +1 -1
- package/dist/preview/{chunk.DD2NKFDX.js → chunk.BVIJXL4J.js} +1 -1
- package/dist/preview/{chunk.5HGD6OWL.js → chunk.CC7P435K.js} +2 -2
- package/dist/preview/{chunk.IQMD7DG3.js → chunk.CJHYGRWV.js} +1 -1
- package/dist/preview/chunk.CM65MCHA.js +1 -0
- package/dist/preview/{chunk.MYNMBOLD.js → chunk.D2XLECMP.js} +1 -1
- package/dist/preview/chunk.DJIF7IAQ.js +2 -0
- package/dist/preview/{chunk.G4ULQK64.js → chunk.DLWFULWE.js} +1 -1
- package/dist/preview/{chunk.QDWSU47A.js → chunk.DMENNIHT.js} +1 -1
- package/dist/preview/{chunk.L3WTKQQL.js → chunk.DN7UCBOA.js} +1 -1
- package/dist/preview/{chunk.22BZU7ME.js → chunk.DQAMVVE6.js} +1 -1
- package/dist/preview/chunk.DUP2CGVH.js +1 -0
- package/dist/preview/{chunk.TM4EPUNO.js → chunk.DYRULRFX.js} +1 -1
- package/dist/preview/{chunk.AFNSAQEQ.js → chunk.E4TXLT25.js} +1 -1
- package/dist/preview/{chunk.DDUCIUVW.js → chunk.F6BNFLQM.js} +1 -1
- package/dist/preview/chunk.FN34P4IS.js +1 -0
- package/dist/preview/{chunk.AJSUHPBE.js → chunk.FUPYIOXZ.js} +1 -1
- package/dist/preview/{chunk.7KVUUEZA.js → chunk.FXRYMT3U.js} +1 -1
- package/dist/preview/{chunk.DEAP3H2L.js → chunk.G5BVZLCM.js} +1 -1
- package/dist/preview/{chunk.Y2YYH3JN.js → chunk.G7YLK4PX.js} +1 -1
- package/dist/preview/chunk.GF62K25C.js +1 -0
- package/dist/preview/chunk.GFQPO3NC.js +1 -0
- package/dist/preview/{chunk.5STU3KYG.js → chunk.GH5UBSQI.js} +1 -1
- package/dist/preview/chunk.GHHKRFPD.js +1 -0
- package/dist/preview/{chunk.THVC2BEC.js → chunk.GP5DAA4P.js} +1 -1
- package/dist/preview/{chunk.VN23AGIY.js → chunk.HPG6CNKM.js} +1 -1
- package/dist/preview/chunk.HSJEOM3W.js +1 -0
- package/dist/preview/{chunk.H5S7OL2U.js → chunk.HZPRMHSL.js} +1 -1
- package/dist/preview/chunk.IQGSEAQ2.js +5 -0
- package/dist/preview/{chunk.PCDUV3WP.js → chunk.ITBG37WJ.js} +1 -1
- package/dist/preview/{chunk.SVPKUWZU.js → chunk.JHUCKEJS.js} +1 -1
- package/dist/preview/{chunk.H7N7WN4U.js → chunk.JOM6MFVE.js} +1 -1
- package/dist/preview/{chunk.DNVWSWL2.js → chunk.JS2UZYGB.js} +1 -1
- package/dist/preview/{chunk.7XLS6XTY.js → chunk.K2PXP5H6.js} +1 -1
- package/dist/preview/{chunk.6AKW7TXM.js → chunk.K54ISAXN.js} +1 -1
- package/dist/preview/{chunk.3FON2Y72.js → chunk.K5YFUMRS.js} +1 -1
- package/dist/preview/chunk.KHXRJLLU.js +50 -0
- package/dist/preview/chunk.KMIFSPGQ.js +1 -0
- package/dist/preview/chunk.L4V5VLSM.js +1 -0
- package/dist/preview/{chunk.T6WHGKWR.js → chunk.LDMBJC3B.js} +1 -1
- package/dist/preview/{chunk.PLTH2LW5.js → chunk.LTOQ22ZJ.js} +1 -1
- package/dist/preview/{chunk.UVA7AALY.js → chunk.M5VHUIDB.js} +1 -1
- package/dist/preview/chunk.N643PVQA.js +1 -0
- package/dist/preview/{chunk.FULEUL34.js → chunk.NGRL3QOI.js} +1 -1
- package/dist/preview/{chunk.OFWNMTGB.js → chunk.NRPBTV6O.js} +2 -2
- package/dist/preview/{chunk.N6EJXXQK.js → chunk.O7HHNQK4.js} +2 -2
- package/dist/preview/{chunk.5YAOKOGV.js → chunk.OW3M4OBN.js} +1 -1
- package/dist/preview/{chunk.2N4Z5K5S.js → chunk.OXFDB5BB.js} +1 -1
- package/dist/preview/{chunk.4TX6VCBT.js → chunk.P4TAX3HE.js} +1 -1
- package/dist/preview/{chunk.RYRQ66JN.js → chunk.P6FNJR6E.js} +1 -1
- package/dist/preview/chunk.PR74PGLC.js +1 -0
- package/dist/preview/{chunk.F7YXLYLX.js → chunk.PVDDSBRG.js} +1 -1
- package/dist/preview/{chunk.OUDATENL.js → chunk.QROPDEJF.js} +1 -1
- package/dist/preview/{chunk.I77ZGIFE.js → chunk.QRT6BZR6.js} +1 -1
- package/dist/preview/{chunk.OWT3VVOT.js → chunk.R5MLRKAO.js} +2 -2
- package/dist/preview/chunk.RDA35HZB.js +2 -0
- package/dist/preview/{chunk.ROZTJ6IY.js → chunk.REXU6ARY.js} +1 -1
- package/dist/preview/chunk.S6QZBWCJ.js +1 -0
- package/dist/preview/{chunk.MAKODQO3.js → chunk.S7SHWDPR.js} +1 -1
- package/dist/preview/{chunk.SWMDFXUX.js → chunk.SADHOSRC.js} +1 -1
- package/dist/preview/chunk.SJHUC4TL.js +1 -0
- package/dist/preview/chunk.SL5FXE3R.js +1 -0
- package/dist/preview/{chunk.X6KYRBL6.js → chunk.T4JP6BGP.js} +1 -1
- package/dist/preview/{chunk.TIALD6SC.js → chunk.T4TRJDBF.js} +1 -1
- package/dist/preview/{chunk.M4AYA2PL.js → chunk.TA2JTUNX.js} +1 -1
- package/dist/preview/{chunk.EVBCEEQ4.js → chunk.TMHVYI5R.js} +1 -1
- package/dist/preview/chunk.TOLW64EO.js +1 -0
- package/dist/preview/chunk.TP3PZRHE.js +1 -0
- package/dist/preview/{chunk.PZQNR4KZ.js → chunk.TQ2G4AM4.js} +1 -1
- package/dist/preview/{chunk.5J3O2FVG.js → chunk.TUR2DA2M.js} +1 -1
- package/dist/preview/{chunk.B23WZQXQ.js → chunk.TYIBLD2D.js} +1 -1
- package/dist/preview/{chunk.DC35FJAB.js → chunk.UD2GGG7L.js} +1 -1
- package/dist/preview/chunk.UDU545CL.js +1 -0
- package/dist/preview/{chunk.RPDH32XV.js → chunk.UDYFGYJP.js} +1 -1
- package/dist/preview/{chunk.SEHRPTNA.js → chunk.UJNLT3L6.js} +1 -1
- package/dist/preview/chunk.UN2IAA5R.js +1 -0
- package/dist/preview/chunk.VLX7YWVH.js +25 -0
- package/dist/preview/{chunk.T3UQ7ZQK.js → chunk.VT4YBFZL.js} +1 -1
- package/dist/preview/{chunk.ELTV44HU.js → chunk.VZAF3452.js} +2 -2
- package/dist/preview/{chunk.O2BHPYA4.js → chunk.WFCE7NLK.js} +2 -2
- package/dist/preview/{chunk.CY3ELWCM.js → chunk.WHX47OJM.js} +1 -1
- package/dist/preview/{chunk.NUWDMH47.js → chunk.WMARJ5E3.js} +1 -1
- package/dist/preview/chunk.WPQP54FM.js +1 -0
- package/dist/preview/{chunk.6JO5HQDR.js → chunk.WX23K7ZU.js} +1 -1
- package/dist/preview/{chunk.W4BKYSZX.js → chunk.X36BYTEG.js} +1 -1
- package/dist/preview/{chunk.AQRB7LDA.js → chunk.XCLW4GP7.js} +1 -1
- package/dist/preview/{chunk.DDO3GLEJ.js → chunk.XEG7ZDRG.js} +1 -1
- package/dist/preview/{chunk.ILIIBSGA.js → chunk.XIVELWAM.js} +1 -1
- package/dist/preview/{chunk.75GVFX7L.js → chunk.XJWKIXPV.js} +1 -1
- package/dist/preview/{chunk.O75HWF3F.js → chunk.XQ5RTPEF.js} +1 -1
- package/dist/preview/{chunk.NOGGSLVG.js → chunk.YEXFVDRA.js} +1 -1
- package/dist/preview/{chunk.UXMPFPFH.js → chunk.YIZPW7IK.js} +2 -2
- package/dist/preview/chunk.YLOGIJOH.js +1 -0
- package/dist/preview/chunk.YMXWS4XN.js +3 -0
- package/dist/preview/{chunk.Z2TDZSMN.js → chunk.YSBTE3PX.js} +1 -1
- package/dist/preview/{chunk.RD2X25XB.js → chunk.Z26T5E76.js} +1 -1
- package/dist/preview/{chunk.A3OL2BI2.js → chunk.Z4XGEV34.js} +1 -1
- package/dist/preview/chunk.ZA5TDCBC.js +1 -0
- package/dist/preview/chunk.ZNDVJGTY.js +1 -0
- package/dist/preview/chunk.ZQGLPP7A.js +1 -0
- package/dist/preview/index.html +53 -52
- package/dist/preview/page.js +2 -2
- package/dist/preview/splash.js +7 -6
- package/package.json +6 -6
- package/dist/preview/chunk.2AT3GRXM.js +0 -1
- package/dist/preview/chunk.4HRYB7HF.js +0 -1
- package/dist/preview/chunk.5MZYCELA.js +0 -6
- package/dist/preview/chunk.7M4HNKDR.js +0 -1
- package/dist/preview/chunk.7OBIBPYH.js +0 -1
- package/dist/preview/chunk.7V56P2A7.js +0 -1
- package/dist/preview/chunk.7YOAW7ED.js +0 -1
- package/dist/preview/chunk.ACTXR2MI.js +0 -3
- package/dist/preview/chunk.AI34V6WV.js +0 -74
- package/dist/preview/chunk.BLUKSGI4.js +0 -1
- package/dist/preview/chunk.CAKFNKN5.js +0 -1
- package/dist/preview/chunk.CGALLZ54.js +0 -1
- package/dist/preview/chunk.DHJ3FQTR.js +0 -1
- package/dist/preview/chunk.DZZL5IDD.js +0 -5
- package/dist/preview/chunk.H24OC6OE.js +0 -1
- package/dist/preview/chunk.H73ZPYUX.js +0 -1
- package/dist/preview/chunk.HANJZ6FA.js +0 -1
- package/dist/preview/chunk.HIMQ65QT.js +0 -1
- package/dist/preview/chunk.IQPILSV3.js +0 -18
- package/dist/preview/chunk.IYBEXENQ.js +0 -1
- package/dist/preview/chunk.J7Q2WAF4.js +0 -28
- package/dist/preview/chunk.JYFZCJ4N.js +0 -2
- package/dist/preview/chunk.KDXU5DT3.js +0 -1
- package/dist/preview/chunk.KL7E4YHJ.js +0 -1
- package/dist/preview/chunk.LAYQ5PFS.js +0 -1
- package/dist/preview/chunk.LTZUF5VG.js +0 -1
- package/dist/preview/chunk.M7RESZB6.js +0 -25
- package/dist/preview/chunk.MGALQLRW.js +0 -1
- package/dist/preview/chunk.NAD7ZXYP.js +0 -1
- package/dist/preview/chunk.NHTGAP3G.js +0 -3
- package/dist/preview/chunk.NUYA4BWI.js +0 -1
- package/dist/preview/chunk.OKZT2QBM.js +0 -2
- package/dist/preview/chunk.OUPURRDE.js +0 -1
- package/dist/preview/chunk.PD2DECOP.js +0 -1
- package/dist/preview/chunk.PKWQKFPE.js +0 -2
- package/dist/preview/chunk.RMR24LFJ.js +0 -4
- package/dist/preview/chunk.RRKI24WY.js +0 -1
- package/dist/preview/chunk.SGCW2XRC.js +0 -1
- package/dist/preview/chunk.SS7234R6.js +0 -1
- package/dist/preview/chunk.TKUNRFDE.js +0 -1
- package/dist/preview/chunk.U6ZRJKVM.js +0 -1
- package/dist/preview/chunk.UKQUUPKE.js +0 -1
- package/dist/preview/chunk.VACKSKGJ.js +0 -1
- package/dist/preview/chunk.VC3V7HLL.js +0 -1
- package/dist/preview/chunk.VIH5AX7S.js +0 -5
- package/dist/preview/chunk.WKI5INH7.js +0 -1
- package/dist/preview/chunk.Y4S7CDRB.js +0 -1
- package/dist/preview/chunk.YP2QSPXU.js +0 -50
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{a as Ye}from"./chunk.SDO3U72B.js";import{$d as po,Ad as lo,Hc as oo,La as eo,N as Qn,Pa as Rt,Qd as uo,Ra as to,_d as co,bb as no,fe as fo,id as ro,je as yo,le as Ue,me as Tt,pd as io,rd as ao,xd as so}from"./chunk.DZZL5IDD.js";import{a as $e,b as H}from"./chunk.AJZBJBMO.js";var Io=$e(w=>{"use strict";var Ht=Symbol.for("react.transitional.element"),ai=Symbol.for("react.portal"),si=Symbol.for("react.fragment"),li=Symbol.for("react.strict_mode"),di=Symbol.for("react.profiler"),ui=Symbol.for("react.consumer"),ci=Symbol.for("react.context"),pi=Symbol.for("react.forward_ref"),fi=Symbol.for("react.suspense"),yi=Symbol.for("react.memo"),Ro=Symbol.for("react.lazy"),mi=Symbol.for("react.activity"),Po=Symbol.iterator;function gi(e){return e===null||typeof e!="object"?null:(e=Po&&e[Po]||e["@@iterator"],typeof e=="function"?e:null)}var To={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mo=Object.assign,Co={};function Se(e,t,n){this.props=e,this.context=t,this.refs=Co,this.updater=n||To}Se.prototype.isReactComponent={};Se.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")};Se.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Oo(){}Oo.prototype=Se.prototype;function Dt(e,t,n){this.props=e,this.context=t,this.refs=Co,this.updater=n||To}var Nt=Dt.prototype=new Oo;Nt.constructor=Dt;Mo(Nt,Se.prototype);Nt.isPureReactComponent=!0;var Eo=Array.isArray;function _t(){}var I={H:null,A:null,T:null,S:null},Vo=Object.prototype.hasOwnProperty;function Wt(e,t,n){var o=n.ref;return{$$typeof:Ht,type:e,key:t,ref:o!==void 0?o:null,props:n}}function hi(e,t){return Wt(e.type,t,e.props)}function jt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ht}function Si(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ao=/\/+/g;function Lt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Si(""+e.key):t.toString(36)}function wi(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(_t,_t):(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 he(e,t,n,o,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ht:case ai:a=!0;break;case Ro:return a=e._init,he(a(e._payload),t,n,o,r)}}if(a)return r=r(e),a=o===""?"."+Lt(e,0):o,Eo(r)?(n="",a!=null&&(n=a.replace(Ao,"$&/")+"/"),he(r,t,n,"",function(u){return u})):r!=null&&(jt(r)&&(r=hi(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Ao,"$&/")+"/")+a)),t.push(r)),1;a=0;var s=o===""?".":o+":";if(Eo(e))for(var l=0;l<e.length;l++)o=e[l],i=s+Lt(o,l),a+=he(o,t,n,i,r);else if(l=gi(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,i=s+Lt(o,l++),a+=he(o,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return he(wi(e),t,n,o,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function ot(e,t,n){if(e==null)return e;var o=[],r=0;return he(e,o,"","",function(i){return t.call(n,i,r++)}),o}function vi(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 ko=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)},bi={map:ot,forEach:function(e,t,n){ot(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ot(e,function(){t++}),t},toArray:function(e){return ot(e,function(t){return t})||[]},only:function(e){if(!jt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};w.Activity=mi;w.Children=bi;w.Component=Se;w.Fragment=si;w.Profiler=di;w.PureComponent=Dt;w.StrictMode=li;w.Suspense=fi;w.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I;w.__COMPILER_RUNTIME={__proto__:null,c:function(e){return I.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=Mo({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!Vo.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=n;else if(1<i){for(var a=Array(i),s=0;s<i;s++)a[s]=arguments[s+2];o.children=a}return Wt(e.type,r,o)};w.createContext=function(e){return e={$$typeof:ci,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:ui,_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)Vo.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(r[o]=t[o]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var s=Array(a),l=0;l<a;l++)s[l]=arguments[l+2];r.children=s}if(e&&e.defaultProps)for(o in a=e.defaultProps,a)r[o]===void 0&&(r[o]=a[o]);return Wt(e,i,r)};w.createRef=function(){return{current:null}};w.forwardRef=function(e){return{$$typeof:pi,render:e}};w.isValidElement=jt;w.lazy=function(e){return{$$typeof:Ro,_payload:{_status:-1,_result:e},_init:vi}};w.memo=function(e,t){return{$$typeof:yi,type:e,compare:t===void 0?null:t}};w.startTransition=function(e){var t=I.T,n={};I.T=n;try{var o=e(),r=I.S;r!==null&&r(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(_t,ko)}catch(i){ko(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),I.T=t}};w.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()};w.use=function(e){return I.H.use(e)};w.useActionState=function(e,t,n){return I.H.useActionState(e,t,n)};w.useCallback=function(e,t){return I.H.useCallback(e,t)};w.useContext=function(e){return I.H.useContext(e)};w.useDebugValue=function(){};w.useDeferredValue=function(e,t){return I.H.useDeferredValue(e,t)};w.useEffect=function(e,t){return I.H.useEffect(e,t)};w.useEffectEvent=function(e){return I.H.useEffectEvent(e)};w.useId=function(){return I.H.useId()};w.useImperativeHandle=function(e,t,n){return I.H.useImperativeHandle(e,t,n)};w.useInsertionEffect=function(e,t){return I.H.useInsertionEffect(e,t)};w.useLayoutEffect=function(e,t){return I.H.useLayoutEffect(e,t)};w.useMemo=function(e,t){return I.H.useMemo(e,t)};w.useOptimistic=function(e,t){return I.H.useOptimistic(e,t)};w.useReducer=function(e,t,n){return I.H.useReducer(e,t,n)};w.useRef=function(e){return I.H.useRef(e)};w.useState=function(e){return I.H.useState(e)};w.useSyncExternalStore=function(e,t,n){return I.H.useSyncExternalStore(e,t,n)};w.useTransition=function(){return I.H.useTransition()};w.version="19.2.8"});var W=$e((rs,Lo)=>{"use strict";Lo.exports=Io()});var qo=$e(at=>{"use strict";var Oi=Symbol.for("react.transitional.element"),Vi=Symbol.for("react.fragment");function Bo(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:Oi,type:e,key:o,ref:t!==void 0?t:null,props:n}}at.Fragment=Vi;at.jsx=Bo;at.jsxs=Bo});var He=$e((ys,zo)=>{"use strict";zo.exports=qo()});var me={focusId:null,relation:null,expanded:[],pins:{}},Ze=e=>{let t=Number(e);return Number.isFinite(t)?t:null};function Q(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}`,`${Xe(r.x)},${Xe(r.y)}`)}e.pan&&(e.pan.x!==0||e.pan.y!==0)&&t.set("pan",`${Xe(e.pan.x)},${Xe(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 ei(e){return e&&e.startsWith("agg:")?`aggregate:${e.slice(4)}`:e}function Je(e){let t=e.includes("#")?e.slice(e.indexOf("#")+1):e,n=new URLSearchParams(t),o=Object.create(null);for(let[m,y]of n){if(!m.startsWith("pin."))continue;let[g,b]=y.split(","),R=g===void 0?null:Ze(g),f=b===void 0?null:Ze(b);R===null||f===null||(o[m.slice(4)]={x:R,y:f})}let r=Object.create(null);for(let[m,y]of n)!m.startsWith("in.")||y.length===0||(r[m.slice(3)]=y);let i=n.get("view");i&&i.length>0&&r.view===void 0&&(r.view=i);let a=n.get("pan")?.split(",")??[],s=a[0]===void 0?null:Ze(a[0]),l=a[1]===void 0?null:Ze(a[1]),u=(n.get("sel")??"").split(",").filter(m=>m.length>0).sort(),c=n.get("overview")==="1";return{...u.length>0?{selection:u}:{},...c?{overview:!0}:{},...n.get("zoom")==="1"?{zoom:!0}:{},...n.get("past")==="1"?{past:!0}:{},...n.get("show")?{shown:[...new Set(n.get("show").split(",").filter(Boolean))].sort()}:{},...s!==null&&l!==null?{pan:{x:s,y:l}}:{},...Object.keys(r).length>0?{within:r}:{},...n.get("q")?.trim()?{q:n.get("q")}:{},focusId:ei(n.get("focus")),relation:n.get("relation"),expanded:(n.get("expand")??"").split(",").filter(m=>m.length>0&&(c||!m.startsWith("kind:"))).sort(),pins:o}}function Ga(e){let t=Je(e);return Q(t)==="#"?{...t,overview:!0}:t}function Fa(e){let t=Q(e);return t==="#overview=1"?"":t}function Xe(e){return Math.round(e*100)/100}function go(e,t){return Q(e)===Q(t)}var mo="edge:";function ho(e){if(!e.startsWith(mo))return null;let t=e.slice(mo.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 Mt(e){let{pan:t,...n}=e;return{...n,pins:{}}}function q(e,t){if(t===e.focusId)return{...e,focusId:t};let n=Mt(e);return{...n.within?.q!==void 0?ee(n,"q",null):n,focusId:t}}function So(e,t){return{...e,relation:t}}function ee(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 ue(e,t){if(t!==e.overview&&(e=Mt(e)),!t){let n=e.expanded.filter(o=>!o.startsWith("kind:"));return{...e,overview:!1,expanded:n}}return{...e,overview:t}}function Qe(e,t){if(t.length===0){let{selection:n,...o}=e;return o}return{...e,selection:[...t]}}function Le(e,t){if(t!==(e.zoom===!0)&&(e=Mt(e)),!t){let{zoom:n,...o}=e;return o}return{...e,zoom:!0}}function et(e,t){let n=new Set(e.expanded);return n.has(t)?n.delete(t):n.add(t),{...e,expanded:[...n].sort()}}var nt="aggregate:",tt="kind:";function Ct(e){return`${tt}${e}`}function ge(e){return e.startsWith(tt)?e.slice(tt.length):null}var qa="kinds:beyond";function ti(e){let t=ge(e);return t?[t]:ce(e)}function te(...e){return`${nt}${[...e].sort().join("+")}`}function wo(e){return e.startsWith(nt)}function ce(e){return!wo(e)||e.includes("|")?[]:e.slice(nt.length).split("+").filter(Boolean)}function vo(e,t,n={}){let o=ge(t);if(o!==null&&e.overview&&n.ownPicture!==!0)return et(e,t);let r=o!==null?te(o):t;if(e.zoom&&e.focusId===r&&!(o!==null&&n.carry))return Le(e,!1);if(o!==null&&n.carry){let i=ue({...q(e,r),relation:null},!1);return ee(Le(i,!0),"q",n.carry)}return Le({...q(e,r),relation:null},!0)}function ni(e,t,n){return ee(ue(q(e,te(t)),!1),"view",n)}function za(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var bo="aggregate:";function Ot(e){return e.startsWith(bo)&&e.includes("|")}var Vt=e=>e?.off===!0,oi=e=>e!==void 0&&!Vt(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),xo=e=>e!==void 0&&!Vt(e)&&(e.fast!==void 0||e.decide!==void 0),ri=e=>e?.suggestOnOpen!==!1&&xo(e),ii=e=>e?.hoverChips===!0&&xo(e);var It={};var _o=H(W(),1),xi={turns:[],outcomes:new Map,busy:!1,pending:null,draft:null,draftNote:null},Ho=e=>`graview:seat:${e}`;function Pi(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 Ei(e,t){if(e)try{sessionStorage.setItem(e,JSON.stringify({turns:t.turns.slice(-40),outcomes:[...t.outcomes],draft:t.draft}))}catch{}}function Gt(e){let t=e===null?null:Ho(e),n={...xi,...Pi(t)},o=new Set,r=(i,a=!0)=>{n=i,a&&Ei(t,n);for(let s of[...o])s()};return{get:()=>n,subscribe(i){return o.add(i),()=>void o.delete(i)},setTurns:i=>r({...n,turns:i(n.turns)}),settle:(i,a)=>r({...n,outcomes:new Map(n.outcomes).set(i,a)}),setBusy:i=>r({...n,busy:i},!1),ask:i=>r({...n,pending:i.trim()||null}),takePending(){let i=n.pending;return i!==null&&r({...n,pending:null},!1),i},setDraft:(i,a=null)=>r({...n,draft:i,draftNote:a})}}function Ai(e){return(0,_o.useSyncExternalStore)(e.subscribe,e.get,e.get)}var No=H(W(),1),ki={entries:[],ghost:null,loaded:!1};function Do(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 Ft(e){let t=ki,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:Do(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:Do(t.entries,i)})).catch(i=>{console.warn("The host's AI interactions could not be read:",i)})}}}function Ri(e){return(0,No.useSyncExternalStore)(e.subscribe,e.get,e.get)}function Wo(e){return e?.closest?.("[data-graview-pick]")?.getAttribute("data-graview-pick")??null}var rt=H(W(),1),it=(0,rt.createContext)(void 0),Ti=()=>(0,rt.useContext)(it);var E=H(W(),1),_e=(0,E.createContext)(null);function Go(){return(0,E.useContext)(_e)}function Mi(e,t){let n=Go(),o=(0,E.useMemo)(()=>n?n.live.seenBy(t):e,[n,e,t]),r=(0,E.useRef)(0),i=(0,E.useCallback)(a=>o.subscribe(()=>{r.current+=1,a()}),[o]);return(0,E.useSyncExternalStore)(i,()=>r.current,()=>0),o}var Fo=Ye(()=>(__graviewPreload(import.meta.url,["./chunk.YFVJUHAK.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.FC6AF6CC.js")));function Kt(e){let[,t]=(0,E.useReducer)(o=>o+1,0),n=e.publishing?.mode==="on-publish"&&!io();return(0,E.useEffect)(()=>{n&&Fo().then(t,()=>{})},[n]),!n}var jo,Ci=400;function Bt(e,t,n){let o=(0,E.useContext)(_e),r=o!==null&&o.owns(e,t),[i,a]=(0,E.useState)(null),[s,l]=(0,E.useState)(jo);(0,E.useEffect)(()=>{if(s||r||i===null)return;let P=!0;return Fo().then(T=>{jo=T,P&&l(T)},()=>{}),()=>{P=!1}},[s,r,i]);let[u,c]=(0,E.useState)(0),[m,y]=(0,E.useMemo)(()=>r||i===null||!s?[]:[i>=e.log.length?void 0:s.askArchived(e,i,n)??s.askDeclaration(n,i),s.keptOf(e,n)],[r,e,i,n,s,u]),g=m&&"waiting"in m?m.waiting:void 0,b=m&&"seq"in m?m:null,[R,f]=(0,E.useState)(void 0);(0,E.useEffect)(()=>{if(!g)return;let P=!0,T=setTimeout(()=>P&&f(g),Ci);return g.then(()=>P&&c(_=>_+1)),()=>{P=!1,clearTimeout(T)}},[g]);let S=g!==void 0&&R!==g||b!==null,v=(0,E.useMemo)(()=>{if(r||i===null||i>=e.log.length||!s||S)return null;try{let P=s.pastAt(e,i,n);return{seq:i,at:P.past?.at,store:P}}catch{return null}},[r,e,i,n,s,S,u]),A=(0,E.useRef)(null),x=S?A.current:v;(0,E.useEffect)(()=>{A.current=x},[x]);let j=(0,E.useCallback)(P=>a(P===null?null:P>=e.log.length?Number.POSITIVE_INFINITY:P),[e]),G=(0,E.useCallback)((P,T)=>[e,x?.store].some(_=>_!==void 0&&(_===P||_.seenBy(T)===P)),[e,x]),D=i!==null,O=(0,E.useMemo)(()=>({past:x,open:D,show:j,live:e,host:n,owns:G,archive:b,kept:y}),[x,D,j,e,n,G,b,y]);return r?o:O}var Ko=H(W(),1),qt=(0,Ko.createContext)(null);var $o=e=>`graview:setting:${e}`;function Uo(){return localStorage}function Yo(e,t){try{let n=(t??Uo()).getItem($o(e.name));if(n!==null&&e.options.some(o=>o.value===n))return n}catch{}return e.initial}function Zo(e,t,n){try{(n??Uo()).setItem($o(e.name),t)}catch{}}function Xo(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 L=H(W(),1);function zt(e){return Ue(e)}var Ii=12,Li=4;function _i(e,t,n){let o=zt(t);return e.get(o)??{participant:o,who:t.id??t.kind,at:null,mode:"docked",since:n,trail:[]}}var st=(e,t)=>t===null||e[e.length-1]===t?e:[...e,t].slice(-Ii);function Jo(e,t){let n=e.filter(r=>r.length>0);if(n.length===0)return null;if(n.length<=Li)return n[0];let o=new Set(n.map(r=>t(r)).filter(r=>r!==void 0));return o.size===1?Ct([...o][0]):n[0]}function $t(e,t,n){let o=new Map(e);if(t.type==="rest"){for(let[a,s]of e)s.mode!=="asking"&&s.mode!=="docked"&&t.at-s.since>=t.holdMs&&o.set(a,{...s,mode:"docked",at:null,trail:[],say:void 0,confidence:void 0});return o}if(t.author.kind!=="agent")return o;let r=_i(e,t.author,t.at),i=a=>o.set(r.participant,{...r,...a,since:t.at});switch(t.type){case"read":{let a=Jo(t.ids,n);return i({at:a,mode:"reading",trail:st(r.trail,a)}),o}case"about-to-write":case"write":{let a=Jo(t.ids,n);return i({at:a,mode:"writing",trail:st(r.trail,a),say:void 0,confidence:void 0}),o}case"refused":return i({at:t.where,mode:"refused",say:t.say,confidence:void 0,trail:st(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:st(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 Qo="graview:session";function er(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(Qo);if(o)return o;let r=t();return n.setItem(Qo,r),r}catch{return t()}}var Ut={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"},Yt={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"},tr=[Ut,Yt],Hi=800;function nr(e){let{channel:t,store:n,view:o,principal:r,session:i,robots:a,seatWho:s,settingValues:l,setView:u,ttlMs:c=yo,people:m,seats:y}=e,[g,b]=(0,L.useState)(()=>new Map),[R,f]=(0,L.useState)(null),[S,v]=(0,L.useState)(null),[A,x]=(0,L.useState)(null),j=typeof r.id=="string"&&r.id.length>0,G=j&&(l[Ut.name]??Ut.initial)==="shared",D=G&&(l[Yt.name]??Yt.initial)==="shared",O=zt({kind:r.kind,...r.id?{id:r.id}:{},session:i}),P=j?no(r,{graph:n.graph,schema:n.schema,...y?{seats:y}:{},...m?{people:m}:{}}):"",T=s?a.get(`agent:${s}:${i}`):void 0,_=(0,L.useMemo)(()=>!t||!G?null:{participant:O,kind:r.kind,name:P,...r.onBehalfOf?.id?{onBehalfOf:r.onBehalfOf.id,...r.onBehalfOf.name?{onBehalfOfName:r.onBehalfOf.name}:{}}:{},hue:oo(r.id??"nobody"),stop:A??Q(o),...D?{over:R}:{},...T?{robot:{at:T.at,mode:T.mode}}:{},at:new Date().toISOString()},[t,G,D,O,P,r.id,r.kind,r.onBehalfOf?.id,r.onBehalfOf?.name,o,A,R,T?.at,T?.mode]),We=(0,L.useRef)(null),Ee=k=>k&&t?.here({...k,caret:We.current??void 0,at:new Date().toISOString()}),je=(0,L.useCallback)(k=>{We.current=k,Ee(_)},[t,_]);(0,L.useEffect)(()=>{if(!_)return;Ee(_);let k=setInterval(()=>Ee(_),Hi);return()=>clearInterval(k)},[t,_]),(0,L.useEffect)(()=>t?t.onWho(K=>b(Tt(new Map,K,Date.now(),c))):void 0,[t,c]);let Ae=g.size>0;(0,L.useEffect)(()=>{if(!Ae)return;let k=setInterval(()=>{b(K=>{let ae=Tt(K,[],Date.now(),c);return ae.size===K.size?K:ae})},Math.max(250,Math.min(1e3,c/4)));return()=>clearInterval(k)},[Ae,c]),(0,L.useEffect)(()=>{if(!t||typeof window>"u")return;let k=()=>t.leave();return window.addEventListener("pagehide",k),()=>window.removeEventListener("pagehide",k)},[t]),(0,L.useEffect)(()=>{if(!D||typeof document>"u")return;let k=null,K=ae=>{let se=Wo(ae.target);se!==k&&(k=se,f(se))};return document.addEventListener("pointermove",K,{passive:!0}),()=>document.removeEventListener("pointermove",K)},[D]);let re=(0,L.useRef)(null),Z=S?g.get(S)??null:null,X=(0,L.useCallback)(k=>{re.current=null,v(k)},[]);(0,L.useEffect)(()=>{if(S){if(!Z){v(null);return}Z.stop!==re.current?.stop&&(re.current={stop:Z.stop,at:Date.now()},u(Je(Z.stop)))}},[S,Z,u]),(0,L.useEffect)(()=>{let k=re.current;!S||k===null||Date.now()-k.at<400||go(o,Je(k.stop))||v(null)},[o,S]),(0,L.useEffect)(()=>{if(!S||typeof document>"u")return;let k=K=>{K.key==="Escape"&&v(null)};return document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)},[S]);let ie=_!==null,ke=(0,L.useMemo)(()=>ie?{participant:O,name:P}:null,[ie,O,P]);return(0,L.useMemo)(()=>({who:g,sharing:ke,following:Z,follow:X,sayWhere:x,sayCaret:je}),[g,ke,Z,X,je])}var U=H(W(),1);function or(e){return Ue(e.author)}function Di(e,t){return e.length>1?"co-edited":t==="rule"?"rule":t==="agent"?"autonomous":"directed"}function rr(e,t,n,o,r){let i=new Map;for(let[l,u]of e)o-u.at<r&&i.set(l,u);let a=new Set(n.flatMap(l=>l.nodeIds)),s=(l,u,c)=>{let m=i.get(l),y=m?.participants.includes(or(u))?m.participants:[...m?.participants??[],or(u)];i.set(l,{at:o,manner:Di(y,u.author.kind),intent:u.intent,wrote:(m?.wrote??!1)||(c.wrote??!1),read:(m?.read??!1)||(c.read??!1),broke:(m?.broke??!1)||a.has(l),participants:y})};for(let l of t){for(let u of l.writes)s(u,l,{wrote:!0});for(let u of l.reads)l.writes.includes(u)||s(u,l,{read:!0})}for(let l of n)for(let u of l.nodeIds){let c=i.get(u);i.set(u,{at:o,manner:c?.manner??"rule",intent:c?.intent??l.message,wrote:c?.wrote??!1,read:c?.read??!1,broke:!0,participants:c?.participants??["rule::"]})}return i}var Ni=2600;function ir(e,t=Ni){let[n,o]=(0,U.useState)(()=>new Map),r=(0,U.useRef)(n);r.current=n;let i=(0,U.useRef)(null),a=(0,U.useCallback)(l=>{r.current=l,o(l),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{r.current=new Map,o(new Map)},t)},[t]);(0,U.useEffect)(()=>{let l=e.violations(),u=e.subscribe((c,m)=>{let y=e.violations(),g=lo(e.allInvariants(),l,y).introduces;l=y,a(rr(r.current,m,g.map(b=>({nodeIds:b.nodeIds,message:b.message})),Date.now(),t))});return()=>{u(),i.current&&clearTimeout(i.current)}},[e,t,a]);let s=(0,U.useCallback)(l=>{l.reads.length!==0&&a(rr(r.current,[Wi(l)],[],Date.now(),t))},[t,a]);return{activity:n,noteAttention:s}}function Wi(e){return{id:`attention:${e.intent}`,seq:-1,batch:"attention",author:e.author,intent:e.intent,mutation:null,primitives:[],reads:e.reads,writes:[],at:new Date().toISOString()}}var d=H(W(),1);function ar(){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 lt=H(W(),1),ji=e=>e.definitions.some(t=>eo(t).size>0);function sr(e,t,n){let[o,r]=(0,lt.useState)(void 0),i=(n.roles??[]).join("\0"),a=n.onBehalfOf?JSON.stringify(n.onBehalfOf):"";return(0,lt.useEffect)(()=>{if(!t||!ji(e.schema)){r(void 0);return}let s=!0,l=!1,u=e.graph,c=()=>{l||(l=!0,queueMicrotask(()=>{l=!1,s&&e.reread()}))},m=to(t,{kind:n.kind,...n.id===void 0?{}:{id:n.id},...n.roles?{roles:n.roles}:{},...n.onBehalfOf?{onBehalfOf:n.onBehalfOf}:{}},c);return Rt(u,m.read),r(m),e.reread(),()=>{s=!1,Rt(u,void 0)}},[e,t,n.kind,n.id,i,a]),o}function lr(){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 ne=H(He(),1),Gi="graview:place-menu",De=(0,d.createContext)(null),pr=(0,d.createContext)("scene");function Fi({mode:e,children:t}){return(0,ne.jsx)(pr.Provider,{value:e,children:t})}function Ki(){return(0,d.useContext)(pr)}var fr={kind:"human"},Bi=[],qi=[],zi=[],Zt=[];function yr(e,t){let n=(0,d.useId)();(0,d.useEffect)(()=>{if(!globalThis.__graviewWatch)return;let o=t??fr,r=()=>so(e,o,n);r();let i,a=e.subscribe(()=>{clearTimeout(i),i=setTimeout(r,250)});return()=>{clearTimeout(i),a(),globalThis.__graviewWatch?.unseen?.({words:[],from:n,gone:!0})}},[e,t,n])}var $i=()=>{try{return typeof location<"u"&&new URLSearchParams(location.search).get("as")==="published"?"published":void 0}catch{return}},Ui={off:!0};function Yi({store:e,views:t,initialView:n,scheme:o="dark",initialSelection:r,principal:i,as:a,seats:s=Bi,onSeat:l,people:u=qi,memory:c,presenceTtlMs:m,app:y,settings:g=y?.settings??zi,presence:b,typing:R,brand:f,locale:S,timeZone:v,onKeepLens:A,onProposeChange:x,providers:j,ai:G,files:D,resolveApp:O,history:P,linkedRecords:T,menuSections:_,keptViews:We,onExport:Ee,subscriptions:je,dismissals:Ae,whileAway:re,signIn:Z,view:X,onViewChange:ie,children:ke}){let k=(0,d.useContext)(De),K=_??k?.menuSections,ae=Z??k?.signIn,se=We??k?.keptViews,wt=Ee??k?.onExport,[jr,Gr]=(0,d.useState)(null),fe=jr??i??s[0]?.principal??fr,Ge=Bt(e,fe,P),mn=Ge.past&&Ge.live===e?Ge.past.store:e,vt=a??$i(),bt=!Kt(e),N=(0,d.useMemo)(()=>bt?e:mn.seenBy(fe,vt?{as:vt}:void 0),[bt,e,mn,fe,vt]);yr(e,fe);let[le]=(0,d.useState)(()=>er(c)),[gn,Fr]=(0,d.useState)(!1),hn=(0,d.useCallback)(()=>Fr(!0),[]),de=(0,d.useMemo)(()=>b?[...g,...tr]:g,[g,b]),[xt]=(0,d.useState)(()=>n??en(t,e.schema)),[Kr,Sn]=(0,d.useState)(()=>Qe(xt??me,r??xt?.selection??[])),Re=(0,d.useRef)(xt??me).current,[wn,Br]=(0,d.useState)(null),[vn,qr]=(0,d.useState)(null),z=(0,d.useContext)(De),[bn]=(0,d.useState)(()=>z?.seatTalk??Gt(f?.name??e.schema.kinds.join(","))),Pt=G??z?.ai??It,Fe=(0,d.useMemo)(()=>Pt.off?Ui:Pt,[Pt]),xn=(0,d.useRef)(Fe.interactions);xn.current=Fe.interactions;let[Pn]=(0,d.useState)(()=>z?.aiDesk??Ft(()=>xn.current)),[zr]=(0,d.useState)(()=>z?.subscriptions??ao()),En=je??z?.subscriptions??zr,Et=A??z?.onKeepLens,An=x??z?.onProposeChange,Ke=y??z?.app,Be=S??z?.locale,$r=f?.locale??Ke?.brand?.locale,qe=v??z?.timeZone;Qn({reader:Be,app:$r,readerTimeZone:qe,appTimeZone:f?.timeZone??Ke?.brand?.timeZone});let kn=(0,d.useRef)(null),Rn=(0,d.useCallback)(p=>{kn.current=p},[]),Tn=(0,d.useCallback)(p=>kn.current?.whereIs(p)??null,[]),[Mn]=(0,d.useState)(()=>ar()),[Cn]=(0,d.useState)(()=>lr()),[At,Ur]=(0,d.useState)(null),[Te,On]=(0,d.useState)(()=>new Map),Me=(0,d.useRef)(Te);Me.current=Te;let Ce=(0,d.useRef)(null),kt=(0,d.useCallback)(p=>N.graph.getNode(p)?.kind,[N]),J=(0,d.useCallback)(p=>{let h=$t(Me.current,p,kt);Me.current=h,On(h),Ce.current&&clearTimeout(Ce.current),[...h.values()].some(V=>V.mode!=="docked"&&V.mode!=="asking")&&(Ce.current=setTimeout(()=>{let V=$t(Me.current,{type:"rest",at:Date.now(),holdMs:Qt},kt);Me.current=V,On(V)},Qt+20))},[kt]),Vn=(0,d.useCallback)(p=>J({...p,at:p.at??Date.now()}),[J]),In=(0,d.useCallback)(p=>{Ur(p),p&&J({type:"home",author:{kind:"agent",id:p,session:le},at:Date.now()})},[J,le]);(0,d.useEffect)(()=>N.subscribe((p,h)=>{for(let M of h)M.author.kind==="agent"&&J({type:"write",author:M.author,ids:M.writes,at:Date.now()})}),[N,J]),(0,d.useEffect)(()=>()=>{Ce.current&&clearTimeout(Ce.current)},[]);let $=(0,d.useMemo)(()=>({...fe,session:le}),[fe,le]),Ln=sr(N,T,$),_n=(0,d.useCallback)(p=>{Gr(p),l?.(p)},[l]),[Oe,Yr]=(0,d.useState)(()=>Object.fromEntries(de.map(p=>[p.name,Yo(p,c)])));(0,d.useEffect)(()=>{for(let p of de)Xo(p,Oe[p.name]??p.initial)},[de,Oe]);let Hn=(0,d.useCallback)((p,h)=>{let M=de.find(V=>V.name===p);!M||!M.options.some(V=>V.value===h)||(Zo(M,h,c),Yr(V=>({...V,[p]:h})))},[de,c]),[Dn,Zr]=(0,d.useState)(null),{activity:Nn,noteAttention:Wn}=ir(N),jn=(0,d.useCallback)(p=>{Wn(p),J({type:"read",author:p.author,ids:p.reads,at:Date.now()})},[Wn,J]),ye=(0,d.useCallback)(p=>{if(ge(p)!==null||ce(p).length>0||Ot(p))return!0;let h=ho(p);return h?N.graph.allEdges().some(M=>M.kind===h.kind&&M.from===h.from&&M.to===h.to):N.graph.getNode(p)!==void 0},[N]),Gn=(0,d.useCallback)(p=>{let h=p.selection??Zt,M=h.filter(ye),V=M.length===h.length?p:Qe(p,M);return V.focusId!==null&&!ye(V.focusId)&&(V=q(V,null)),V},[ye]),Ve=(0,d.useCallback)(p=>{let h=Gn(p),M=cr(N,$,h.shown);if(h.focusId!==null&&M.size>0){let V=ce(h.focusId),Jn=N.graph.getNode(h.focusId);(V.length>0?V.every(Qr=>M.has(Qr)):Jn?M.has(Jn.kind):!1)&&(h={...h,focusId:null})}if(!h.overview&&h.focusId===null){let V=Re.focusId!==null&&!ye(Re.focusId)?en(t,e.schema)??{...me,overview:!0}:Re;V.focusId!==null&&ye(V.focusId)?h={...h,focusId:V.focusId}:V.overview===!0&&(h={...h,overview:!0})}return h},[Gn,ye,N,Re,$,t,e.schema]),B=Ve(X??Kr),Fn=(0,d.useMemo)(()=>cr(N,$,B.shown),[N,$,B.shown]),Kn=(0,d.useMemo)(()=>[...N.modules.administered.entries()].map(([p,h])=>{let M=N.mayAdminister(p,$);return{name:p,...h.description?{description:h.description}:{},kinds:h.kinds??[],canShow:M,shown:M&&(B.shown??[]).includes(p)}}),[N,$,B.shown]),Ie=(0,d.useCallback)(p=>{let h=M=>Ve(typeof p=="function"?p(M):p);if(X!==void 0){ie?.(h(X));return}ie&&ie(h(B)),Sn(M=>h(M))},[B,ie,X,Ve]);(0,d.useEffect)(()=>{X===void 0&&Sn(p=>{let h=Ve(p);return h===p?p:h})},[B,X,Ve]);let Bn=B.selection??Zt,qn=(0,d.useCallback)(p=>{Ie(h=>Qe(h,typeof p=="function"?p(h.selection??Zt):p))},[Ie]),{who:ze,following:zn,follow:$n,sayWhere:Xr,sayCaret:Un,sharing:Yn}=nr({channel:b,store:N,view:B,principal:$,session:le,robots:Te,seatWho:At,settingValues:Oe,setView:Ie,seats:s,people:u,...m!==void 0?{ttlMs:m}:{}}),Jr=(0,d.useMemo)(()=>({store:N,scheme:o,views:t,view:B,setView:Ie,homeView:Re,selection:Bn,setSelection:qn,menuAt:wn,setMenuAt:Br,whereIs:Tn,pointer:Mn,motion:Cn,registerScene:Rn,robots:Te,noteSeat:Vn,seatWho:At,registerSeatWho:In,actsDoor:vn,registerActsDoor:qr,seatTalk:bn,aiDesk:Pn,...c?{memory:c}:{},who:ze,following:zn,follow:$n,sayWhere:Xr,sharing:Yn,session:le,ai:Fe,resolveApp:O,linkedRecords:T,menuSections:K,...se?{keptViews:se}:{},...wt?{onExport:wt}:{},subscriptions:En,dismissals:Ae,whileAway:re,signIn:ae,linkedReads:Ln,movedByHand:gn,noteMoved:hn,emphasis:Dn,setEmphasis:Zr,activity:Nn,noteAttention:jn,principal:$,seats:s,people:u,takeSeat:_n,settings:de,settingValues:Oe,chooseSetting:Hn,hiddenKinds:Fn,administered:Kn,...j?{providers:j}:{},...f?{brand:f}:{},...Et?{onKeepLens:Et}:{},...An?{onProposeChange:An}:{},app:Ke,...Be?{locale:Be}:{},...qe?{timeZone:qe}:{}}),[N,o,t,B,Ie,Bn,qn,wn,Tn,Mn,Cn,Rn,Te,Vn,At,In,vn,bn,Pn,c,ze,zn,$n,Yn,le,Fe,O,T,K,se,wt,En,Ae,re,ae,Ln,gn,hn,Dn,Nn,jn,$,s,u,_n,de,Oe,Hn,Fn,Kn,j,f,Et,Ke,Be,qe]),Zn=(0,d.useMemo)(()=>R?{typing:R,sayCaret:Un,who:ze}:null,[R,Un,ze]),Xn=D?(0,ne.jsx)(it.Provider,{value:D,children:ke}):ke;return(0,ne.jsx)(De.Provider,{value:Jr,children:(0,ne.jsx)(_e.Provider,{value:Ge,children:(0,ne.jsx)(ea,{children:bt?null:Zn?(0,ne.jsx)(qt.Provider,{value:Zn,children:Xn}):Xn})})})}var mr=(0,d.createContext)(null),Xt,Jt=new Set,Zi=e=>(Jt.add(e),()=>void Jt.delete(e)),dr=()=>Xt;function Xi(e){if(!Xt){Xt=e;for(let t of[...Jt])t()}}var Ji=300;function Qi(e){let t=0;return async(n,o)=>{let r=++t;return await new Promise(i=>setTimeout(i,Ji)),r===t?e(n,o):[]}}function ea({children:e}){let{store:t,view:n,views:o,principal:r,hiddenKinds:i,selection:a,ai:s}=oe(),l=dt(),u=n.q,c=n.focusId,m=!!(u&&u.trim().length>0),y=(0,d.useSyncExternalStore)(Zi,dr,dr),g=(0,d.useMemo)(()=>m&&y?{flagged:new Set(t.violations().flatMap(A=>A.nodeIds)),touched:y.touchWeights(t.log.all())}:null,[t,l,m,y]),b=c?t.graph.getNode(c)?.kind??ge(c)??(ce(c).length===1?ce(c)[0]:void 0):void 0,R=(0,d.useMemo)(()=>s.near&&Qi(s.near),[s.near]),f=(0,d.useMemo)(()=>!u||!g||!y?null:y.search(t,u,{...b?{inKind:b}:{},principal:r,places:o.places(),kinds:t.schema.kinds.filter(A=>!i.has(A)),from:[...a,...c&&t.graph.has(c)?[c]:[]],flagged:g.flagged,touched:g.touched,limit:200,rank:R}),[t,u,r,o,i,a,c,b,g,R]),[S,v]=(0,d.useState)();return(0,d.useEffect)(()=>void f?.later?.then(A=>v([f,A])),[f]),(0,ne.jsx)(mr.Provider,{value:S?.[0]===f?S[1]:f,children:e})}var ur=new WeakMap;function qs(e){let t=ur.get(e);return t||ur.set(e,t=new Set(e.matched)),t}function ta(){return(0,d.useContext)(mr)}function oe(){let e=(0,d.useContext)(De);if(!e)throw new Error("useGraview must be used inside a <GraviewProvider>.");return e}function tn(){return(0,d.useContext)(De)??null}function dt(){let{store:e}=oe(),t=(0,d.useRef)(null),n=(0,d.useRef)(null),o=(0,d.useCallback)(()=>(n.current!==e&&(n.current=e,t.current=null),t.current??=e.graph.allNodes(),t.current),[e]),r=(0,d.useCallback)(i=>e.subscribe(()=>{t.current=null,i()}),[e]);return(0,d.useSyncExternalStore)(r,o,o)}function na(e){let{store:t}=oe(),n=(0,d.useCallback)(r=>t.subscribe(r),[t]),o=(0,d.useCallback)(()=>e===null?void 0:t.graph.getNode(e),[t,e]);return(0,d.useSyncExternalStore)(n,o,o)}function cr(e,t,n){let o=new Set(e.modules.disabledKinds);for(let r of e.kindsKeptFrom(t))o.add(r);for(let[r,i]of e.modules.administered)if(!(e.mayAdminister(r,t)&&(n??[]).includes(r)))for(let a of i.kinds??[])o.add(a);return o}var Qt=2600;var gr=new WeakSet,oa=e=>gr.has(e),ra=e=>void gr.add(e);function en(e,t){let n=fo(e.arrangement?.()?.first,t,e.places());if(!(!n||n.to==="home"))return n.to==="place"?{...me,focusId:te(n.place.kind),within:{view:n.place.as}}:{...me,focusId:te(n.kind)}}var pe=H(W(),1);var nn=H(W(),1),ia=(0,nn.createContext)(null),on=(0,nn.createContext)(null);var hr=(0,pe.createContext)(null);function aa(){let e=(0,pe.useContext)(hr),t=tn(),n=(0,pe.useContext)(on),o=(i,a,s)=>t?.setView(l=>ee(ee(ue(q(l,te(i)),!1),"view",a),"filter",s?.filter??null)),r=()=>t?.setView(i=>ee(ue(i,!0),"view",null));return(0,pe.useMemo)(()=>e??{record:i=>{t&&(t.setView(a=>q(ue(a,!1),i)),t.setSelection([i]))},place:(i,a)=>{if(i===po)return r();if(i===co)return n?n.open("/"):r();let s=t?.views.places().find(l=>l.as===i);s&&o(s.kind,s.as,a)},list:(i,a)=>o(i,null,a)},[e,t,n])}var Sr=H(W(),1),sa=(0,Sr.createContext)(!1);var ut=Symbol.for("graview.default-view");function wr(e){return Object.defineProperty(e,ut,{value:!0,enumerable:!1}),e}function vr(e){return typeof e=="function"&&e[ut]===!0}var ct=Symbol.for("graview.replaces-page");function br(e){return Object.defineProperty(e,ct,{value:!0,enumerable:!1}),e}function xr(e){return typeof e=="function"&&e[ct]===!0}var pt=Symbol.for("graview.bleeds");function Pr(e){return Object.defineProperty(e,pt,{value:!0,enumerable:!1}),e}function Er(e){return typeof e=="function"&&e[pt]===!0}var ft=Symbol.for("graview.previews");function Ar(e,t={}){return Object.defineProperty(e,ft,{value:t,enumerable:!1}),e}function kr(e){return typeof e=="function"?e[ft]:void 0}function la(e){return uo(e)}function da(e,t){if(t===e)return e;for(let r of t.registrations())e.register(r.kind,r,r.view,r);let n=t.arrangement?.();n&&e.arrange?.(n);let o=t.homes?.()??[];if(o.length>0)for(let r of o)e.home?.(r.view,r.name!==void 0?{name:r.name}:void 0);else{let r=t.homeView?.();r&&e.home?.(r)}return e}var C=H(W(),1),Y=H(He(),1),rn=new Set,yt=0;function an(e){return()=>{yt+=1;let t=e();return t.then(()=>void(yt-=1),()=>void(yt-=1)),t}}var ua=()=>yt,gt=(0,C.createContext)(null);function ca(){return{waiting:new Map,at:0}}function pa(e){for(let[t,n]of e.waiting)n<e.at&&e.waiting.delete(t);e.at+=1}var fa=e=>e?.waiting.size??0;function Mr(e,t){e?.waiting.set(t,e.at)}function Cr(e){let t=(0,C.useContext)(gt);(0,C.useLayoutEffect)(()=>{t?.waiting.delete(e)},[t,e])}function ya(e){let t={},n=!1,o=new Set,r=(0,C.lazy)(an(()=>e().then(a=>{n=!0;let s=a.default;function l(u){return Cr(t),(0,C.createElement)(s,u)}return{default:l}},a=>{for(let s of o)s.waiting.delete(t);throw a})));function i(a){let s=(0,C.useContext)(gt);return!n&&s&&(o.add(s),Mr(s,t)),(0,C.createElement)(r,a)}return i}var Or=!1,Vr=!1,mt=new Set;function ma(){Or=!0}function ga(){Vr=!0;for(let e of[...mt])e();mt.clear()}var Ir=()=>Vr||!Or;function ha(e){return Ir()?(e(),()=>{}):(mt.add(e),()=>void mt.delete(e))}var Rr=!1;function sn(){for(let e of[...rn])e()}function Sa(){Rr||typeof window>"u"||(Rr=!0,window.addEventListener("online",sn))}function ln(e){let t,n=!1,o=!1,r,i=0,a=new Set,s=()=>{i+=1;for(let y of[...a])y()},l=y=>(a.add(y),()=>void a.delete(y)),u=()=>i,c=()=>void m().catch(()=>{});function m(){if(n)return Promise.resolve(t);if(r)return r;let y=e().then(g=>(t=g,n=!0,o=!1,r=void 0,rn.delete(c),s(),g),g=>{throw r=void 0,o=!0,rn.add(c),Sa(),s(),g});return y.catch(()=>{}),r=y,y}return{load:m,prefetch:c,get current(){return t},get failed(){return o},part(y,g={}){let b=g.what??"This part",R={};function f(A){(0,C.useSyncExternalStore)(l,u,u),Cr(R);let x=(0,C.useRef)(null),j=(0,C.useRef)(null),G=(0,C.useRef)(!1);return(0,C.useEffect)(()=>{o&&r===void 0&&c()},[]),n&&typeof document<"u"&&x.current!==null&&document.activeElement===x.current&&(G.current=!0),(0,C.useLayoutEffect)(()=>{if(!(!n||!G.current)){G.current=!1;for(let D=j.current?.nextElementSibling??null;D!==null;D=D.nextElementSibling){let O=D.matches(Tr)?D:D.querySelector(Tr);if(O instanceof HTMLElement){O.focus();return}}}}),n?(0,Y.jsxs)(Y.Fragment,{children:[G.current?(0,Y.jsx)("span",{ref:j,hidden:!0}):null,y(t,A)]}):g.quiet?null:(0,Y.jsx)(wa,{what:b,button:x,...g.as?{as:g.as}:{}})}let S=(0,C.lazy)(an(()=>m().then(()=>({default:f}),()=>({default:f}))));function v(A){let x=(0,C.useContext)(gt),[j]=(0,C.useState)(()=>n||o);return!n&&!o&&Mr(x,R),(0,C.createElement)(j?f:S,A)}return v}}}var Tr="button,a[href],input,select,textarea,[tabindex]:not([tabindex='-1'])";function wa({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:sn,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 ve=H(W(),1);function va(){let{selection:e,setSelection:t}=oe();return(0,ve.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 ba(){let{store:e}=oe(),t=dt();return(0,ve.useMemo)(()=>xa(e),[e,t])}var Lr=new WeakMap;function xa(e){let t=Lr.get(e);if(!t){let n={violations:null};e.subscribe(()=>{n.violations=null}),Lr.set(e,n),t=n}return t.violations??=e.violations(),t.violations}function Pa(){let{view:e,setView:t}=oe();return(0,ve.useMemo)(()=>({view:e,url:Q(e),focus:n=>t(o=>q(o,n)),show:n=>t(o=>So(o,n)),toggle:n=>t(o=>et(o,n)),go:n=>t(n)}),[e,t])}var we={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;we.at=typeof t?.graview=="number"?t.graview:0,we.at>we.depth&&(we.depth=we.at),we.tell()});var F=H(W(),1),un={profile:{trigger:"profile-button",pane:"profile",opens:"press",focus:"into",drawn:["shell","embed"]},problems:{trigger:"standing",pane:"problems",opens:"press",focus:"into",drawn:["shell","embed"]},places:{trigger:"app-places-open",pane:"app-places",opens:"press",focus:"into",drawn:["embed"]},here:{trigger:"here-open",pane:"here-list",opens:"press",focus:"into",drawn:["shell","embed","pages"]},suggested:{trigger:"suggested-button",pane:"suggested",opens:"press",focus:"into",drawn:["shell","embed","pages"]},"host-actions":{trigger:"host-bar-actions-open",pane:"host-bar-actions",opens:"press",focus:"into",drawn:["shell","embed"]},activity:{trigger:"activity-button",pane:"activity",opens:"press",focus:"into",drawn:["shell","embed","pages"]},find:{trigger:"find-box",pane:"find-strip",opens:"typing",focus:"stays",drawn:["shell"]},districts:{trigger:"beyond-more",pane:"beyond-list",opens:"press",focus:"into",drawn:["shell","embed"]},acts:{trigger:null,pane:"context-menu",opens:"context-menu",focus:"into",drawn:["shell","embed","pages"]},arrange:{trigger:"arrange-add",pane:"arrange-list",opens:"press",focus:"into",drawn:["pages"]},"studio-ask":{trigger:"studio-agent",pane:"studio-agent-panel",opens:"press",focus:"into",drawn:["studio"]}},Ea={position:"fixed",inset:"auto",margin:0,zIndex:ro("popover"),boxSizing:"border-box"},ht=6,be=8,Aa=e=>typeof e.showPopover=="function";function St(e){try{return e.matches(":popover-open")}catch{return!1}}function ka(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 cn(e,t,n={}){let o=ka(t);if(!o)return;let r={width:document.documentElement.clientWidth||innerWidth,height:innerHeight},i=e.dataset.graviewDesignedHeight??=e.style.maxHeight;e.style.maxHeight=i;let a=e.getBoundingClientRect(),s=r.height-o.bottom-ht-be,l=o.top-ht-be,u=a.height<=s||s>=l,c=Math.max(96,Math.floor(u?s:l)),m=Math.min(a.height,c);a.height>c&&(e.style.maxHeight=i?`min(${i}, ${c}px)`:`${c}px`);let y=a.width,g=n.align==="start"?o.left:o.right-y,b=typeof t=="function"?null:t.current?.closest("[data-graview-embed]")?.getBoundingClientRect();b&&y<=b.right-b.left&&(g<b.left?g=o.left+y<=b.right?o.left:b.left:g+y>b.right&&(g=o.right-y>=b.left?o.right-y:b.right-y));let R=y>=r.width-2*be?Math.max(0,(r.width-y)/2):Math.max(be,Math.min(g,r.width-be-y)),f=u?o.bottom+ht:Math.max(be,o.top-ht-m);e.style.left=`${Math.round(R)}px`,e.style.top=`${Math.round(f)}px`}function _r(e,t,n,o={}){let r=o.align??"end";(0,F.useLayoutEffect)(()=>{let i=e.current;if(!t||!i)return;if(Aa(i)&&!St(i))try{i.showPopover(),Ta()}catch{}let a=0,s=u=>{u?.target instanceof Node&&i.contains(u.target)||(cancelAnimationFrame(a),a=requestAnimationFrame(()=>cn(i,n,{align:r})))};cn(i,n,{align:r}),addEventListener("resize",s),addEventListener("scroll",s,!0);let l=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>s());return l?.observe(i),()=>{if(cancelAnimationFrame(a),removeEventListener("resize",s),removeEventListener("scroll",s,!0),l?.disconnect(),i.isConnected&&St(i))try{i.hidePopover()}catch{}}},[t,e,r])}var pn=new Set;function Ra(e){return pn.add(e),()=>pn.delete(e)}function Ta(){for(let e of pn)if(!(!e.isConnected||!St(e)))try{e.hidePopover(),e.showPopover()}catch{}}var xe=null,Ma='button:not([disabled]), [href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])';function Ca(e){for(let t of e.querySelectorAll(Ma))if(t.closest("[hidden]")===null&&getComputedStyle(t).visibility!=="hidden")return t;return e}var dn=()=>{let e=document.activeElement;return e===null||e===document.body};function Oa(e,t={}){let{at:n,returnTo:o,onOpenChange:r}=t,i=t.popover!==!1,[a,s]=(0,F.useState)(!1),l=t.open??a,u=(0,F.useRef)(null),c=(0,F.useRef)(null),m=(0,F.useCallback)(v=>{u.current=v},[]),y=(0,F.useCallback)(v=>{c.current=v},[]),g=`graview-popover-${(0,F.useId)().replace(/:/g,"")}`,b=(0,F.useRef)({onOpenChange:r,returnTo:o,controlled:t.open!==void 0});b.current={onOpenChange:r,returnTo:o,controlled:t.open!==void 0};let R=(0,F.useCallback)(v=>{b.current.controlled||s(v),b.current.onOpenChange?.(v)},[]),f=(0,F.useCallback)(()=>{(document.querySelector(`[aria-controls="${g}"]`)??u.current??b.current.returnTo?.()??null)?.focus({preventScroll:!0})},[g]),S=(0,F.useCallback)(v=>{let A=c.current,x=typeof document>"u"?null:document.activeElement,j=x===null||x===document.body||A!==null&&A.contains(x);R(!1),!(!v||!j)&&(f(),requestAnimationFrame(()=>{dn()&&f()}))},[R,f]);return _r(c,i&&l,n??u,t.align?{align:t.align}:{}),(0,F.useEffect)(()=>{if(!i||!l)return;let v={name:e,close:()=>S(!1)};if(xe&&xe.close!==v.close&&xe.close(),xe=v,un[e].focus==="into"){let O=c.current;O&&!O.contains(document.activeElement)&&Ca(O).focus({preventScroll:!0})}let A=O=>{O.key==="Escape"&&S(!0)},x=O=>{let P=O.target;if(!(P instanceof Node))return;let T=c.current;if(T?.contains(P)||u.current?.contains(P))return;let _=P instanceof Element?P.closest('[role="dialog"], [role="alertdialog"]'):null;_&&!(T&&_.contains(T))||(S(!1),un[e].focus==="into"&&requestAnimationFrame(()=>{(dn()||T!==null&&T.contains(document.activeElement))&&f()}))},j=null,G=null,D=O=>{let P=O.target;if(!(P instanceof Element))return;let T=c.current,_=P.closest('[role="dialog"], [role="alertdialog"]');!_||T&&(T.contains(_)||_.contains(T))||(j=_,S(!1))};return document.addEventListener("keydown",A),document.addEventListener("pointerdown",x,!0),document.addEventListener("focusin",D),()=>{document.removeEventListener("keydown",A),document.removeEventListener("pointerdown",x,!0),document.removeEventListener("focusin",D);let O=j;O&&typeof MutationObserver<"u"&&(G?.disconnect(),G=new MutationObserver(()=>{O.isConnected||(G?.disconnect(),requestAnimationFrame(()=>{(dn()||document.activeElement.closest("[hidden]")!==null)&&f()}))}),G.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>G?.disconnect(),10*6e4)),xe?.close===v.close&&(xe=null)}},[i,l,e,S,f]),{open:l,setOpen:v=>v?R(!0):S(!0),toggle:()=>l?S(!0):R(!0),trigger:{ref:m,"aria-expanded":l,"aria-controls":g,"data-graview-popover-trigger":e},pane:{ref:y,id:g,popover:"manual",tabIndex:-1,"data-graview-popover":e,"data-graview-overlay":""}}}var Pe=H(W(),1);var Va=ln(Ye(()=>(__graviewPreload(import.meta.url,["./chunk.M7RESZB6.js","./chunk.SDO3U72B.js","./chunk.DZZL5IDD.js","./chunk.FQLNBIQ5.js","./chunk.AJZBJBMO.js"]),import("./chunk.JT3MFPRD.js"))));function Ia(e,t,n){let o,r=!1,i=()=>{let{hidden:s,removed:l}=t.current();o||r||s.length+l.length===0||(o=()=>{},Va.load().then(u=>{r||(o=u.watchTidied(e,t,n))},String))};i();let a=t.onChange?.(i);return()=>{r=!0,a?.(),o?.()}}function La(e,t){let[n,o]=(0,Pe.useState)();return(0,Pe.useEffect)(()=>t?Ia(e,t,r=>o([e,r])):void 0,[e,t]),n?.[0]===e?n[1]:e}var Hr=H(W(),1),_a=(0,Hr.createContext)(!1);var Dr=H(W(),1),Ha=(0,Dr.createContext)(null);var Nr=H(W(),1),fn='button:not([disabled]), a[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"])',yn=e=>e instanceof HTMLElement&&(e.matches(fn)||e.hasAttribute("tabindex")),Ne=e=>typeof e.checkVisibility=="function"?e.checkVisibility():e.getClientRects().length>0;function Da(e,t){let n=l=>l.replace(/["\\]/g,"\\$&"),o=t.getAttribute("data-testid"),r=t.getAttribute("data-graview-pick"),i=t.getAttribute("aria-label"),a=o?`[data-testid="${n(o)}"]`:r?`[data-graview-pick="${n(r)}"]`:i?`${t.tagName.toLowerCase()}[aria-label="${n(i)}"]`:null;if(!a)return null;let s=e.querySelector(a);return s&&yn(s)&&Ne(s)?s:null}var Na=e=>e.isConnected&&yn(e)&&!e.matches(":disabled")&&e instanceof HTMLElement&&Ne(e);function Wr(e,t){let n=t?Da(e,t):null;if(n)return n;let o=e.querySelector("[data-graview-view][tabindex]");if(o&&Ne(o))return o;for(let r of e.querySelectorAll(fn))if(Ne(r))return r;return yn(e)&&Ne(e)?e:null}function Wa(e){(0,Nr.useEffect)(()=>{let t=e.current;if(!t||typeof MutationObserver>"u")return;let n=[],o=f=>{let S=f.target;if(S instanceof Element){n=[];for(let v=S;v&&v!==t.parentElement;v=v.parentElement)n.push(v)}},r=!1,i=!1,a=t.ownerDocument,s=()=>!i&&a.defaultView!==null,l=(f,S)=>void setTimeout(()=>s()&&S(),f),u=f=>void requestAnimationFrame(()=>s()&&f()),c=f=>{if(r=!1,i)return;let S=a.activeElement;if(!(!(S===null||S===a.body||S===a.documentElement)||n.length===0)){if(Na(n[0])){f&&n[0]instanceof HTMLElement&&n[0].focus({preventScroll:!0});return}for(let A of n.slice(1)){if(!A.isConnected)continue;let x=Wr(A,n[0]);if(x){x.focus({preventScroll:!0}),n=[];return}}}},m=(f,S=Date.now()+2500)=>{l(100,()=>{c(f);let v=a.activeElement;(v===null||v===a.body||v===a.documentElement)&&n.length>0&&Date.now()<S&&m(f,S)})},y=()=>{r||n.length===0||(r=!0,l(60,()=>u(()=>{c(!1),m(!1)})))},g=f=>{if(!(f instanceof KeyboardEvent&&!["Enter"," ","Escape"].includes(f.key))){if(!(f instanceof KeyboardEvent)){let S=f.target instanceof Element?f.target.closest(fn):null,v=a.activeElement,A=v===null||v===a.body||v===a.documentElement;if(S&&A&&t.contains(S)){n=[];for(let x=S;x&&x!==t.parentElement;x=x.parentElement)n.push(x);l(150,()=>u(()=>{c(!1),m(!1)}));return}}!(f instanceof KeyboardEvent)&&!(f.target instanceof Node&&n[0]?.contains(f.target))||l(150,()=>u(()=>{c(!0),m(!0)}))}},b=new MutationObserver(()=>{n.length>0&&!n[0].isConnected&&y()}),R=f=>{f.relatedTarget===null&&y()};return t.addEventListener("focusin",o),t.addEventListener("focusout",R),t.addEventListener("click",g),t.addEventListener("keydown",g),b.observe(t,{childList:!0,subtree:!0}),()=>{i=!0,t.removeEventListener("focusin",o),t.removeEventListener("focusout",R),t.removeEventListener("click",g),t.removeEventListener("keydown",g),b.disconnect()}},[e])}export{me as a,Q as b,Je as c,Ga as d,Fa as e,go as f,mo as g,ho as h,Mt as i,q as j,So as k,ee as l,ue as m,Qe as n,Le as o,et as p,nt as q,Ct as r,ge as s,qa as t,ti as u,te as v,wo as w,ce as x,vo as y,ni as z,za as A,bo as B,Ot as C,oi as D,ri as E,ii as F,W as G,Gt as H,Ai as I,Ri as J,Wo as K,it as L,Ti as M,_e as N,Go as O,Mi as P,Kt as Q,Bt as R,qt as S,He as T,Gi as U,De as V,Fi as W,Ki as X,yr as Y,Yi as Z,Xi as _,qs as $,ta as aa,oe as ba,tn as ca,dt as da,na as ea,oa as fa,ra as ga,en as ha,ia,on as ja,hr as ka,aa as la,sa as ma,wr as na,vr as oa,br as pa,xr as qa,Pr as ra,Er as sa,Ar as ta,kr as ua,la as va,da as wa,an as xa,ua as ya,gt as za,ca as Aa,pa as Ba,fa as Ca,ya as Da,ma as Ea,ga as Fa,Ir as Ga,ha as Ha,ln as Ia,La as Ja,_a as Ka,Ha as La,va as Ma,ba as Na,Pa as Oa,we as Pa,Wa as Qa,Ea as Ra,St as Sa,_r as Ta,Ra as Ua,Oa as Va};
|
|
2
|
-
/*! Bundled license information:
|
|
3
|
-
|
|
4
|
-
react/cjs/react.production.js:
|
|
5
|
-
(**
|
|
6
|
-
* @license React
|
|
7
|
-
* react.production.js
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*)
|
|
14
|
-
|
|
15
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
16
|
-
(**
|
|
17
|
-
* @license React
|
|
18
|
-
* react-jsx-runtime.production.js
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE file in the root directory of this source tree.
|
|
24
|
-
*)
|
|
25
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o}from"./chunk.ROZTJ6IY.js";import"./chunk.BIDL7GQD.js";import"./chunk.G4JJXA63.js";import"./chunk.M4AYA2PL.js";import"./chunk.H5S7OL2U.js";import"./chunk.T6WHGKWR.js";import"./chunk.XOZU4OFA.js";import"./chunk.Y2YYH3JN.js";import"./chunk.Q5WEOX3Q.js";import"./chunk.CGALLZ54.js";import"./chunk.WKI5INH7.js";import"./chunk.NOGGSLVG.js";import"./chunk.WVUJXDXZ.js";import"./chunk.SGCW2XRC.js";import"./chunk.ZN3PUM2I.js";import"./chunk.QIPASE42.js";import"./chunk.EVBCEEQ4.js";import"./chunk.OWT3VVOT.js";import"./chunk.NHTGAP3G.js";import"./chunk.NUYA4BWI.js";import"./chunk.OKZT2QBM.js";import"./chunk.ACTXR2MI.js";import"./chunk.DZZL5IDD.js";import"./chunk.FQLNBIQ5.js";import"./chunk.AJZBJBMO.js";export{i as draftAnswer,h as draftFromLens,b as draftSight,l as draftView,a as isDraftFailure,c as judgeLens,d as lensEditOf,f as lensFromSpec,j as recipeDraft,g as recipeOfLens,m as refineDraft,o as runDraftTool,e as takeBackEditOf,k as templateDraft,n as withReaderLenses};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as Y,b as _,c as D,e as R,h as H,i as q,j as S,k as N,l as x,o as P,p as V}from"./chunk.2GEJNG2U.js";import{b as U}from"./chunk.OKZT2QBM.js";import{$a as F,G as T,L as j,T as A,aa as W,eb as I,ga as k,ja as B}from"./chunk.DZZL5IDD.js";function te(e,r){return e===void 0||e===!0?!0:e===!1?!1:e[r]!==!1}function ne(e){let r={};return e.query&&e.query.trim().length>0&&(r.q=e.query),e.archived!==void 0&&e.archived!==!1&&(r.archived=String(e.archived)),e.sort&&(r.sort=e.sort.direction==="desc"?`${e.sort.by}:desc`:e.sort.by),e.filter?.length&&(r.filter=e.filter.map(n=>`${n.key}:${n.value}`).join(",")),e.group&&(r.group=e.group.bucket?`${e.group.by}:${e.group.bucket}`:e.group.by),r}function oe(e,r){let n=[],d={};if(e.query&&(d.query=e.query),e.archived!==void 0&&e.archived!==!1&&(d.archived=e.archived),e.sort&&(r.sorts.some(u=>u.key===e.sort.by)?d.sort=e.sort:n.push(`sort ${e.sort.by}`)),e.filter){let u=e.filter.filter(c=>r.filters.find(l=>l.key===c.key)?!0:(n.push(`filter ${c.key}`),!1));u.length>0&&(d.filter=u)}return e.group&&(r.groups.some(u=>u.key===e.group.by)?d.group=e.group:n.push(`group ${e.group.by}`)),{arrangement:d,dropped:n}}function O(e,r){return B(e.schema.tryDefinition(r.kind),S(r))}var ie=(e,r)=>e==null?r==null?0:1:r==null?-1:typeof e=="number"&&typeof r=="number"?e-r:typeof e=="boolean"&&typeof r=="boolean"?e===r?0:e?1:-1:String(e).localeCompare(String(r),void 0,{numeric:!0,sensitivity:"base"});function se(e,r,n){if(n==="label")return O(e,r);let d=e.schema.tryDefinition(r.kind);return d&&n in(d.fields.shape??{})?F(q(r),n,e.today??j()):d?.computed?.[n]!==void 0?e.read?.(r,n):N(e.graph,r.id,n).map(c=>O(e,c)).sort()[0]}var de=/^(\d{4})-(\d{2})-(\d{2})/;function Z(e,r){if(T.test(e)){let[s,i]=[e.slice(0,4),e.slice(5,7)];return r==="year"?`${s}-01-01`:r==="decade"?`${String(Number(s)-Number(s)%10).padStart(4,"0")}-01-01`:r==="month"&&i?`${s}-${i}-01`:e}let n=de.exec(e);if(!n)return;let[,d,u,c]=n;if(r==="day")return`${d}-${u}-${c}`;if(r==="month")return`${d}-${u}-01`;if(r==="year")return`${d}-01-01`;if(r==="decade")return`${String(Number(d)-Number(d)%10).padStart(4,"0")}-01-01`;let f=new Date(Date.UTC(Number(d),Number(u)-1,Number(c))),l=(f.getUTCDay()+6)%7;return f.setUTCDate(f.getUTCDate()-l),f.toISOString().slice(0,10)}function ue(e,r){return T.test(e)?A(e):r==="month"?W(e):r==="week"?`Week of ${A(e)}`:r==="year"?e.slice(0,4):r==="decade"?`The ${e.slice(0,4)}s`:A(e)}function fe(e,r,n){return z(e,n)(r)}function z(e,r){let{words:n,conditions:d}=P(r);if(n.length===0&&d.length===0)return()=>!0;let u=new Map,c=f=>{let l=u.get(f);return l||(l=new Set(R(e.schema,f).filters.map(s=>s.key)),u.set(f,l)),l};return f=>{let l=c(f.kind),s=d.filter(i=>l.has(i.key));return s.every(i=>x(e,f,i))?n.length>0?V(e.schema.tryDefinition(f.kind),S(f),n,e.searchIn)!==void 0:s.length>0:!1}}function le(e,r,n){let d=r.query?.trim(),u=r.archived===void 0?e:e.filter(t=>I(t,r.archived)),c=d?u.filter(z(n,d)):u,f=r.filter?.length?c.filter(t=>r.filter.every(a=>x(n,t,a))):[...c],l=[];for(let t=r.sort;t&&l.length<4;t=t.then)l.push(t);let s=l.length>0?f.map((t,a)=>({node:t,index:a,values:l.map(o=>se(n,t,o.by))})).sort((t,a)=>{for(let[o,p]of l.entries()){let[b,E]=[t.values[o],a.values[o]],G=ie(b,E),M=p.direction==="desc"&&G!==0&&b!==void 0&&E!==void 0?-G:G;if(M!==0)return M}return t.index-a.index}).map(t=>t.node):f,i=r.group;if(!i)return{nodes:s,groups:[{key:"",label:"",nodes:s}],grouped:!1};let y=new Map,g=(t,a,o)=>{let p=y.get(t)??{label:a,nodes:[]};p.nodes.push(o),y.set(t,p)},L=s[0],m=L?n.schema.tryDefinition(L.kind):void 0,w=m?.fields.shape??{},X=m?Y(m,i.by):k(i.by),$=i.by in w,h=$?_(w[i.by]):void 0,ee=D(n.schema,L?.kind??"").find(t=>t.key===i.by)?.label,v=$?`No ${X.toLowerCase()}`:`Without ${(ee??k(i.by)).toLowerCase()}`,K=$?new Map:U([...new Map(s.flatMap(t=>N(n.graph,t.id,i.by)).map(t=>[t.id,t])).values()].map(S),t=>n.schema.tryDefinition(t));for(let t of s){if($){let o=F(q(t),i.by,n.today??j());if(o==null||o==="")g("",v,t);else if(h==="date"){let p=i.bucket??"day",b=Z(String(o),p);b?g(b,ue(b,p),t):g("",v,t)}else if(h==="boolean")g(o?"1":"0",o?"Yes":"No",t);else{let p=m?.display?.format?.[i.by];g(String(o),p?p(o):h==="choice"?k(String(o)):String(o),t)}continue}let a=N(n.graph,t.id,i.by).map(o=>({id:o.id,label:K.has(o.id)?`${O(n,o)} \xB7 ${K.get(o.id)}`:O(n,o)})).sort((o,p)=>o.label.localeCompare(p.label));a.length===0?g("",v,t):g(a.map(o=>o.id).join(","),a.map(o=>o.label).join(", "),t)}let C=h==="choice"?H(w[i.by]):void 0,re=[...y.entries()].sort(([t,a],[o,p])=>t===""?1:o===""?-1:C?C.indexOf(t)-C.indexOf(o):h==="boolean"?o.localeCompare(t):h==="date"?t.localeCompare(o):a.label.localeCompare(p.label)).map(([t,a])=>({key:t,label:a.label,nodes:a.nodes}));return{nodes:s,groups:re,grouped:!0}}function Q(e){if(e===void 0)return;if(typeof e=="string")return{by:e,direction:"asc"};let r=e.then===void 0?void 0:typeof e.then=="string"?{by:e.then,direction:"asc"}:{by:e.then.by,direction:e.then.direction??"asc"};return{by:e.by,direction:e.direction??"asc",...r?{then:r}:{}}}function J(e){if(e!==void 0)return typeof e=="string"?{by:e}:e}function ae(e){let r=Q(e?.sort),n=J(e?.group);if(!(!r&&!n))return{...r?{sort:r}:{},...n?{group:{by:n.by}}:{}}}var ce=(e,r)=>r?e==="1"?"true":"false":e;function pe(e,r,n){let d=n.type==="boolean",u=d?["true","false"]:n.options??[],c=[...new Set([...(r.order??[]).filter(s=>u.includes(s)),...u])],f=r.closed??[],l=s=>{if(s.key==="")return[1,0];let i=ce(s.key,d);if(f.includes(i))return[2,f.indexOf(i)];let y=c.indexOf(i);return[0,y<0?c.length:y]};return e.map((s,i)=>({group:s,at:i,rank:l(s)})).sort((s,i)=>s.rank[0]-i.rank[0]||s.rank[1]-i.rank[1]||s.at-i.at).map(({group:s,rank:i})=>({...s,closed:i[0]===2}))}export{J as a,ae as b,pe as c,te as d,ne as e,oe as f,fe as g,le as h};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{$a as gn,F as V,G,H as an,I as z,Ia as cn,J as D,L as j,M as sn,Q as dn,Qa as yn,T as _,U as ln,V as un,W as H,Wb as X,X as fn,Y,Z as q,bc as hn,da as J,db as pn,fa as B,qa as Q}from"./chunk.DZZL5IDD.js";var Pn=864e5,P=e=>String(e).padStart(2,"0"),v=e=>new Date(e).toISOString().slice(0,10),R=e=>Date.UTC(+e.slice(0,4),+e.slice(5,7)-1,+e.slice(8,10)),vn=(e,t)=>v(R(e)+t*Pn),kn=e=>new Date(R(e)).getUTCDay(),Un=e=>/T\d\d:\d\d(:[\d.]+)?(Z|[+-]\d\d:?\d\d)$/.test(e),nn=["sun","mon","tue","wed","thu","fri","sat"],xn=e=>sn(e)??"UTC";function Sn(e,t){if(V.test(e))return v(R(e))===e?{day:e}:void 0;if(G.test(e))return{day:e.length===4?`${e}-01-01`:`${e}-01`};if(D.test(e)&&!Un(e)){let l=e.slice(0,10);return v(R(l))!==l?void 0:{day:l,minutes:Number(e.slice(11,13))*60+Number(e.slice(14,16))}}let s=Date.parse(e);if(!Number.isNaN(s))return{...ln(s,t),stamp:s}}var mn=["EEEE","EEE","MMMM","MMM","yyyy","HH","mm","h","a","d"],wn=/[A-Za-z]+/y;function Zn(e){let t=[],s=0;for(;s<e.length;){let l=e[s];if(l==="'"){let f="",g=s+1;for(;g<e.length;g++){if(e[g]==="'"){if(e[g+1]==="'"){f+="'",g++;continue}break}f+=e[g]}if(g>=e.length)return`the quoted words in "${e}" are never closed`;t.push({text:f}),s=g+1;continue}wn.lastIndex=s;let u=wn.exec(e);if(u){let f=u[0];for(;f.length>0;){let g=mn.find($=>f.startsWith($));if(!g)return`"${f}" is not a piece of a date pattern; the pieces are ${mn.map($=>`${$}`).join(", ")}, and other words go in single quotes`;t.push(g),f=f.slice(g.length)}s+=u[0].length;continue}t.push({text:l}),s++}return t}var $n="UTC",bn=new Map;function Kn(e,t){let s=`${e}|${JSON.stringify(t)}`,l=bn.get(s);if(!l){try{l=new Intl.DateTimeFormat(e,{...t,timeZone:$n})}catch{l=new Intl.DateTimeFormat("en-US",{...t,timeZone:$n})}bn.set(s,l)}return l}var C=(e,t,s,l)=>Kn(e,t).formatToParts(s).find(u=>u.type===l)?.value??"";function An(e,t,s){let l=Zn(t);if(typeof l=="string")return{problem:l};let u=dn(s),f=R(e.day),g=e.minutes,$=g===void 0?void 0:f+g*6e4;return l.map(x=>{if(typeof x!="string")return x.text;switch(x){case"EEEE":return C(u,{weekday:"long"},f,"weekday");case"EEE":return C(u,{weekday:"short"},f,"weekday");case"MMMM":return C(u,{month:"long"},f,"month");case"MMM":return C(u,{month:"short"},f,"month");case"yyyy":return e.day.slice(0,4);case"d":return String(Number(e.day.slice(8,10)));case"HH":return g===void 0?"":P(Math.floor(g/60));case"mm":return g===void 0?"":P(g%60);case"h":return g===void 0?"":String((Math.floor(g/60)+11)%12+1);case"a":return $===void 0?"":C(u,{hour:"numeric",hour12:!0},$,"dayPeriod")}}).join("")}var zn=/^(\d{1,2}):(\d{2})$/;function Nn(e){let t=zn.exec(e.trim());if(!t)return;let s=Number(t[1]),l=Number(t[2]);return s<=23&&l<=59?s*60+l:void 0}var Mn=e=>new Date(e).toISOString().replace(/\.\d{3}Z$/,"Z"),Hn=(e,t)=>`${e}T${P(Math.floor(t/60))}:${P(t%60)}`;function On(e,t,s){return Mn(un(e.day,t,s))}function En(e,t){if(e.stamp!==void 0)return Mn(e.stamp+t*6e4);let s=R(e.day)+(e.minutes??0)*6e4+t*6e4,l=v(s);return Hn(l,Math.round((s-R(l))/6e4))}var Rn=e=>nn[kn(e.day)];function Tn(e,t){let s=(kn(e.day)-nn.indexOf(t)+7)%7;return vn(e.day,-s)}var Fn=e=>typeof e=="string"&&nn.includes(e);var Yn=1e4,w=class{constructor(t){this.nodes=t}},Dn=Symbol.for("@graview/core:far-record"),qn=e=>typeof e=="object"&&e!==null&&e[Dn]===!0;function Jn(e){let t={...e.fields,id:`@${e.address}/${e.kind}:${e.id}`,kind:`@${e.address}/${e.kind}`,label:e.label};return Object.defineProperty(t,Dn,{value:!0}),t}function he(e){let t=`the linked record in ${e.ref.address}`;return e.reason==="denied"?`${t} is not one this viewer may open`:`${t} has not been read`}var Bn="",y=class extends Error{constructor(s,l){super(s);this.sentence=s;this.at=l}},en=class extends y{},T=e=>e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof w)&&typeof e.id=="string",Gn=e=>{let t=new Set;return new w(e.filter(s=>!t.has(s.id)&&t.add(s.id)))},k=e=>e===null?"nothing":e instanceof w?"a set of records":Array.isArray(e)?"a list":T(e)?"a record":typeof e=="string"?"a word":typeof e;function Qn(e,t){if(!G.test(e)&&!G.test(t))return;let s=f=>z(D.test(f)?f.slice(0,10):f),l=s(e),u=s(t);return l&&u?[l,u]:void 0}function Wn(e,t){let s=t.budget??Yn,l=(n,d)=>{if(s-=n,s<0)throw new en("this rule looks at too much of the graph to judge in one go",d)},u=t.today??j(),f=t.now??new Date().toISOString(),g=xn(t.timeZone),$=new Map,x=new Set,S=t.bindings,rn=(n,d,o,a)=>{let p=`${n?.id}\0${d}`;if($.has(p))return $.get(p);if(x.has(p))throw new y(`"${d}"${n?` of ${Q(n.kind)}`:""} depends on itself`,a);x.add(p);let r=S;S=void 0;try{let i=A(o,n);return $.set(p,i),i}finally{S=r,x.delete(p)}},I=(n,d,o)=>{l(1,o);let a=t.kinds.get(n.kind),p=a?.computed?.get(d);if(p)return rn(n,d,p,o);let r=a?.linked?.get(d);if(r){let h=cn(Object.hasOwn(n,d)?n[d]:void 0,r);l(h.length,o);let b=t.linked??yn(t.graph),m=h.flatMap(N=>{let K=b?b(N):{unread:!0};return"record"in K?[Jn(K.record)]:(t.onUnread?.({relation:d,ref:N,reason:"denied"in K?"denied":"unread"}),[])});return r.cardinality==="one"?m[0]??null:new w(m)}let i=Object.hasOwn(n,d);if(a?.fields.has(d)||i){let h=i?gn(n,d,u):void 0;return h===void 0?null:h}let c=a?.edges.get(d);if(c){let h=t.graph.out(n.id,d);return l(h.length,o),c==="one"?h[0]??null:new w(h)}if(d==="id")return n.id;if(qn(n))return null;throw new y(`${Q(n.kind)} has no field or relation called "${d}"`,o)},M=(n,d,o)=>{if(n instanceof w)return n;if(n===null)return new w([]);if(T(n))return new w([n]);throw new y(`${o}(\u2026) needs a set of records, and was given ${k(n)}`,d)},E=(n,d,o)=>{if(n===null)return null;if(typeof n=="string")return n;if(typeof n=="number"||typeof n=="boolean")return String(n);throw new y(`${o}(\u2026) needs a word, and was given ${k(n)}`,d)},Z=(n,d,o)=>{let a=E(n,d,o);if(a===null)return null;let p=G.test(a)?z(a).from:a,r=Date.parse(p.length===10?`${p}T00:00:00Z`:p);if(Number.isNaN(r))throw new y(`${o}(\u2026) needs a date, and "${a}" is not one`,d);return r},W=(n,d,o)=>{if(n===null)return null;if(typeof n!="string")throw new y(`${o}(\u2026) needs a date, and was given ${k(n)}`,d);let a=Sn(n,g);if(!a)throw new y(`${o}(\u2026) needs a date, and "${n}" is not one`,d);return a},F=(n,d)=>T(n)&&T(d)?n.id===d.id:T(n)&&typeof d=="string"?n.id===d:typeof n=="string"&&T(d)?n===d.id:Array.isArray(n)&&Array.isArray(d)?n.length===d.length&&n.every((o,a)=>F(o,d[a])):n===d,O=(n,d,o)=>{if(n===null)return!1;if(typeof n=="boolean")return n;throw new y(`${o} must be true or false, and was ${k(n)}`,d)},L=(n,d)=>A(d,n);function A(n,d){switch(l(1,n.at),n.t){case"lit":return n.value;case"list":return n.items.map(o=>A(o,d));case"ident":{let o=S&&Object.hasOwn(S,n.name)?S[n.name]:void 0;if(o!==void 0)return o;if(d)return I(d,n.name,n.at);throw new y(`"${n.name}" means nothing in a rule over the whole graph`,n.at)}case"member":{let o=A(n.object,d);if(o===null)return null;if(T(o))return I(o,n.name,n.at);throw new y(`".${n.name}" needs a record before it, and was given ${k(o)}`,n.at)}case"unary":{let o=A(n.operand,d);if(n.op==="!")return!O(o,n.at,"what follows not");if(o===null)return null;if(typeof o!="number")throw new y(`"-" needs a number, and was given ${k(o)}`,n.at);return-o}case"where":{let o=M(A(n.set,d),n.at,"where");return l(o.nodes.length,n.at),new w(o.nodes.filter(a=>O(L(a,n.filter),n.at,"a where condition")))}case"binary":return Ln(n,d);case"call":return jn(n,d)}}function Ln(n,d){if(n.op==="&&")return O(A(n.left,d),n.at,"each side of and")&&O(A(n.right,d),n.at,"each side of and");if(n.op==="||")return O(A(n.left,d),n.at,"each side of or")||O(A(n.right,d),n.at,"each side of or");let o=A(n.left,d),a=A(n.right,d);if(n.op==="&"||n.op==="|"||n.op==="-"&&(o instanceof w||a instanceof w)){let p=M(o,n.at,n.op).nodes,r=M(a,n.at,n.op).nodes;l(p.length+r.length,n.at);let i=new Set(r.map(c=>c.id));return Gn(n.op==="|"?[...p,...r]:p.filter(c=>i.has(c.id)===(n.op==="&")))}switch(n.op){case"==":return F(o,a);case"!=":return!F(o,a);case"in":{if(a===null)return!1;if(a instanceof w)return a.nodes.some(p=>F(o,p));if(Array.isArray(a))return a.some(p=>F(o,p));if(typeof a=="string"&&typeof o=="string")return a.includes(o);throw new y(`"in" needs a list or a set on its right, and was given ${k(a)}`,n.at)}case"<":case"<=":case">":case">=":{if(o===null||a===null)return!1;if(!(typeof o=="number"&&typeof a=="number"||typeof o=="string"&&typeof a=="string"))throw new y(`cannot compare ${k(o)} with ${k(a)}`,n.at);let r=typeof o=="string"&&typeof a=="string"?Qn(o,a):void 0;if(r){let[i,c]=r,h=i.to<c.from,b=i.from>c.to,m=i.from===c.from&&i.to===c.to;return n.op==="<"?h:n.op==="<="?h||m:n.op===">"?b:b||m}return n.op==="<"?o<a:n.op==="<="?o<=a:n.op===">"?o>a:o>=a}default:{if(o===null||a===null)return null;if(n.op==="+"&&(typeof o=="string"||typeof a=="string")){let p=`${E(o,n.at,"+")}${E(a,n.at,"+")}`;if(p.length>1e4)throw new y("that makes a word too long",n.at);return p}if(typeof o!="number"||typeof a!="number")throw new y(`"${n.op}" needs numbers, and was given ${k(o)} and ${k(a)}`,n.at);return(n.op==="/"||n.op==="%")&&a===0?null:n.op==="+"?o+a:n.op==="-"?o-a:n.op==="*"?o*a:n.op==="/"?o/a:o%a}}}function jn(n,d){let o=(r,i=r)=>{if(n.args.length<r||n.args.length>i)throw new y(`${n.fn}(\u2026) takes ${r===i?r:`${r} to ${i}`} argument${i===1?"":"s"}`,n.at)},a=r=>A(n.args[r],d),p=r=>{let i=a(r);if(typeof i!="string")throw new y(`${n.fn}(\u2026) needs a quoted name, like ${n.fn}('name')`,n.at);return i};switch(n.fn){case"out":case"in":{o(1,2);let r=(h,b)=>n.fn==="out"?t.graph.out(h,b):t.graph.in(h,b);if(n.args.length===2){let h=M(a(0),n.at,n.fn).nodes,b=p(1);return Gn(h.flatMap(m=>{let N=r(m.id,b);return l(N.length+1,n.at),N}))}let i=p(0);if(!d)throw new y(`${n.fn}('${i}') needs a record to start from`,n.at);let c=r(d.id,i);return l(c.length,n.at),new w(c)}case"all":{o(1,2);let r=t.graph.nodesOfKind(p(0),{archived:n.args.length===2?a(1):!1});return l(r.length,n.at),new w(r)}case"archived":return o(0,1),pn(n.args.length===1?a(0):d);case"count":return o(1),M(a(0),n.at,"count").nodes.length;case"exists":return o(1),M(a(0),n.at,"exists").nodes.length>0;case"every":case"some":{o(2);let r=M(a(0),n.at,n.fn);l(r.nodes.length,n.at);let i=c=>O(L(c,n.args[1]),n.at,`the condition in ${n.fn}(\u2026)`);return n.fn==="every"?r.nodes.every(i):r.nodes.some(i)}case"sum":case"min":case"max":{o(2);let r=M(a(0),n.at,n.fn);l(r.nodes.length,n.at);let i=n.args[1],c=i.t==="lit"&&typeof i.value=="string"?i.value:void 0,h=i.t==="ident"?`'${i.name}'`:c!==void 0?`'${c}'`:"\u2026",b=r.nodes.map(m=>i.t==="ident"?I(m,i.name,n.at):c!==void 0?I(m,c,n.at):L(m,i)).filter(m=>{if(m===null)return!1;if(typeof m!="number")throw new y(`${n.fn}(\u2026, ${h}) needs a number for each member, and found ${k(m)}`,n.at);return!0});return n.fn==="sum"?b.reduce((m,N)=>m+N,0):b.length===0?null:n.fn==="min"?Math.min(...b):Math.max(...b)}case"fact":{o(1);let r=p(0),i=t.kinds.get(Bn)?.computed?.get(r);if(!i)throw new y(`no fact is called "${r}"`,n.at);return rn(null,r,i,n.at)}case"first":return o(1),M(a(0),n.at,"first").nodes[0]??null;case"sort":{o(2,3);let r=M(a(0),n.at,"sort"),i=n.args.length===3?a(2):"asc";if(i!=="asc"&&i!=="desc")throw new y("sort(\u2026) goes 'asc' or 'desc'",n.at);let c=r.nodes.length;l(c+c*Math.ceil(Math.log2(c+1)),n.at);let h=r.nodes.map((m,N)=>({node:m,i:N,key:L(m,n.args[1])})),b=i==="desc"?-1:1;return h.sort((m,N)=>on(m.key,N.key,b,n.at)||m.i-N.i),new w(h.map(m=>m.node))}case"either":{if(n.args.length<1)throw new y("either(\u2026) takes at least one argument",n.at);for(let r=0;r<n.args.length;r++){let i=a(r);if(i!==null&&!(i instanceof w&&i.nodes.length===0))return i}return null}case"present":{o(1);let r=a(0);return r===null||r===""?!1:Array.isArray(r)?r.length>0:r instanceof w?r.nodes.length>0:!0}case"len":{o(1);let r=a(0);if(r===null)return 0;if(typeof r=="string"||Array.isArray(r))return r.length;if(r instanceof w)return r.nodes.length;throw new y(`len(\u2026) needs a word or a list, and was given ${k(r)}`,n.at)}case"contains":case"startsWith":{o(2);let r=a(0),i=a(1);if(r===null||i===null)return!1;if(n.fn==="contains"&&Array.isArray(r))return r.some(b=>F(b,i));let c=E(r,n.at,n.fn),h=E(i,n.at,n.fn);return n.fn==="contains"?c.toLowerCase().includes(h.toLowerCase()):c.startsWith(h)}case"lower":{o(1);let r=E(a(0),n.at,"lower");return r===null?null:r.toLowerCase()}case"concat":{if(n.args.length<1)throw new y("concat(\u2026) takes at least one argument",n.at);let r="";for(let i=0;i<n.args.length;i++)r+=E(a(i),n.at,"concat")??"";if(r.length>1e4)throw new y("that makes a word too long",n.at);return r}case"format":{o(2);let r=W(a(0),n.at,"format"),i=a(1);if(typeof i!="string")throw new y("format(\u2026) says its pattern in quotes, like format(start, 'EEE h:mm a')",n.at);if(r===null)return null;let c=An(r,i,t.locale);if(typeof c!="string")throw new y(c.problem,n.at);return c}case"datetime":case"at":{o(2);let r=W(a(0),n.at,n.fn),i=a(1);if(i===null||r===null)return null;let c=typeof i=="string"?Nn(i):void 0;if(c===void 0)throw new y(`${n.fn}(\u2026) needs a time of day written like '09:30', and was given ${typeof i=="string"?`"${i}"`:k(i)}`,n.at);return On(r,c,g)}case"addMinutes":{o(2);let r=W(a(0),n.at,"addMinutes"),i=a(1);if(r===null||i===null)return null;if(typeof i!="number"||!Number.isFinite(i))throw new y(`addMinutes(\u2026) needs a number of minutes, and was given ${k(i)}`,n.at);return En(r,Math.round(i))}case"weekday":{o(1);let r=W(a(0),n.at,"weekday");return r===null?null:Rn(r)}case"startOfWeek":{o(1,2);let r=W(a(0),n.at,"startOfWeek"),i=n.args.length===2?a(1):"mon";if(!Fn(i))throw new y("startOfWeek(\u2026) starts the week on a day said 'mon' to 'sun'",n.at);return r===null?null:Tn(r,i)}case"today":return o(0),u;case"now":return o(0),f;case"date":{o(1);let r=Z(a(0),n.at,"date");return r===null?null:new Date(r).toISOString().slice(0,10)}case"days":case"hours":{o(2);let r=Z(a(0),n.at,n.fn),i=Z(a(1),n.at,n.fn);if(r===null||i===null)return null;let c=(i-r)/(n.fn==="days"?864e5:36e5);return n.fn==="days"?Math.round(c):c}case"round":{o(1,2);let r=a(0);if(r===null)return null;if(typeof r!="number")throw new y(`round(\u2026) needs a number, and was given ${k(r)}`,n.at);let i=n.args.length===2?a(1):0;if(typeof i!="number"||!Number.isInteger(i)||i<0||i>12)throw new y("round(\u2026, places) takes a whole number of places from 0 to 12",n.at);let c=10**i,h=Math.sign(r)*Math.round(Math.abs(r)*c*(1+Number.EPSILON))/c;return Object.is(h,-0)?0:h}case"if":return o(3),O(a(0),n.at,"the condition in if(\u2026)")?a(1):a(2);default:throw new y(`"${n.fn}" is not a function the rule language knows`,n.at)}}function on(n,d,o,a){if(n===null||d===null)return n===d?0:n===null?1:-1;if(Array.isArray(n)&&Array.isArray(d)){for(let r=0;r<Math.max(n.length,d.length);r++){let i=on(n[r]??null,d[r]??null,o,a);if(i!==0)return i}return 0}let p=r=>typeof r=="number"||typeof r=="string"||typeof r=="boolean"?typeof r:k(r);if(p(n)!==p(d)||typeof n=="object"||typeof d=="object")throw new y(`sort(\u2026) cannot put ${k(n)} and ${k(d)} in order`,a);return typeof n=="string"?o*(n<d?-1:n>d?1:0):o*(Number(n)-Number(d))}return A(e,t.subject)}var me=["out","in","all","count","exists","every","some","sum","min","max","present","len","contains","startsWith","lower","today","now","date","days","hours","if","first","sort","either","fact","archived","round","concat","format","datetime","at","addMinutes","weekday","startOfWeek"];var Xn=(e,t,s,l,u)=>({severity:"error",code:e,path:t,message:s,...l?{fix:l}:{},...u}),$e=(e,t,s,l,u)=>({...Xn(e,t,s,l,u?.length?{edits:u}:void 0),severity:"warning"}),be=e=>e.some(t=>t.severity==="error");function ne(e,t){return[...(e.edits??[]).map(s=>`${t}edit: ${JSON.stringify(s)}`),...e.details?[`${t}details: ${e.details}`]:[],...(e.fixes??[]).flatMap(s=>[`${t}fix: ${s.label}`,...(s.edits??[]).map(l=>`${t} edit: ${JSON.stringify(l)}`)])].map(s=>`
|
|
2
|
-
${s}`).join("")}function ke(e){return e.map(t=>`${t.severity==="error"?"\u2717":t.severity==="warning"?"!":"\xB7"} ${t.path||"(document)"}: ${t.message}${t.fix?` \u2014 ${t.fix}`:""}${ne(t," ")}`).join(`
|
|
3
|
-
`)}var ee=(e,t)=>e.to==="*"||e.to.includes(t);function Vn(e,t,s){let l=s(e);if(l){if(t.some(u=>l.from.includes(u)))return{step:{relation:e,out:!0},far:l.to};if(t.some(u=>ee(l,u)))return{step:{relation:e,out:!1},far:l.from}}}function Se(e,t,s,l){if(!l(t.every))return{problem:{key:"every",message:`"${t.every}" is not a kind this document declares`}};let u=Vn(t.through,[e],s);if(!u){let S=s(t.through);return{problem:{key:"through",message:S?`"${t.through}" is a relation of ${S.from.join(", ")}, not of ${e}, so a ${e} cannot be followed through it`:`"${t.through}" is not a relation any kind declares`,fix:S?`name a relation ${e} declares, or one that points at ${e}`:void 0}}}let f=u.far==="*"?"*":u.far;if(!t.via)return f==="*"||f.includes(t.every)?{plan:{every:t.every,through:u.step}}:{problem:{key:"through",message:`"${t.through}" reaches ${f.join(", ")}, not ${t.every}`,fix:`add "via": the relation from ${f.join(" or ")} to ${t.every}, or name a relation that reaches ${t.every}`}};let g=f==="*"?[t.every]:f,$=Vn(t.via,g,s);if(!$){let S=s(t.via);return{problem:{key:"via",message:S?`"${t.via}" is a relation of ${S.from.join(", ")}, which "${t.through}" does not reach`:`"${t.via}" is not a relation any kind declares`,fix:S?`name a relation of ${g.join(" or ")}, or one that points at it`:void 0}}}let x=f==="*"?[t.every]:$.far;return x==="*"||x.includes(t.every)?{plan:{every:t.every,through:u.step,via:f==="*"?{relation:$.step.relation,out:!$.step.out}:$.step}}:{problem:{key:"via",message:`"${t.via}" reaches ${x.join(", ")}, not ${t.every}`,fix:`name a relation that reaches ${t.every}`}}}var _n=(e,t,s)=>s.out?e.out(t,s.relation):e.in(t,s.relation);function Ae(e,t,s){let l=new Set;for(let u of _n(e,t.id,s.through)){if(!s.via){l.add(u.id);continue}for(let f of _n(e,u.id,s.via))l.add(f.id)}return e.nodesOfKind(s.every).filter(u=>!l.has(u.id))}var Fe=["money","percent","date","time","datetime","relative","upper","lower","count","words","and","plural","excerpt"],te={getNode:()=>{},allNodes:()=>[],allEdges:()=>[],nodesOfKind:()=>[],edgesOfKind:()=>[],out:()=>[],in:()=>[],neighbors:()=>[],has:()=>!1};function Ge(e,t,s,l=[],u,f=U){return tn(e,t,s,l,u,f)}var re=(e,t)=>e.capital?J(t):t,oe=new Set(["words","plural","relative"]);function De(e,t){let s=e[0];return!s||s.text!==void 0||!s.format||!oe.has(s.format)?t:/^[a-z][a-z'’-]*(?=\s|$|[,.;:!?])/.test(t)?J(t):t}function ae(e){return e?t=>{let s=e.tryDefinition(t.kind)?.label;return s?s(t):U(t)}:U}var Cn=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],In=["","","twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"];function ie(e,t){return!Number.isInteger(e)||e<0||e>99?q(e,t):e<20?Cn[e]:e%10===0?In[e/10]:`${In[Math.floor(e/10)]}-${Cn[e%10]}`}function se(e){return/[^aeiou]y$/i.test(e)?`${e.slice(0,-1)}ies`:/(s|x|z|ch|sh)$/i.test(e)?`${e}es`:`${e}s`}var U=e=>String(e.name??e.title??e.label??e.id);function tn(e,t,s,l=[],u,f=U){if(t==="plural"){let g=e instanceof w?e.nodes.length:Array.isArray(e)?e.length:typeof e=="number"?e:null;return g===null||l[0]===void 0?"\u2014":g===1?l[0]:l[1]??se(l[0])}if(e===null)return"\u2014";if(e instanceof w)return t==="count"?String(e.nodes.length):t==="and"?B(e.nodes.map(f)):e.nodes.map(f).join(", ");if(Array.isArray(e)){if(t==="count")return String(e.length);let g=e.map($=>tn($,void 0,s,[],u,f));return t==="and"?B(g):g.join(", ")}if(typeof e=="object")return f(e);switch(t){case"words":return typeof e=="number"?ie(e,u?.locale):String(e);case"money":return typeof e=="number"?X(e,u):String(e);case"percent":return typeof e=="number"?q(e,u?.locale,{style:"percent",maximumFractionDigits:0}):String(e);case"upper":return String(e).toUpperCase();case"lower":return String(e).toLowerCase();case"excerpt":return hn(String(e),Number(l[0])||void 0);case"date":return _(Y(String(e),u?.timeZone)??String(e).slice(0,10),u?.locale);case"time":return typeof e=="string"&&V.test(e)?_(e,u?.locale):fn(String(e),u?.locale,u?.timeZone);case"datetime":return typeof e=="string"&&V.test(e)?_(e,u?.locale):H(String(e),u?.locale,u?.timeZone);case"relative":{let g=Y(String(e),u?.timeZone),$=g===void 0?Date.parse(String(e)):Date.parse(`${g}T00:00:00Z`);if(Number.isNaN($))return String(e);let x=Math.round(($-Date.parse(`${s}T00:00:00Z`))/864e5);return x===0?"today":x===1?"tomorrow":x===-1?"yesterday":x>0?`in ${x} days`:`${-x} days ago`}default:return typeof e=="string"&&an.test(e)?_(e,u?.locale):typeof e=="string"&&D.test(e)?H(e,u?.locale,u?.timeZone):String(e)}}function We(e,t){let s=t.today??j(),l=t.name??ae(t.graph?.schema);return e.map(u=>{if(u.text!==void 0)return u.text;try{let f=Wn(u.expr,{graph:t.graph??te,subject:t.node,kinds:t.kinds,today:s,budget:t.budget??500,...t.bindings?{bindings:t.bindings}:{}});return re(u,tn(f,u.format,s,u.formatArgs,t.money,l))}catch(f){if(f instanceof y)return"\u2014";throw f}}).join("")}export{w as a,he as b,Bn as c,y as d,en as e,Wn as f,me as g,Xn as h,$e as i,be as j,ke as k,Fe as l,te as m,Ge as n,re as o,De as p,ae as q,We as r,Se as s,Ae as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as b,P as w,R as N,S,U as O,V as W,Z as m}from"./chunk.DZZL5IDD.js";var x=864e5,L=/^(\d{4})-(\d{2})-(\d{2})/,g=e=>String(e).padStart(2,"0"),A=e=>new Date(e).toISOString().slice(0,10),a=e=>Date.UTC(+e.slice(0,4),+e.slice(5,7)-1,+e.slice(8,10)),p=(e,n)=>A(a(e)+n*x),F=e=>new Date(a(e)).getUTCDay();function c(e,n,r){if(!(n>=1&&n<=12&&r>=1&&r<=31))return;let i=`${String(e).padStart(4,"0")}-${g(n)}-${g(r)}`;return A(a(i))===i?i:void 0}function I(e=new Date){let n=N();return n?O(e.getTime(),n):{day:`${e.getFullYear()}-${g(e.getMonth()+1)}-${g(e.getDate())}`,minutes:e.getHours()*60+e.getMinutes()}}var h=e=>/T\d\d:\d\d(:[\d.]+)?(Z|[+-]\d\d:?\d\d)$/.test(e);function l(e){if(typeof e!="string")return;if(h(e)){let i=new Date(e);return Number.isNaN(i.getTime())?void 0:I(i)}let n=/^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2}))?/.exec(e);if(!n||!c(Number(n[1]),Number(n[2]),Number(n[3])))return;let r=e.slice(0,10);return n[4]===void 0?{day:r}:{day:r,minutes:Number(n[4])*60+Number(n[5])}}function D(e,n){if(!n.time)return e.day;let r=e.minutes??9*60;if(!n.instant)return`${e.day}T${g(Math.floor(r/60))}:${g(r%60)}`;let i=N(),[,t,o,d]=L.exec(e.day);return(i?new Date(W(e.day,r,i)):new Date(Number(t),Number(o)-1,Number(d),Math.floor(r/60),r%60)).toISOString().replace(/\.\d{3}Z$/,"Z")}function P(e,n=new Date){let r=S(),i=r;try{i=new Intl.DateTimeFormat(e??b,{timeZoneName:"short",timeZone:r}).formatToParts(n).find(t=>t.type==="timeZoneName")?.value??r}catch{i=r}return{zone:r,short:i}}function z(e,n,r,i){let t=l(n);if(!t)return r;let o=e===void 0?void 0:l(e),d=r===void 0?void 0:l(r),u=s=>a(s.day)+(s.minutes??0)*6e4,f=(s,$)=>{let y=u(s)+$;return{day:A(y),...i.time?{minutes:Math.round(y%x/6e4)}:{}}};return o&&d?D(f(d,u(t)-u(o)),i):d&&u(d)>=u(t)?r:i.time?D(f(t,36e5),i):r}var Y=/^(start|starts|startsAt|startsOn|startAt|begins|from|opens|checkIn)$/i,B=/^(end|ends|endsAt|endsOn|endAt|until|to|finish|finishes|closes|through|checkOut)$/i;function Z(e,n={}){let r=(n.start&&e.includes(n.start)?n.start:void 0)??e.find(t=>Y.test(t)),i=(n.end&&e.includes(n.end)?n.end:void 0)??e.find(t=>t!==r&&B.test(t));return r&&i?{start:r,end:i}:void 0}var C=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],H=["sun","mon","tue","wed","thu","fri","sat"],T="(jan(?:uary)?|feb(?:ruary)?|mar(?:ch)?|apr(?:il)?|may|june?|july?|aug(?:ust)?|sept?(?:ember)?|oct(?:ober)?|nov(?:ember)?|dec(?:ember)?)",E="(sun(?:day)?|mon(?:day)?|tue(?:s|sday)?|wed(?:nesday)?|thu(?:r|rs|rsday)?|fri(?:day)?|sat(?:urday)?)",_=e=>C.indexOf(e.slice(0,3))+1,M=e=>e===void 0?void 0:e.length===2?2e3+Number(e):Number(e);function U(e){try{let n=new Intl.DateTimeFormat(e,{month:"numeric",day:"numeric"}).formatToParts(0).map(r=>r.type);return n.indexOf("month")<n.indexOf("day")}catch{return!0}}function v(e){let n=(t,o)=>({minutes:o,rest:`${e.slice(0,t.index)} ${e.slice(t.index+t[0].length)}`}),r=/\b(noon|midday)\b/.exec(e);if(r)return n(r,12*60);if(r=/\bmidnight\b/.exec(e),r)return n(r,0);if(r=/\b(\d{1,2})(?::(\d{2}))?\s*([ap])\.?m?\.?(?=\s|$)/.exec(e),r){let t=Number(r[1]),o=Number(r[2]??0);return t<1||t>12||o>59?{rest:e,bad:!0}:n(r,(t%12+(r[3]==="p"?12:0))*60+o)}if(r=/\b(\d{1,2}):(\d{2})\b/.exec(e),r){let t=Number(r[1]),o=Number(r[2]);return t>23||o>59?{rest:e,bad:!0}:n(r,t*60+o)}if(r=/\bat\s+(\d{1,2})\b/.exec(e),r){let t=Number(r[1]);return t>23?{rest:e,bad:!0}:n(r,(t>=1&&t<=7?t+12:t)*60)}let i=/\b(morning|afternoon|evening|tonight)\b/.exec(e);return i?{minutes:{morning:9,afternoon:15,evening:18,tonight:20}[i[1]]*60,rest:i[1]==="tonight"?`${e.slice(0,i.index)} today ${e.slice(i.index+i[0].length)}`:`${e.slice(0,i.index)} ${e.slice(i.index+i[0].length)}`}:{rest:e}}function K(e,n,r){let i=e.replace(/\b(on|at|the|of|this)\b/g," ").replace(/\s+/g," ").trim();if(i==="")return null;if(i==="today"||i==="now")return n;if(i==="tomorrow"||i==="tmrw"||i==="tmr")return p(n,1);if(i==="yesterday")return p(n,-1);if(i==="next week")return p(n,7);let t=/^in (\d{1,3}) (day|days|week|weeks)$/.exec(i);if(t)return p(n,Number(t[1])*(t[2].startsWith("week")?7:1));if(t=new RegExp(`^(next )?${E}$`).exec(i),t){let s=(H.indexOf(t[2].slice(0,3))-F(n)+7)%7;return p(n,t[1]&&s===0?7:s)}if(t=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(i),t)return c(Number(t[1]),Number(t[2]),Number(t[3]));let o=i.replace(new RegExp(`^${E} `),"");t=new RegExp(`^(\\d{1,2})(?:st|nd|rd|th)? ${T}(?: (\\d{4}))?$`).exec(o);let d=t?{date:t[1],month:t[2],year:t[3]}:void 0;t=new RegExp(`^${T} (\\d{1,2})(?:st|nd|rd|th)?(?: (\\d{4}))?$`).exec(o);let u=d??(t?{date:t[2],month:t[1],year:t[3]}:void 0);if(u)return R(n,M(u.year),_(u.month),Number(u.date));if(t=/^(\d{1,2})[/.-](\d{1,2})(?:[/.-](\d{2}|\d{4}))?$/.exec(o),t){let[f,s]=[Number(t[1]),Number(t[2])],[$,y]=U(r)?[f,s]:[s,f];return R(n,M(t[3]),$,y)}}function R(e,n,r,i){if(n!==void 0)return c(n,r,i);let t=Number(e.slice(0,4)),o=c(t,r,i);return o===void 0?c(t+1,r,i):a(e)-a(o)>183*x?c(t+1,r,i):o}function q(e){if(typeof e=="number")return Number.isInteger(e)&&e>=1e3&&e<=9999?String(e):void 0;let n=String(e).trim().toLowerCase().replace(/,/g," ").replace(/\s+/g," ");if(/^\d{4}$/.test(n))return Number(n)>=1e3?n:void 0;let r=(t,o)=>o>=1&&o<=12&&Number(t)>=1e3?`${t}-${String(o).padStart(2,"0")}`:void 0,i=/^(\d{4})[-/](\d{1,2})$/.exec(n);if(i)return r(i[1],Number(i[2]));if(i=/^(\d{1,2})\/(\d{4})$/.exec(n),i)return r(i[2],Number(i[1]));if(i=new RegExp(`^${T}\\.? (\\d{4})$`).exec(n),i)return r(i[2],_(i[1]))}function G(e,n){let r=e.trim();if(h(r)){let u=l(r);if(u)return n.time?u:{day:u.day}}let i=e.toLowerCase().replace(/,/g," ").replace(/(\d{4}-\d{2}-\d{2})t(\d\d:\d\d)(:\d\d(\.\d+)?)?/,"$1 $2").replace(/\s+/g," ").trim();if(i==="")return;let t=v(i);if(t.bad)return;let o=K(t.rest,n.today,n.locale??b);if(o===void 0||o===null&&t.minutes===void 0)return;let d=o??n.base?.day??n.today;return n.time?{day:d,minutes:t.minutes??n.base?.minutes??9*60}:{day:d}}function J(e){if(e===void 0||e==="web"||e.startsWith("ai:")||e.startsWith("app:"))return;if(e==="api")return"via the API";if(e==="cli")return"via the command line";let[n,...r]=e.split(":"),i=r.join(":");return(n==="mcp"||n==="view")&&i?`via ${i}`:n==="mcp"?"via an agent's tools":`via ${e}`}var j=e=>{if(!e.currency)return{before:!0};try{let n=w(e.locale),r=new Intl.NumberFormat(n,{style:"currency",currency:e.currency}).formatToParts(1),i=r.findIndex(d=>d.type==="currency"),t=r.findIndex(d=>d.type==="integer"),o;try{o=new Intl.DisplayNames([n],{type:"currency"}).of(e.currency)}catch{}return{...i>=0?{symbol:r[i].value}:{},before:i<t,...o?{name:o}:{}}}catch{return{symbol:e.currency,before:!0}}};function Q(e){let n=e.locale;if(e.format==="money"){let{symbol:r,before:i,name:t}=j(e),o=m(1250,n,{minimumFractionDigits:2,maximumFractionDigits:2});return{...r?i?{prefix:r}:{suffix:r}:{},placeholder:o,hint:t?`in ${t}`:e.currency?`in ${e.currency}`:"an amount of money"}}return e.format==="percent"?{suffix:"%",placeholder:m(15,n),hint:"as a percent"}:{...e.unit?{suffix:e.unit}:{},placeholder:"",hint:e.unit?`in ${e.unit}`:"a number"}}function V(e,n){return e===void 0||!Number.isFinite(e)?"":n.format==="money"?m(e,n.locale,Number.isInteger(e)?{maximumFractionDigits:0}:{minimumFractionDigits:2,maximumFractionDigits:2}):n.format==="percent"?m(e*100,n.locale,{maximumFractionDigits:4}):m(e,n.locale,{maximumFractionDigits:6})}function X(e){try{let n=new Intl.NumberFormat(w(e)).formatToParts(12345.6);return{group:n.find(r=>r.type==="group")?.value??",",decimal:n.find(r=>r.type==="decimal")?.value??"."}}catch{return{group:",",decimal:"."}}}function k(e,n){let{group:r,decimal:i}=X(n),t=e.replace(/[\s ']/g,"").replace(/[−–]/g,"-");if(i!=="."&&!t.includes(i)&&/^-?\d+\.\d{1,2}$/.test(t))return Number(t);if(r&&(t=t.split(r).join("")),i!=="."&&(t=t.replace(i,".")),!/^-?(\d+\.?\d*|\.\d+)$/.test(t))return;let o=Number(t);return Number.isFinite(o)?o:void 0}function ee(e,n){let r=e.trim();if(r==="")return;let i=n?.format==="money"&&n.currency?j(n).symbol:void 0,t=r;i&&(t=t.split(i).join("")),n?.currency&&(t=t.replace(new RegExp(n.currency,"gi"),"")),t=t.replace(/^[$€£¥₹]|[$€£¥₹]$/g,""),/%\s*$/.test(t)&&(t=t.replace(/%\s*$/,"")),n?.unit&&n.format!=="money"&&(t=t.replace(new RegExp(`\\s*${n.unit.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*$`),""));let d=k(t,n?.locale);if(d!==void 0)return n?.format==="percent"?d/100:d}export{J as a,Q as b,V as c,ee as d,I as e,h as f,l as g,D as h,P as i,z as j,Z as k,q as l,G as m};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as le,b as U,d as ce,g as ye,h as pe,i as me,j as ge,k as he}from"./chunk.ACTXR2MI.js";import{$ as L,Aa as te,C as j,Da as oe,H as _,Ia as re,J as E,Jb as fe,K as Z,Ka as ie,L as B,Sa as C,T as x,Vb as O,W as H,Wa as se,X,Xb as ue,Ya as de,Yb as I,_a as ae,ba as Y,ea as q,ga as W,ja as M,pa as v,ra as J,xa as Q,ya as ee,za as ne}from"./chunk.DZZL5IDD.js";var _e=t=>`${t}${t%100>=11&&t%100<=13?"th":["th","st","nd","rd"][t%10]??"th"}`,xe={day:"day",week:"week",month:"month",year:"year"},F=t=>t.length<2?t[0]??"":`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`;function ve(t,e,n){let o=e.interval??1,i=xe[e.every],s=t.slice(0,10),l=o===1?`Every ${i}`:o===2?`Every other ${i}`:`Every ${o} ${i}s`,d;if(e.every==="week"){let y=(e.on?.length?e.on:[C[new Date(`${s}T00:00:00Z`).getUTCDay()]]).map(r=>Y(C.indexOf(r),"long",n));d=o===1?`Every ${F(y)}`:o===2?`Every other ${F(y)}`:`${l} on ${F(y)}`}else if(e.every==="month"){let y=(e.on?.length?e.on:[+s.slice(8,10)]).map(r=>r===-1?"the last day":`the ${_e(Number(r))}`);d=`${l} on ${F(y)}`}else e.every==="year"?d=`${l} on ${L(s,n)}`:d=l;return E.test(t)&&(d+=` at ${X(t,n)}`),e.until&&(d+=`, until ${x(e.until,n)}`),e.count&&(d+=`, ${e.count===1?"once":`${e.count} times`}`),d}function ke(t,e,n={}){if(!de(e)||typeof t!="string")return;let o=n.today??B(),i=ae(t,e,o),s=ve(t,e,n.locale),l=i.slice(0,4)===o.slice(0,4)?L(i.slice(0,10),n.locale):x(i.slice(0,10),n.locale);return i.slice(0,10)<o?`${s}, last ${l}`:`${s}, next ${l}`}function dn(t,e){let n=new Map,o=new Map;for(let i of t){let s=M(e(i.kind),i).trim().toLowerCase();o.set(s,[...o.get(s)??[],i])}for(let i of o.values()){if(i.length<2)continue;let s=new Map;for(let l of i)s.set(l.kind,[...s.get(l.kind)??[],l]);for(let[l,d]of s){if(d.length===1){n.set(d[0].id,J(e(l),l));continue}let y=d.map(u=>new Map(Ee(u,e(u.kind)).map(p=>[p.key,p.alone]))),r=[...new Set(y.flatMap(u=>[...u.keys()]))],c=u=>y.every(p=>!/\d/.test(p.get(u)??"")),h=[...r.filter(c),...r.filter(u=>!c(u))],b=(u,p)=>p.map(m=>y[u].get(m)??"").filter(Boolean).join(" \xB7 "),S=u=>new Set(d.map((p,m)=>b(m,u))).size===d.length&&d.every((p,m)=>b(m,u)!==""),f=h.find(u=>S([u])),a=f?void 0:h.flatMap((u,p)=>h.slice(p+1).map(m=>[u,m])).find(u=>S(u));d.forEach((u,p)=>{if(f||a)return void n.set(u.id,b(p,f?[f]:a));let m=h.find($=>{let w=y[p].get($);return w!==void 0&&w!==""&&y.every((R,k)=>k===p||R.get($)!==w)});n.set(u.id,m?y[p].get(m):`${p+1} of ${d.length}`)})}}return n}function an(t,e){return t?.describe?t.describe(e):`${e.kind} ${M(t,e)}`}var Oe=new Set(["id","kind","label"]);function Se(t,e){if(e.length===0)return!1;let n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[\\s\xB7,(/])${n}($|[\\s\xB7,)/])`).test(t)}function Ee(t,e,n={}){let o=e?.display,i=new Set([...Oe,...o?.hide??[]]);typeof t.label=="string"&&e?.label&&!M(e,t).includes(t.label)&&i.delete("label");let s=(n.said??[]).filter(f=>!!f),l=s.filter(f=>f.endsWith("\u2026")).map(f=>f.replace(/…$/,"").trim()).filter(f=>f.length>12),d=[],y=e?.fields?.shape,r=e?.fieldRoles,c=n.glance?o?.glance??[r?.who,r?.when].filter(f=>!!f):be(o?.page),h=n.glance&&o?.glance!==void 0,S=[...new Set(h?c:[...c,...De(e),...Object.keys(t)])].filter(f=>Object.hasOwn(t,f)).map(f=>[f,t[f]]);for(let[f,a]of S){if(i.has(f)||a===void 0||a===null||pe(e,f))continue;let u=o?.format?.[f],p=u?[]:ne(a);if(p[0]&&n.glance)continue;let m=e?.fields?.shape?.[f],$=!u&&typeof a=="string"&&oe(m)?a:void 0,w=!u&&typeof a=="string"&&le(m);if($&&n.glance)continue;let R=u?void 0:ie(m),k=R?{relation:R,refs:re(a,R)}:void 0;if(k&&(n.glance||k.refs.length===0)||!p[0]&&typeof a=="object"&&(!Array.isArray(a)||a.some(g=>typeof g=="object"&&g!==null))&&u===void 0)continue;let V=typeof a=="string"&&!u?ke(a,t[`${f}Repeat`],{locale:n.locale}):void 0,N=p[0]?p.map(g=>`${g.caption?`${g.name} \u2014 ${g.caption}`:g.name}${Q(g)?` (${ee(g)})`:""}`).join(", "):Array.isArray(a)?a.join(", "):typeof a=="boolean"?a?"Yes":"No":String(a),z=u?void 0:me(e,f),G=he(z,a),K=!u&&!z&&typeof a=="number"?O(e?.fields?.shape?.[f])??ye(e,f):void 0,D=k?k.refs.length>1?`${k.refs.length} linked records`:"linked record":u?u(a):K?ue(a,K):ge(z,a,n.locale)??(Array.isArray(a)||typeof a=="boolean"?N:typeof a=="string"&&V!==void 0?V:typeof a=="string"&&_.test(a)&&(a.length===10||Ne(e,f))?x(a,n.locale):typeof a=="string"&&E.test(a)?H(a,n.locale,n.timeZone):typeof a=="string"&&ze(e,f)?U(e,f,a):N),P=typeof a=="string"&&We(e,f,D),A=(n.glance||n.excerpt)&&!u&&(P||w)?ce(D,{markdown:w}):D;if(s.includes(A)||l.some(g=>A.startsWith(g))||n.glance&&(typeof a=="string"||typeof a=="number")&&s.some(g=>Se(g,A)))continue;let T=v(e,f),Re=typeof a=="number"?`${T} ${A}`:typeof a=="boolean"&&!u?`${T}: ${A.toLowerCase()}`:A;if(d.push({key:f,label:T,value:A,stored:N,alone:Re,long:P,...w?{markdown:!0}:{},...p[0]?{files:p}:{},...$?{app:$}:{},...k?{linked:k}:{},...G?{href:G}:{},...se(y?.[`${f}Repeat`])?{repeats:!0}:{}}),n.limit!==void 0&&d.length>=n.limit)break}return Me(d,e)}function Me(t,e){let n=new Map;for(let o of t){let i=Fe(e,o.key);i&&n.set(o.key,new Set(i.map(s=>U(e,o.key,s).toLowerCase())))}return n.size<2?t:t.map(o=>{let i=n.get(o.key);return i!==void 0&&[...n].some(([l,d])=>l!==o.key&&[...i].some(y=>d.has(y)))?{...o,alone:`${o.label}: ${o.value.toLowerCase()}`}:o})}function Fe(t,e){let n=t?.fields?.shape?.[e];for(let o=0;o<6&&n?._zod?.def?.innerType!==void 0;o++)n=n._zod.def.innerType;return n?._zod?.def?.type==="enum"&&n._zod.def.entries?Object.values(n._zod.def.entries).map(String):void 0}function Ne(t,e){let n=t?.fields?.shape?.[e]?._zod?.def;for(let o=0;o<6&&n?.innerType!==void 0;o++)n=n.innerType._zod?.def;return n?.type==="string"&&(n.checks??[]).some(o=>o._zod?.def?.pattern?.source===_.source)}function ze(t,e){let n=t?.fields?.shape?.[e];for(let o=0;o<6&&n?._zod?.def?.innerType!==void 0;o++)n=n._zod.def.innerType;return n?._zod?.def?.type==="enum"}function De(t){let e=t?.fields?.shape;return[...Object.keys(e??{}),...Object.keys(t?.computed??{})]}function be(t){return[...t?.fields??[],...(t?.groups??[]).flatMap(e=>e.fields)]}var Te=500,je=160;function Le(t){let e=t;for(let n=0;n<6&&e?._zod?.def?.innerType!==void 0;n++)e=e._zod.def.innerType;return e?._zod?.def?.type==="string"?e._zod.def:void 0}function We(t,e,n){return Le(t?.fields?.shape?.[e])?.checks?.some(i=>i._zod?.def?.check==="max_length"&&(i._zod.def.maximum??0)>Te)?!0:typeof n=="string"&&(n.includes(`
|
|
2
|
-
`)||n.length>je)}function ln(t,e){let n=t?.display?.page,o=n?.groups??[],i=new Map(e.map(r=>[r.key,r])),s=new Set(be(n)),l=r=>r.flatMap(c=>i.has(c)?[i.get(c)]:[]),d=e.filter(r=>!s.has(r.key));return[{fields:[...l(n?.fields??[]),...o.length>0?[]:d]},...o.map(r=>({title:r.title,fields:l(r.fields)})),...o.length>0?[{title:"Details",fields:d}]:[]].filter(r=>r.fields.length>0)}function Ce(t,e,n){let o=[...e?.creates??[],...e?.subject&&e.subject.kinds!=="*"?e.subject.kinds:[]];for(let i of o){let s=t.tryDefinition(i),l=s?.fields?.shape??{};if(!s||!(n in l))continue;let d=s.display?.format?.[n];return{label:s.display?.labels?.[n]??v(s,n),option:r=>d?d(r):W(r)}}return{label:v(void 0,n),option:i=>W(i)}}function pn(t,e,n){if(n instanceof fe){let o=e.find(s=>s.name===n.mutation);return`Not yet: ${n.issues.map(s=>{let l=s.path.length>0?Ce(t,o,String(s.path[0])).label:void 0;return l?`${l} \u2014 ${q(s.message)}`:s.message}).join("; ")}.`}return n instanceof Error?n.message:String(n)}var Ie=t=>/^[A-Z]{3}$/.test(t??"");function we(t){let{format:e,unit:n,currency:o,locale:i}=t,s=Ie(n),l=e==="money"||!e&&s,d=l?s?n:o:void 0;return{...l?{format:"money"}:e?{format:e}:{},...n&&!(l&&s)?{unit:n}:{},...d?{currency:d}:{},...i?{locale:i}:{}}}function gn(t){switch(t.format){case"money":return t.currency?`An amount of money in ${t.currency}: a plain number, 1250.5 for 1,250.50 ${t.currency}.`:"An amount of money, in no named currency: a plain number.";case"percent":return"A fraction said as a percent: 0.15 is 15%.";default:return t.unit?`A number of ${t.unit}.`:"A number."}}function Ae(t){let e=j(t)?.innerType;return e===void 0?t:Ae(e)}var Ue={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ve=t=>(t?._zod?.def?.checks??[]).map(e=>e._zod?.def).filter(e=>e!==void 0);function $e(t){let e=Ae(t),n=j(e),o=n?.type,i=Ve(e);if(o==="enum")return{type:"choice",options:Object.keys(n?.entries??{})};let s=te(e);if(s)return s==="image"?{type:"file",image:!0}:s==="video"?{type:"file",video:!0}:{type:"file"};if(o==="boolean")return{type:"boolean"};if(o==="array"){let l=$e(n?.element);return l.type==="unknown"?{type:"unknown"}:{type:"several",of:l}}if(o==="number"){let l,d,y;for(let r of i){r.check==="multiple_of"&&typeof r.value=="number"?y=r.value:r.check==="number_format"&&(r.format==="safeint"||r.format==="int32"||r.format==="uint32")&&(y??=1);let c=r.check==="number_format"&&r.format?Ue[r.format]:void 0,h=c?c[0]:r.check==="greater_than"&&r.inclusive&&typeof r.value=="number"?r.value:void 0,b=c?c[1]:r.check==="less_than"&&r.inclusive&&typeof r.value=="number"?r.value:void 0;h!==void 0&&(l=l===void 0?h:Math.max(l,h)),b!==void 0&&(d=d===void 0?b:Math.min(d,b))}return{type:"number",...l===void 0?{}:{min:l},...d===void 0?{}:{max:d},...y===void 0?{}:{step:y},...I(e)==="duration"?{duration:!0}:{},...O(t)?{amount:we(O(t))}:{}}}if(o==="string"){if(i.some(c=>c.fn===Z||c.format==="datetime")||n?.format==="datetime")return{type:"date",time:!0,instant:!0};let d=[n?.pattern,...i.map(c=>c.pattern)].filter(c=>c instanceof RegExp).map(c=>c.source);if(d.some(c=>c.includes("\\d{4}")))return d.some(c=>c.includes("\\d{2}:\\d{2}"))?{type:"date",time:!0}:d.includes(_.source)?{type:"date",partial:!0}:{type:"date"};let y=i.some(c=>c.check==="max_length"&&typeof c.maximum=="number"&&c.maximum>500),r=I(e);return y?{type:"text",long:!0}:r==="phone"||r==="place"?{type:"text",holds:r}:{type:"text"}}return{type:"unknown"}}function _n(t,e){let n=t?.shape;return!n||!(e in n)?{type:"unknown"}:$e(n[e])}export{ve as a,dn as b,an as c,Ee as d,ln as e,we as f,gn as g,Ae as h,$e as i,_n as j,Ce as k,pn as l};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./chunk.IQPILSV3.js";import"./chunk.IQ3PRWGO.js";import"./chunk.YP2QSPXU.js";import"./chunk.VIH5AX7S.js";import"./chunk.Q355UPFG.js";import{l as s}from"./chunk.VC3V7HLL.js";import"./chunk.BZMQDEIY.js";import"./chunk.ELTV44HU.js";import"./chunk.CY3ELWCM.js";import"./chunk.I77ZGIFE.js";import"./chunk.OWOOKLIU.js";import"./chunk.RD2X25XB.js";import"./chunk.KMV6PJFL.js";import"./chunk.SWMDFXUX.js";import"./chunk.A3ZC2JBO.js";import"./chunk.NAD7ZXYP.js";import"./chunk.2GEJNG2U.js";import"./chunk.4TX6VCBT.js";import"./chunk.TIALD6SC.js";import"./chunk.66P5IDTH.js";import"./chunk.UQQKDBIH.js";import"./chunk.AJSUHPBE.js";import"./chunk.LAYQ5PFS.js";import"./chunk.KDXU5DT3.js";import"./chunk.O2BHPYA4.js";import"./chunk.H5S7OL2U.js";import"./chunk.BJUUSIQY.js";import"./chunk.PZQNR4KZ.js";import"./chunk.W4BKYSZX.js";import"./chunk.XOZU4OFA.js";import"./chunk.Y2YYH3JN.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.SGCW2XRC.js";import"./chunk.ZN3PUM2I.js";import"./chunk.QIPASE42.js";import"./chunk.EVBCEEQ4.js";import"./chunk.OWT3VVOT.js";import"./chunk.NHTGAP3G.js";import"./chunk.GZHZLJBF.js";import"./chunk.UKQUUPKE.js";import"./chunk.OJGHDWI6.js";import"./chunk.DDUCIUVW.js";import"./chunk.NUYA4BWI.js";import"./chunk.OKZT2QBM.js";import"./chunk.ACTXR2MI.js";import"./chunk.AI34V6WV.js";import"./chunk.G4ULQK64.js";import{G as y,T as i}from"./chunk.M7RESZB6.js";import"./chunk.SDO3U72B.js";import"./chunk.DZZL5IDD.js";import"./chunk.FQLNBIQ5.js";import{b as r}from"./chunk.AJZBJBMO.js";var c=r(y(),1),e=r(i(),1);function v({store:d,views:t,as:a,scope:o}){let l=(0,c.useMemo)(()=>s({scope:`.${o}`}),[o]);return(0,e.jsxs)("div",{"data-testid":"embed-picture","data-embed-content":"",tabIndex:0,"aria-label":t.places().find(m=>m.as===a)?.title??"The picture",style:{flex:"1 1 auto",minHeight:0,display:"grid",gridTemplateRows:"minmax(0, 1fr)",overflow:"auto",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)"},children:[(0,e.jsx)("style",{children:l}),(0,e.jsx)(n,{store:d,views:t,as:a})]})}export{v as PictureFace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as f}from"./chunk.IQPILSV3.js";import"./chunk.IQ3PRWGO.js";import"./chunk.YP2QSPXU.js";import"./chunk.VIH5AX7S.js";import"./chunk.Q355UPFG.js";import{l as g}from"./chunk.VC3V7HLL.js";import"./chunk.BZMQDEIY.js";import"./chunk.ELTV44HU.js";import"./chunk.CY3ELWCM.js";import"./chunk.I77ZGIFE.js";import"./chunk.OWOOKLIU.js";import"./chunk.RD2X25XB.js";import"./chunk.KMV6PJFL.js";import"./chunk.SWMDFXUX.js";import"./chunk.A3ZC2JBO.js";import"./chunk.NAD7ZXYP.js";import"./chunk.2GEJNG2U.js";import"./chunk.4TX6VCBT.js";import"./chunk.TIALD6SC.js";import"./chunk.66P5IDTH.js";import"./chunk.UQQKDBIH.js";import"./chunk.AJSUHPBE.js";import"./chunk.LAYQ5PFS.js";import"./chunk.KDXU5DT3.js";import"./chunk.O2BHPYA4.js";import"./chunk.H5S7OL2U.js";import"./chunk.BJUUSIQY.js";import"./chunk.PZQNR4KZ.js";import"./chunk.W4BKYSZX.js";import"./chunk.XOZU4OFA.js";import"./chunk.Y2YYH3JN.js";import"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.SGCW2XRC.js";import"./chunk.ZN3PUM2I.js";import"./chunk.QIPASE42.js";import"./chunk.EVBCEEQ4.js";import"./chunk.OWT3VVOT.js";import"./chunk.NHTGAP3G.js";import"./chunk.GZHZLJBF.js";import"./chunk.UKQUUPKE.js";import"./chunk.OJGHDWI6.js";import"./chunk.DDUCIUVW.js";import"./chunk.NUYA4BWI.js";import"./chunk.OKZT2QBM.js";import"./chunk.ACTXR2MI.js";import"./chunk.AI34V6WV.js";import"./chunk.G4ULQK64.js";import{G as b,T as h}from"./chunk.M7RESZB6.js";import"./chunk.SDO3U72B.js";import{ge as n}from"./chunk.DZZL5IDD.js";import"./chunk.FQLNBIQ5.js";import{b as t}from"./chunk.AJZBJBMO.js";var m=t(b(),1),a=t(h(),1);function P({store:c,auto:y,brand:i,views:u,presence:s,steering:r,overview:o,scope:d,titleLevel:w=2,quickAsk:l,props:e}){let v=(0,m.useMemo)(()=>g({scope:`.${d}`}),[d]);return(0,a.jsxs)("div",{"data-embed-content":"",style:y?{flex:"0 0 auto",background:"var(--graview-ground)"}:{flex:"1 1 auto",minHeight:0,overflow:"auto",background:"var(--graview-ground)"},children:[(0,a.jsx)("style",{children:v}),(0,a.jsx)("div",{"data-embed-measure":"",style:{display:"flow-root"},children:(0,a.jsx)(f,{context:{store:c,embedded:!0,...e.bar!==!1?{barAbove:!0}:{},...o?{overview:o}:{},titleLevel:w,views:u,settings:e.app.settings??[],app:e.app,...s?{presence:s}:{},...i?{brand:i}:{},...e.locale?{locale:e.locale}:{},...e.timeZone?{timeZone:e.timeZone}:{},...e.principal?{principal:e.principal}:{},...e.seats?{seats:e.seats}:{},...e.people?{people:e.people}:{},...e.subscriptions?{subscriptions:e.subscriptions}:{},dismissals:e.dismissals,whileAway:e.whileAway,...e.signIn?{signIn:e.signIn}:{},...l!==void 0?{quickAsk:l}:{}},...e.pages?{registry:e.pages}:{},...r?{steering:r}:{},...e.routing==="address"?n(e.basePath)===""?{}:{basename:n(e.basePath)}:{initialPath:e.path??"/"},...e.path!==void 0?{path:e.path}:{},...e.hrefOf?{hrefOf:e.hrefOf}:e.routing==="address"?{}:{hrefOf:!1},...e.onNavigate?{onNavigate:e.onNavigate}:{}})})]})}export{P as PagesContent};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Z,b as qe}from"./chunk.KHRS2SKB.js";import"./chunk.4HRYB7HF.js";import"./chunk.T6PU3NKP.js";import"./chunk.ELOFPE25.js";import{j as De,k as Ne,l as Oe}from"./chunk.RMR24LFJ.js";import"./chunk.KMV6PJFL.js";import"./chunk.NAD7ZXYP.js";import"./chunk.2GEJNG2U.js";import"./chunk.HJCQ6I3S.js";import"./chunk.22BZU7ME.js";import"./chunk.2N4Z5K5S.js";import"./chunk.JYFZCJ4N.js";import"./chunk.U6ZRJKVM.js";import{a as We,b as S}from"./chunk.PLTH2LW5.js";import{a as X,b as $e}from"./chunk.66P5IDTH.js";import"./chunk.AJSUHPBE.js";import"./chunk.KDXU5DT3.js";import"./chunk.M4AYA2PL.js";import"./chunk.H5S7OL2U.js";import"./chunk.PZQNR4KZ.js";import{b as Pe,c as Le}from"./chunk.W4BKYSZX.js";import"./chunk.T6WHGKWR.js";import"./chunk.XOZU4OFA.js";import"./chunk.Y2YYH3JN.js";import"./chunk.YFVJUHAK.js";import"./chunk.NOGGSLVG.js";import"./chunk.SGCW2XRC.js";import"./chunk.ZN3PUM2I.js";import"./chunk.QIPASE42.js";import"./chunk.EVBCEEQ4.js";import"./chunk.OWT3VVOT.js";import"./chunk.NHTGAP3G.js";import{u as Re}from"./chunk.UKQUUPKE.js";import"./chunk.OJGHDWI6.js";import"./chunk.DDUCIUVW.js";import"./chunk.NUYA4BWI.js";import{l as ze}from"./chunk.OKZT2QBM.js";import{c as Ce}from"./chunk.ACTXR2MI.js";import{j as Ie}from"./chunk.AI34V6WV.js";import"./chunk.G4ULQK64.js";import{G as ot,Ma as J,Ra as He,T as Me,Va as Ee,ba as O,h as Ae,u as Te}from"./chunk.M7RESZB6.js";import"./chunk.SDO3U72B.js";import{Ec as xe,Gc as ke,Jb as be,id as Se,qa as Q,ra as N}from"./chunk.DZZL5IDD.js";import"./chunk.FQLNBIQ5.js";import{b as Y}from"./chunk.AJZBJBMO.js";var a=Y(ot(),1);var t=Y(Me(),1);function wt(u,r,o){let c=r.on??r.about[r.about.length-1];De(u,r.about,{...o,pins:Z(),...c===void 0?{}:{focus:c}})}function bt({placement:u="float",chosen:r=!0}={}){let{menuAt:o}=O();return u==="menu"&&o===null?r?(0,t.jsx)(at,{}):null:(0,t.jsx)(lt,{placement:u})}function at(){let{store:u,setMenuAt:r,view:o}=O(),{selection:c}=J(),h=(0,a.useRef)(null),[E,y]=(0,a.useState)(null);(0,a.useLayoutEffect)(()=>{let b=h.current?.offsetParent??h.current?.parentElement;if(!b)return;let m=Math.round(b.getBoundingClientRect().width);m!==E&&y(m)});let v=c.length===1&&!o.overview?u.graph.getNode(c[0]):void 0;return!v||E===null||E>=Be?(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 ${S(u,v.id)}`,"aria-haspopup":"menu",onClick:b=>{let m=b.currentTarget.getBoundingClientRect();r({x:Math.round(m.right),y:Math.round(m.bottom+4),on:v.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 Be=564;function lt({placement:u}){let{store:r,menuAt:o,setMenuAt:c,view:h,signIn:E}=O(),y=(0,a.useRef)(null),v=(0,a.useRef)(null),b=(0,a.useRef)(null),m=(0,a.useRef)(null);o?.returnTo&&(m.current=o.returnTo);let Ke=e=>{let i=e.closest("[data-graview-asking]")?.getAttribute("data-graview-asking"),n=e.getAttribute("data-pin-for"),d=i??e.getAttribute("data-affordance")??(n===null?null:`pin:${n}`)??e.getAttribute("data-menu-item");v.current=d===null?null:{key:d,element:e}};(0,a.useEffect)(()=>{let e=y.current,i=v.current;if(i===null||document.activeElement!==document.body||i.element.isConnected)return;let n=i.key;if(!e){v.current=null;let k=m.current;m.current=null,(k?.isConnected?k: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[_e,je]=(0,a.useState)(null);(0,a.useLayoutEffect)(()=>{let e=y.current?.offsetParent??y.current?.parentElement;if(e instanceof HTMLElement&&(b.current=e),!e)return;let i=e.getBoundingClientRect();je(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:Ue,set:Ve,clear:Ge}=J(),s=o?.about??Ue,[q,Ye]=(0,a.useState)(()=>Z()),F=o?.on??s[s.length-1],B=o?.about,Qe=(0,a.useMemo)(()=>({pins:q,...F===void 0?{}:{focus:F},...B?{about:B}:{}}),[q,F,B]),Je=(0,a.useMemo)(()=>new Set(r.allMutations().filter(e=>e.pinned).map(e=>e.name)),[r]),{affordances:g,withheld:ee,observations:te}=Ne(Qe),I=ke(ee,E),f=I?st:ee,Xe=o===null?null:{face:o.face??"scene",on:o.on,about:s,field:o.field,place:o.place,href:o.href,act:o.act,element:o.returnTo},ne=Re(Xe),ie=te.some(e=>e.id.startsWith("schema:waits:")),{apply:Ze,preview:et}=Oe(),[C,z]=(0,a.useState)(null),[tt,re]=(0,a.useState)(!1),[oe,ae]=(0,a.useState)(!1),[L,R]=(0,a.useState)(""),nt=$e({letters:!0}),[le,K]=(0,a.useState)(null),_=(0,a.useRef)([]),j=(e,i)=>{try{return et(e,i),Ze(e,i),K(null),c(null),_.current=[],!0}catch(n){return K(ze(r.schema,r.allMutations(),n)),_.current=n instanceof be?n.issues.map(d=>String(d.path[0]??"")).filter(Boolean):[],!1}},$=[...new Set(s.flatMap(e=>{let i=r.graph.getNode(e);return i?[i.kind]:[]}))],x=$.length>0?$:[...new Set(s.flatMap(e=>Te(e)))],p=s.length===1?Ae(s[0]):null,U=p?{from:r.graph.getNode(p.from),to:r.graph.getNode(p.to)}:null,se=p?Le(r,p):void 0,de=se?.provisional?se:void 0,ue=p?(()=>{let e=r.schema.tryDefinition(r.graph.getNode(p.from)?.kind??"")?.edges?.[p.kind],i=r.graph.getNode(p.to);return e?.inverse&&i?`From ${S(r,i.id)}: ${e.inverse}`:null})():null;(0,a.useEffect)(()=>{z(null),re(!1),ae(!1),K(null),R("")},[s,o?.about]);let l=o!==null,it=u==="menu"&&!l,A=(0,a.useRef)(o);A.current=o;let pe=Ee("acts",{open:l&&u==="menu",onOpenChange:e=>{e||c(null)},at:()=>A.current?{x:A.current.x,y:A.current.y}:null,returnTo:()=>{let e=A.current?.returnTo;if(e?.isConnected)return e;let i=A.current?.on;return i?document.querySelector(`[data-graview-view="${CSS.escape(i)}"]`):null},align:"start"}),ce=(_e?.width??Number.POSITIVE_INFINITY)<Be;if((0,a.useLayoutEffect)(()=>{let e=y.current?.offsetParent;if(!e||!ce||l)return;let i=y.current?.getBoundingClientRect().height??0,n=`${Math.round(i)+20}px`;if(e.style.paddingBottom===n)return;let d=e.style.paddingBottom;return e.style.paddingBottom=n,()=>{e.style.paddingBottom=d}}),s.length===0&&!l)return null;let ge=o?.title!==void 0||s.length>0&&!(s.length===1&&s[0]===h.focusId),he=Math.max(1,Math.min(9,g.length)),T=[...g.filter(e=>e.provider==="invariant"&&!e.destructive),...g.filter(e=>e.pinned&&e.provider!=="invariant"&&!e.destructive),...g.filter(e=>!e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...g.filter(e=>e.ties&&!e.destructive&&!e.pinned&&e.provider!=="invariant"),...g.filter(e=>e.destructive)],me=T.length>he&&!l,fe=L.trim().toLowerCase(),w=me&&fe.length>0?T.filter(e=>`${e.label} ${e.why}`.toLowerCase().includes(fe)):null,V=w??(tt||l?T:T.slice(0,he)),ye=w?0:T.length-V.length,W=[];for(let e of V){let i=!l&&e.provider==="invariant",n=!l&&!i&&e.pinned!==void 0&&!e.destructive,d=!l&&!i&&!n&&e.ties===!0&&!e.destructive,k=i?e.why:n?"pinned":d?"its ties":null,D=i?"violation":n||d?"ties":null,H=W[W.length-1];H&&H.heading===k?H.items.push(e):W.push({heading:k,tone:D,items:[e]})}let G=g.find(e=>e.id===C),P=s.length===1?S(r,s[0]):null,ve=e=>{if(!P)return e;let i=e.startsWith(`"${P}"`)?e.slice(P.length+2):e.startsWith(P)?e.slice(P.length):null;if(i===null)return e;let n=i.trimStart();return n.length===0?e:n[0].toUpperCase()+n.slice(1)},rt=new Set(l?[]:V.filter(e=>e.provider==="invariant").map(e=>e.why)),M=te.filter(e=>!rt.has(e.text)).map(e=>({...e,text:ve(e.text)}));return it?null:(0,t.jsxs)("section",{...l?pe.pane:{},ref:e=>{y.current=e,l&&pe.pane.ref(e)},"aria-label":"Inspector","data-graview-offstage":"","data-testid":l?"context-menu":"inspector-strip",tabIndex:-1,onFocus:e=>Ke(e.target),onBlur:e=>{e.relatedTarget!==null&&(v.current=null)},onMouseDown:e=>e.stopPropagation(),style:{...l?He:{position:"absolute",zIndex:Se("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"}:ce?{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:{...Ie,margin:0},children:"Inspector"}),(0,t.jsxs)("div",{style:{display:ge||!l?"flex":"none",alignItems:"baseline",flexWrap:"wrap",gap:"2px 8px",minWidth:0,paddingRight:l?0:24},children:[ge?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("strong",{style:{fontSize:"0.9375rem",whiteSpace:"nowrap"},children:o?.title??(s.length===1?S(r,s[0]):`${s.length} selected`)}),$.length>0||p?(0,t.jsx)("span",{style:{fontSize:"0.75rem",color:"var(--graview-ink-faint)",whiteSpace:"nowrap"},children:p?"relation":$.map(e=>N(r.schema.tryDefinition(e),e)).join(" \xB7 ")}):null,s.length===1&&!p&&o?.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:()=>{c(null),Ge()},"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"}),p&&U?(0,t.jsxs)("div",{style:{display:"grid",gap:6},children:[ue?(0,t.jsx)("p",{"data-testid":"edge-said",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:ue}):null,de?(0,t.jsx)("p",{"data-testid":"edge-provisional",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-ink-muted)"},children:Pe(de)}):null,(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[["from",U.from],["to",U.to]].map(([e,i],n)=>(0,t.jsxs)(a.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:()=>Ve([i.id]),title:`Select ${S(r,i.id)}`,style:{fontSize:"0.8125rem",padding:"3px 9px",borderRadius:6},children:S(r,i.id)}):(0,t.jsx)("span",{style:{fontSize:"0.8125rem",color:"var(--graview-ink-faint)"},children:"gone"})]},e))})]}):null,!p&&s.length===1&&xe(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,M.length>0?(0,t.jsx)("div",{"data-testid":"observations",title:M.map(e=>e.text).join(`
|
|
2
|
-
`),style:{display:"grid",gap:3},children:M.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===M[1]&&M.length>2?(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" +",M.length-2]}):null]},e.id))}):null,l?ne.start.map(e=>(0,t.jsx)(Fe,{section:e,close:()=>c(null)},e.id)):null,le?(0,t.jsx)("p",{"data-testid":"refused",style:{margin:0,fontSize:"0.8125rem",lineHeight:1.45,color:"var(--graview-warn)"},children:le}):null,me?(0,t.jsx)("input",{"data-testid":"action-filter",value:L,onChange:e=>R(e.target.value),placeholder:`Filter ${T.length} actions\u2026`,"aria-label":"Filter actions",onKeyDown:e=>{if(e.key==="Escape"){e.stopPropagation(),L.length>0?R(""):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)&&R("")}},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",L.trim(),"\u201D."]}):null,I&&g.length===0||g.length===0&&!ie&&s.length===0?null:g.length===0&&!ie?(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 ${p?"this relation":x.length===1?Q(N(r.schema.tryDefinition(x[0]),x[0])):"this mix of kinds"} \u2014 ${f.length} action${f.length===1?"":"s"} withheld.`:p?`Nothing can be done with this line yet \u2014 nothing this app declares makes or breaks \u201C${Ce(r.schema,r.graph.getNode(p.from)?.kind??"",p.kind,"out")}\u201D.`:`Nothing can be done with ${x.length===1?Q(N(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",{...nt,"data-testid":"affordances",style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",flexWrap:"nowrap",gap:2},children:[W.map((e,i)=>(0,t.jsxs)(a.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"?ve(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"},onKeyDown:d=>{if(d.metaKey||d.ctrlKey||d.altKey)return;let k=d.currentTarget.querySelector("[data-affordance]"),D=d.currentTarget.querySelector("[data-pin-for]"),H=d.target===D,we=d.key==="ArrowRight"&&!H?D:H&&["ArrowLeft","ArrowUp","ArrowDown"].includes(d.key)?k:null;we&&(d.preventDefault(),d.stopPropagation(),we.focus())},children:[(0,t.jsxs)("button",{type:"button",[X]:"","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",tabIndex:-1,"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:()=>Ye(qe(q,n.mutation,Je.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}`)),ye>0?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",[X]:"",onClick:()=>re(!0),title:`Show all ${g.length} actions`,style:{padding:"4px 10px",fontSize:"0.875rem",borderRadius:8},children:["Show ",ye," more"]})}):null]}),I?(0,t.jsx)("button",{type:"button","data-testid":"sign-in",onClick:()=>{c(null),I.run()},style:{padding:"5px 10px",fontSize:"0.875rem",borderRadius:8,width:"100%",textAlign:"left"},children:I.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||oe?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&&!oe&&f.length>3?(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-testid":"withheld-more",onClick:()=>ae(!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?ne.end.map(e=>(0,t.jsx)(Fe,{section:e,close:()=>c(null)},e.id)):null,G?(0,t.jsx)(We,{affordance:G,onApply:e=>{if(j(G,e))z(null);else return _.current},onCancel:()=>z(null)}):null]})}var st=[];function Fe({section:u,close:r}){return(0,t.jsxs)("div",{"data-menu-section":u.id,...u.heading?{role:"group","aria-label":u.heading}:{},style:{display:"grid",gap:2,borderTop:"1px solid var(--graview-edge)",paddingTop:5},children:[u.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:u.heading}):null,u.items&&u.items.length>0?(0,t.jsx)("ul",{style:{margin:0,padding:0,listStyle:"none",display:"flex",flexDirection:"column",gap:2},children:u.items.map(o=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button","data-menu-item":o.id,onClick:()=>{r(),o.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:[o.label,o.hint?(0,t.jsxs)("span",{style:{color:"var(--graview-ink-faint)"},children:[" \xB7 ",o.hint]}):null]})},o.id))}):null,u.render?.(r)]})}export{bt as InspectorPane,wt as prepareActs};
|