graview 0.1.40 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/preview/chunk.22QEYFWI.js +1 -0
- package/dist/preview/{chunk.YWNHCZQ5.js → chunk.27P37343.js} +1 -1
- package/dist/preview/{chunk.D25XEVKO.js → chunk.2ZGICECC.js} +1 -1
- package/dist/preview/{chunk.6PSWHBL2.js → chunk.35FR36BQ.js} +1 -1
- package/dist/preview/chunk.36LP3I7Z.js +21 -0
- package/dist/preview/{chunk.JDRLSVOI.js → chunk.37NF3YXZ.js} +1 -1
- package/dist/preview/chunk.3JATXDSP.js +1 -0
- package/dist/preview/{chunk.2JB4Y2ET.js → chunk.3K2KBIRG.js} +1 -1
- package/dist/preview/chunk.3SKUJWFC.js +1 -0
- package/dist/preview/{chunk.47KHZCNG.js → chunk.3WABA2WQ.js} +1 -1
- package/dist/preview/{chunk.FFZBOP65.js → chunk.4NBB44YU.js} +1 -1
- package/dist/preview/chunk.4QEDYRES.js +349 -0
- package/dist/preview/{chunk.YYIKSH2F.js → chunk.4YBP552Z.js} +2 -2
- package/dist/preview/{chunk.XQHDP5C3.js → chunk.4YRCKOX2.js} +1 -1
- package/dist/preview/{chunk.WVDKYUF3.js → chunk.57R4ZUMM.js} +1 -1
- package/dist/preview/{chunk.VNUHESMZ.js → chunk.5FHH5NR6.js} +1 -1
- package/dist/preview/{chunk.XRYTJNA7.js → chunk.5NDYYTT4.js} +1 -1
- package/dist/preview/{chunk.4VG2KN7G.js → chunk.6HUS5UHZ.js} +1 -1
- package/dist/preview/{chunk.YYFLTMNN.js → chunk.6MLAJKYM.js} +1 -1
- package/dist/preview/{chunk.T3TYD7QI.js → chunk.6NF32PAT.js} +1 -1
- package/dist/preview/chunk.6WB24MS3.js +1 -0
- package/dist/preview/{chunk.Z7LDT55A.js → chunk.7EB6SDUQ.js} +1 -1
- package/dist/preview/chunk.7HZVCW3Q.js +1 -0
- package/dist/preview/{chunk.DPZTW24D.js → chunk.7MJM3OVC.js} +1 -1
- package/dist/preview/chunk.7OSL64QH.js +1 -0
- package/dist/preview/chunk.7XDNCCLG.js +6 -0
- package/dist/preview/{chunk.S356ACK2.js → chunk.7Z2GTKA4.js} +1 -1
- package/dist/preview/{chunk.GT2BITLW.js → chunk.AOC2KUFE.js} +1 -1
- package/dist/preview/{chunk.6FNMDAX5.js → chunk.AQTCN7KQ.js} +1 -1
- package/dist/preview/{chunk.5RABSIF7.js → chunk.ARTJL3X2.js} +1 -1
- package/dist/preview/{chunk.JQEYZB5I.js → chunk.AWSUMY3D.js} +1 -1
- package/dist/preview/{chunk.H6XKMLDQ.js → chunk.B65HPL4I.js} +1 -1
- package/dist/preview/{chunk.4QPVS2ZM.js → chunk.B6DKKNVR.js} +1 -1
- package/dist/preview/{chunk.PPG2SEIY.js → chunk.B7DCQJXV.js} +1 -1
- package/dist/preview/chunk.BBLIT7S7.js +1 -0
- package/dist/preview/chunk.BJET6KOG.js +1 -0
- package/dist/preview/{chunk.I7XSDXQ3.js → chunk.BZ4VZ6WQ.js} +1 -1
- package/dist/preview/{chunk.67WWRC6Y.js → chunk.CAZX6OPN.js} +1 -1
- package/dist/preview/{chunk.BSAXZQSY.js → chunk.CSWX7YGI.js} +1 -1
- package/dist/preview/chunk.D3ELYLME.js +1 -0
- package/dist/preview/{chunk.ETOGQE2V.js → chunk.DNMBZONP.js} +1 -1
- package/dist/preview/{chunk.G6VZNRQ5.js → chunk.DXAUXGNN.js} +1 -1
- package/dist/preview/{chunk.LPE4FLC6.js → chunk.EC2T2UVH.js} +2 -2
- package/dist/preview/chunk.EHMCRUYR.js +1 -0
- package/dist/preview/{chunk.STI447YW.js → chunk.EQIQPY4O.js} +1 -1
- package/dist/preview/{chunk.VZYCILPJ.js → chunk.ETWOZQWL.js} +1 -1
- package/dist/preview/{chunk.LPBM5AES.js → chunk.EVHXF7LZ.js} +1 -1
- package/dist/preview/{chunk.6J37UQKG.js → chunk.FFRWSODT.js} +1 -1
- package/dist/preview/chunk.G4AY6NGN.js +1 -0
- package/dist/preview/{chunk.ZGCRMNER.js → chunk.GN2SZEFH.js} +1 -1
- package/dist/preview/{chunk.ZK3X23EU.js → chunk.GXWOEOUY.js} +1 -1
- package/dist/preview/{chunk.ISXFH3CK.js → chunk.HAY22FPJ.js} +1 -1
- package/dist/preview/{chunk.42XSBKPO.js → chunk.HG2IO5NS.js} +1 -1
- package/dist/preview/{chunk.UOPKRN55.js → chunk.HOTOH7ZB.js} +1 -1
- package/dist/preview/chunk.HQMGTPDC.js +117 -0
- package/dist/preview/{chunk.C2PECN4C.js → chunk.I7QCXRP7.js} +1 -1
- package/dist/preview/{chunk.ESSSNLEO.js → chunk.IGA7OD3L.js} +1 -1
- package/dist/preview/{chunk.GY6RYJHM.js → chunk.ILPD5CZG.js} +1 -1
- package/dist/preview/chunk.IQ3LUSD6.js +6 -0
- package/dist/preview/chunk.IWLVZGW5.js +1 -0
- package/dist/preview/chunk.IXS5XBG6.js +1 -0
- package/dist/preview/{chunk.ZHLQWMV5.js → chunk.J7ZMNAWB.js} +1 -1
- package/dist/preview/{chunk.6AVZWLRF.js → chunk.JCTT2LAK.js} +1 -1
- package/dist/preview/{chunk.FOQZADMA.js → chunk.JE4QQEJE.js} +1 -1
- package/dist/preview/{chunk.CL2ZS5EQ.js → chunk.JEBB3WM7.js} +1 -1
- package/dist/preview/{chunk.OW7NSJ4H.js → chunk.JPD2I4Z7.js} +1 -1
- package/dist/preview/{chunk.MIM2QLF5.js → chunk.K63BUJBF.js} +2 -2
- package/dist/preview/{chunk.GTV2VZAS.js → chunk.KMGGP6XT.js} +2 -2
- package/dist/preview/{chunk.P5ODICND.js → chunk.KZDLDXLB.js} +1 -1
- package/dist/preview/{chunk.BFNVG5JE.js → chunk.L6HKDIZB.js} +1 -1
- package/dist/preview/{chunk.2FLPDPEL.js → chunk.LFJH6X6O.js} +1 -1
- package/dist/preview/{chunk.7WPCP2LZ.js → chunk.LKGDN25E.js} +1 -1
- package/dist/preview/{chunk.IDUPJMJO.js → chunk.LMUFLZYT.js} +1 -1
- package/dist/preview/chunk.LQGXUMUX.js +1 -0
- package/dist/preview/{chunk.UTCB3CE7.js → chunk.LWAZ6ZO6.js} +2 -2
- package/dist/preview/{chunk.CNFL5IN5.js → chunk.LZH65VSN.js} +1 -1
- package/dist/preview/{chunk.H5HWN7A2.js → chunk.MUBZIU6F.js} +1 -1
- package/dist/preview/chunk.MZ6I2Q4E.js +1 -0
- package/dist/preview/{chunk.UWW6ZEPY.js → chunk.NS3Z7QNP.js} +1 -1
- package/dist/preview/{chunk.7LIKEE5Z.js → chunk.NTJNBKWC.js} +1 -1
- package/dist/preview/chunk.O7VHAKSA.js +2 -0
- package/dist/preview/{chunk.Q4TZHWQX.js → chunk.OMCXJGDI.js} +1 -1
- package/dist/preview/chunk.OTHGZPUC.js +1 -0
- package/dist/preview/{chunk.VF7P3ZVZ.js → chunk.P6FGIYWP.js} +1 -1
- package/dist/preview/{chunk.6JEU3ZNE.js → chunk.P6J6VFF5.js} +1 -1
- package/dist/preview/{chunk.ACBUAIDF.js → chunk.P7ISPJAQ.js} +1 -1
- package/dist/preview/{chunk.HB7ELBVK.js → chunk.PACJFDDU.js} +1 -1
- package/dist/preview/{chunk.2RVUDRRY.js → chunk.PCTVLNOS.js} +1 -1
- package/dist/preview/{chunk.BXT6FDT4.js → chunk.PH5ITX3N.js} +1 -1
- package/dist/preview/chunk.PYFQGBU3.js +1 -0
- package/dist/preview/{chunk.AWX7GP72.js → chunk.QHLD4TZW.js} +1 -1
- package/dist/preview/{chunk.ZJMDLRC5.js → chunk.QHP7AJUV.js} +1 -1
- package/dist/preview/{chunk.AKQXF7GW.js → chunk.QXMTGLHR.js} +1 -1
- package/dist/preview/{chunk.AVKDWISO.js → chunk.RFCTUGMU.js} +1 -1
- package/dist/preview/chunk.ROHM3ETN.js +49 -0
- package/dist/preview/{chunk.SIGC3G7S.js → chunk.RR4RZH4S.js} +1 -1
- package/dist/preview/chunk.RRCPEHM4.js +1 -0
- package/dist/preview/{chunk.FDE3TSTK.js → chunk.S5K4FLLG.js} +1 -1
- package/dist/preview/{chunk.ZRLXVYPG.js → chunk.SUQU4AXG.js} +1 -1
- package/dist/preview/{chunk.TIH2PDFH.js → chunk.SZKVNPEF.js} +1 -1
- package/dist/preview/chunk.T3F6BKIO.js +1 -0
- package/dist/preview/{chunk.2GDXNTY5.js → chunk.U3MQUIJL.js} +1 -1
- package/dist/preview/{chunk.H5ADMSE7.js → chunk.U6YOAS4X.js} +1 -1
- package/dist/preview/chunk.UG727PEE.js +5 -0
- package/dist/preview/{chunk.NGDXH66B.js → chunk.V3K32XD7.js} +1 -1
- package/dist/preview/{chunk.QIV65FWE.js → chunk.V5VQCANB.js} +1 -1
- package/dist/preview/{chunk.RCM7NOPF.js → chunk.VEP4EJ2N.js} +1 -1
- package/dist/preview/chunk.VKJAGZNU.js +2 -0
- package/dist/preview/{chunk.N2K25KH3.js → chunk.VMBIFUYX.js} +1 -1
- package/dist/preview/{chunk.35PHXNOC.js → chunk.VO6DBVZR.js} +1 -1
- package/dist/preview/{chunk.UUBYFBPN.js → chunk.VTUMPH4Z.js} +1 -1
- package/dist/preview/{chunk.3Q75TIGL.js → chunk.VXZFW52D.js} +1 -1
- package/dist/preview/{chunk.PYNYHNDS.js → chunk.VYPR2MZO.js} +1 -1
- package/dist/preview/chunk.W77OH637.js +1 -0
- package/dist/preview/{chunk.HPAGOEZG.js → chunk.WERBD5ZR.js} +1 -1
- package/dist/preview/{chunk.2WACBAUN.js → chunk.WODEO2JF.js} +2 -2
- package/dist/preview/{chunk.JACGQ2PR.js → chunk.WUQOSVQU.js} +2 -2
- package/dist/preview/{chunk.N6MVK3KD.js → chunk.WVN62OMH.js} +1 -1
- package/dist/preview/{chunk.Z5AB2DBF.js → chunk.WZEA2UK6.js} +1 -1
- package/dist/preview/{chunk.VJXXCUKS.js → chunk.X2M7IOQA.js} +1 -1
- package/dist/preview/chunk.X5WIS4BC.js +1 -0
- package/dist/preview/{chunk.UHI3D7JC.js → chunk.XDPIS7RS.js} +1 -1
- package/dist/preview/{chunk.VIYECFKZ.js → chunk.XNW7PUAF.js} +1 -1
- package/dist/preview/chunk.XPML6T3P.js +1 -0
- package/dist/preview/{chunk.XEKLEHC3.js → chunk.Y2QDZLSY.js} +1 -1
- package/dist/preview/{chunk.R5WY567U.js → chunk.YJM23BJL.js} +1 -1
- package/dist/preview/chunk.YLGSXLXF.js +1 -0
- package/dist/preview/chunk.YLI6I6XP.js +1 -0
- package/dist/preview/chunk.YRYEWVNP.js +1 -0
- package/dist/preview/chunk.Z2TYCMBT.js +5 -0
- package/dist/preview/chunk.ZAFIZXGX.js +1 -0
- package/dist/preview/{chunk.IFTWVUJO.js → chunk.ZBYLAC3B.js} +1 -1
- package/dist/preview/chunk.ZOS5APMD.js +1 -0
- package/dist/preview/{chunk.TGVUIFKD.js → chunk.ZQCGDTQ3.js} +1 -1
- package/dist/preview/chunk.ZRIDKFTV.js +1 -0
- package/dist/preview/index.html +45 -45
- package/dist/preview/page.js +3 -3
- package/package.json +6 -6
- package/dist/preview/chunk.242EUAPE.js +0 -1
- package/dist/preview/chunk.2CF2XKOS.js +0 -1
- package/dist/preview/chunk.2FGYWAID.js +0 -1
- package/dist/preview/chunk.2NXH7VAI.js +0 -1
- package/dist/preview/chunk.2OSNYF5C.js +0 -1
- package/dist/preview/chunk.6CRRPXKP.js +0 -1
- package/dist/preview/chunk.74NOI7QN.js +0 -1
- package/dist/preview/chunk.AUBGUDO5.js +0 -1
- package/dist/preview/chunk.BNVMMOOY.js +0 -1
- package/dist/preview/chunk.CN5WAKHJ.js +0 -5
- package/dist/preview/chunk.DL26BKT7.js +0 -1
- package/dist/preview/chunk.GZIVMOY4.js +0 -117
- package/dist/preview/chunk.H7POIT3V.js +0 -1
- package/dist/preview/chunk.HFYUAK5Z.js +0 -6
- package/dist/preview/chunk.J2CR4RRH.js +0 -1
- package/dist/preview/chunk.J4IULZFD.js +0 -1
- package/dist/preview/chunk.JLDBFX6O.js +0 -1
- package/dist/preview/chunk.L3A6YLMT.js +0 -21
- package/dist/preview/chunk.LLEFYJPJ.js +0 -344
- package/dist/preview/chunk.LOZJQ5ZX.js +0 -1
- package/dist/preview/chunk.O5JKDFDH.js +0 -1
- package/dist/preview/chunk.O6F3K6CU.js +0 -1
- package/dist/preview/chunk.QCWZSSNC.js +0 -1
- package/dist/preview/chunk.S2U5CEP4.js +0 -1
- package/dist/preview/chunk.T73RB7LC.js +0 -1
- package/dist/preview/chunk.TD2LNFUB.js +0 -1
- package/dist/preview/chunk.TNESS3LQ.js +0 -2
- package/dist/preview/chunk.V5MYKNL7.js +0 -5
- package/dist/preview/chunk.VDAMCTNL.js +0 -1
- package/dist/preview/chunk.W4HBRXMY.js +0 -1
- package/dist/preview/chunk.W7R2GFBW.js +0 -47
- package/dist/preview/chunk.WBLHCH5M.js +0 -1
- package/dist/preview/chunk.XFZKP4IF.js +0 -2
- package/dist/preview/chunk.XQTMO5PW.js +0 -1
- package/dist/preview/chunk.YO24NALN.js +0 -1
- package/dist/preview/chunk.ZOR6FKNI.js +0 -1
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{a as Pt,b as xe,c as Ct,f as Lt,g as re}from"./chunk.CN5WAKHJ.js";import{m as xt}from"./chunk.PYNYHNDS.js";import{g as yt}from"./chunk.XQHDP5C3.js";import{a as ht}from"./chunk.ZJMDLRC5.js";import{d as pt}from"./chunk.UUBYFBPN.js";import{d as mt}from"./chunk.2RVUDRRY.js";import{F as bt,G as Et,i as ft,j as kr,s as gt,t as vt,w as Rt,x as wt,y as St}from"./chunk.LLEFYJPJ.js";import{$ as dt,G as O,O as ct,R as q}from"./chunk.FOQZADMA.js";import{Va as tt,Vc as nt,Wc as ot,Xc as it,da as Ee,ga as le,ic as rt,kd as lt,ld as st,md as ut,tc as at}from"./chunk.V5MYKNL7.js";import{b as D}from"./chunk.AJZBJBMO.js";function Fr(e,t){return nt(e,t).slice(1)}function se(e,t){return e.kinds.find(r=>Fr(e,r)===t)}function Sn(e,t,r){return ot(e,t,r)}function bn(e,t){return it(e,t)}var A=D(O(),1),g=D(O(),1),E=D(O(),1),Be=D(O(),1),ur=D(O(),1),b=D(O(),1),qa=D(O(),1),Za=D(O(),1),en=D(O(),1),v=D(O(),1),Sr=D(O(),1);var Me=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_t=/^[\\/]{2}/;function Tr(e,t){return t+e.replace(/\\/g,"/")}var Dt="popstate";function he(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function $t(e={}){let{initialEntries:t=["/"],initialIndex:r,v5Compat:a=!1}=e,n;n=t.map((f,y)=>c(f,typeof f=="string"?null:f.state,y===0?"default":void 0,typeof f=="string"?void 0:f.mask));let o=s(r??n.length-1),i="POP",l=null;function s(f){return Math.min(Math.max(f,0),n.length-1)}function u(){return n[o]}function c(f,y=null,m,h){let S=me(n?u().pathname:"/",f,y,m,h);return T(S.pathname.charAt(0)==="/",`relative pathnames are not supported in memory history: ${JSON.stringify(f)}`),S}function d(f){return typeof f=="string"?f:z(f)}return{get index(){return o},get action(){return i},get location(){return u()},createHref:d,createURL(f){return new URL(d(f),"http://localhost")},encodeLocation(f){let y=typeof f=="string"?V(f):f;return{pathname:y.pathname||"",search:y.search||"",hash:y.hash||""}},push(f,y){i="PUSH";let m=he(f)?f:c(f,y);o+=1,n.splice(o,n.length,m),a&&l&&l({action:i,location:m,delta:1})},replace(f,y){i="REPLACE";let m=he(f)?f:c(f,y);n[o]=m,a&&l&&l({action:i,location:m,delta:0})},go(f){i="POP";let y=s(o+f),m=n[y];o=y,l&&l({action:i,location:m,delta:f})},listen(f){return l=f,()=>{l=null}}}}function It(e={}){function t(a,n){let o=n.state?.masked,{pathname:i,search:l,hash:s}=o||a.location;return me("",{pathname:i,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function r(a,n){return typeof n=="string"?n:z(n)}return Nr(t,r,null,e)}function P(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function T(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Mr(){return Math.random().toString(36).substring(2,10)}function kt(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function me(e,t,r=null,a,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||a||Mr(),mask:n}}function z({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Nr(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,i=n.history,l="POP",s=null,u=c();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let h=c(),S=h==null?null:h-u;u=h,s&&s({action:l,location:m.location,delta:S})}function p(h,S){l="PUSH";let R=he(h)?h:me(m.location,h,S);r&&r(R,h),u=c()+1;let w=kt(R,u),L=m.createHref(R.mask||R);try{i.pushState(w,"",L)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;n.location.assign(L)}o&&s&&s({action:l,location:m.location,delta:1})}function f(h,S){l="REPLACE";let R=he(h)?h:me(m.location,h,S);r&&r(R,h),u=c();let w=kt(R,u),L=m.createHref(R.mask||R);i.replaceState(w,"",L),o&&s&&s({action:l,location:m.location,delta:0})}function y(h){return Or(n,h)}let m={get action(){return l},get location(){return e(n,i)},listen(h){if(s)throw new Error("A history only accepts one active listener");return n.addEventListener(Dt,d),s=h,()=>{n.removeEventListener(Dt,d),s=null}},createHref(h){return t(n,h)},createURL:y,encodeLocation(h){let S=y(h);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:p,replace:f,go(h){return i.go(h)}};return m}function Or(e,t,r=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),P(a,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:z(t);return n=n.replace(/ $/,"%20"),!r&&_t.test(n)&&(n=a+n),new URL(n,a)}var Ar;Ar=new WeakMap;function Ne(e,t,r="/"){return _r(e,t,r,!1)}function _r(e,t,r,a,n){let o=typeof t=="string"?V(t):t,i=U(o.pathname||"/",r);if(i==null)return null;let l=n??Ir(e),s=null,u=Gr(i);for(let c=0;s==null&&c<l.length;++c)s=Kr(l[c],u,a);return s}function $r(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Ir(e){let t=Ht(e);return Hr(t),t}function Ht(e,t=[],r=[],a="",n=!1){let o=(i,l,s=n,u)=>{let c={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(c.relativePath.startsWith("/")){if(!c.relativePath.startsWith(a)&&s)return;P(c.relativePath.startsWith(a),`Absolute route path "${c.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(a.length)}let d=I([a,c.relativePath]),p=r.concat(c);i.children&&i.children.length>0&&(P(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Ht(i.children,t,p,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:Vr(d,i.index),routesMeta:p.map((f,y)=>{let[m,h]=zt(f.relativePath,f.caseSensitive,y===p.length-1);return{...f,matcher:m,compiledParams:h}})})};return e.forEach((i,l)=>{if(i.path===""||!i.path?.includes("?"))o(i,l);else for(let s of Ut(i.path))o(i,l,!0,s)}),t}function Ut(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let i=Ut(a.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),n&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function Hr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Jr(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Ur=/^:[\w-]+$/,jr=3,zr=2,Br=1,Wr=10,Yr=-2,Ft=e=>e==="*";function Vr(e,t){let r=e.split("/"),a=r.length;return r.some(Ft)&&(a+=Yr),t&&(a+=zr),r.filter(n=>!Ft(n)).reduce((n,o)=>n+(Ur.test(o)?jr:o===""?Br:Wr),a)}function Jr(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function Kr(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",i=[];for(let l=0;l<a.length;++l){let s=a[l],u=l===a.length-1,c=o==="/"?t:t.slice(o.length)||"/",d={path:s.relativePath,caseSensitive:s.caseSensitive,end:u},p=s.matcher&&s.compiledParams?jt(d,c,s.matcher,s.compiledParams):ne(d,c),f=s.route;if(!p&&u&&r&&!a[a.length-1].route.index&&(p=ne({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},c)),!p)return null;Object.assign(n,p.params),i.push({params:n,pathname:I([o,p.pathname]),pathnameBase:Qr(I([o,p.pathnameBase])),route:f}),p.pathnameBase!=="/"&&(o=I([o,p.pathnameBase]))}return i}function ne(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=zt(e.path,e.caseSensitive,e.end);return jt(e,t,r,a)}function jt(e,t,r,a){let n=t.match(r);if(!n)return null;let o=n[0],i=Z(o,1),l=n.slice(1);return{params:a.reduce((u,{paramName:c,isOptional:d},p)=>{if(c==="*"){let y=l[p]||"";i=Z(o.slice(0,o.length-y.length),1)}let f=l[p];return d&&!f?u[c]=void 0:u[c]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function zt(e,t=!1,r=!0){T(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s,u,c)=>{if(a.push({paramName:l,isOptional:s!=null}),s){let d=c.charAt(u+i.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Gr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function Bt(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?V(e):e,o;return r?(r=Wt(r),r.startsWith("/")||r.startsWith("\\")?o=Tt(r.substring(1),"/"):o=Tt(r,t)):o=t,{pathname:o,search:qr(a),hash:Zr(n)}}function Tt(e,t){let r=Z(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Pe(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Xr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Oe(e){let t=Xr(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function ge(e,t,r,a=!1){let n;typeof e=="string"?n=V(e):(n={...e},P(!n.pathname||!n.pathname.includes("?"),Pe("?","pathname","search",n)),P(!n.pathname||!n.pathname.includes("#"),Pe("#","pathname","hash",n)),P(!n.search||!n.search.includes("#"),Pe("#","search","hash",n)));let o=e===""||n.pathname==="",i=o?"/":n.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!a&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),d-=1;n.pathname=p.join("/")}l=d>=0?t[d]:"/"}let s=Bt(n,l),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}var Wt=e=>e.replace(/[\\/]{2,}/g,"/"),I=e=>Wt(e.join("/"));function Z(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}var Qr=e=>Z(e).replace(/^\/*/,"/"),qr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Zr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;var Yt=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Vt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ea(e){let t=e.map(r=>r.route.path).filter(Boolean);return I(t)||"/"}var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Kt(e,t){let r=e;if(typeof r!="string"||!Me.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let a=r,n=!1;if(Jt)try{let o=new URL(window.location.href),i=_t.test(r)?new URL(Tr(r,o.protocol)):new URL(r),l=U(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:n=!0}catch{T(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:n,to:r}}var xn=Symbol("Uninstrumented");var Pn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Mt=new URL("http://localhost");function Ae(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Mt)}catch{return Mt}}function Ce(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function ta(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function _e(e,t,r,a){let n=null;try{n=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),i=n!=null&&!Ce(n,r),l=!Ce(o,r);if(a==="reject"){if(i||l)throw new Error("External navigation is not allowed")}else if(l&&(n==null||!ta(e,n)||!Ce(n,o)))throw new Error("External navigation is not allowed")}var Gt=["POST","PUT","PATCH","DELETE"],Cn=new Set(Gt),ra=["GET",...Gt],Ln=new Set(ra);var Dn=Symbol("ResetLoaderData"),aa,na,oa,ia;aa=new WeakMap;na=new WeakMap;oa=new WeakMap;ia=new WeakMap;var la=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function sa(e){try{return la.includes(new URL(e).protocol)}catch{return!1}}var K=A.createContext(null);K.displayName="DataRouter";var ee=A.createContext(null);ee.displayName="DataRouterState";var Xt=A.createContext(!1);function ua(){return A.useContext(Xt)}var $e=A.createContext({isTransitioning:!1});$e.displayName="ViewTransition";var Qt=A.createContext(new Map);Qt.displayName="Fetchers";var ca=A.createContext(null);ca.displayName="Await";var F=A.createContext(null);F.displayName="Navigation";var G=A.createContext(null);G.displayName="Location";var $=A.createContext({outlet:null,matches:[],isDataRoute:!1});$.displayName="Route";var Ie=A.createContext(null);Ie.displayName="RouteError";var ke=!0,qt="REACT_ROUTER_ERROR",da="REDIRECT",fa="ROUTE_ERROR_RESPONSE";function ha(e){if(e.startsWith(`${qt}:${da}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ma(e){if(e.startsWith(`${qt}:${fa}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Yt(t.status,t.statusText,t.data)}catch{}}function ve(e,{relative:t}={}){P(X(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=g.useContext(F),{hash:n,pathname:o,search:i}=te(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:I([r,o])),a.createHref({pathname:l,search:i,hash:n})}function X(){return g.useContext(G)!=null}function k(){return P(X(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(G).location}function pa(){return g.useContext(G).navigationType}var Zt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function er(e){g.useContext(F).static||g.useLayoutEffect(e)}function Q(){let{isDataRoute:e}=g.useContext($);return e?Ca():ya()}function ya(){P(X(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(K),{basename:t,navigator:r}=g.useContext(F),{matches:a}=g.useContext($),{pathname:n}=k(),o=JSON.stringify(Oe(a)),i=g.useRef(!1);return er(()=>{i.current=!0}),g.useCallback((s,u={})=>{if(T(i.current,Zt),!i.current)return;if(typeof s=="number"){r.go(s);return}let c=ge(s,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:I([t,c.pathname])),_e(typeof s=="string"?s:z(s),r.createHref(c),Ae(r),"reject"),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,o,n,e])}var kn=g.createContext(null);function ga(){let{matches:e}=g.useContext($);return e[e.length-1]?.params??{}}function te(e,{relative:t}={}){let{matches:r}=g.useContext($),{pathname:a}=k(),n=JSON.stringify(Oe(r));return g.useMemo(()=>ge(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function tr(e,t){return rr(e,t)}function rr(e,t,r){P(X(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=g.useContext(F),{matches:n}=g.useContext($),o=n[n.length-1],i=o?o.params:{},l=o?o.pathname:"/",s=o?o.pathnameBase:"/",u=o&&o.route;if(ke){let h=u&&u.path||"";ir(l,!u||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
2
|
-
|
|
3
|
-
Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let c=k(),d;if(t){let h=typeof t=="string"?V(t):t;P(s==="/"||h.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${h.pathname}" was given in the \`location\` prop.`),d=h}else d=c;let p=d.pathname||"/",f=p;if(s!=="/"){let h=s.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(h.length).join("/")}let y=r&&r.state.matches.length?r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):Ne(e,{pathname:f});ke&&(T(u||y!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),T(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`));let m=ba(y&&y.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:I([s,a.encodeLocation?a.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?s:I([s,a.encodeLocation?a.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),n,r);return t&&m?g.createElement(G.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...d},navigationType:"POP"}},m):m}function va(){let e=or(),t=Vt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},i=null;return ke&&(console.error("Error handled by React Router default ErrorBoundary:",e),i=g.createElement(g.Fragment,null,g.createElement("p",null,"\u{1F4BF} Hey developer \u{1F44B}"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:o},"ErrorBoundary")," or"," ",g.createElement("code",{style:o},"errorElement")," prop on your route."))),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),r?g.createElement("pre",{style:n},r):null,i)}var Ra=g.createElement(va,null),ar=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){let r=ma(e.digest);r&&(e=r)}let t=e!==void 0?g.createElement($.Provider,{value:this.props.routeContext},g.createElement(Ie.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?g.createElement(wa,{error:e},t):t}};ar.contextType=Xt;var Le=new WeakMap;function wa({children:e,error:t}){let{basename:r,navigator:a}=g.useContext(F);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ha(t.digest);if(n){let o=Le.get(t);if(o)throw o;let i=Kt(n.location,r),l=i.absoluteURL||i.to;if(_e(n.location,l,Ae(a),"allow-explicit"),sa(l))throw new Error("Invalid redirect location");if(Jt&&!Le.get(t))if(i.isExternal||n.reloadDocument)window.location.href=l;else{let s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:n.replace}));throw Le.set(t,s),s}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Sa({routeContext:e,match:t,children:r}){let a=g.useContext(K);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement($.Provider,{value:e},r)}function ba(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let n=e,o=a?.errors;if(o!=null){let c=n.findIndex(d=>d.route.id&&o?.[d.route.id]!==void 0);P(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,c+1))}let i=!1,l=-1;if(r&&a){i=a.renderFallback;for(let c=0;c<n.length;c++){let d=n[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(l=c),d.route.id){let{loaderData:p,errors:f}=a,y=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!f||f[d.route.id]===void 0);if(d.route.lazy||y){r.isStatic&&(i=!0),l>=0?n=n.slice(0,l+1):n=[n[0]];break}}}}let s=r?.onError,u=a&&s?(c,d)=>{s(c,{location:a.location,params:a.matches?.[0]?.params??{},pattern:ea(a.matches),errorInfo:d})}:void 0;return n.reduceRight((c,d,p)=>{let f,y=!1,m=null,h=null;a&&(f=o&&d.route.id?o[d.route.id]:void 0,m=d.route.errorElement||Ra,i&&(l<0&&p===0?(ir("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,h=null):l===p&&(y=!0,h=d.route.hydrateFallbackElement||null)));let S=t.concat(n.slice(0,p+1)),R=()=>{let w;return f?w=m:y?w=h:d.route.Component?w=g.createElement(d.route.Component,null):d.route.element?w=d.route.element:w=c,g.createElement(Sa,{match:d,routeContext:{outlet:c,matches:S,isDataRoute:a!=null},children:w})};return a&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?g.createElement(ar,{location:a.location,revalidation:a.revalidation,component:m,error:f,children:R(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:u}):R()},null)}function He(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ea(e){let t=g.useContext(K);return P(t,He(e)),t}function Ue(e){let t=g.useContext(ee);return P(t,He(e)),t}function xa(e){let t=g.useContext($);return P(t,He(e)),t}function je(e){let t=xa(e),r=t.matches[t.matches.length-1];return P(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Pa(){return je("useRouteId")}function nr(){let e=Ue("useNavigation");return g.useMemo(()=>{let{matches:t,historyAction:r,...a}=e.navigation;return a},[e.navigation])}function ze(){let{matches:e,loaderData:t}=Ue("useMatches");return g.useMemo(()=>e.map(r=>$r(r,t)),[e,t])}function or(){let e=g.useContext(Ie),t=Ue("useRouteError"),r=je("useRouteError");return e!==void 0?e:t.errors?.[r]}function Ca(){let{router:e}=Ea("useNavigate"),t=je("useNavigate"),r=g.useRef(!1);return er(()=>{r.current=!0}),g.useCallback(async(n,o={})=>{T(r.current,Zt),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var Nt={};function ir(e,t,r){!t&&!Nt[e]&&(Nt[e]=!0,T(!1,r))}var La="useOptimistic",Fn=E[La];var Tn=E.memo(Da);function Da({routes:e,manifest:t,future:r,state:a,isStatic:n,onError:o}){return rr(e,void 0,{manifest:t,state:a,isStatic:n,onError:o,future:r})}function ka({basename:e,children:t,initialEntries:r,initialIndex:a,useTransitions:n}){let o=E.useRef();o.current==null&&(o.current=$t({initialEntries:r,initialIndex:a,v5Compat:!0}));let i=o.current,[l,s]=E.useState({action:i.action,location:i.location}),u=E.useCallback(c=>{n===!1?s(c):E.startTransition(()=>s(c))},[n]);return E.useLayoutEffect(()=>i.listen(u),[i,u]),E.createElement(Re,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:i,useTransitions:n})}function Fa({to:e,replace:t,state:r,relative:a}){P(X(),"<Navigate> may be used only in the context of a <Router> component.");let{static:n,navigator:o}=E.useContext(F);T(!n,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=E.useContext($),{pathname:l}=k(),s=Q(),u=ge(e,Oe(i),l,a==="path");_e(typeof e=="string"?e:z(e),o.createHref(u),Ae(o),"reject");let c=JSON.stringify(u);return E.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:a})},[s,c,a,t,r]),null}function lr(e){P(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Re({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1,useTransitions:i}){P(!X(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=E.useMemo(()=>({basename:l,navigator:n,static:o,useTransitions:i,future:{}}),[l,n,o,i]);typeof r=="string"&&(r=V(r));let{pathname:u="/",search:c="",hash:d="",state:p=null,key:f="default",mask:y}=r,m=E.useMemo(()=>{let h=U(u,l);return h==null?null:{location:{pathname:h,search:c,hash:d,state:p,key:f,mask:y},navigationType:a}},[l,u,c,d,p,f,a,y]);return T(m!=null,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:E.createElement(F.Provider,{value:s},E.createElement(G.Provider,{children:t,value:m}))}function Ta({children:e,location:t}){return tr(pe(e),t)}function pe(e,t=[]){let r=[];return E.Children.forEach(e,(a,n)=>{if(!E.isValidElement(a))return;let o=[...t,n];if(a.type===E.Fragment){r.push.apply(r,pe(a.props.children,o));return}P(a.type===lr,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),P(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=pe(a.props.children,o)),r.push(i)}),r}var de="get",fe="application/x-www-form-urlencoded";function we(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ma(e){return we(e)&&e.tagName.toLowerCase()==="button"}function Na(e){return we(e)&&e.tagName.toLowerCase()==="form"}function Oa(e){return we(e)&&e.tagName.toLowerCase()==="input"}function Aa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _a(e,t){return e.button===0&&(!t||t==="_self")&&!Aa(e)}function ye(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let a=e[r];return t.concat(Array.isArray(a)?a.map(n=>[r,n]):[[r,a]])},[]))}function $a(e,t){let r=ye(e);return t&&t.forEach((a,n)=>{r.has(n)||t.getAll(n).forEach(o=>{r.append(n,o)})}),r}var ue=null;function Ia(){if(ue===null)try{new FormData(document.createElement("form"),0),ue=!1}catch{ue=!0}return ue}var Ha=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return e!=null&&!Ha.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fe}"`),null):e}function Ua(e,t){let r,a,n,o,i;if(Na(e)){let l=e.getAttribute("action");a=l?U(l,t):null,r=e.getAttribute("method")||de,n=De(e.getAttribute("enctype"))||fe,o=new FormData(e)}else if(Ma(e)||Oa(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(a=s?U(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||de,n=De(e.getAttribute("formenctype"))||De(l.getAttribute("enctype"))||fe,o=new FormData(l,e),!Ia()){let{name:u,type:c,value:d}=e;if(c==="image"){let p=u?`${u}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else u&&o.append(u,d)}}else{if(we(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=de,a=null,n=fe,i=e}return o&&n==="text/plain"&&(i=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:i}}var Mn=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ja={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},za=/[&><\u2028\u2029]/g;function Ot(e){return e.replace(za,t=>ja[t])}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var Ba=Symbol("SingleFetchRedirect");function sr(e,t,r,a){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?n.pathname.endsWith("/")?n.pathname=`${n.pathname}_.${a}`:n.pathname=`${n.pathname}.${a}`:n.pathname==="/"?n.pathname=`_root.${a}`:t&&U(n.pathname,t)==="/"?n.pathname=`${Z(t)}/_root.${a}`:n.pathname=`${Z(n.pathname)}.${a}`,n}async function Wa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){if(console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode&&import.meta.hot)throw r;return window.location.reload(),new Promise(()=>{})}}function Ya(e){return e!=null&&typeof e.page=="string"}function Va(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ja(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let i=await Wa(o,r);return i.links?i.links():[]}return[]}));return Qa(a.flat(1).filter(Va).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function At(e,t,r,a,n,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>r[u].pathname!==s.pathname||r[u].route.path?.endsWith("*")&&r[u].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{let c=a.routes[s.route.id];if(!c||!c.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;if(s.route.shouldRevalidate){let d=s.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function Ka(e,t,{includeHydrateFallback:r}={}){return Ga(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function Ga(e){return[...new Set(e)]}function Xa(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function Qa(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Ya(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let l=JSON.stringify(Xa(o));return r.has(l)||(r.add(l),n.push({key:l,link:o})),n},[])}function Ye(){let e=b.useContext(K);return We(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tn(){let e=b.useContext(ee);return We(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var oe=b.createContext(void 0);oe.displayName="FrameworkContext";function Se(){let e=b.useContext(oe);return We(e,"You must render this element inside a <HydratedRouter> element"),e}function rn(e,t){let r=b.useContext(oe),[a,n]=b.useState(!1),[o,i]=b.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,p=b.useRef(null);b.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=S=>{S.forEach(R=>{i(R.isIntersecting)})},h=new IntersectionObserver(m,{threshold:.5});return p.current&&h.observe(p.current),()=>{h.disconnect()}}},[e]),b.useEffect(()=>{if(a){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[a]);let f=()=>{n(!0)},y=()=>{n(!1),i(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:ae(l,f),onBlur:ae(s,y),onMouseEnter:ae(u,f),onMouseLeave:ae(c,y),onTouchStart:ae(d,f)}]:[!1,p,{}]}function ae(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function cr({page:e,...t}){let r=ua(),{nonce:a}=Se(),{router:n}=Ye(),o=b.useMemo(()=>Ne(n.routes,e,n.basename),[n.routes,e,n.basename]);return o?(t.nonce==null&&a&&(t={...t,nonce:a}),r?b.createElement(nn,{page:e,matches:o,...t}):b.createElement(on,{page:e,matches:o,...t})):null}function an(e){let{manifest:t,routeModules:r}=Se(),[a,n]=b.useState([]);return b.useEffect(()=>{let o=!1;return Ja(e,t,r).then(i=>{o||n(i)}),()=>{o=!0}},[e,t,r]),a}function nn({page:e,matches:t,...r}){let a=k(),{future:n}=Se(),{basename:o}=Ye(),i=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let l=sr(e,o,n.v8_trailingSlashAwareDataRequests,"rsc"),s=!1,u=[];for(let c of t)typeof c.route.shouldRevalidate=="function"?s=!0:u.push(c.route.id);return s&&u.length>0&&l.searchParams.set("_routes",u.join(",")),[l.pathname+l.search]},[o,n.v8_trailingSlashAwareDataRequests,e,a,t]);return b.createElement(b.Fragment,null,i.map(l=>b.createElement("link",{key:l,rel:"prefetch",as:"fetch",href:l,...r})))}function on({page:e,matches:t,...r}){let a=k(),{future:n,manifest:o,routeModules:i}=Se(),{basename:l}=Ye(),{loaderData:s,matches:u}=tn(),c=b.useMemo(()=>At(e,t,u,o,a,"data"),[e,t,u,o,a]),d=b.useMemo(()=>At(e,t,u,o,a,"assets"),[e,t,u,o,a]),p=b.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let m=new Set,h=!1;if(t.forEach(R=>{let w=o.routes[R.route.id];!w||!w.hasLoader||(!c.some(L=>L.route.id===R.route.id)&&R.route.id in s&&i[R.route.id]?.shouldRevalidate||w.hasClientLoader?h=!0:m.add(R.route.id))}),m.size===0)return[];let S=sr(e,l,n.v8_trailingSlashAwareDataRequests,"data");return h&&m.size>0&&S.searchParams.set("_routes",t.filter(R=>m.has(R.route.id)).map(R=>R.route.id).join(",")),[S.pathname+S.search]},[l,n.v8_trailingSlashAwareDataRequests,s,a,o,c,t,e,i]),f=b.useMemo(()=>Ka(d,o),[d,o]),y=an(d);return b.createElement(b.Fragment,null,p.map(m=>b.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...r})),f.map(m=>b.createElement("link",{key:m,rel:"modulepreload",href:m,...r})),y.map(({key:m,link:h})=>b.createElement("link",{key:m,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}function ln(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var sn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{sn&&(window.__reactRouterVersion="7.18.3")}catch{}function un({basename:e,children:t,useTransitions:r,window:a}){let n=v.useRef();n.current==null&&(n.current=It({window:a,v5Compat:!0}));let o=n.current,[i,l]=v.useState({action:o.action,location:o.location}),s=v.useCallback(u=>{r===!1?l(u):v.startTransition(()=>l(u))},[r]);return v.useLayoutEffect(()=>o.listen(s),[o,s]),v.createElement(Re,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:o,useTransitions:r})}function dr({basename:e,children:t,history:r,useTransitions:a}){let[n,o]=v.useState({action:r.action,location:r.location}),i=v.useCallback(l=>{a===!1?o(l):v.startTransition(()=>o(l))},[a]);return v.useLayoutEffect(()=>r.listen(i),[r,i]),v.createElement(Re,{basename:e,children:t,location:n.location,navigationType:n.action,navigator:r,useTransitions:a})}dr.displayName="unstable_HistoryRouter";var ie=v.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:i,mask:l,state:s,target:u,to:c,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:f,...y},m){let{basename:h,navigator:S,useTransitions:R}=v.useContext(F),w=typeof c=="string"&&Me.test(c),L=Kt(c,h);c=L.to;let x=ve(c,{relative:n}),N=k(),H=null;if(l){let Y=ge(l,[],N.mask?N.mask.pathname:"/",!0);h!=="/"&&(Y.pathname=Y.pathname==="/"?h:I([h,Y.pathname])),H=S.createHref(Y)}let[_,B,W]=rn(a,y),be=yr(c,{replace:i,mask:l,state:s,target:u,preventScrollReset:d,relative:n,viewTransition:p,defaultShouldRevalidate:f,useTransitions:R});function Dr(Y){t&&t(Y),Y.defaultPrevented||be(Y)}let Ze=!(L.isExternal||o),et=v.createElement("a",{...y,...W,href:(Ze?H:void 0)||L.absoluteURL||x,onClick:Ze?Dr:t,ref:ln(m,B),target:u,"data-discover":!w&&r==="render"?"true":void 0});return _&&!w?v.createElement(v.Fragment,null,et,v.createElement(cr,{page:x})):et});ie.displayName="Link";var fr=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:i,viewTransition:l,children:s,...u},c){let d=te(i,{relative:u.relative}),p=k(),f=v.useContext(ee),{navigator:y,basename:m}=v.useContext(F),h=f!=null&&wr(d)&&l===!0,S=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,R=p.pathname,w=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(R=R.toLowerCase(),w=w?w.toLowerCase():null,S=S.toLowerCase()),w&&m&&(w=U(w,m)||w);let L=S!=="/"&&S.endsWith("/")?S.length-1:S.length,x=R===S||!n&&R.startsWith(S)&&R.charAt(L)==="/",N=w!=null&&(w===S||!n&&w.startsWith(S)&&w.charAt(S.length)==="/"),H={isActive:x,isPending:N,isTransitioning:h},_=x?t:void 0,B;typeof a=="function"?B=a(H):B=[a,x?"active":null,N?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let W=typeof o=="function"?o(H):o;return v.createElement(ie,{...u,"aria-current":_,className:B,ref:c,style:W,to:i,viewTransition:l},typeof s=="function"?s(H):s)});fr.displayName="NavLink";var hr=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:i=de,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p,...f},y)=>{let{useTransitions:m}=v.useContext(F),h=gr(),S=vr(l,{relative:u}),R=i.toLowerCase()==="get"?"get":"post",w=typeof l=="string"&&Me.test(l);return v.createElement("form",{ref:y,method:R,action:S,onSubmit:a?s:x=>{if(s&&s(x),x.defaultPrevented)return;x.preventDefault();let N=x.nativeEvent.submitter,H=N?.getAttribute("formmethod")||i,_=()=>h(N||x.currentTarget,{fetcherKey:t,method:H,navigate:r,replace:n,state:o,relative:u,preventScrollReset:c,viewTransition:d,defaultShouldRevalidate:p});m&&r!==!1?v.startTransition(()=>_()):_()},...f,"data-discover":!w&&e==="render"?"true":void 0})});hr.displayName="Form";function mr({getKey:e,storageKey:t,...r}){let a=v.useContext(oe),{basename:n}=v.useContext(F),o=k(),i=ze();Rr({getKey:e,storageKey:t});let l=v.useMemo(()=>{if(!a||!e)return null;let u=Te(o,i,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let s=((u,c)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let p=JSON.parse(sessionStorage.getItem(u)||"{}")[c||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return r.nonce==null&&a?.nonce&&(r.nonce=a.nonce),v.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${Ot(JSON.stringify(t||Fe))}, ${Ot(JSON.stringify(l))})`}})}mr.displayName="ScrollRestoration";function pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ve(e){let t=v.useContext(K);return P(t,pr(e)),t}function cn(e){let t=v.useContext(ee);return P(t,pr(e)),t}function yr(e,{target:t,replace:r,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s,useTransitions:u}={}){let c=Q(),d=k(),p=te(e,{relative:i});return v.useCallback(f=>{if(_a(f,t)){f.preventDefault();let y=r!==void 0?r:z(d)===z(p),m=()=>c(e,{replace:y,mask:a,state:n,preventScrollReset:o,relative:i,viewTransition:l,defaultShouldRevalidate:s});u?v.startTransition(()=>m()):m()}},[d,c,p,r,a,n,t,e,o,i,l,s,u])}function Je(e){T(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=v.useRef(ye(e)),r=v.useRef(!1),a=k(),n=v.useMemo(()=>$a(a.search,r.current?null:t.current),[a.search]),o=Q(),i=v.useCallback((l,s)=>{let u=ye(typeof l=="function"?l(new URLSearchParams(n)):l);r.current=!0,o("?"+u,s)},[o,n]);return[n,i]}var dn=0,fn=()=>`__${String(++dn)}__`;function gr(){let{router:e}=Ve("useSubmit"),{basename:t}=v.useContext(F),r=Pa(),a=e.fetch,n=e.navigate;return v.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:c,body:d}=Ua(o,t);if(i.navigate===!1){let p=i.fetcherKey||fn();await a(p,r,i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await n(i.action||l,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:c,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[a,n,t,r])}function vr(e,{relative:t}={}){let{basename:r}=v.useContext(F),a=v.useContext($);P(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...te(e||".",{relative:t})},i=k();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(c=>c==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let c=l.toString();o.search=c?`?${c}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:I([r,o.pathname])),z(o)}var Fe="react-router-scroll-positions",ce={};function Te(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:U(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Rr({getKey:e,storageKey:t}={}){let{router:r}=Ve("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=cn("useScrollRestoration"),{basename:o}=v.useContext(F),i=k(),l=ze(),s=nr();v.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),hn(v.useCallback(()=>{if(s.state==="idle"){let u=Te(i,l,o,e);ce[u]=window.scrollY}try{sessionStorage.setItem(t||Fe,JSON.stringify(ce))}catch(u){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(v.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||Fe);u&&(ce=JSON.parse(u))}catch{}},[t]),v.useLayoutEffect(()=>{let u=r?.enableScrollRestoration(ce,()=>window.scrollY,e?(c,d)=>Te(c,d,o,e):void 0);return()=>u&&u()},[r,o,e]),v.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{T(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}n!==!0&&window.scrollTo(0,0)}},[i,a,n]))}function hn(e,t){let{capture:r}=t||{};v.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function wr(e,{relative:t}={}){let r=v.useContext($e);P(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Ve("useViewTransitionState"),n=te(e,{relative:t});if(!r.isTransitioning)return!1;let o=U(r.currentLocation.pathname,a)||r.currentLocation.pathname,i=U(r.nextLocation.pathname,a)||r.nextLocation.pathname;return ne(n.pathname,i)!=null||ne(n.pathname,o)!=null}var Ke=D(O(),1),br=D(kr(),1);var j=D(q(),1);function Er({context:e,own:t}){re(e.store);let r=dt(),a=ct()?.live??e.store;re(a);let n=yt();if(!r||a.batches().length===0&&n===0)return null;let o=(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Ke.Suspense,{fallback:null,children:(0,j.jsx)(xt,{})}),(0,j.jsx)(Ke.Suspense,{fallback:null,children:(0,j.jsx)(Pt,{})})]});return t?(0,br.createPortal)(o,t):(0,j.jsx)("div",{className:"graview-bar-own",children:o})}var M=D(O(),1);var J=D(O(),1),mn=(0,J.createContext)(null);function Qo(){let e=new Map,t=new Set,r=()=>{for(let a of t)a()};return{count:a=>e.get(a)??0,place(a){return e.set(a,(e.get(a)??0)+1),r(),()=>{e.set(a,(e.get(a)??1)-1),r()}},subscribe(a){return t.add(a),()=>t.delete(a)}}}function xr(e){let t=(0,J.useContext)(mn);(0,J.useLayoutEffect)(()=>t?.place(e),[t,e])}function qo(e,t){return(0,J.useSyncExternalStore)(e.subscribe,()=>e.count(t)>0,()=>!1)}var Lr=D(q(),1),Ge="var(--graview-text-small)",Xe="var(--graview-text-body)",ni="var(--graview-font-display, var(--graview-font-body, system-ui))",Qe={maxWidth:760,margin:"0 auto",padding:"40px 20px max(96px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",display:"grid",gridTemplateColumns:"minmax(0, 1fr)",gap:40},qe=1160,oi={...Qe,maxWidth:qe},Pr={margin:0,fontSize:"var(--graview-text-title)",lineHeight:1.2,letterSpacing:"-0.012em",overflowWrap:"anywhere",textWrap:"balance"},ii={margin:0,fontSize:"var(--graview-text-heading)",lineHeight:1.3,textWrap:"balance"},li={margin:0,fontSize:Ge,letterSpacing:"0.08em",textTransform:"uppercase",color:"var(--graview-ink-muted)"},si={margin:0,fontSize:Xe,color:"var(--graview-ink-muted)",maxWidth:"60ch"},Cr={color:"var(--graview-ink-muted)",fontSize:Ge},ui={borderTop:"1px solid var(--graview-edge)",paddingTop:24},ci={color:"var(--graview-accent)",textDecorationColor:"color-mix(in srgb, currentColor 50%, transparent)",textDecorationThickness:1,textUnderlineOffset:"0.2em",display:"inline-flex",alignItems:"center",minHeight:24},di={color:"inherit",textDecoration:"none",display:"inline-flex",alignItems:"center",minHeight:24},fi=`.graview-list{container-type:inline-size}
|
|
4
|
-
.graview-rows{display:grid;grid-template-columns:minmax(0,1fr);column-gap:1.5rem;margin:0;padding:0;list-style:none;border-top:1px solid var(--graview-edge)}
|
|
5
|
-
.graview-row{grid-column:1/-1;display:grid;grid-template-columns:subgrid;align-items:baseline;align-content:center;position:relative;box-sizing:border-box;min-height:2.75rem;padding:.5rem 0;border-bottom:1px solid var(--graview-edge);overflow-wrap:anywhere}
|
|
6
|
-
.graview-row-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:24px;color:inherit;text-decoration:none;font-size:var(--graview-text-body);font-weight:500;line-height:1.3;text-wrap:pretty;hyphens:manual}
|
|
7
|
-
.graview-row-title::after{content:"";position:absolute;inset:0}
|
|
8
|
-
.graview-row-title:focus-visible{outline:0}
|
|
9
|
-
.graview-row-title:focus-visible::after{outline:2px solid var(--graview-accent);outline-offset:-2px;border-radius:var(--graview-radius-sm)}
|
|
10
|
-
.graview-row:hover .graview-row-title{text-decoration:underline 1px color-mix(in srgb,currentColor 50%,transparent);text-underline-offset:.2em}
|
|
11
|
-
.graview-row:active .graview-row-title{color:var(--graview-accent)}
|
|
12
|
-
.graview-row :is(a,button):not(.graview-row-title){position:relative}
|
|
13
|
-
.graview-row-glance,.graview-row>[data-testid=search-why]{font-size:var(--graview-text-small);line-height:1.5;color:var(--graview-ink-muted)}
|
|
14
|
-
.graview-row>[data-testid=search-why]{grid-column:1/-1}
|
|
15
|
-
.graview-row-glance{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
|
|
16
|
-
.graview-group-head{display:flex;gap:.5em;align-items:baseline;margin:0;padding:.375rem 0;font-family:var(--graview-font-body);font-size:var(--graview-text-small);font-weight:var(--graview-weight-label);line-height:1.3;letter-spacing:.02em;scroll-margin-top:4rem}
|
|
17
|
-
.graview-group-head>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
18
|
-
.graview-group-toggle{display:inline-flex;gap:.5em;align-items:center;min-height:2.75rem;margin:-.375rem 0;padding:0 .5rem 0 0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:start;cursor:pointer;border-radius:var(--graview-radius-sm)}
|
|
19
|
-
.graview-group-toggle:focus-visible{outline:2px solid var(--graview-accent);outline-offset:2px}
|
|
20
|
-
.graview-group-toggle>span{color:var(--graview-ink-muted);font-weight:var(--graview-weight-body)}
|
|
21
|
-
@container (min-width:36rem){.graview-rows{grid-template-columns:minmax(0,1fr) fit-content(40%)}.graview-group-head:has(+.graview-rows){position:sticky;top:0;z-index:${at.raised};background:var(--graview-ground)}}`,hi={font:"inherit",fontSize:Ge,padding:"8px 14px",borderRadius:"var(--graview-radius-sm, 8px)",border:"1px solid var(--graview-edge-bright)",background:"var(--graview-panel)",color:"var(--graview-ink)",cursor:"pointer"};function mi({kind:e,brand:t,size:r=10,schema:a}){return(0,Lr.jsx)(ht,{kind:e,...a?{schema:a}:{},...t?{brand:t}:{},size:Math.round(r*1.6)})}function pi(e,t){let a=[...new Set(t.targets.map(n=>n.kind))].map(n=>e.schema.tryDefinition(n)?.plural??Ee(n));return a.length>0?a.join(" and "):Ee(t.edgeKind)}function yi(e,t,r){return e.author.kind==="human"&&(e.author.id===void 0||t?.id===void 0||e.author.id===t.id)?"you":r?tt(e.author,r):e.author.kind==="agent"?e.author.id??"an agent":e.author.id??e.author.kind}function gi(e,t,r){return pt(e,t,{limit:3,said:[r],glance:!0}).map(a=>a.long?mt(a.stored,{markdown:a.markdown,most:100}):a.alone).join(" \xB7 ")}var vi=(e,t)=>le(e.schema,t),pn=(e,t)=>{let r=e.kindsKeptFrom(t);return e.schema.kinds.filter(a=>!e.modules.disabledKinds.has(a)&&!r.has(a))},yn=e=>ut(pn(e.store,e.principal),e.views?.arrangement?.()?.order),Ri=e=>{let t=new Set(e.views?.arrangement?.()?.hide??[]);return yn(e).filter(r=>!t.has(r))},wi=e=>e.charAt(0).toUpperCase()+e.slice(1);var C=D(q(),1);function Fi({context:e,children:t}){let{store:r,brand:a}=e;return re(r),ft(e.embedded?void 0:rt(a)),(0,C.jsxs)("div",{style:{...e.embedded?{}:{minHeight:"100vh"},display:"flex",flexDirection:"column",background:"var(--graview-ground)",color:"var(--graview-ink)",fontFamily:"var(--graview-font-body, system-ui)",fontSize:Xe,lineHeight:1.5},children:[e.embedded?null:(0,C.jsx)(vn,{context:e}),(0,C.jsx)("div",{style:{flex:1},children:t}),e.remembers?(0,C.jsx)("footer",{style:{borderTop:"1px solid var(--graview-edge)",padding:"14px 20px max(20px, calc(var(--graview-foot-room, 0px) + env(safe-area-inset-bottom, 0px)))",...Cr},children:(0,C.jsx)("div",{style:{maxWidth:qe,margin:"0 auto",display:"flex",gap:14,flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"},children:(0,C.jsxs)("span",{"data-testid":"remembered",children:["Remembered in this browser \xB7 ",(0,C.jsx)(Lt,{})]})})}):null]})}var gn=(0,M.createContext)(null);function vn({context:e}){let{store:t,brand:r,sceneHref:a="/",invariantContext:n}=e,o=k(),i=Q(),l=ve("/").replace(/\/$/,""),s=(0,M.useContext)(gn),u=s?.places===!1?[]:gt({store:t,principal:e.principal,views:e.views}),c=e.views?.arrangement?.(),d=`${o.pathname}${o.search}`,p=t.violations(n),f=p.length,y=bt(p,"All rules hold"),m=o.pathname.split("/").filter(Boolean),h=m.length===2&&se(t.schema,m[0])!==void 0&&t.graph.getNode(decodeURIComponent(m[1]))!==void 0;return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(wt,{brand:r,name:r?.name??"Graview",description:r?.subtitle,home:{href:`${l}/`,go:()=>i("/"),current:o.pathname==="/"},faces:{scene:{label:lt(c),current:!1,go:()=>window.location.assign(a)},pages:{label:st(c),current:!0,go:()=>{}}},places:u,current:vt(u,d),reach:{href:S=>`${l}${S}`,go:S=>i(S.path)},...s?{onFind:s.onFind,find:s.find}:{findBox:(0,C.jsx)(Rn,{context:e})},skips:(0,C.jsx)(Ct,{to:[{label:"Skip to the content",testid:"content",go:()=>{let S=document.querySelector("[data-graview-skip-target]");xe(S?.querySelector('[data-graview-choose-box][tabindex="0"]')??S??document.querySelector("main"))}},...h?[{label:"Skip to what can be done",testid:"acts",go:()=>void xe(document.querySelector("main [data-affordance]:not([disabled])")??document.querySelector("main"))}]:[]]}),tools:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(ie,{to:"/problems","data-testid":"standing-link","aria-label":y,title:y,style:{...Rt,padding:f===0?0:"0 8px",textDecoration:"none",fontWeight:600,fontVariantNumeric:"tabular-nums",color:f===0?"var(--graview-ink-muted)":"var(--graview-warn)"},children:[(0,C.jsx)(Et,{tone:f===0?"var(--graview-good)":"var(--graview-warn)"}),f>0?(0,C.jsx)("span",{"aria-hidden":"true",children:f}):null]}),s?null:(0,C.jsx)(Er,{context:e}),e.views?(0,C.jsx)(St,{...e.signature?{signature:!0}:{}}):null]})})})}function Ti({context:e,style:t,children:r,...a}){let n=e.embedded||e.framed?"section":"main";return(0,C.jsx)(n,{style:{...Qe,...t},...a,children:r})}function Mi({context:e,children:t,...r}){let a=`h${e.titleLevel??(e.framed&&!e.barAbove?1:2)}`;return(0,C.jsx)(a,{style:Pr,"data-graview-page-title":"",...r,children:t})}function Rn({context:e,narrowsLists:t=!0}){xr("find");let r=k(),a=Q(),[n,o]=Je(),i=r.pathname.split("/").filter(Boolean),l=t&&i.length===1&&se(e.store.schema,i[0])!==void 0,s=r.pathname==="/search",u=l||s?n.get("q")??"":"",c=l?`Narrow ${le(e.store.schema,se(e.store.schema,i[0])).toLowerCase()}\u2026`:"",[d,p]=(0,M.useState)(!0);(0,M.useLayoutEffect)(()=>{let R=m.current;if(!R||!c||typeof ResizeObserver>"u")return;let w=()=>{let x=getComputedStyle(R),N=document.createElement("canvas").getContext("2d");N&&(N.font=`${x.fontWeight} ${x.fontSize} ${x.fontFamily}`,p(N.measureText(c).width<=R.clientWidth-parseFloat(x.paddingLeft)-parseFloat(x.paddingRight)))};w();let L=new ResizeObserver(w);return L.observe(R),()=>L.disconnect()},[c]);let[f,y]=(0,M.useState)(u),m=(0,M.useRef)(null);(0,M.useEffect)(()=>{let R=w=>{if(w.defaultPrevented||w.altKey)return;let L=!w.shiftKey&&(w.metaKey||w.ctrlKey)&&w.key.toLowerCase()==="k",x=document.activeElement,N=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||x instanceof HTMLSelectElement||x instanceof HTMLElement&&x.isContentEditable,H=w.key==="/"&&!w.metaKey&&!w.ctrlKey&&!N;if(!L&&!H)return;let _=m.current,B=_?.closest("[data-graview-embed]"),W=w.target,be=W===document.body||W===document.documentElement;!_||!(be||!B||W instanceof Node&&B.contains(W))||(w.preventDefault(),_.closest("[data-graview-app-bar]")?.querySelector('[data-testid="app-find-open"]')?.click(),requestAnimationFrame(()=>{_.focus(),_.select()}))};return document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[]);let h=(0,M.useRef)(new Set([u]));(0,M.useEffect)(()=>{h.current.has(u)||(h.current=new Set([u]),y(u))},[u]);let S=R=>{if(y(R),h.current.add(R),l){let L=new URLSearchParams(n);R.trim()?L.set("q",R):L.delete("q"),o(L,{replace:!0});return}let w=R.trim()?`/search?${new URLSearchParams({q:R}).toString()}`:"/search";a(w,{replace:s})};return(0,C.jsx)("form",{role:"search","aria-label":l?"Narrow this list":"Find anything",style:{display:"flex",minWidth:0,flex:"1 1 auto"},onSubmit:R=>{R.preventDefault(),l&&f.trim()&&a(`/search?${new URLSearchParams({q:f}).toString()}`)},children:(0,C.jsx)("input",{ref:m,type:"search","data-testid":"nav-find",value:f,onChange:R=>S(R.target.value),placeholder:l?d?c:"Narrow\u2026":"Find\u2026","aria-keyshortcuts":"/ Meta+K Control+K","aria-label":l?"Narrow this list":"Find anything",style:{width:"100%",minWidth:0,height:30,padding:"0 var(--graview-bar-find-end, 10px) 0 10px",font:"inherit",fontSize:"0.875rem",color:"var(--graview-ink)",background:"var(--graview-ground)",border:"1px solid var(--graview-edge)",borderRadius:8}})})}export{Fr as a,se as b,Sn as c,bn as d,Ge as e,ni as f,oi as g,ii as h,li as i,si as j,Cr as k,ui as l,ci as m,di as n,fi as o,hi as p,mi as q,pi as r,yi as s,gi as t,vi as u,pn as v,yn as w,Ri as x,wi as y,Er as z,ve as A,k as B,pa as C,Q as D,ga as E,ka as F,Fa as G,lr as H,Ta as I,un as J,ie as K,Je as L,mn as M,Qo as N,qo as O,Fi as P,gn as Q,Ti as R,Mi as S,Rn as T};
|
|
22
|
-
/*! Bundled license information:
|
|
23
|
-
|
|
24
|
-
react-router/dist/development/chunk-BV7QT456.mjs:
|
|
25
|
-
(**
|
|
26
|
-
* react-router v7.18.3
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Remix Software Inc.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
32
|
-
*
|
|
33
|
-
* @license MIT
|
|
34
|
-
*)
|
|
35
|
-
|
|
36
|
-
react-router/dist/development/index.mjs:
|
|
37
|
-
(**
|
|
38
|
-
* react-router v7.18.3
|
|
39
|
-
*
|
|
40
|
-
* Copyright (c) Remix Software Inc.
|
|
41
|
-
*
|
|
42
|
-
* This source code is licensed under the MIT license found in the
|
|
43
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44
|
-
*
|
|
45
|
-
* @license MIT
|
|
46
|
-
*)
|
|
47
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as a,l as b,m as c,n as d,o as e,p as f,q as g,r as h,s as i}from"./chunk.UTCB3CE7.js";import"./chunk.QIV65FWE.js";import"./chunk.UT6642FC.js";import"./chunk.HPAGOEZG.js";import"./chunk.ISXFH3CK.js";import"./chunk.H5ADMSE7.js";import"./chunk.TI4OSTQV.js";import"./chunk.I7XSDXQ3.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.LLEFYJPJ.js";import"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";export{i as GhostTray,h as InlineAiMenu,g as askAgain,c as askInline,a as askOf,b as drawPanel,d as heldSuggestion,e as suggestOnce,f as takeOffer};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as xe}from"./chunk.Z5AB2DBF.js";import{e as we,f as ke,i as $e,j as J,k as ve}from"./chunk.N6MVK3KD.js";import{f as ge}from"./chunk.ZHLQWMV5.js";import{d as V,e as be}from"./chunk.UUBYFBPN.js";import{b as he,e as ye}from"./chunk.2RVUDRRY.js";import{B as X,Gc as ue,H as ne,Mb as q,Nb as ae,Wc as me,aa as E,ba as K,da as oe,ea as Y,ed as pe,fa as re,fc as le,hc as ce,ia as _,ka as se,md as fe,nc as L,oc as de,zb as ie}from"./chunk.V5MYKNL7.js";function Oe(n,r,t){let i=n.tryDefinition(r)?.fields.shape,e=X(i?.[t]),l=!1,a=!1;for(;e&&(e.type==="optional"||e.type==="default"||e.type==="nullable"||e.type==="prefault");)(e.type==="optional"||e.type==="nullable")&&(l=!0),(e.type==="default"||e.type==="prefault")&&(a=!0),e=X(e.innerType);if(e?.type!=="enum")return;let h=(e.entries?Object.values(e.entries):e.values??[]).filter(m=>typeof m=="string");return h.length>0?{values:h,empty:l&&!a}:void 0}function H(n,r,t){let i=Oe(n,r,t);if(!i)return[];let e=n.tryDefinition(r),l=i.values.map(a=>({value:a,label:he(e,t,a)}));return i.empty&&l.push({value:null,label:`No ${_(e,t).toLowerCase()}`}),l}function z(n,r,t){let i=n[r];return typeof i=="string"&&t.some(e=>e.value===i)?i:null}function Q(n,r,t,i,e=H(n.schema,t.kind,i)){return Se(n,r,t,i,e).flatMap(l=>l.move?[l.move]:[])}function Se(n,r,t,i,e=H(n.schema,t.kind,i)){let l=De(n.schema,n.allMutations(),t.kind,i,e),a=z(t,i,e),h=se(n.schema.tryDefinition(t.kind),t.kind),m=[];for(let{value:x,label:j,by:O,acts:B}of l){if(x===a)continue;let D,G,F;for(let s of B){let p=O==="step"?{[s.subject.arg]:t.id}:{[s.subject.arg]:t.id,[i]:x},b={name:s.name,args:p};if(!s.input.safeParse(p).success){F??=`${s.title??s.name} asks for more than the ${h} itself.`;continue}let w=n.permits(b,r);if(!w.ok){G??=w.refusal?.message??`You may not ${s.title??s.name}.`;continue}try{ie(n.graph,s,p)}catch(c){G??=c instanceof Error?c.message:String(c);continue}D={to:x,call:b,title:s.title??s.name};break}m.push(D?{to:x,label:j,move:D}:{to:x,label:j,why:G??F??`Nothing in this app moves a ${h} to ${j}.`})}return m}function De(n,r,t,i,e=H(n,t,i)){let l=Ce(n,r,t,i),a=Re(n,r,t,i);return e.flatMap(h=>{if(h.value===null)return[];let m=l.filter(x=>x.sets?.[i]===h.value);return[{value:h.value,label:h.label,by:m.length>0?"step":a.length>0?"value":"none",acts:m.length>0?m:a}]})}function Ce(n,r,t,i){return r.filter(e=>e.subject!==void 0&&e.derived===void 0&&typeof e.sets?.[i]=="string"&&q(n,e).includes(t))}function Re(n,r,t,i){let e=n.tryDefinition(t);return e?r.filter(l=>{if(!l.subject||!q(n,l).includes(t)||!ae(l,e).includes(i))return!1;let a=l.input.shape;return a!==void 0&&i in a}).sort((l,a)=>+(l.derived!==void 0)-+(a.derived!==void 0)):[]}var ee=(n,r)=>r&&n[r]!==void 0?String(n[r]):"";function Be(n,r,t){let i=s=>n.tryDefinition(s)?r.nodesOfKind(s).filter(p=>E(n.tryDefinition(s),p)):[],e=i(t.rows),l=i(t.columns),a=new Set(e.map(s=>s.id)),h=new Set(l.map(s=>s.id)),m=r.allEdges(),x=[],j=t.link;if(typeof j=="string"){let s=c=>n.tryDefinition(c)?.edges?.[j]?.to,p=(s(t.columns)??[]).some(c=>c===t.rows||c==="*"),b=(s(t.rows)??[]).some(c=>c===t.columns||c==="*"),w=p||!b;for(let c of m){if(c.kind!==j)continue;let P=w?c.to:c.from,o=w?c.from:c.to;a.has(P)&&h.has(o)&&x.push({rowId:P,columnId:o,via:[]})}}else{let s=new Map(j.path.map(b=>[b,new Map]));for(let b of m){let w=s.get(b.kind);if(!w)continue;let c=w.get(b.from);c?c.push(b.to):w.set(b.from,[b.to]);let P=w.get(b.to);P?P.push(b.from):w.set(b.to,[b.from])}let p=new Set;for(let b of l){let w=[{id:b.id,via:[]}];for(let c of j.path){let P=[],o=new Set;for(let k of w)for(let R of s.get(c).get(k.id)??[])o.has(`${k.id}|${R}`)||(o.add(`${k.id}|${R}`),P.push({id:R,via:[...k.via,k.id]}));w=P}for(let c of w){let P=`${c.id}|${b.id}`;!a.has(c.id)||p.has(P)||(p.add(P),x.push({rowId:c.id,columnId:b.id,via:c.via.slice(1)}))}}}let O=t.groupOrder??[],B=s=>O.indexOf(s)===-1?O.length:O.indexOf(s),D=(s,p)=>p==="label"?K(n.tryDefinition(s.kind),s):s[p],G=L(e,t.sort,D).map(s=>{let p=s;return{node:s,label:K(n.tryDefinition(s.kind),s),group:ee(p,t.rowGroup),ref:ee(p,t.rowRef)}}).sort((s,p)=>B(s.group)-B(p.group)||(t.sort!==void 0?0:s.ref<p.ref?-1:s.ref>p.ref?1:0)),F=L(l,t.columnSort,D).map(s=>({node:s,label:K(n.tryDefinition(s.kind),s),group:ee(s,t.columnGroup)})).sort((s,p)=>s.group<p.group?-1:s.group>p.group?1:t.columnSort!==void 0?0:s.node.id<p.node.id?-1:s.node.id>p.node.id?1:0);return{rows:G,columns:F,cells:x}}function Ae(n,r,t){let{rows:i,columns:e,cells:l}=Be(n,r,t),a=(o,k)=>Y(n,o,k),h=o=>Y(n,o,1).replace(/^1 /,""),m=o=>({id:o.id,kind:o.kind,title:K(n.tryDefinition(o.kind),o),parts:[]}),x=o=>{let k=r.getNode(o);if(!k)return null;let R=n.tryDefinition(k.kind),M=K(R,k),T=V(k,R,{limit:3,said:[M],glance:!0}).map(N=>N.alone.startsWith(N.label)?`${N.label.toLowerCase()}${N.alone.slice(N.label.length)}`:N.alone);return[M,...T].join(", ")},j=typeof t.link=="string"?[]:t.link.path.slice(0,-1).flatMap((o,k,R)=>{let M=ue(n,t.columns,R.slice(0,k+1));return M.ok?[...M.reached]:[]}),O=de(n,t,{rows:i.length,columns:e.length,cells:l.length});if(O)return[{t:"text",text:`${a(t.rows,i.length)} against ${a(t.columns,e.length)}.`},{t:"text",text:O}];let B=[{t:"text",text:`${a(t.rows,i.length)} against ${a(t.columns,e.length)}${j.length>0?`, through ${[...new Set(j)].map(o=>a(o,2).replace(/^2 /,"")).join(" and ")}`:""}${e.length>0?`: ${e.map(o=>o.label).join(", ")}`:""}.`}],D=new Map(e.map(o=>[o.node.id,o.label])),G=new Map(e.map((o,k)=>[o.node.id,k])),F=new Map,s=new Map;for(let o of l){let k=F.get(o.rowId);k?k.push(o):F.set(o.rowId,[o]);let R=s.get(o.columnId);R?R.add(o.rowId):s.set(o.columnId,new Set([o.rowId]))}for(let o of i){let R=[...F.get(o.node.id)??[]].sort((M,T)=>G.get(M.columnId)-G.get(T.columnId)).map(M=>{let T=M.via.map(x).filter(N=>N!==null);return`${D.get(M.columnId)}${T.length>0?` (${T.join("; ")})`:""}`});B.push({t:"field",label:o.label,text:R.length>0?R.join(", "):"none"})}B.push({t:"list",as:"name",columns:1,groups:e.map(o=>{let k=s.get(o.node.id)??new Set,R=i.filter(M=>k.has(M.node.id)).map(M=>m(M.node));return{heading:`${o.label} (${R.length})`,items:R}})});let p=new Set(l.map(o=>o.rowId)),b=new Set(l.map(o=>o.columnId)),w=i.filter(o=>!p.has(o.node.id)),c=e.filter(o=>!b.has(o.node.id)),P=t.rows===t.columns;return w.length>0&&B.push({t:"text",text:`${P?`${w.length} with none across`:`${a(t.rows,w.length)} with no ${h(t.columns)}`}: ${w.map(o=>o.label).join(", ")}.`}),c.length>0&&B.push({t:"text",text:`${P?`${c.length} with none down`:`${a(t.columns,c.length)} on no ${h(t.rows)}`}: ${c.map(o=>o.label).join(", ")}.`}),B}function te(n,r,t,i={}){let{app:e,blocks:l=t?e?.viewSpecs?.[t.kind]?.[i.slot??"page"]:e?.home}=i;if(!l?.length)return[];let a=i.firstHeading??(t||i.blocks?void 0:1),h=ve(n,r,t,{...i,money:i.money??e?.brand,firstHeading:a});return t&&!h.node?[]:ke(typeof l[0]?.t=="string"?l:we(l),h)}var Ie=240,Pe=10,Ge=1160,Fe=40,Ne=640,Ke=3,Te=n=>Math.max(1,Math.floor((Math.min(n,Ge)-Fe+Pe)/(Ie+Pe)));function We(n,r,t,i){let{app:e}=i,l=i.width??1440,a=i.today??n.today()??ne(e.brand?.timeZone),h=n.seenBy(r),m=h.schema,x=h.graph,j=xe(e),O=typeof t=="string"?t.trim():t.slug,B=typeof t=="string"?j.find(d=>d.slug===O||d.title===O||d.address===O):j.find(d=>d.slug===t.slug&&d.kind===t.kind)??t,D=!B&&typeof t=="string"?x.getNode(O):void 0;if(!B&&!D)return{ok:!1,error:`"${O}" is not a place this app has, nor a record this seat can see.`,places:j.map(d=>d.slug)};let G=[],F=e.viewSpecs??{},s=Te(l),p=(d,y)=>te(h,null,d,{app:e,today:a,...y}),b=(d,y,$)=>{let f=m.tryDefinition(d.kind),S=K(f,d);if(y==="name")return{id:d.id,kind:d.kind,title:S,parts:[]};if(F[d.kind]?.[y]){let A=p(d,{slot:y}),[I,...g]=A,C=I?.t==="title";return{id:d.id,kind:d.kind,title:C?I.text:S,parts:w(C?g:A,$,`views.${d.kind}.${y}`,` (${d.id})`,C?1:0)}}if(y==="row")return{id:d.id,kind:d.kind,title:S,parts:[]};let u=f?.computed?J(m,x,d):d,W=V(u,f,{limit:3,said:[S],glance:!0,locale:e.brand?.locale,timeZone:e.brand?.timeZone});return{id:d.id,kind:d.kind,title:S,parts:W.map(A=>({t:"text",text:A.alone}))}};function w(d,y,$,f="",S=0){let v=[];return d.forEach((u,W)=>{let A=`${$}.${W+S}`;switch("problem"in u&&u.problem&&G.push({at:`${A}${f}`,says:u.problem}),u.t){case"title":v.push({t:"heading",level:3,text:u.text});return;case"text":v.push({t:"text",text:u.markdown?ye(u.text):u.text,...u.tone?{tone:u.tone}:{}});return;case"badge":v.push({t:"badge",text:u.text});return;case"field":case"image":v.push({t:"field",label:u.label,text:u.text});return;case"progress":v.push({t:"progress",label:u.label,text:u.text});return;case"group":v.push(...w(u.blocks,y,`${A}.group`,f));return;case"when":v.push(...w(u.blocks,y,`${A}.show`,f));return;case"divider":case"figure":return;case"headline":v.push({t:"heading",level:u.level,text:u.text});return;case"number":v.push({t:"figure",text:u.text,...u.label?{label:u.label}:{}});return;case"list":{if(u.failed){v.push({t:"text",text:"\u2014"});return}if(u.members.length===0){u.empty&&v.push({t:"list",as:u.as,columns:1,groups:[],empty:u.empty});return}let I=y+1,g=I>Ke?"name":u.as,C=(u.groups??[{value:null,members:u.members}]).map(U=>({..."heading"in U&&U.heading?{heading:U.heading}:{},items:U.members.map(Me=>b(Me,g,I))}));v.push({t:"list",as:g,columns:g==="card"?s:1,groups:C,...u.more>0?{more:u.more}:{}});return}}}),v}let c=[],P,o,k;if(D){o="record";let d=m.tryDefinition(D.kind),y=K(d,D);k={slug:D.id,title:y,kind:D.kind,address:me(m,D.kind,D.id)},F[D.kind]?.page&&c.push(...w(p(D,{slot:"page"}),1,`views.${D.kind}.page`));let f=d?.computed?J(m,x,D):D;for(let S of be(d,V(f,d,{said:[y],locale:e.brand?.locale,timeZone:e.brand?.timeZone}))){S.title&&c.push({t:"heading",level:2,text:S.title});for(let v of S.fields)c.push({t:"field",label:v.label,text:v.value,...v.long?{long:!0}:{},...v.markdown?{markdown:!0}:{}})}}else{let d=B;k={slug:d.slug,title:d.title,kind:d.kind,address:d.address};let y=d.lens?pe(e).drawn.find($=>$.as===d.slug&&(d.kind===null||$.kinds.includes(d.kind))):void 0;if(d.kind===null){let $=e.brand,f=$?.name??e.name,S=$?.logo&&ce($.logo)?$.logo:void 0;if(P={name:f,...$?.subtitle?{subtitle:$.subtitle}:{},...S?{logo:{alt:$?.logoAlt??f,...le(S)?{drawn:"inline SVG"}:{drawn:"image",src:S}}}:{}},e.home)o="blocks",c=w(p(null,{}),0,"views.home");else{o="derived";let v=n.kindsKeptFrom(r),u=new Set([...e.pages?.hide??[],...v,...n.modules.disabledKinds]),W=fe(m.kinds,e.pages?.order).filter(A=>!u.has(A));c.push({t:"heading",level:1,text:e.name??"Home"});for(let A of W){let I=x.nodesOfKind(A).filter(g=>E(m.tryDefinition(A),g)).length;I>0&&c.push({t:"text",text:`${I} ${Z(m,A,I)}`})}}}else if(y?.lens==="blocks")o="lens:blocks",c=w(p(null,{blocks:y.options.blocks??[]}),0,`lenses.${y.index}.options.blocks`);else if(y?.lens==="columns"){o="lens:columns";let $=y.options.bindings??{};for(let f of Object.keys($)){let S=$[f]?.column;if(!S)continue;let v=H(m,f,S),u=L(x.nodesOfKind(f).filter(g=>E(m.tryDefinition(f),g)),y.options.sort,(g,C)=>C==="label"?K(m.tryDefinition(g.kind),g):g[C]);Object.keys($).length>1&&c.push({t:"heading",level:2,text:Z(m,f,2).replace(/^./,g=>g.toUpperCase())}),c.push({t:"text",text:`${u.length} ${Z(m,f,u.length)} in columns by ${_(m.tryDefinition(f),S).toLowerCase()}.`});let W=v.map(g=>({column:g,items:u.filter(C=>z(C,S,v)===g.value).map(C=>b(C,"card",1))})).filter(({column:g,items:C})=>g.value!==null||C.length>0).map(({column:g,items:C})=>({heading:`${g.label} (${C.length})`,items:C}));c.push({t:"list",as:"card",columns:1,groups:W});let A=new Map;for(let g of u)for(let C of Q(n,r,g,S,v))A.set(C.to,(A.get(C.to)??new Set).add(`"${C.title}"`));let I=v.filter(g=>g.value!==null&&A.has(g.value)).map(g=>`to ${g.label} by ${[...A.get(g.value)].join(" or ")}`);c.push({t:"text",text:I.length>0?`Moves: ${I.join("; ")}.`:"Moves: none for this seat."})}}else if(y?.lens==="coverage")o="lens:coverage",c=Ae(m,x,y.options);else if(y){o=`lens:${y.lens}`;let $=y.kinds.flatMap(f=>x.nodesOfKind(f).filter(S=>E(m.tryDefinition(f),S)));c.push({t:"text",text:`A ${y.lens} of ${$.length} ${y.kinds.map(f=>Z(m,f,$.length)).join(" and ")}.`}),c.push({t:"list",as:"name",columns:1,groups:[{items:$.map(f=>b(f,"name",1))}]})}else{o="derived";let $=x.nodesOfKind(d.kind).filter(f=>E(m.tryDefinition(d.kind),f));c.push({t:"heading",level:1,text:d.title}),$.length===0?c.push({t:"list",as:"row",columns:1,groups:[],empty:`No ${Z(m,d.kind,0)} yet.`}):c.push({t:"list",as:"row",columns:1,groups:[{items:$.map(f=>b(f,"row",1))}]})}}let R=r.kind==="system"?"the system":(r.roles??[]).length>0?(r.roles??[]).join(", "):r.kind,M=l<Ne?"phone":"wide",T=k.kind===null?Ee(m,x):[],N={...P?{masthead:P}:{},...T.length>0?{facts:T}:{},place:k,seat:R,width:l,variant:M,drawnBy:o,parts:c,problems:G};return{ok:!0,description:{...N,text:je(N)}}}function Ee(n,r){let t=$e(n,r,null),i=e=>Array.isArray(e)?e.map(i).join(", "):e===null?"nothing":typeof e=="boolean"?e?"yes":"no":typeof e=="object"?e.label:String(e);return[...ge(n)].map(([e,l])=>{let a=l.label??oe(e);return Object.hasOwn(t.values,e)?{name:e,label:a,value:i(t.values[e])}:{name:e,label:a,refused:t.refused[e]??"it could not be worked out"}})}function Z(n,r,t){let i=n.tryDefinition(r);if(t===1)return i?.noun??r;let e=re(n,r);return e.charAt(0).toLowerCase()+e.slice(1)}function je(n){let r=[`${n.place.title} (${n.place.address}) \u2014 as ${n.seat}, ${n.width} wide (${n.variant}).`],t=n.masthead;t&&r.push(`Masthead: ${t.logo?`the logo ("${t.logo.alt}", ${t.logo.drawn==="image"?t.logo.src:"inline SVG"}), `:""}${t.name}${t.subtitle?` \u2014 ${t.subtitle}`:""}`);let i=(e,l)=>{for(let a of e)switch(a.t){case"heading":r.push(`${l}${"#".repeat(a.level)} ${a.text}`);break;case"text":r.push(`${l}${a.text}`);break;case"badge":r.push(`${l}[${a.text}]`);break;case"field":case"progress":r.push(`${l}${a.label}: ${a.text}`);break;case"figure":r.push(`${l}${a.text}${a.label?` \u2014 ${a.label}`:""}`);break;case"list":if(a.groups.length===0){a.empty&&r.push(`${l}(${a.empty})`);break}for(let h of a.groups){h.heading&&r.push(`${l}${h.heading}:`);for(let m of h.items)r.push(`${l}${h.heading?" ":""}- ${m.title}`),i(m.parts,`${l}${h.heading?" ":" "}`)}a.as==="card"&&a.columns>1&&r.push(`${l}(cards, ${a.columns} across)`),a.more&&r.push(`${l}and ${a.more} more`);break}};if(i(n.parts,""),n.facts){r.push("Facts of the whole graph (what fact('<name>') reads):");for(let e of n.facts)r.push(`- ${e.label} (${e.name}): ${e.value??`not worked out \u2014 ${e.refused}`}`)}if(n.problems.length>0){r.push("Problems:");for(let e of n.problems)r.push(`- ${e.at}: ${e.says}`)}return r.join(`
|
|
2
|
-
`)}export{H as a,z as b,Q as c,Se as d,De as e,Ce as f,Re as g,te as h,We as i,je as j};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk.AJZBJBMO.js";var e='"use strict";\n/*! @remote-dom/core and @remote-dom/polyfill \u2014 Copyright 2020-present, Shopify Inc. \u2014 MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest\'s worker runtime \u2014 Elastic License 2.0. */\n"use strict";(()=>{var Oe=globalThis,Yr=Oe.addEventListener,Wr=Oe.removeEventListener,Xr=Oe.postMessage,$r=globalThis.queueMicrotask,an=globalThis.performance,Kr=an?an.now.bind(an):Date.now,Re={listen:t=>Yr.call(Oe,"message",t),unlisten:t=>Wr.call(Oe,"message",t),post:t=>Xr.call(Oe,t),microtask:t=>$r.call(globalThis,t),now:()=>Kr()};var w=Symbol("name"),ue=Symbol("prefix"),de=Symbol("value"),x=Symbol("ns"),F=Symbol("owner"),I=Symbol("owner_document"),te=Symbol("attributes"),M=Symbol("prev"),m=Symbol("next"),S=Symbol("child"),q=Symbol("parent"),fe=Symbol("host"),X=Symbol("data"),Ee=Symbol("listeners"),ln=Symbol("isTrusted"),Ae=Symbol("path"),_e=Symbol("stop_immediate_propagation"),Pe=Symbol("dispatching"),ie=Symbol("content"),D=Symbol("hooks"),ut=Symbol("extensions"),Ne=Symbol("hooks_dispatch"),U=Symbol("is_connected"),Ce=Symbol("create_element"),zn=0,W=1,ke=2,Ie=3,Me=8,Te=9,jn=10,me=11,_="http://www.w3.org/1999/xhtml",$="http://www.w3.org/2000/svg",Fn="http://www.w3.org/XML/1998/namespace",We="http://www.w3.org/2000/xmlns/";function dt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function qn(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function C(t,e){let n=globalThis.DOMException;if(typeof n=="function")return new n(t,e);let r=new Error(t);return r.name=e,r}var Yn=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Wn=/[\\0\\t\\n\\f\\r />=]/u,Zr=/[\\0\\t\\n\\f\\r />]/u;function se(t){if(t==null)return null;let e=String(t);return e===""?null:e}function Xn(t){Yn.test(t)||un(t)}function cn(t){(t===""||Wn.test(t))&&un(t)}function ft(t,e,n){let r=se(t),o=String(e),i=o.indexOf(":"),s=i<0?null:o.slice(0,i),a=i<0?o:o.slice(i+1);if((s!=null&&(s===""||Zr.test(s))||(n==="element"?!Yn.test(a):a===""||Wn.test(a)))&&un(o),s!=null&&r==null)throw C(`A namespace is required for the prefix in "${o}"`,"NamespaceError");if(s==="xml"&&r!==Fn)throw C("The xml prefix requires the XML namespace","NamespaceError");if((o==="xmlns"||s==="xmlns")&&r!==We)throw C("The xmlns name requires the XMLNS namespace","NamespaceError");if(r===We&&o!=="xmlns"&&s!=="xmlns")throw C("The XMLNS namespace requires the xmlns name or prefix","NamespaceError");return{namespace:r,qualifiedName:o,prefix:s,localName:a}}function un(t){throw C(`Invalid name: "${t}"`,"InvalidCharacterError")}var mt=0,pt=1,$n=2,dn=3,Qr=typeof performance>"u"?Date.now:performance.now.bind(performance),V=class{static NONE=mt;static CAPTURING_PHASE=pt;static AT_TARGET=$n;static BUBBLING_PHASE=dn;timeStamp=Qr();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=mt;[Ae]=[];[_e]=!1;[Pe]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ln,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[ln]}composedPath(){return[...this[Ae]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[_e]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function fn(t,e,n){if(t.cancelBubble)return;let o=e[Ee]?.get(t.type)?.[n===pt?"capture":"bubble"];if(o)for(let i of[...o]){if(!o.has(i)||i.signal?.aborted)continue;t.eventPhase=t.target===e?$n:n,t.currentTarget=e;let s=i.normalizedListener;try{typeof s=="object"?s.handleEvent(t):s.call(e,t)}catch(a){setTimeout(Jr,0,a)}if(t[_e])break}}function Jr(t){throw t}var Xe=[],ht=new WeakMap;function gt(t,e){let n=ht.get(t);n?n.push(e):ht.set(t,[e]),Xe[Xe.length-1].push(t)}function B(t){let e=[];Xe.push(e);let n;try{n=t()}catch(r){Xe.pop();try{Kn(e)}catch{}throw r}return Xe.pop(),Kn(e),n}function Kn(t){let e,n=!1;for(let r of t){let o=ht.get(r);if(o){for(;o.length>0;){let i=o.shift();try{i()}catch(s){n||(e=s,n=!0)}}ht.delete(r)}}if(n)throw e}var yt=[],$e=[],mn=!1;function we(t){for(let e of t)yt.push(e),e[1]&&$e.push(e[1]);if(!mn){mn=!0;try{let e,n=!1;for(let r=0;r<yt.length;r++){let[o,i]=yt[r];i&&$e.splice($e.indexOf(i),1);try{o()}catch(s){n||(e=s,n=!0)}}if(n)throw e}finally{yt.length=0,$e.length=0,mn=!1}}}function Ke(t){let e=t;for(;e;){if($e.includes(e))return!0;e=e[q]??e[fe]}return!1}var Ze=Symbol("listenerRegistrations"),pe=class{[Ee]=void 0;[Ze]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r=="object"&&r.capture===!0,i=typeof r=="object"&&r.once===!0,s=typeof r=="object"?r.signal:void 0;if(s?.aborted)return;let a=pn(o),c=this[Ze];c||(c=new Map,this[Ze]=c);let u=c.get(e);u||(u={},c.set(e,u));let f=u[a];if(f||(f=new Map,u[a]=f),f.has(n))return;let p=this,h={type:e,listener:n,capture:o,once:i,normalizedListener:n,signal:s};(i||s)&&(h.normalizedListener=function(...k){if(h.signal?.aborted){bt(p,h);return}return h.once&&bt(p,h),typeof h.listener=="object"?h.listener.handleEvent(...k):h.listener.call(this,...k)});let g=this[Ee];g||(g=new Map,this[Ee]=g);let v=g.get(e);v||(v={},g.set(e,v));let y=v[a];if(y||(y=new Set,v[a]=y),f.set(n,h),y.add(h),s){let b=()=>{bt(p,h)};h.abortListener=b,s.addEventListener("abort",b,{once:!0})}this[I]?.defaultView[Ne].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return eo.call(this,e,n,r)}dispatchEvent(e){if(e[Pe])throw C("Failed to execute \'dispatchEvent\' on \'EventTarget\': The event is already being dispatched.","InvalidStateError");e[Pe]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ae]=n;for(let i=n.length;i--;)if(fn(e,n[i],pt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let i=0;i<o.length;i++)if(fn(e,o[i],dn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Pe]=!1,e.cancelBubble=!1,e[_e]=!1,e.eventPhase=mt,e.currentTarget=null,e[Ae]=[]}}};function eo(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=pn(!!r),i=this[Ze]?.get(t)?.[o]?.get(e);i&&bt(this,i)}function pn(t){return t?"capture":"bubble"}function bt(t,e){let n=pn(e.capture),r=t[Ze],o=r?.get(e.type);if(!o)return;let i=o[n];if(!i||i.get(e.listener)!==e)return;i.delete(e.listener),i.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener("abort",e.abortListener);let s=t[Ee],a=s?.get(e.type);if(!a)return;let c=a[n];c?.delete(e)&&(c.size===0&&delete a[n],!a.bubble&&!a.capture&&s?.delete(e.type),t[I]?.defaultView[Ne].removeEventListener?.(t,e.type,e.listener,e.capture))}var K=class extends Array{item(e){return this[e]??null}};var Je=0,Zn=1,yn=2,bn=3,et=4,Qn=0,Jn=1,Tt=2,wt=3,er=4,gn=5,tr=6,nr=7,Et=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function to(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let i=t[o];if(r){i==="\\\\"?o++:i===r&&(r=null);continue}if(i===\'"\'||i==="\'")r=i;else if(i==="(")n++;else if(i===")"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function Y(t){throw C(`Invalid or unsupported selector: "${t}"`,"SyntaxError")}function xt(t,e){let n=typeof e=="string"?tt(e):[{combinator:et,matchers:e}],r=null,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>(r=i,!1)),r}function vt(t,e){let n=typeof e=="string"?tt(e):[{combinator:et,matchers:e}],r=new K,o=t[S];return o&&n[0].matchers.length&&En(o,n,i=>{r.push(i)}),r}function tt(t,e=!1,n=!1){let r={combinator:et,matchers:[]},o=[r],i=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:([\'"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,s=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,"");s===""&&Y(t);let a=0,c;for(;c=i.exec(s);){c.index!==a&&Y(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&Y(t),c[1]===">"?r.combinator=Zn:c[1]==="+"?r.combinator=bn:c[1]==="~"?r.combinator=yn:r.combinator=Je,r={combinator:et,matchers:[]},o.push(r));let u=c[8]?H(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&Y(t);let p,h=c[4]??c[5]??c[7];if(c[2]){Et.test(u)||Y(t);let g=c[5],v=g?.[0];if(c[3]==null&&(v===\'"\'||v==="\'")){let y=c[0].lastIndexOf(g);h=s.slice(c.index+y+1),i.lastIndex=s.length}else g!=null&&!Et.test(g)&&Y(t);p=er}else c[6]?(Et.test(u)||Y(t),p=c[6]==="#"?Tt:wt):c[8]?p=c[9]==null?gn:tr:c[7]==="*"?p=Qn:c[7]&&Et.test(c[7])?p=Jn:Y(t);c[9]?([h,i.lastIndex]=to(s,i.lastIndex),u!=="has"&&u!=="not"&&Y(t),u==="has"&&e&&Y(t),tt(h,e||u==="has",u==="has")):p===gn&&Y(t),r.matchers.push({type:p,name:u,value:h}),a=i.lastIndex}return(a!==s.length||r.matchers.length===0)&&Y(t),o}function no(t,e){let n=tt(e);return n[0]?.matchers.length?Qe(t,n):!1}function ro(t,e){let n=tt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Je,i={type:nr,name:":scope"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(i)):n.unshift({combinator:Je,matchers:[i]}),n.some(({matchers:c})=>c.length===0))return!1;let s=o===bn||o===yn?t[m]:t[S];if(!s)return!1;let a=!1;return En(s,n,()=>(a=!0,!1),t),a}function En(t,e,n,r){let o=[],i=t;for(;i;){if(z(i)){if(Qe(i,e,r)&&n(i)===!1)return!1;let s=i[S];if(s){let a=i[m];a&&o.push(a),i=s;continue}}i=i[m]??o.pop()??null}return!0}function Qe(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===et){if(!Nt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(t,a,n)}let i=r===Zn||r===Je?q:M,s=t[i];if(!s)return!1;if(r===Je||r===yn){for(;s;){if(z(s)&&Nt(s,o,n)){let a=e.slice(0,-1);if(a.length===0||Qe(s,a,n))return!0}s=s[i]}return!1}else{if(r===bn&&!z(s)){for(;s&&!z(s);)s=s[i];if(!s)return!1}if(!z(s)||!Nt(s,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Qe(s,a,n)}}function hn(t,e){return t.getAttributeNS(null,t.namespaceURI===_?H(e):e)}function Nt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let s of e)if(Nt(t,s,n)===!1)return!1;return!0}let{type:r,name:o,value:i}=e;switch(r){case Qn:return o==="*";case Jn:return t.namespaceURI===_?t.localName===H(o):t.localName===o;case Tt:return hn(t,"id")===o;case wt:let s=hn(t,"class");return s?dt(s).includes(o):!1;case er:let a=hn(t,o);return i==null?a!=null:a===i;case nr:return t===n;case gn:Y(`:${o}`);case tr:switch(o){case"has":return ro(t,i||"");case"not":return!no(t,i||"");default:Y(`:${o}(${i})`)}}return!1}function oo(t){return t.nodeType===ke}function nt(t){return X in t}function Tn(t){return t.nodeType===Ie}function io(t){return t.nodeType===Me}function z(t){return t.nodeType===W}function Nn(t){return t.nodeType===me}function sr(t){return"appendChild"in t}function St(t){let e=[],n=[t],r=new Set(n),o=new Set,i;for(;n.length>0;){let s=n.pop();if(r.delete(s),o.has(s))continue;let a=[];for(let c of ot(s)){if(o.has(c)||(o.add(c),e.push(c),a.push(c),!z(c)))continue;let u=c[te];if(u)for(let p of u)o.has(p)||(o.add(p),e.push(p));let f=c[ie];f&&!o.has(f)&&!r.has(f)&&(r.add(f),n.push(f))}i??=a}return{nodes:e,treeNodes:i}}function rt(t,e){for(let n of t)n[I]=e}function rr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function or(t,e){if(Tn(t))return e.createTextNode(t.data);if(io(t))return e.createComment(t.data);if(oo(t))return rr(t,e);if(z(t)){let n=e[Ce](t[w],t.namespaceURI,t[ue],t.localName);if(t[te])for(let r=0;r<t[te].length;r++){let o=t[te].item(r);n.attributes.setNamedItem(rr(o,e))}return n}else{if(Nn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Ot(t,e,n=t.ownerDocument){if(t.nodeType===Te)throw C("Cannot clone a document node","NotSupportedError");let r=or(t,n);if(!e||!z(t)&&!Nn(t))return r;let o=new Set([t]),i=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;i.length>0;){let s=i[i.length-1],a,c;if(s.cloningContent)if(s.contentSource&&s.contentDestination)a=s.contentSource.childNodes[s.childIndex++],c=s.contentDestination;else{i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}else if(a=s.source.childNodes[s.childIndex++],c=s.destination,!a){if(s.cloningContent=!0,s.childIndex=0,z(s.source)&&s.source.namespaceURI===_&&s.source.localName==="template"){let f=s.source[ie];f&&(o.has(f)&&ir(),o.add(f),s.contentSource=f,s.contentDestination=s.destination.content)}continue}if(!a){i.pop(),s.appendTo&&s.appendTo.appendChild(s.destination);continue}o.has(a)&&ir(),o.add(a);let u=or(a,n);z(a)||Nn(a)?i.push({source:a,destination:u,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(u)}return r}function ir(){throw new Error("Cannot clone a cyclic or repeated node graph")}function Rt(t,e){let n=String(e);return n===""?null:xt(t,[{type:Tt,name:n}])}function At(t,e){let n=[...new Set(dt(String(e)))];return vt(t,n.map(r=>({type:wt,name:r})))}function _t(t,e){let n=String(e),r=H(n),o=[];for(let i of Pt(t))z(i)&&(n==="*"||(i.namespaceURI===_?i[w]===r:i[w]===n))&&o.push(i);return o}function Pt(t){let e=[],n=[],r=t[S];for(;r;){e.push(r);let o=r[S],i=r[m];o?(i&&n.push(i),r=o):r=i??n.pop()??null}return e}function ot(t){let e=Pt(t);return e.unshift(t),e}var Z=class extends pe{nodeType=zn;[w]="";[q]=null;[fe]=null;[S]=null;[M]=null;[m]=null;[U]=!1;get[D](){return this[I].defaultView[Ne]}get localName(){return this[w]}get nodeName(){return this[w]}get ownerDocument(){return this[I]}get isConnected(){return this[U]}isDefaultNamespace(e){let n=se(e);return so(this)===n}get parentNode(){return this[q]}set parentNode(e){}get parentElement(){let e=this[q];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[M]}set previousSibling(e){}get nextSibling(){return this[m]}set nextSibling(e){}get previousElementSibling(){let e=this[M];for(;e&&e.nodeType!==1;)e=e[M];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[m];for(;e&&e.nodeType!==1;)e=e[m];return e}set nextElementSibling(e){}get firstChild(){return this[S]}set firstChild(e){}get lastChild(){let e=this[S];for(;e;){let n=e[m];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return nt(this)?this.data:null}set nodeValue(e){nt(this)&&(this.data=e)}get textContent(){if(nt(this))return this.data;let e="";for(let n of Pt(this))Tn(n)&&(e+=n.data);return e}set textContent(e){if(nt(this))this.data=e;else if(sr(this)){let n=e==null?"":String(e);n===""?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Ot(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function so(t){let e=t;for(;e;)switch(e.nodeType){case W:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(We,"xmlns");if(r!=null&&r.prefix==null)return se(r.value);e=n.parentElement;break}case Te:e=e.documentElement;break;case jn:case me:return null;case ke:e=e.ownerElement;break;default:e=e.parentElement}return null}var Q=Symbol("insertNode"),vn=Symbol("preflightInsertions"),Ct=Symbol("replaceNode"),he=class extends Z{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);this.parentNode===r?r[Ct](s,this,o):r[Q](s,i,o)})}before(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[M];for(;i&&n.includes(i);)i=i[M];let s=xn(r,n,o);r[Q](s,i?i[m]:r.firstChild,o)})}after(...e){let n=xe(e),r=this.parentNode;if(r)return wn(o=>{ae(r,n);let i=this[m];for(;i&&n.includes(i);)i=i[m];let s=xn(r,n,o);r[Q](s,i,o)})}};function wn(t){return B(()=>{let e=[];try{t(e)}catch(n){try{we(e)}catch{}throw n}we(e)})}function xe(t){return t.map(e=>e instanceof Z?e:String(e))}function it(t,e){return e instanceof Z?e:t.ownerDocument.createTextNode(String(e))}function ae(t,e){for(let n of e){if(!(n instanceof Z))continue;let r=t;for(;r;){if(r===n)throw C("Cannot insert a node into itself or one of its descendants","HierarchyRequestError");r=r[q]??r[fe]}}}function xn(t,e,n){let r=[];for(let i of e)r.push(it(t,i));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[vn](r);for(let i of r)o[Q](i,null,n);return o}var kt,Sn=0,ar=0,lr=0,cr=0,De=!1,Rn=!1,st=!1,It=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!="function")throw new TypeError("MutationObserver callback must be a function");this.#t=e}observe(e,n={}){let r=ao(n),o=kt??=new WeakMap,i=o.get(e);i==null&&(i=new Map,o.set(e,i));let s=i.get(this);s==null?Sn++:On(s,-1),i.set(this,r),On(r,1),this.#e.add(e)}disconnect(){let e=kt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Sn--,On(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Sn===0&&(kt=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function J(t){let e=kt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[i,s]of o){if(r!==t.target&&!s.subtree)continue;let a=!1;if(t.type==="attributes"){if(!s.attributes||s.attributeFilter&&!s.attributeFilter.has(t.attributeName??""))continue;a=s.attributeOldValue}else if(t.type==="characterData"){if(!s.characterData)continue;a=s.characterDataOldValue}else if(!s.childList)continue;n.set(i,n.get(i)===!0||a)}r=r.parentNode}for(let[o,i]of n)o.enqueue({addedNodes:t.addedNodes??new K,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:i?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new K,target:t.target,type:t.type})}function Mt(...t){let e=new K;return e.push(...t),e}function ao(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError("attributeOldValue and attributeFilter require attributes to be enabled");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError("characterDataOldValue requires characterData to be enabled");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError("MutationObserver options must enable childList, attributes, or characterData");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function On(t,e){t.attributes&&(ar+=e),t.characterData&&(lr+=e),t.childList&&(cr+=e),De=ar>0,Rn=lr>0,st=cr>0}var ne=class extends he{childNodes=new K;children=new K;appendChild(e){return B(()=>this[Q](e,null))}insertBefore(e,n){return B(()=>this[Q](e,n||null))}append(...e){return B(()=>{let n=xe(e.filter(r=>r!=null));n.length>1&&ae(this,n);for(let r of n)this[Q](it(this,r),null)})}prepend(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));n.length>1&&ae(this,n);let r=this.firstChild;for(let o of n)this[Q](it(this,o),r)})}replaceChildren(...e){return B(()=>{let n=xe(e.filter(o=>o!=null));ae(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[Q](it(this,o),null)})}removeChild(e){return B(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw C("The node is not a child of this node","NotFoundError");let n=this[U]?ot(e):void 0,r=e[M],o=e[m],i=Dt(this,e);if(n)for(let s of n)s[U]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,"disconnectedCallback"),we(this.collectRemovalHookEffects(e,i))}replaceChild(e,n){return B(()=>this[Ct](e,n))}[Ct](e,n,r){if(ae(this,[e]),n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError");let o=n[M],i=n[m],s=this.prepareInsertion(e),a=this[U]?ot(n):void 0,c=new Set(s.map(({node:h})=>h)),u=i;for(;u&&c.has(u);)u=u[m];let f=Dt(this,n);if(a){for(let g of a)g[U]=!1;let h=new Set(a);for(let g of s)h.has(g.node)&&(g.shouldDisconnect=!1)}this.commitInsertion(s,u);let p=this[U];return this.queueRemovalMutationRecord(this,n,o,i),this.queueInsertionMutationRecords(s),a&&this.enqueueTreeReactions(a,"disconnectedCallback"),this.enqueueInsertionReactions(s,p),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,f),...this.collectInsertionHookEffects(s)],r),n}querySelectorAll(e){return vt(this,e)}querySelector(e){return xt(this,e)}[Q](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[vn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ae(this,[e]),n&&n.parentNode!==this)throw C("The reference node is not a child of this parent","NotFoundError")}insertIntoValidated(e,n,r){e===n&&(n=e[m]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let i=this[U];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,i),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):we(e)}prepareInsertion(e){let n=[];if(e.nodeType===me){let s=e[S];for(;s;)n.push(s),s=s[m]}else n.push(e);let r=this[U],o=this[I],i=[];for(let s of n){let a=s[U],c=a||r,u,f;if(s[I]===o)c&&(u=ot(s));else{let p=St(s);f=p.nodes,c&&(u=p.treeNodes)}i.push({node:s,nodes:u,adoption:f,shouldDisconnect:a})}return i}commitInsertion(e,n){for(let i of e){let s=i.node[q];if(s){let a=i.node[M],c=i.node[m];i.source={parent:s,index:Dt(s,i.node),previousSibling:a,nextSibling:c}}}for(let i of e){let s=this.attachChild(i.node,n);i.insertIndex=s.index,i.previousSibling=s.previousSibling,i.nextSibling=s.nextSibling}let r=this[I];for(let{adoption:i}of e)i&&rt(i,r);let o=this[U];for(let{nodes:i}of e)if(i)for(let s of i)s[U]=o}attachChild(e,n){if(n){let i=n[M];e[m]=n,e[M]=i,i?i[m]=e:this[S]=e,n[M]=e}else{e[m]=null;let i=this[S];if(i){let s;for(;s=i[m];)i=s;i[m]=e,e[M]=i}else this[S]=e,e[M]=null}let r=z(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let i=n;for(;i&&!z(i);)i=i[m];i?this.children.splice(this.children.indexOf(i),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[M],nextSibling:e[m]}}queueRemovalMutationRecord(e,n,r,o){st&&J({type:"childList",target:e,removedNodes:Mt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(st)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),J({type:"childList",target:this,addedNodes:Mt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==W||Ke(this)?[]:[[()=>this[D].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:i}=r;i?.parent.nodeType===W&&!Ke(i.parent)&&n.push([()=>i.parent[D].removeChild?.(i.parent,o,i.index)]),this.nodeType===W&&!Ke(this)&&n.push([()=>this[D].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,"disconnectedCallback"),n&&this.enqueueTreeReactions(o,"connectedCallback"))}}enqueueTreeReactions(e,n){dr(e,n)}};function ur(t,e,n,r){if(e.parentNode!==t)throw Error("not a child of this node");let o=t[U]?n.treeNodes:void 0,i=e[M],s=e[m],a=Dt(t,e);if(o)for(let u of o)u[U]=!1;rt(n.nodes,r),st&&J({type:"childList",target:t,removedNodes:Mt(e),previousSibling:i,nextSibling:s}),o&&dr(o,"disconnectedCallback");let c=[];t.nodeType===W&&!Ke(t)&&c.push([()=>t[D].removeChild?.(t,e,a)]),we(c)}function Dt(t,e){let n=e[M],r=e[m];n?n[m]=r:t[S]=r,r&&(r[M]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),z(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[m]=null,e[M]=null,o}function dr(t,e){for(let n of t){let r=n[e];typeof r=="function"&>(n,()=>r.call(n))}}function at(t,e,n,r,o){let{observedAttributes:i}=t.constructor,{attributeChangedCallback:s}=t;s==null||i==null||!i.includes(e)||gt(t,()=>s.call(t,e,n,r,o))}var Lt=class{[S]=null;constructor(e){this[F]=e}getNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n,o=this[S];for(;o;){if(o.name===r)return o;o=o[m]}return null}getNamedItemNS(e,n){let r=se(e),o=String(n),i=this[S];for(;i;){if(i.localName===o&&i[x]===r)return i;i=i[m]}return null}item(e){let n=this[S],r=0;for(;n;){if(r++===e)return n;n=n[m]}return null}get length(){let e=0,n=this[S];for(;n;)e++,n=n[m];return e}removeNamedItem(e){let n=String(e),r=this[F][x]===_?H(n):n;return B(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=se(e),o=String(n);return B(()=>this.removeNamedItemImmediately(i=>i.localName===o&&i[x]===r))}removeNamedItemImmediately(e){let n=this[F],r=this[S],o=null;for(;r!=null;){if(e(r)){o&&(o[m]=r[m]),this[S]===r&&(this[S]=r[m]);let i=r.value;return r[m]=null,r[F]=null,De&&J({type:"attributes",target:n,attributeName:r.name,attributeNamespace:r[x],oldValue:i}),n[D].removeAttribute?.(n,r.name,r[x]),at(n,r.localName,i,null,r[x]),r}o=r,r=r[m]}return null}setNamedItem(e){return B(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[F],r=e[F];if(r!=null&&r!==n)throw C("The attribute is already in use by another element.","InUseAttributeError");let o=null,i=this[S],s=null;for(;i;){if(i.localName===e.localName&&i[x]===e[x]){if(i===e)return i;s?s[m]=e:this[S]=e,e[m]=i[m],i[m]=null,o=i;break}s=i,i=i[m]}o==null&&(s?s[m]=e:this[S]=e),e[F]=n,e[I]=n[I],o&&(o[F]=null);let a=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return a&&De&&J({type:"attributes",target:n,attributeName:e.name,attributeNamespace:e[x],oldValue:o?.value??null}),c&&n[D].removeAttribute?.(n,o.name,o[x]),(a||c)&&n[D].setAttribute?.(n,e.name,e.value,e[x]),a&&at(n,e.localName,o?.value??null,e.value,e[x]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[S];for(;e;)yield e,e=e[m]}};var ve=class extends Z{nodeType=ke;[x]=null;[m]=null;[F]=null;constructor(e,n,r){super(),this[w]=e,this[de]=n,r&&(this[x]=r)}get nodeName(){return this[w]}set nodeName(e){}get name(){return this[w]}set name(e){}get localName(){if(this[x]==null)return this[w];let e=this[w].indexOf(":");return e<0?this[w]:this[w].slice(e+1)}get prefix(){if(this[x]==null)return null;let e=this[w].indexOf(":");return e<0?null:this[w].slice(0,e)}get value(){return this[de]}set value(e){let n=String(e),r=this[F];if(!r){this[de]=n;return}B(()=>{let o=this[de];this[de]=n,De&&o!==n&&J({type:"attributes",target:r,attributeName:this[w],attributeNamespace:this[x],oldValue:o}),this[D].setAttribute?.(r,this[w],n,this[x]),at(r,this.localName,o,n,this[x])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[F]}get namespaceURI(){return this[x]}get specified(){return!0}};var lo={amp:"&",AMP:"&",apos:"\'",gt:">",GT:">",lt:"<",LT:"<",quot:\'"\',QUOT:\'"\'},co=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),uo=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>\'"=/\\s]+(?:=([\'"])[^]*?\\3|=[^>\'"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,pr=/\\s([^<>\'"=/\\n\\s]+)(?:=(["\'])([\\s\\S]*?)\\2|=([^>\'"\\n\\s]*)|)/g,fo="|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|",mo=/^(?:color|face|size)$/i;function fr(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return lo[n];let i=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(i)}catch{return e}})}function hr(t){return t.namespaceURI===_&&co.has(t.localName)}function mr(t){let e=t.localName;return t[x]===$&&(e==="foreignObject"||e==="desc"||e==="title")}function po(t,e){if(fo.includes(`|${t}|`))return!0;if(t!=="font")return!1;for(let n of e.matchAll(pr))if(mo.test(n[1]))return!0;return!1}function Ht(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],i=r;for(let s of t.matchAll(uo)){let a=s[1];if(a){let c=s[2],u=H(a),f=o[o.length-1]?.element??e,p=f[x]===$?$:_;if(u==="svg")p=$;else if(p===$){if(mr(f))p=_;else if(po(u,c)){for(;o.length>0;){let v=o[o.length-1];if(v.element[x]!==$||mr(v.element))break;o.pop(),i=v.target}p=_}}let h=p===_?u:a,g=n[Ce](h,p,null,h);for(let v of c.matchAll(pr))g.setAttribute(v[1],fr(v[3]||v[4]||""));if(i.append(g),hr(g)||p!==_&&s[4])continue;o.push({element:g,target:i}),i=p===_&&u==="template"?g.content:g}else if(s[5]){let c=H(s[5]);for(let u=o.length-1;u>=0;u--){let f=o[u],p=H(f.element[w]);if(p===c){i=f.target,o.length=u;break}if(f.element[x]===_&&p==="template")break}}else s[6]?i.append(n.createComment(s[6])):i.append(fr(s[7]))}return r}function Gt(t){return yr([{type:"content",child:t[S]}])}function gr(t){return yr([{type:"opening",node:t}])}function yr(t){let e=[],n;for(;n=t.pop();)switch(n.type){case"opening":{let r=n.node;switch(r.nodeType){case W:{let o=r;e.push(`<${o[w]}`);let i=o[te]?.[S];for(;i;){e.push(` ${i[w]}`);let a=i[de];a!==""&&(a=String(a).replace(/&/g,"&").replace(/"/g,"""),e.push(`="${a}"`)),i=i[m]}if(e.push(">"),hr(o))break;let s=o.namespaceURI===_&&o.localName==="template"?o[ie]:o;t.push({type:"closing",name:o[w]}),t.push({type:"content",child:s?.[S]??null});break}case Ie:{let o=r;e.push(o[X].replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">"));break}case Me:{let o=r;e.push(`<!--${o[X]}-->`);break}}break}case"content":{let r=n.child;r&&(t.push({type:"content",child:r[m]}),t.push({type:"opening",node:r}));break}case"closing":e.push(`</${n.name}>`);break}return e.join("")}var G=class extends ne{nodeType=W;[x]=_;[ue]=null;get namespaceURI(){return this[x]}get prefix(){return this[ue]}get localName(){let e=this[ue];return e==null?this[w]:this[w].slice(e.length+1)}get nodeName(){return this[x]===_?qn(this[w]):this[w]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,"id")??""}set id(e){this.setAttribute("id",String(e))}get slot(){return this.getAttributeNS(null,"slot")??""}set slot(e){let n=String(e);this.getAttributeNS(null,"slot")!==n&&this.attributes.setNamedItem(new ve("slot",n))}get attributes(){let e=this[te];return e||(e=new Lt(this),this[te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return _t(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return At(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);cn(r);let i=this[x]===_?H(r):r,s=this.attributes.getNamedItemNS(null,i);s?s.value=o:this.attributes.setNamedItem(new ve(i,o))}setAttributeNS(e,n,r){let o=se(e),i=String(n),s=String(r),a=ft(o,i,"attribute"),c=this.attributes.getNamedItemNS(a.namespace,a.localName);c?c.value=s:this.attributes.setNamedItemNS(new ve(a.qualifiedName,s,a.namespace))}toggleAttribute(e,n){let r=String(e);cn(r);let o=this[x]===_?H(r):r,i=this.attributes.getNamedItemNS(null,o),s=n===void 0?void 0:!!n;return i==null?s===!1?!1:(this.attributes.setNamedItem(new ve(o,"")),!0):s===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[x]===_?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return gr(this)}get innerHTML(){return Gt(this)}set innerHTML(e){if(e==null||e==="")this.replaceChildren();else{let n=Ht(String(e),this);this.replaceChildren(n)}}};var Le=class t extends G{[x]=$;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ge=class extends he{[X]="";constructor(e){super(),this[X]=e==null?"":String(e)}setData(e){let n=Rn,r=n?this[X]:null,o="";e!=null&&(o=typeof e=="string"?e:String(e)),this[X]=o,n&&r!==o&&J({type:"characterData",target:this,oldValue:r}),this[D].setText?.(this,o)}get data(){return this[X]}set data(e){this.setData(e)}};var He=class extends ge{nodeType=Ie;[w]="#text"};var Ge=class extends ge{nodeType=Me;[w]="#comment"};var Ue=class extends ne{nodeType=me;[w]="#document-fragment";[I]=typeof window<"u"?window.document:null;getElementById(e){return Rt(this,e)}};var Ve=class extends G{get content(){let e=this[ie];return e||(e=this.ownerDocument.createDocumentFragment(),e[fe]=this,this[ie]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ht(String(e),this))}get innerHTML(){let e=this[ie];return e?Gt(e):""}};var Ut=class extends G{};var Vt=class extends G{};var Bt=class extends G{};var lt=class extends ne{nodeType=Te;[w]="#document";[U]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=jt(new Bt,this,"html"),this.body=jt(new Ut,this,"body"),this.head=jt(new Vt,this,"head"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return At(this,e)}createElement(e){let n=String(e);return Xn(n),An(this,H(n))}createElementNS(e,n){let r=ft(e,n,"element");return An(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ce](e,n,r,o){return An(this,e,n,r,o)}createTextNode(e){let n=zt(new He(e),this);return this[D].createText?.(n,n.data),n}createComment(e){return zt(new Ge(e),this)}createDocumentFragment(){return zt(new Ue,this)}createEvent(){return new V("")}getElementById(e){return Rt(this,e)}getElementsByTagName(e){return _t(this,e)}importNode(e,n){if(e.nodeType===Te)throw C("Cannot import a document node","NotSupportedError");return Ot(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=St(e);return B(()=>{let r=e.parentNode;return r?ur(r,e,n,this):rt(n.nodes,this),e})}};function zt(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function An(t,e,n=_,r=null,o=e){let i;if(n===$)i=new Le;else if(n===_&&o==="template")i=new Ve;else if(n===_){let s=t.defaultView.customElements.get(o);i=s?new s:new G}else i=new G;return jt(i,t,e,n,r)}function jt(t,e,n,r=_,o=null){return zt(t,e),Object.defineProperties(t,{[w]:{value:n},[x]:{value:r},[ue]:{value:o}}),e[D].createElement?.(t,r),t}var Ft=class extends V{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var qt=class extends V{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Yt=class extends V{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wt=class extends V{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Xt=class extends V{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var $t=class extends V{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Kt=class extends G{};var ho=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,go=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function br(t){return ho.test(t)&&!go.has(t)}function Er(t){return C(`Invalid custom element name: "${t}"`,"SyntaxError")}var Zt=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!br(e))throw Er(e);if(this.registry.has(e))throw C(`A custom element named "${e}" has already been defined`,"NotSupportedError");if(this.getName(n)!=null)throw C("This constructor has already been registered in this custom element registry","NotSupportedError");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let i of o)i(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!br(e))return Promise.reject(Er(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var yo=["onerror","onunhandledrejection"],Tr=Symbol.for("@remote-dom/polyfill/global-property");function wr(t){return Object.getOwnPropertyDescriptors(t)}function xr(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(pe.prototype)))n!=="constructor"&&typeof r.value=="function"&&(r.value=_n(r.value.bind(t)),e[n]=r);return e}function vr(t){let e={};for(let n of yo)e[n]={configurable:!0,enumerable:!0,get:_n(()=>t[n]),set:_n(r=>{t[n]=r})};return e}function bo(t){return Object.assign(wr(t),xr(t),vr(t))}function _n(t){return Object.defineProperty(t,Tr,{value:!0}),t}function Nr(t,e){for(let n of Reflect.ownKeys(e)){let r=Eo(t,n);(r==null||No(r))&&Object.defineProperty(t,n,e[n])}}function Eo(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function No(t){return[t.value,t.get,t.set].some(e=>typeof e=="function"&&e[Tr]===!0)}var Se=class extends pe{[D]={};[ut]=[];[Ne]=wo(this);name="";window=this;parent=this;self=this;top=this;document=new lt(this);customElements=new Zt;location=globalThis.location;navigator=globalThis.navigator;Event=V;ErrorEvent=qt;PromiseRejectionEvent=Yt;ToggleEvent=Wt;FocusEvent=Xt;ClipboardEvent=$t;EventTarget=pe;CustomEvent=Ft;Node=Z;ParentNode=ne;ChildNode=he;DocumentFragment=Ue;Document=lt;CharacterData=ge;Comment=Ge;Text=He;Element=G;HTMLElement=Kt;SVGElement=Le;HTMLTemplateElement=Ve;MutationObserver=It;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)To(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener("error",this.#t),e&&typeof e=="function"?(this.#n=e,this.#t=n=>{e(n.message??"Error",n.filename,n.lineno,n.colno,n.error)},this.addEventListener("error",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener("unhandledrejection",this.#e),e&&typeof e=="function"?(this.#e=e,this.addEventListener("unhandledrejection",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=wr(e),i=Object.assign(xr(e),vr(e));delete o.self,Object.defineProperties(globalThis,o),Nr(globalThis,i),typeof n>"u"||n===r&&n!==globalThis?Object.defineProperty(globalThis,"self",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Nr(n,i))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,bo(e))}};function To(t,e){t[ut].push(e(t)??{})}function wo(t){return{createElement:le.bind(null,t,"createElement"),setAttribute:le.bind(null,t,"setAttribute"),removeAttribute:le.bind(null,t,"removeAttribute"),createText:le.bind(null,t,"createText"),setText:le.bind(null,t,"setText"),insertChild:le.bind(null,t,"insertChild"),removeChild:le.bind(null,t,"removeChild"),addEventListener:le.bind(null,t,"addEventListener"),removeEventListener:le.bind(null,t,"removeEventListener")}}function le(t,e,...n){for(let i of t[ut])i[e]?.apply(i,n);let r=t[D];r[e]?.apply(r,n)}var Qt=new Se;var Pn="~";var ye=new WeakMap;function Be(t){return ye.get(t)}var Mn=new WeakMap,vo=0;function ee(t){let e=Mn.get(t);return e==null&&(e=String(vo++),Jt(t,e)),e}function Jt(t,e){Mn.set(t,e)}var kn=new WeakMap;function So(t){return kn.get(t)}var In=new WeakMap;function Oo(t){let e=In.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes("-"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Ro=new WeakMap;function Ao(t){return Ro.get(t)}function Dn(t,e,n){let r=kn.get(t);if(r==null&&(r={},kn.set(t,r)),r[e]===n)return;r[e]=n;let o=ye.get(t);o?.mutate([[3,ee(t),e,n,1]])}function be(t,e,n){let r=In.get(t);if(r==null&&(r={},In.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=ye.get(t);o?.mutate([[3,ee(t),e,n,2]])}function ze(t,e){if(ye.get(t)!==e&&(ye.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ze(t.childNodes[r],e)}function en(t){if(ye.get(t)!=null&&(ye.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)en(t.childNodes[n])}function je(t){let{nodeType:e}=t;switch(e){case 1:return{id:ee(t),type:e,element:t.localName,properties:Cn(So(t)),attributes:Cn(Oo(t)),eventListeners:Cn(Ao(t)),children:Array.from(t.childNodes).map(je)};case 3:case 8:return{id:ee(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Cn(t){return t?{...t}:void 0}function Ln(t,e,...n){let r=Mn.get(t),o=ye.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Fe=Qt[D];Fe.insertChild=(t,e,n)=>{let r=Be(t);r!=null&&(ze(e,r),r.mutate([[0,ee(t),je(e),n]]))};Fe.removeChild=(t,e,n)=>{let r=Be(t);r!=null&&(en(e),r.mutate([[1,ee(t),n]]))};Fe.setText=(t,e)=>{let n=Be(t);n?.mutate([[2,ee(t),e]])};Fe.setAttribute=(t,e,n)=>{t.tagName.includes("-")||be(t,e,n)};Fe.removeAttribute=(t,e)=>{t.tagName.includes("-")||be(t,e)};Se.setGlobal(Qt);function tn(t){if(typeof t=="string")return{type:"navigate",to:t};let{place:e,record:n,where:r,section:o}=t??{},i={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e=="string"?{type:"navigate",place:e,...i}:typeof n=="string"?{type:"navigate",to:n,...i}:void 0}function Or(t){let e=t;return typeof t=="object"&&t!==null&&e.graview==="host-hello"&&typeof e.nonce=="string"}function Ar(t,e={}){let n,r="",o,i=0,s=new Set,a=new Map,c=[],u=y=>{n?n.postMessage({...y,nonce:r}):c.push(y)},f=y=>{let b=y.data;if(!(!b||typeof b!="object")){if(b.type==="props"){o=b.props;for(let k of s)k(b.props)}else b.type==="answer"?(a.get(b.id)?.(b),a.delete(b.id)):b.type==="event"&&typeof b.listener=="number"?e.onEvent?.(b):b.type==="heartbeat"&&typeof b.beat=="number"&&u({type:"heartbeat",beat:b.beat});e.onMessage?.(b)}},p=()=>{},h=y=>{if(n||!t.fromHost(y)||!Or(y.data)||y.data.protocol!==1)return;let b=y.ports[0];if(b){n=b,r=y.data.nonce,n.onmessage=f,n.start?.(),p();for(let k of c.splice(0))u(k)}};p=t.listen(h),t.ready({graview:"guest-ready",protocol:1});let g,v={get props(){return o},subscribe(y){return s.add(y),()=>s.delete(y)},act(y,b={}){let k=i+=1;return new Promise(L=>{a.set(k,L),u({type:"act",id:k,name:y,args:b})})},navigate(y){let b=tn(y);b&&u(b)},size(y){u({type:"size",height:y})},autoSize(y){let b=y??globalThis.document?.documentElement,k=globalThis.ResizeObserver;if(!b||!k||typeof b.getBoundingClientRect!="function")return()=>{};g?.disconnect();let L=new k(()=>v.size(Math.ceil(b.getBoundingClientRect().height)));return L.observe(b),g=L,()=>L.disconnect()},close(){g?.disconnect(),p(),n?.close(),s.clear()}};return{guest:v,send:u}}var Pr=["globalThis","Infinity","NaN","undefined","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape","Object","Function","Array","Number","Boolean","String","Symbol","BigInt","Date","Promise","RegExp","Math","JSON","Reflect","Proxy","Intl","Error","AggregateError","EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError","SuppressedError","Map","Set","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Iterator","AsyncIterator","DisposableStack","AsyncDisposableStack","ArrayBuffer","SharedArrayBuffer","DataView","Atomics","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float16Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"],Cr=["window","parent","top","document","customElements","Event","ErrorEvent","PromiseRejectionEvent","ToggleEvent","FocusEvent","ClipboardEvent","CustomEvent","EventTarget","Node","ParentNode","ChildNode","DocumentFragment","Document","CharacterData","Comment","Text","Element","HTMLElement","SVGElement","HTMLTemplateElement","MutationObserver"],kr=["self","postMessage","setTimeout","clearTimeout","setInterval","clearInterval","queueMicrotask","structuredClone","crypto","console","DOMException"],Ir=["TEMPORARY","PERSISTENT"],nl=Object.freeze([...Pr,...Cr,...kr,...Ir]),rl=Object.freeze(["constructor","__defineGetter__","__defineSetter__","hasOwnProperty","__lookupGetter__","__lookupSetter__","isPrototypeOf","propertyIsEnumerable","toString","valueOf","__proto__","toLocaleString"]),_r=t=>typeof t=="symbol"?`[${t.description??"symbol"}]`:t;function Mr(t=globalThis,e=[],n={}){let r=[],o=[],i=new Set([...Pr,...Cr,...kr,...e,"constructor",Symbol.toStringTag]),s=(N,P)=>{let j=Reflect.getOwnPropertyDescriptor(N,P);return j===void 0||!("value"in j)||j.writable||j.configurable?!1:n.primitivesStay&&typeof P=="symbol"&&(typeof j.value!="object"||j.value===null)&&typeof j.value!="function"?!0:Ir.includes(P)&&typeof j.value=="number"},a=t,c=a.setTimeout,u=a.setInterval,f=a.crypto,p=(N,P)=>function(j,Bn,...l){if(typeof j!="function")throw new TypeError(`${P} takes a function: a guest view cannot run code from text`);return N.call(t,j,Bn,...l)},h=f?Object.freeze({getRandomValues:N=>f.getRandomValues(N)}):void 0,g=a.document?.defaultView;if(g&&g!==a)for(let N of Reflect.ownKeys(g))typeof N=="symbol"||i.has(N)||Reflect.deleteProperty(g,N)||o.push(`window.${N}`);let v=[];for(let N=t;N&&N!==Object.prototype;N=Object.getPrototypeOf(N))v.push(N);for(let N of v)for(let P of Reflect.ownKeys(N))i.has(P)||(Reflect.deleteProperty(N,P)?r.push(_r(P)):s(N,P)||o.push(_r(P)));let y=()=>function(){throw new EvalError("A guest view cannot make code from text.")},b=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let N of b){let P=y();Object.defineProperty(P,"prototype",{value:N,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(N,"constructor",{value:P,writable:!1,enumerable:!1,configurable:!1})||o.push("Function.prototype.constructor"),N===Function.prototype&&Reflect.defineProperty(t,"Function",{value:P,writable:!0,enumerable:!1,configurable:!0})}let k=(N,P)=>{Reflect.defineProperty(t,N,{value:P,writable:!0,enumerable:!0,configurable:!0})||o.push(N)};k("setTimeout",p(c,"setTimeout")),k("setInterval",p(u,"setInterval")),h&&k("crypto",h);for(let N of v.slice(1))Object.freeze(N);for(let N of Reflect.ownKeys(t)){let P=Reflect.getOwnPropertyDescriptor(t,N);Reflect.defineProperty(t,N,"value"in P?{...P,writable:!1,configurable:!1}:{...P,configurable:!1})}let L;try{L=Reflect.preventExtensions(t)}catch{L=!1}return{removed:r,stuck:o,sealed:L}}var ct=class extends HTMLElement{constructor(){super(),Jt(this,Pn)}connect(e){if(Be(this)===e||(ze(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Pn,je(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Dn(this,e,n)}callRemoteMethod(e,...n){return Ln(this,e,...n)}};var d={},nn={empty:!0},_o={id:"text",class:"text",title:"text",lang:"text",dir:{oneOf:["ltr","rtl","auto"]},hidden:"text",tabindex:{oneOf:["-1","0"]},role:"text",style:"style",translate:{oneOf:["yes","no"]},spellcheck:{oneOf:["true","false"]},draggable:{oneOf:["true","false"]},inert:"boolean"},Hn={div:d,section:d,article:d,aside:d,header:d,footer:d,nav:d,hgroup:d,search:d,address:d,figure:d,figcaption:d,blockquote:d,p:d,pre:d,hr:nn,br:nn,wbr:nn,h1:d,h2:d,h3:d,h4:d,h5:d,h6:d,span:d,strong:d,em:d,b:d,i:d,u:d,s:d,small:d,mark:d,abbr:d,cite:d,q:d,code:d,kbd:d,samp:d,var:d,sub:d,sup:d,dfn:d,bdi:d,bdo:d,ruby:d,rt:d,rp:d,time:{attributes:{datetime:"text"}},data:{attributes:{value:"text"}},del:{attributes:{datetime:"text"}},ins:{attributes:{datetime:"text"}},a:d,ul:d,menu:d,dl:d,dt:d,dd:d,ol:{attributes:{start:"number",reversed:"boolean",type:{oneOf:["1","a","A","i","I"]}}},li:{attributes:{value:"number"}},table:d,caption:d,thead:d,tbody:d,tfoot:d,tr:d,colgroup:{attributes:{span:"number"}},col:{attributes:{span:"number"},empty:!0},th:{attributes:{colspan:"number",rowspan:"number",headers:"text",scope:{oneOf:["row","col","rowgroup","colgroup"]},abbr:"text"}},td:{attributes:{colspan:"number",rowspan:"number",headers:"text"}},details:{attributes:{open:"boolean",name:"text"}},summary:d,button:{attributes:{type:{oneOf:["button"]},disabled:"boolean",name:"text",value:"text"}},input:{empty:!0,attributes:{type:{oneOf:["text","search","number","range","checkbox","radio","date","time","datetime-local","month","week","color","email","tel","url"]},name:"text",value:"text",placeholder:"text",min:"text",max:"text",step:"text",checked:"boolean",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",size:"number",pattern:"text",multiple:"boolean",inputmode:"text",enterkeyhint:"text"}},select:{attributes:{name:"text",disabled:"boolean",multiple:"boolean",required:"boolean",size:"number"}},option:{attributes:{value:"text",selected:"boolean",disabled:"boolean",label:"text"}},optgroup:{attributes:{label:"text",disabled:"boolean"}},textarea:{attributes:{name:"text",placeholder:"text",rows:"number",cols:"number",disabled:"boolean",readonly:"boolean",required:"boolean",maxlength:"number",minlength:"number",wrap:{oneOf:["soft","hard","off"]}}},label:{attributes:{for:"text"}},fieldset:{attributes:{disabled:"boolean",name:"text"}},legend:d,output:d,meter:{attributes:{value:"number",min:"number",max:"number",low:"number",high:"number",optimum:"number"}},progress:{attributes:{value:"number",max:"number"}},img:{empty:!0,attributes:{src:"image",alt:"text",width:"number",height:"number",decoding:{oneOf:["async","sync","auto"]}}},"graview-video":nn},Po=["fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","stroke-opacity","stroke-miterlimit","opacity","color","display","visibility","transform-origin","clip-path","clip-rule","marker-start","marker-mid","marker-end","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","alignment-baseline","letter-spacing","text-decoration","paint-order","vector-effect","shape-rendering","pointer-events","stop-color","stop-opacity","overflow","mask"],Co={id:"text",class:"text",style:"style",lang:"text",role:"text",tabindex:{oneOf:["-1","0"]},transform:"geometry",...Object.fromEntries(Po.map(t=>[t,"css"]))},qe={x:"geometry",y:"geometry",width:"geometry",height:"geometry"},rn={viewBox:"geometry",preserveAspectRatio:"geometry"},Dr={gradientUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},gradientTransform:"geometry",spreadMethod:{oneOf:["pad","reflect","repeat"]},href:"fragment"},Lr={svg:{attributes:{...qe,...rn}},g:d,defs:d,symbol:{attributes:{...qe,...rn,refX:"geometry",refY:"geometry"}},use:{attributes:{...qe,href:"fragment"}},title:d,desc:d,path:{attributes:{d:"geometry",pathLength:"number"}},rect:{attributes:{...qe,rx:"geometry",ry:"geometry",pathLength:"number"}},circle:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",pathLength:"number"}},ellipse:{attributes:{cx:"geometry",cy:"geometry",rx:"geometry",ry:"geometry",pathLength:"number"}},line:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",pathLength:"number"}},polyline:{attributes:{points:"geometry",pathLength:"number"}},polygon:{attributes:{points:"geometry",pathLength:"number"}},text:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry",lengthAdjust:{oneOf:["spacing","spacingAndGlyphs"]}}},tspan:{attributes:{x:"geometry",y:"geometry",dx:"geometry",dy:"geometry",rotate:"geometry",textLength:"geometry"}},textPath:{attributes:{href:"fragment",startOffset:"geometry",method:{oneOf:["align","stretch"]},spacing:{oneOf:["auto","exact"]},side:{oneOf:["left","right"]}}},linearGradient:{attributes:{x1:"geometry",y1:"geometry",x2:"geometry",y2:"geometry",...Dr}},radialGradient:{attributes:{cx:"geometry",cy:"geometry",r:"geometry",fx:"geometry",fy:"geometry",fr:"geometry",...Dr}},stop:{attributes:{offset:"geometry"}},clipPath:{attributes:{clipPathUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},mask:{attributes:{...qe,maskUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},maskContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]}}},pattern:{attributes:{...qe,...rn,patternUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternContentUnits:{oneOf:["userSpaceOnUse","objectBoundingBox"]},patternTransform:"geometry",href:"fragment"}},marker:{attributes:{...rn,markerWidth:"geometry",markerHeight:"geometry",refX:"geometry",refY:"geometry",orient:"geometry",markerUnits:{oneOf:["strokeWidth","userSpaceOnUse"]}}}};var Hr={section:["aria-label","aria-labelledby","title"]};function ko(t){return/^aria-[a-z]+$/.test(t)}function Io(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Mo=new Map(Object.keys(Lr).map(t=>[t.toLowerCase(),t]));function Gr(t){return Mo.get(t.toLowerCase())}function Ur(t,e,n){let r=n.toLowerCase(),o=t==="html"?[Hn[e]?.attributes,_o]:[Lr[e]?.attributes,Co],i=t==="svg"&&r==="xlink:href"?"href":r;for(let s of o)if(s){for(let[a,c]of Object.entries(s))if(a.toLowerCase()===i)return{name:a,kind:c}}if(ko(r)||Io(r))return{name:r,kind:"text"}}var Vr="~",on=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),re=(t,e=0)=>{if(t===null||typeof t=="string"||typeof t=="number"||typeof t=="boolean"||t===void 0)return t;if(!(e>64||typeof t!="object"))return Array.isArray(t)?t.map(n=>re(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,re(r,e+1)]))};function Br(){let t=new Map,e=new Map,n=new Map([[Vr,{children:[],listeners:new Map}]]),r=0,o=u=>{let f=e.get(u);return f===void 0&&(f=r+=1,e.set(u,f),t.set(f,{listener:u,count:0})),t.get(f).count+=1,f},i=u=>{let f=t.get(u);f&&(f.count-=1,!(f.count>0)&&(t.delete(u),e.delete(f.listener)))},s=u=>{let f=n.get(u);if(f){n.delete(u);for(let p of f.listeners.values())i(p);for(let p of f.children)s(p)}},a=(u,f,p=0)=>{if(!on(u)||p>64)return re(u);let h=typeof u.id=="string"?u.id:void 0,g=f&&h!==void 0&&h!==Vr;g&&s(h);let v={children:[],listeners:new Map};g&&n.set(h,v);let y={};for(let[b,k]of Object.entries(u))b==="children"&&Array.isArray(k)?y[b]=k.map(L=>{let N=a(L,g,p+1);return g&&on(L)&&typeof L.id=="string"&&v.children.push(L.id),N}):b==="eventListeners"&&on(k)?y[b]=Object.fromEntries(Object.entries(k).map(([L,N])=>{if(typeof N!="function"||!g)return[L,void 0];let P=o(N);return v.listeners.set(L,P),[L,{listener:P}]})):y[b]=re(k,p+1);return y},c=u=>{if(!Array.isArray(u))return re(u);let[f,p]=u,h=typeof p=="string"?n.get(p):void 0;if(f===0){let g=a(u[2],h!==void 0),v=on(u[2])?u[2].id:void 0;if(h&&typeof v=="string"&&n.has(v)){let y=Number(u[3]);h.children.splice(Number.isInteger(y)&&y>=0&&y<=h.children.length?y:h.children.length,0,v)}return[f,re(p),g,re(u[3])]}if(f===1){let g=Number(u[2]);return h&&Number.isInteger(g)&&g>=0&&g<h.children.length&&s(h.children.splice(g,1)[0]),re(u)}if(f===3&&u[4]===3){let g=String(u[2]),v=u[3],y=h&&typeof v=="function"?o(v):void 0,b=h?.listeners.get(g);return b!==void 0&&i(b),y===void 0?h?.listeners.delete(g):h.listeners.set(g,y),[f,re(p),g,y===void 0?void 0:{listener:y},3]}return re(u)};return{encode:u=>u.map(c),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var sn="graview-view-root",Do=t=>t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'"),Lo=t=>Object.freeze({html:t,toString:()=>t}),zr=t=>typeof t=="object"&&t!==null&&typeof t.html=="string"&&Object.isFrozen(t),jr=t=>t==null||t===!1?"":Array.isArray(t)?t.map(jr).join(""):zr(t)?t.html:Do(String(t));function Fr(t){customElements.get(sn)||customElements.define(sn,ct);let e=Event,n=Br(),r=new Set,o=new Set,i,s=[],a=new Set;for(let l of["closest","matches","dataset"]){let E=()=>{throw new TypeError(`A view\'s element has no ${l}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute("data-\\u2026").`)};l in Element.prototype||Object.defineProperty(Element.prototype,l,l==="dataset"?{get:E}:{value:E})}let c=document.createElement(sn),u=l=>{let E=O=>{for(let T of Array.from(O.childNodes)){if(T.nodeType!==1)continue;if(ee(T)===l)return T;let R=E(T);if(R)return R}};return E(c)},f=l=>{let E=u(l.target);if(!E)return;let O=new e(l.event,{bubbles:!0});for(let T of["value","checked","key","pressed","files","refused"])l[T]!==void 0&&Object.defineProperty(O,T,{value:l[T],enumerable:!0});E.dispatchEvent(O);for(let T of o){if(T.type!==l.event)continue;let R;try{R=new Set(Array.from(c.querySelectorAll(T.selector)))}catch{continue}for(let A=E;A&&A!==c;A=A.parentNode)if(R.has(A)){T.listener(Object.freeze({type:l.event,target:E,element:A,...l.value!==void 0?{value:l.value}:{},...l.checked!==void 0?{checked:l.checked}:{},...l.key!==void 0?{key:l.key}:{},...l.pressed!==void 0?{pressed:l.pressed}:{},...l.files!==void 0?{files:l.files}:{},...l.refused!==void 0?{refused:l.refused}:{}}));break}}},p=l=>{if(l.type==="dom-event"&&typeof l.target=="string")return f(l);if(l.type==="notice")return t.warn(l.text);if(l.type!=="props")return;i=l.props;let E=t.now();for(let R of r)try{R(l.props)}catch(A){t.threw(A)}let O=t.now()-E,T=l.push;typeof T=="number"&&t.microtask(()=>t.microtask(()=>t.send({type:"pushed",push:T,ms:O})))},h;c.connect({mutate(l){h||(h=[],t.microtask(()=>{let E=h??[];h=void 0,t.send({type:"render",records:n.encode(E)})})),h.push(...l)},call:()=>{}});let g=l=>l.nodeType===1?l.getAttribute("data-key")??l.getAttribute("id"):null,v=(l,E)=>l.nodeType===E.nodeType&&(l.nodeType!==1||l.localName===E.localName&&l.namespaceURI===E.namespaceURI&&g(l)===g(E));function y(l,E){let O=Array.from(E.childNodes),T=0;for(let R of O){let A=l.childNodes[T]??null;if(A&&v(A,R)){b(A,R),T+=1;continue}if(g(R)!==null){let ce=Array.from(l.childNodes).slice(T+1).find(Ye=>v(Ye,R));if(ce){l.insertBefore(ce,A),b(ce,R),T+=1;continue}}l.insertBefore(R,A),T+=1}for(;l.childNodes.length>T;)l.removeChild(l.lastChild)}function b(l,E){if(l.nodeType!==1){l.data!==E.data&&(l.data=E.data);return}let O=l,T=E,R=k(O);for(let A of O.getAttributeNames())T.hasAttribute(A)||(O.removeAttribute(A),R&&be(O,A,void 0));for(let A of T.getAttributeNames()){let oe=T.getAttribute(A);O.getAttribute(A)!==oe&&O.setAttribute(A,oe),R&&be(O,A,oe)}y(O,T)}let k=l=>l.localName.includes("-");function L(l){for(let E of Array.from(l.childNodes)){if(E.nodeType!==1)continue;let O=E;if(k(O))for(let T of O.getAttributeNames())be(O,T,O.getAttribute(T)??void 0);L(O)}}function N(l,E,O){for(let T of Array.from(l.childNodes)){if(T.nodeType!==1)continue;let R=T,A=R.localName,oe=E||A.toLowerCase()==="svg",ce=oe?Gr(A):Object.prototype.hasOwnProperty.call(Hn,A.toLowerCase())?A.toLowerCase():void 0;if(!ce){O.add(`<${A}>`);continue}for(let Ye of R.getAttributeNames())(!Ur(oe?"svg":"html",ce,Ye)||!oe&&Hr[ce]?.includes(Ye.toLowerCase()))&&O.add(`${ce} ${Ye}`);N(R,oe,O)}}function P(l){let E=document.createElement("div"),O=Array.isArray(l)?l:[l];for(let R of O)if(R!=null)if(typeof R=="string"||zr(R)){let A=document.createElement("div");A.innerHTML=typeof R=="string"?R:R.html,E.append(...Array.from(A.childNodes))}else E.append(R);let T=new Set;N(E,!1,T),s=[...T],s.length>0&&t.warn(`The host will not draw: ${s.join(", ")}`),L(E),y(c,E)}let j;return{view:Object.freeze({get props(){return i},onProps(l){return r.add(l),i&&l(i),()=>void r.delete(l)},render:P,style(l){typeof l!="string"||l===j||(j=l,t.send({type:"style",css:l}))},on(l,E,O){let T={type:l,selector:E,listener:O};return o.add(T),typeof l=="string"&&!a.has(l)&&(a.add(l),t.send({type:"hears",events:[l]})),()=>void o.delete(T)},act:(l,E={})=>t.act(l,E),navigate(l){if(typeof l=="string")return t.navigate(l);let E=tn(l);E&&t.send(E)},html(l,...E){return Lo(l.reduce((O,T,R)=>O+T+(R<E.length?jr(E[R]):""),""))},get refused(){return s},get hardening(){return t.hardening()}}),hear:p}}var Vn={removed:[],stuck:[],sealed:!1,worker:!1},Gn=Ar({listen(t){return Re.listen(t),()=>Re.unlisten(t)},fromHost:()=>!0,ready:t=>Re.post(t)},{onMessage:t=>qr.hear(t)}),qr=Fr({send:t=>Gn.send(t),act:(t,e)=>Gn.guest.act(t,e),navigate:t=>Gn.guest.navigate(t),microtask:Re.microtask,now:Re.now,threw:t=>console.error(t),warn:t=>console.warn(t),hardening:()=>Vn}),Ho=qr.view;Object.defineProperty(globalThis,"graview",{value:Ho,enumerable:!0,configurable:!0,writable:!1});var Un="WorkerGlobalScope"in globalThis?Mr(globalThis,["graview"]):Vn;Vn=Un;if(Un.stuck.length>0)throw new Error(`The view\'s worker could not be hardened: ${Un.stuck.join(", ")} would not go.`);})();\n';export{e as VIEW_RUNTIME};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as L}from"./chunk.CN5WAKHJ.js";import{a as R,b as O,c as v,d as P}from"./chunk.UGFDSE37.js";import"./chunk.PYNYHNDS.js";import"./chunk.LPE4FLC6.js";import"./chunk.XEKLEHC3.js";import"./chunk.VZYCILPJ.js";import"./chunk.4QPVS2ZM.js";import"./chunk.RCM7NOPF.js";import"./chunk.Z7LDT55A.js";import"./chunk.47KHZCNG.js";import"./chunk.XQHDP5C3.js";import"./chunk.BFNVG5JE.js";import"./chunk.ZJMDLRC5.js";import"./chunk.2GDXNTY5.js";import"./chunk.ETOGQE2V.js";import"./chunk.O5JKDFDH.js";import"./chunk.YYIKSH2F.js";import"./chunk.LPBM5AES.js";import"./chunk.5RABSIF7.js";import"./chunk.NGDXH66B.js";import"./chunk.67WWRC6Y.js";import{a as E,b as T}from"./chunk.MB7LKKUD.js";import"./chunk.WVUJXDXZ.js";import"./chunk.N6MVK3KD.js";import"./chunk.I7XSDXQ3.js";import"./chunk.UHI3D7JC.js";import"./chunk.WVDKYUF3.js";import"./chunk.ZHLQWMV5.js";import"./chunk.TNESS3LQ.js";import"./chunk.GZHZLJBF.js";import"./chunk.42XSBKPO.js";import"./chunk.OJGHDWI6.js";import"./chunk.6FNMDAX5.js";import"./chunk.2FLPDPEL.js";import"./chunk.UUBYFBPN.js";import"./chunk.2RVUDRRY.js";import"./chunk.LLEFYJPJ.js";import{Ea as x,G as D,R as C}from"./chunk.FOQZADMA.js";import"./chunk.SDO3U72B.js";import{uc as k}from"./chunk.V5MYKNL7.js";import{b as S}from"./chunk.AJZBJBMO.js";var o=S(D(),1);var i=S(C(),1);function W(c){let e=document.activeElement;if(e!==null&&e!==document.body&&e!==document.documentElement&&e.isConnected)return;let r=c??document,a=r.querySelector("main")??r.querySelector("[data-graview-page]")??null,n=r.querySelector("[data-graview-page-title]")??a?.querySelector("h1, h2")??a;n instanceof HTMLElement&&(n.hasAttribute("tabindex")||n.setAttribute("tabindex","-1"),n.focus({preventScroll:!0}))}var H=1500;function z(c,e,r){let{store:a,principal:n}=c,u=L(a),l=(0,o.useMemo)(()=>R(a,n),[a,n,u]),b=(0,o.useRef)(r),[p,m]=(0,o.useState)(),[s,f]=(0,o.useState)("");(0,o.useEffect)(()=>{let t=O(a,n,b.current);b.current=a.batches().length,t&&(m({batch:t.batch,at:e,when:Date.now()}),f(""))},[a,n,u]),(0,o.useEffect)(()=>{m(t=>!t||t.at===e?t:Date.now()-t.when<H?{...t,at:e}:void 0)},[e]);let[g,h]=(0,o.useState)(null),y=(0,o.useCallback)(()=>{m(void 0),h(null)},[]),w=(0,o.useCallback)(()=>{h(null);try{let t=P(a,n);t&&f(`Took back \u201C${t.intent}\u201D`)}catch(t){h(t instanceof Error?t.message:String(t))}},[a,n]),d=l&&p?.batch===l.batch&&p.at===e?l:void 0;return{change:l,offered:d,close:y,takeBack:w,refused:g,said:s}}function Y({context:c,docked:e,at:r,since:a}){let{change:n,offered:u,close:l,takeBack:b,refused:p,said:m}=z(c,r,a),s=e?u:n,f=(0,o.useRef)(null),g=e&&(s!==void 0||p!==null);B(f,g),(0,o.useEffect)(()=>{if(!g)return;let d,t=()=>d=setTimeout(()=>f.current?.matches(":hover, :focus-within")?t():l(),1e4);return t(),()=>clearTimeout(d)},[g,s?.batch,p,l]);let h=m||(e&&s?v(s):""),y=e?{position:"fixed",inset:"auto",margin:0,padding:0,border:"none",background:"none",overflow:"visible",zIndex:k("toast"),width:"max-content",height:"auto",bottom:"calc(16px + env(safe-area-inset-bottom, 0px))",left:16,justifyItems:"start",color:"var(--graview-ink)",...g?{}:{display:"none"}}:{},w=s?(0,i.jsxs)("button",{type:"button","data-testid":"page-undo",title:`${v(s)} \u2014 \u2318Z or Ctrl+Z`,"aria-keyshortcuts":"Meta+Z Control+Z",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");b(),requestAnimationFrame(()=>W(t))},style:e?I:A,children:[(0,i.jsx)("span",{"aria-hidden":"true",children:"\u21B6"}),(0,i.jsx)("span",{style:e?j:F,children:v(s)})]}):null;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{role:"status","aria-live":"polite",style:N,children:h}),(0,i.jsxs)("div",{ref:f,...e?{popover:"manual","data-graview-foot":"","data-graview-offstage":""}:{},"data-testid":e?"face-undo-dock":"page-undo-place",style:{display:"grid",justifyItems:"end",gap:4,maxWidth:"100%",minWidth:0,...y},children:[e&&s?(0,i.jsxs)("div",{"data-testid":"page-undo-notice",style:_,children:[w,(0,i.jsx)("button",{type:"button","data-testid":"page-undo-dismiss","aria-label":`Dismiss: ${v(s)}`,title:"Dismiss",onClick:d=>{let t=d.currentTarget.closest("[data-graview-face]");l(),requestAnimationFrame(()=>W(t))},style:q,children:"\xD7"})]}):w,p?(0,i.jsx)("span",{"data-testid":"page-undo-refused",role:"alert",style:{fontSize:"0.8125rem",lineHeight:1.4,color:"var(--graview-warn)",background:e?"var(--graview-float)":void 0,padding:e?"4px 8px":void 0,borderRadius:6},children:p}):null]})]})}function B(c,e){(0,o.useLayoutEffect)(()=>{let r=c.current;if(!r||!e)return;if(typeof r.showPopover=="function"&&!x(r))try{r.showPopover()}catch{}let a=()=>r.parentElement?.closest("[data-embed-content]")??null,n=()=>{T(r,a()),dispatchEvent(new Event(E))};n(),addEventListener("resize",n),addEventListener("scroll",n,!0);let u=typeof ResizeObserver=="function"?new ResizeObserver(n):null;return u?.observe(r),()=>{if(u?.disconnect(),removeEventListener("resize",n),removeEventListener("scroll",n,!0),r.isConnected&&x(r))try{r.hidePopover()}catch{}dispatchEvent(new Event(E))}},[c,e])}var A={display:"inline-flex",alignItems:"center",gap:6,minHeight:36,maxWidth:"100%",minWidth:0,padding:"0 14px",borderRadius:999,border:"1px solid var(--graview-edge)",background:"var(--graview-float)",color:"var(--graview-ink)",font:"inherit",fontSize:"0.875rem",cursor:"pointer"},I={...A,textAlign:"start",lineHeight:1.4,padding:"8px 4px 8px 14px",border:"none",background:"none",color:"inherit"},_={display:"flex",alignItems:"center",gap:2,maxWidth:"100%",minWidth:0,paddingRight:6,borderRadius:"var(--graview-radius, 12px)",border:"1px solid var(--graview-edge)",background:"var(--graview-float)",boxShadow:"var(--graview-lift-high)"},q={flex:"0 0 auto",minWidth:28,minHeight:28,padding:0,border:"none",background:"none",boxShadow:"none",color:"var(--graview-ink-muted)",font:"inherit",fontSize:"1rem",cursor:"pointer"},F={minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},j={minWidth:0,overflow:"hidden",overflowWrap:"anywhere",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:4},N={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};export{Y as TakeBack};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __graviewPreload=(base,files)=>{if(typeof document>"u")return;const asked=globalThis.__graviewPreloaded??=new Set;for(const file of files){const href=new URL(file,base).href;if(asked.has(href))continue;asked.add(href);const link=document.createElement("link");link.rel="modulepreload";link.href=href;document.head.append(link)}};import{b as z}from"./chunk.6CRRPXKP.js";import{a as p,b as T,c as S,d as _,e as U,f as V,g as b,h as B,i as C,j as W}from"./chunk.H7POIT3V.js";import{a as J,b as h,d as A}from"./chunk.W4HBRXMY.js";import{a as R}from"./chunk.SDO3U72B.js";import"./chunk.V5MYKNL7.js";import"./chunk.AJZBJBMO.js";var Q=R(()=>(__graviewPreload(import.meta.url,["./chunk.AJZBJBMO.js"]),import("./chunk.SHNYYBNW.js")));function te(d,e){let f=d.ownerDocument,u=f.defaultView,t=f.createElement("iframe");t.setAttribute("sandbox",T),t.setAttribute("referrerpolicy","no-referrer"),t.setAttribute("allow",""),t.setAttribute("title",e.title??e.view),t.setAttribute("data-guest-view",e.view),t.setAttribute("aria-busy","true"),t.style.border="0",t.style.width="100%",t.style.display="block",t.src=e.url;let a={applied:0,refused:0,dropped:0},P=h(e.limits),i,y,o={applied:0,refused:0,dropped:0},v=()=>{if(!i)return;let r=i.stats;a.applied+=r.applied-o.applied,a.refused+=r.refused-o.refused,a.dropped+=r.dropped-o.dropped,o={...r}},O=W(u,()=>l(),"data"),g=()=>C(()=>e.theme?.()??b(d),e.brand,O),L="",l=()=>{i&&(L=JSON.stringify(g()),i.push())},k=B(f,()=>{i&&JSON.stringify(g())!==L&&l()}),n,w=!1,D=e.pictures?z(Q,({createGuestPictures:r})=>{n=r(u,{as:"data",view:`"${e.title??e.view}"`,pictures:e.pictures,...e.limits?{limits:e.limits}:{},...e.file?{file:e.file}:{},moved:()=>{i?.push(),G&&E()}}),w&&x()}):()=>{},G=!1,c,N=()=>{!G||n?.waiting()||(clearTimeout(c),t.removeAttribute("data-guest-view-failed"),t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-drawn",""))},E=()=>{clearTimeout(c),c=setTimeout(N,250)},F=setTimeout(()=>{i||(t.removeAttribute("aria-busy"),t.setAttribute("data-guest-view-failed","silent"))},e.limits?.readyMs??8e3),H=()=>{v(),i?.dispose(),y?.close(),i=void 0,y=void 0,o={applied:0,refused:0,dropped:0}},M=r=>{if(!(r.source===null||r.source!==t.contentWindow)){if(r.origin!==S||!P.message()){a.dropped+=1;return}if(!_(r.data)||r.data.protocol!==1){a.dropped+=1;return}if(e.pictures&&!n){w=!0;return}x()}},x=()=>{w=!1,H();let r=U(),m=new MessageChannel;y=m.port1;let I=A({store:e.store,principal:e.principal,view:e.view,nonce:r,send:s=>m.port1.postMessage(s),...e.input?{input:e.input}:{},...e.reads?{reads:e.reads}:{},...n?{hand:n.hand}:{},theme:g,...e.places?{places:()=>[...new Set(e.places().map(s=>s.as))],placesShown:e.places}:{},...e.onNavigatePlace?{onNavigatePlace:e.onNavigatePlace}:{},...e.onNavigate?{onNavigate:e.onNavigate}:{},...e.onArrive?{onArrive:e.onArrive}:e.goTo?{onArrive:s=>V(e.goTo(),s)}:{},...e.onLost?{onLost:e.onLost}:{},onSize:s=>{e.onSize?e.onSize(s):t.style.height=`${s}px`,N()},...e.limits?{limits:e.limits}:{},limiter:P});i=I,m.port1.onmessage=s=>{I.receive(s.data),v()};let j={graview:"host-hello",protocol:1,nonce:r,view:e.view};t.contentWindow.postMessage(j,"*",[m.port2]),l(),G=!0,E()};return u.addEventListener("message",M),d.appendChild(t),d.removeAttribute("aria-busy"),{iframe:t,update:l,get stats(){return v(),a},dispose(){H(),clearTimeout(F),clearTimeout(c),k(),O.dispose(),D(),n?.dispose(),u.removeEventListener("message",M),t.remove()}}}export{p as GUEST_PROTOCOL,T as GUEST_SANDBOX,S as OPAQUE_ORIGIN,A as createGuestHost,h as createGuestLimiter,te as mountGuestView,J as readAcross,b as readTheme};
|