@apisurf/wireui 0.1.2 → 0.1.4
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/README.md +42 -26
- package/bin/wireui.mjs +1 -1
- package/dist/nitro.json +1 -1
- package/dist/public/assets/environments-CpzEnLw2.js +1 -0
- package/dist/public/assets/feed-B8L4GK9D.js +1 -0
- package/dist/public/assets/globals-D_ltS-iC.css +1 -0
- package/dist/public/assets/history-BIXZHMWn.js +1 -0
- package/dist/public/assets/index-3VfD7Ktf.js +11 -0
- package/dist/public/assets/kv-table-Dv6o68aD.js +2 -0
- package/dist/public/assets/preload-helper-CIs162tl.js +3 -0
- package/dist/public/assets/query-DpztusaI.js +19 -0
- package/dist/public/assets/requests._requestId-Byq4gM_2.js +1 -0
- package/dist/public/assets/rolldown-runtime-CbXtAM7H.js +1 -0
- package/dist/public/assets/routes-C9SXJh8z.js +1 -0
- package/dist/public/assets/runs._runId-CMFvexqY.js +1 -0
- package/dist/public/assets/scoped-CiNsRvyC.js +1 -0
- package/dist/public/assets/session-header-DMR_hFkk.js +1 -0
- package/dist/public/assets/sessions-C-F6Wmmg.js +1 -0
- package/dist/public/assets/split-Ddiw3mOT.js +1 -0
- package/dist/public/assets/tabs-C1EijW_Z.js +2 -0
- package/dist/server/_ssr/{api-Dw1Zb_PK.mjs → api-DUem3i24.mjs} +28 -17
- package/dist/server/_ssr/environments-BFBtf7iL.mjs +146 -0
- package/dist/server/_ssr/feed-BgweoqQ4.mjs +108 -0
- package/dist/server/_ssr/history-57VNXvbE.mjs +195 -0
- package/dist/server/_ssr/{kv-table-DQUkoItO.mjs → kv-table-BONnSOLb.mjs} +2 -2
- package/dist/server/_ssr/{router-CPcgc_kh.mjs → prefs-iPvYd_Vz.mjs} +246 -1551
- package/dist/server/_ssr/{query-D4so9xiY.mjs → query-D6nNoSN3.mjs} +7 -6
- package/dist/server/_ssr/{requests._requestId-BFukRwqL.mjs → requests._requestId-bXoTBGVj.mjs} +7 -23
- package/dist/server/_ssr/router-ClsXvW-b.mjs +1068 -0
- package/dist/server/_ssr/{routes-DaV9vGHn.mjs → routes-CrmwJhiA.mjs} +18 -8
- package/dist/server/_ssr/runs._runId-DM5Y8e6b.mjs +850 -0
- package/dist/server/_ssr/{scoped-CnQ56K8h.mjs → scoped-CNX8KOhL.mjs} +2 -2
- package/dist/server/_ssr/session-header-BYy6LaSU.mjs +153 -0
- package/dist/server/_ssr/{collections-CqidTQpw.mjs → sessions-wsD0b1zm.mjs} +35 -72
- package/dist/server/_ssr/{split-DWrMIs7K.mjs → split-qGbYHKc9.mjs} +2 -2
- package/dist/server/_ssr/ssr.mjs +10 -14
- package/dist/server/_tanstack-start-manifest_v-Ag2qLfrP.mjs +79 -0
- package/dist/server/index.mjs +100 -51
- package/package.json +8 -6
- package/dist/public/assets/collections-CLHcfRfi.js +0 -1
- package/dist/public/assets/globals-CZiNFGaK.css +0 -1
- package/dist/public/assets/index-D5VFd_3H.js +0 -14
- package/dist/public/assets/kv-table-oB5gcq0i.js +0 -2
- package/dist/public/assets/query-BKAhHNIi.js +0 -19
- package/dist/public/assets/requests._requestId-Bu7E2eoI.js +0 -1
- package/dist/public/assets/routes-DDY2CfzA.js +0 -1
- package/dist/public/assets/runs._runId-CzwtVjYq.js +0 -1
- package/dist/public/assets/scoped-DB8raIWx.js +0 -1
- package/dist/public/assets/split-Br1RX2I4.js +0 -1
- package/dist/server/_ssr/runs._runId-Df_LmPHa.mjs +0 -836
- package/dist/server/_tanstack-start-manifest_v-CARKjHfs.mjs +0 -50
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{A as t,C as n,Dt as r,G as i,K as a,L as o,Ot as s,R as c,S as l,U as u,V as d,Vt as f,_ as p,_n as m,at as h,b as g,ft as _,rt as v,s as y,st as b,v as x}from"./tabs-C1EijW_Z.js";var S=e(m(),1),C=f(),w={key:s({color:`synKey`}),string:s({color:`synString`}),number:s({color:`synNumber`}),bool:s({color:`synBool`}),null:s({color:`synNull`}),punct:s({color:`synPunct`})},T=s({fontFamily:`mono`,fontSize:`12px`,lineHeight:`1.65`,py:`2`,pl:`6`,pr:`3`,whiteSpace:`pre-wrap`,wordBreak:`break-word`});function E({value:e,initialDepth:t=2,command:n}){return(0,C.jsx)(`div`,{className:T,children:(0,C.jsx)(D,{value:e,depth:0,initialDepth:t,command:n,last:!0})})}function D({name:e,value:t,depth:n,initialDepth:i,command:a,last:o}){let c=typeof t==`object`&&!!t,[l,u]=S.useState(n<i);S.useEffect(()=>{a&&a.seq>0&&u(a.open)},[a]);let d=e===void 0?null:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:w.key,children:JSON.stringify(e)}),(0,C.jsx)(`span`,{className:w.punct,children:`: `})]}),f=o?null:(0,C.jsx)(`span`,{className:w.punct,children:`,`}),p={paddingLeft:n===0?0:16};if(!c)return(0,C.jsxs)(`div`,{style:p,children:[d,(0,C.jsx)(O,{value:t}),f]});let m=Array.isArray(t),g=m?t.map(e=>[void 0,e]):Object.entries(t),[_,v]=m?[`[`,`]`]:[`{`,`}`];if(g.length===0)return(0,C.jsxs)(`div`,{style:p,children:[d,(0,C.jsx)(`span`,{className:w.punct,children:`${_}${v}`}),f]});let y=m?`${g.length} item${g.length===1?``:`s`}`:`${g.length} key${g.length===1?``:`s`}`;return(0,C.jsxs)(`div`,{style:p,children:[(0,C.jsxs)(`span`,{role:`button`,tabIndex:0,onClick:()=>u(!l),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),u(!l))},className:s({cursor:`pointer`,rounded:`xs`,position:`relative`,ml:`-14px`,pl:`14px`,_hover:{bg:`hover`}}),children:[(0,C.jsx)(`span`,{className:s({position:`absolute`,left:`0`,top:`2px`,color:`faint`,display:`inline-flex`}),children:l?(0,C.jsx)(h,{size:12}):(0,C.jsx)(b,{size:12})}),d,(0,C.jsx)(`span`,{className:w.punct,children:_}),l?null:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:r(s({color:`faint`,fontStyle:`italic`,px:`1`})),children:y}),(0,C.jsx)(`span`,{className:w.punct,children:v}),f]})]}),l?(0,C.jsxs)(C.Fragment,{children:[g.map(([e,t],r)=>(0,C.jsx)(D,{name:e,value:t,depth:n+1,initialDepth:i,command:a,last:r===g.length-1},e??r)),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{className:w.punct,children:v}),f]})]}):null]})}function O({value:e}){return e===null?(0,C.jsx)(`span`,{className:w.null,children:`null`}):typeof e==`string`?(0,C.jsx)(`span`,{className:w.string,children:JSON.stringify(e)}):typeof e==`number`?(0,C.jsx)(`span`,{className:w.number,children:String(e)}):typeof e==`boolean`?(0,C.jsx)(`span`,{className:w.bool,children:String(e)}):null}function k(e){return e.kind===`json`?[`pretty`,`raw`]:e.kind===`image`?e.text?[`preview`,`raw`]:[`preview`]:e.kind===`text`?A(e.contentType)?[`pretty`,`preview`]:[`pretty`]:[]}function A(e){return e!=null&&/html/i.test(e)}var j={pretty:`Pretty`,raw:`Raw`,preview:`Preview`};function M({body:e,emptyTitle:n}){let d=k(e),[f,m]=S.useState(d[0]??`pretty`),[h,v]=S.useState({open:!0,seq:0}),b=d.includes(f)?f:d[0]??`pretty`;if(e.kind===`empty`)return(0,C.jsx)(l,{title:n,icon:(0,C.jsx)(_,{size:22}),children:e.note});let x=b===`raw`?i(e):a(e);return(0,C.jsxs)(`div`,{className:s({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,C.jsxs)(`div`,{className:s({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,flexShrink:0,minW:`0`}),children:[d.length>1?(0,C.jsx)(t,{items:d.map(e=>({id:e,label:j[e]})),value:b,onSelect:m}):null,(0,C.jsxs)(`span`,{title:e.contentType??void 0,className:r(c,o,u,s({fontSize:`11px`,flex:`1`,minW:`0`})),children:[e.contentType??`no content-type`,e.size==null?``:` · ${y(e.size)}`]}),(0,C.jsxs)(`div`,{className:s({ml:`auto`,display:`flex`,gap:`1.5`,flexShrink:0}),children:[e.kind===`json`&&b===`pretty`?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(p,{onClick:()=>v(e=>({open:!0,seq:e.seq+1})),children:`Expand`}),(0,C.jsx)(p,{onClick:()=>v(e=>({open:!1,seq:e.seq+1})),children:`Collapse`})]}):null,(0,C.jsx)(g,{text:x})]})]}),(0,C.jsx)(N,{body:e}),(0,C.jsx)(`div`,{className:s({flex:`1`,minH:`0`,overflow:`auto`,bg:`well`}),children:(0,C.jsx)(P,{body:e,mode:b,command:h})})]})}function N({body:e}){let t=e.kind===`binary`?null:e.note;return!e.truncated&&!t?null:(0,C.jsx)(`div`,{className:s({px:`3`,pt:`2`,flexShrink:0}),children:(0,C.jsx)(x,{tone:`warn`,icon:(0,C.jsx)(v,{size:14}),title:e.truncated?`Truncated at capture`:`Note`,children:t??`Only the first part of this ${y(e.size)} payload was stored — raise the capture limit to keep it all.`})})}function P({body:e,mode:t,command:n}){return e.kind===`binary`?(0,C.jsx)(l,{title:`Binary payload`,icon:(0,C.jsx)(_,{size:22}),children:e.note}):e.kind===`json`?t===`raw`?(0,C.jsx)(I,{text:i(e)??``,wrap:!0}):(0,C.jsx)(E,{value:e.json,command:n}):e.kind===`image`?t===`raw`?(0,C.jsx)(I,{text:e.text??``}):(0,C.jsx)(`div`,{className:s({p:`4`,display:`flex`,justifyContent:`center`,bgImage:`linear-gradient(45deg, token(colors.hover) 25%, transparent 25%), linear-gradient(-45deg, token(colors.hover) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, token(colors.hover) 75%), linear-gradient(-45deg, transparent 75%, token(colors.hover) 75%)`,bgSize:`16px 16px`,bgPosition:`0 0, 0 8px, 8px -8px, -8px 0`,minH:`full`}),children:(0,C.jsx)(`img`,{src:e.dataUrl??void 0,alt:`Response body`,className:s({maxW:`full`,objectFit:`contain`})})}):t===`preview`&&e.text!=null?(0,C.jsx)(`iframe`,{title:`HTML preview`,sandbox:``,srcDoc:e.text,className:s({w:`full`,h:`full`,border:`none`,bg:`white`})}):(0,C.jsx)(I,{text:e.text??``})}var F=4e3;function I({text:e,wrap:t=!1}){let[n,i]=S.useState(!1),a=S.useMemo(()=>e.split(`
|
|
2
|
+
`),[e]),o=n?a:a.slice(0,F),l=String(a.length).length;return(0,C.jsxs)(`div`,{className:r(c,s({py:`2`,lineHeight:`1.6`}),!t&&s({w:`max-content`,minW:`full`})),children:[o.map((e,n)=>(0,C.jsxs)(`div`,{className:s({display:`flex`,px:`3`,_hover:{bg:`hover`}}),children:[(0,C.jsx)(`span`,{className:s({color:`faint`,textAlign:`right`,pr:`3`,userSelect:`none`,flexShrink:0}),style:{width:`${l+2}ch`},children:n+1}),(0,C.jsx)(`span`,{className:r(s({flex:`1`,minW:`0`}),s(t?{whiteSpace:`pre-wrap`,wordBreak:`break-all`}:{whiteSpace:`pre`})),children:e||` `})]},n)),!n&&a.length>F?(0,C.jsx)(`div`,{className:s({px:`3`,py:`2`}),children:(0,C.jsxs)(p,{onClick:()=>i(!0),children:[`Show all `,a.length.toLocaleString(`en-US`),` lines`]})}):null]})}function L({rows:e,empty:t,filterable:i=e.length>8,nameLabel:a=`Key`,valueLabel:o=`Value`,extraLabel:u}){let[f,p]=S.useState(``),m=f.trim().toLowerCase(),h=m?e.filter(e=>e.name.toLowerCase().includes(m)||e.value.toLowerCase().includes(m)):e;return e.length===0?(0,C.jsx)(l,{title:t}):(0,C.jsxs)(`div`,{className:s({display:`flex`,flexDir:`column`,minH:`0`}),children:[i?(0,C.jsx)(`div`,{className:s({px:`3`,py:`2`}),children:(0,C.jsx)(n,{placeholder:`Filter ${e.length} rows…`,value:f,onChange:e=>p(e.target.value)})}):null,(0,C.jsxs)(`table`,{className:d,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{className:s({w:`32%`}),children:a}),(0,C.jsx)(`th`,{children:o}),u?(0,C.jsx)(`th`,{children:u}):null]})}),(0,C.jsxs)(`tbody`,{children:[h.map((e,t)=>(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`td`,{className:r(c,s({color:`muted`,verticalAlign:`top`,wordBreak:`break-all`})),children:e.name}),(0,C.jsx)(`td`,{className:r(c,s({wordBreak:`break-all`,whiteSpace:`pre-wrap`})),children:e.value}),u?(0,C.jsx)(`td`,{children:e.extra}):null]},`${e.name}:${t}`)),h.length===0?(0,C.jsx)(`tr`,{children:(0,C.jsxs)(`td`,{colSpan:u?3:2,className:s({color:`faint`,textAlign:`center`}),children:[`Nothing matches “`,f,`”.`]})}):null]})]})]})}export{E as i,M as n,I as r,L as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{At as t,Ut as n,_n as r,cn as i,hn as a,mn as o,pn as s}from"./tabs-C1EijW_Z.js";var c=`__TSS_CONTEXT`,l=Symbol.for(`TSS_SERVER_FUNCTION`),u=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),d=`application/x-tss-framed`;`${d}`;var f=()=>window.__TSS_START_OPTIONS__;function ee(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function p(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function te(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=p(r):Array.isArray(t)?t.push(p(r)):n[e]=[t,p(r)]}return n}var m=Symbol.asyncIterator,ne=Symbol.hasInstance,h=Symbol.isConcatSpreadable,g=Symbol.iterator,re=Symbol.match,ie=Symbol.matchAll,ae=Symbol.replace,oe=Symbol.search,se=Symbol.species,ce=Symbol.split,le=Symbol.toPrimitive,_=Symbol.toStringTag,ue=Symbol.unscopables,de={[m]:0,[ne]:1,[h]:2,[g]:3,[re]:4,[ie]:5,[ae]:6,[oe]:7,[se]:8,[ce]:9,[le]:10,[_]:11,[ue]:12},fe={0:m,1:ne,2:h,3:g,4:re,5:ie,6:ae,7:oe,8:se,9:ce,10:le,11:_,12:ue},pe={2:!0,3:!1,1:void 0,0:null,4:-0,5:1/0,6:-1/0,7:NaN},me={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},he={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function v(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function y(e){return v(2,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}var ge=y(2),_e=y(3),ve=y(1),ye=y(0),be=y(4),xe=y(5),Se=y(6),Ce=y(7),we=64,Te=/[\x00-\x07\x0b\x0e-\x1f<\u2028\u2029\ud800-\udfff]/;function Ee(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case`
|
|
2
|
+
`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case` `:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return}}function b(e){if(e.length>=we&&!Te.test(e))return JSON.stringify(e).slice(1,-1);let t=``,n=0,r;for(let i=0,a=e.length;i<a;i++)r=Ee(e[i]),r&&(t+=e.slice(n,i)+r,n=i+1);return n===0?t=e:t+=e.slice(n),t}function De(e){switch(e){case`\\\\`:return`\\`;case`\\"`:return`"`;case`\\n`:return`
|
|
3
|
+
`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return` `;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function x(e){return typeof e==`string`&&!e.includes(`\\`)?e:e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,De)}var{toString:Oe}=Object.prototype,ke={parsing:1,serialization:2,deserialization:3};function Ae(e){return`Seroval Error (step: ${ke[e]})`}var je=(e,t)=>Ae(e),Me=class extends Error{constructor(e,t){super(je(e,t)),this.cause=t}},Ne=class extends Me{constructor(e){super(`parsing`,e)}},Pe=class extends Me{constructor(e){super(`deserialization`,e)}};function S(e){return`Seroval Error (specific: ${e})`}var C=class extends Error{constructor(e){super(S(1)),this.value=e}},Fe=class extends Error{constructor(e){super(S(2))}},Ie=class extends Error{constructor(e){super(S(3))}},w=class extends Error{constructor(e){super(S(4))}},Le=class extends Error{constructor(e){super(S(5)),this.value=e}},Re=class extends Error{constructor(e){super(S(6))}},ze=class extends Error{constructor(e){super(S(7))}},T=class extends Error{constructor(e){super(S(8))}},Be=class extends Error{constructor(e){super(S(9))}},E=`__SEROVAL_REFS__`,Ve=new Map,D=new Map;function He(e){return Ve.has(e)}function Ue(e){return D.has(e)}function We(e){if(He(e))return Ve.get(e);throw new Le(e)}function Ge(e){if(Ue(e))return D.get(e);throw new Re(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,E,{value:D,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,E,{value:D,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,E,{value:D,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,E,{value:D,configurable:!0,writable:!1,enumerable:!1});function O(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function Ke(e){let t=me[O(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function qe(e,t){let n=Ke(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function Je(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function Ye(e){switch(e){case 1/0:return xe;case-1/0:return Se}return e===e?Object.is(e,-0)?be:v(0,void 0,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0):Ce}function Xe(e){return v(1,void 0,b(e),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Ze(e){return v(3,void 0,``+e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function Qe(e){return v(4,e,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function $e(e,t){let n=t.valueOf();return v(5,e,n===n?t.toISOString():``,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function k(e,t,n){return v(36,e,n.toString(),t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function et(e,t){return v(6,e,void 0,b(t.source),t.flags,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function tt(e,t){return v(17,e,de[t],void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function nt(e,t){return v(18,e,b(We(t)),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function rt(e,t,n){return v(25,e,n,b(t),void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function it(e,t,n){return v(9,e,void 0,void 0,void 0,void 0,void 0,n,void 0,void 0,Je(t),void 0)}function at(e,t){return v(21,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}var A=1e6;function ot(e,t,n){if(t.length>A)throw new C(t);return v(15,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function st(e,t,n){if(t.length>A)throw new C(t);return v(16,e,void 0,t.constructor.name,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.length)}function ct(e,t,n){if(t.byteLength>A)throw new C(t);return v(20,e,void 0,void 0,void 0,void 0,void 0,void 0,n,t.byteOffset,void 0,t.byteLength)}function lt(e,t,n){return v(13,e,O(t),void 0,b(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function ut(e,t,n){return v(14,e,O(t),void 0,b(t.message),n,void 0,void 0,void 0,void 0,void 0,void 0)}function dt(e,t){return v(7,e,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,void 0)}function ft(e,t){return v(28,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function pt(e,t){return v(30,void 0,void 0,void 0,void 0,void 0,void 0,[e,t],void 0,void 0,void 0,void 0)}function mt(e,t,n){return v(31,e,void 0,void 0,void 0,void 0,void 0,n,t,void 0,void 0,void 0)}function ht(e,t){return v(32,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function gt(e,t){return v(33,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function _t(e,t){return v(34,e,void 0,void 0,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0)}function vt(e,t,n,r){return v(35,e,n,void 0,void 0,void 0,void 0,t,void 0,void 0,void 0,r)}var yt=class{constructor(e,t){this.value=e,this.replacement=t}},j=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e},bt=()=>{let e=[],t=[],n=!0,r=!1,i=0,a={flush(e,n,r){for(r=0;r<i;r++){let i=t[r];i&&i[n](e)}},up(t,i,a,o){for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},on(e,r=0){let o=n;if(n){for(r=0;r<i&&t[r];r++);r===i&&i++,t[r]=e}return a.up(e),()=>{if(n&&o){for(o=!1,t[r]=void 0;i>0&&!t[i-1];)i--;t.length=i}}}};return{__SEROVAL_STREAM__:!0,on(e){return a.on(e)},next(t){n&&(e.push(t),a.flush(t,`next`))},throw(i){n&&(e.push(i),a.flush(i,`throw`),n=!1,r=!1,t.length=0)},return(i){n&&(e.push(i),a.flush(i,`return`),n=!1,r=!0,t.length=0)}}},xt=e=>t=>()=>{let n=0,r={[e](){return r},next(){if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r},St=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c={finalize(e=0,t=s.length){for(;e<t;e++)s[e].s({done:!0,value:void 0})}};n.on({next(e){let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw(e){let t=s.shift();t&&t.f(e),c.finalize(),i=o.length,a=!0,o.push(e)},return(e){let t=s.shift();t&&t.s({done:!0,value:e}),c.finalize(),i=o.length,o.push(e)}});let l={[e](){return l},next(){if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l},Ct=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer};function wt(e){return`__SEROVAL_SEQUENCE__`in e}function Tt(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function Et(e){let t=[],n=-1,r=-1,i=e[g]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return Tt(t,n,r)}var Dt=xt(g);function Ot(e){return Dt(e)}var kt={},At={},jt={0:{},1:{},2:{},3:{},4:{},5:{}};function Mt(e){return`__SEROVAL_STREAM__`in e}function M(){return bt()}function Nt(e,t){let n=M(),r=e[m](),i=!1,a=!1;t?.push(()=>{a||i||(i=!0,Promise.resolve().then(()=>r.return?.call(r)).catch(()=>{}))});async function o(){try{for(;!i;){let e=await r.next();if(i)return;if(e.done){a=!0,n.return(e.value);break}n.next(e.value)}}catch(e){a=!0,i||n.throw(e)}}return o().catch(()=>{}),n}var Pt=St(m,j);function Ft(e){return Pt(e)}async function It(e){try{return[1,await e]}catch(e){return[0,e]}}function Lt(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:127^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3,compactArrayBufferViews:t.compactArrayBufferViews??!1}}function N(e,t){e.marked.add(t)}function Rt(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function P(e,t){let n=e.refs.get(t);return n==null?{type:0,value:Rt(e,t)}:(N(e,n),{type:1,value:Qe(n)})}function F(e,t){let n=P(e,t);return n.type===1?n:He(t)?{type:2,value:nt(n.value,t)}:n}function I(e,t){let n=F(e,t);if(n.type!==0)return n.value;if(t in de)return tt(n.value,t);throw new C(t)}function L(e,t){let n=P(e,jt[t]);return n.type===1?n.value:v(26,n.value,t,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0)}function zt(e){let t=P(e,kt);return t.type===1?t.value:v(27,t.value,void 0,void 0,void 0,void 0,void 0,void 0,I(e,g),void 0,void 0,void 0)}function Bt(e){let t=P(e,At);return t.type===1?t.value:v(29,t.value,void 0,void 0,void 0,void 0,void 0,[L(e,1),I(e,m)],void 0,void 0,void 0,void 0)}function Vt(e,t,n,r){return v(n?11:10,e,void 0,void 0,void 0,r,void 0,void 0,void 0,void 0,Je(t),void 0)}function Ht(e,t,n,r){return v(8,t,void 0,void 0,void 0,void 0,{k:n,v:r},void 0,L(e,0),void 0,void 0,void 0)}function R(e,t){if(!e.compactArrayBufferViews)return t;let n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer,r=t.constructor;return new r(n)}function Ut(e){if(typeof Buffer<`u`)return Buffer.from(e).toString(`base64`);let t=new Uint8Array(e);if(typeof t.toBase64==`function`)return t.toBase64();let n=``;for(let e=0,r=t.length;e<r;e++)n+=String.fromCharCode(t[e]);return btoa(n)}function Wt(e,t,n){return v(19,t,Ut(n),void 0,void 0,void 0,void 0,void 0,L(e,5),void 0,void 0,void 0)}function Gt(e,t){return{base:Lt(e,t),child:void 0}}var Kt=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return V(this._p,this.depth,e)}};async function qt(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await V(e,t,n[i]):r[i]=0;return r}async function Jt(e,t,n,r){return it(n,r,await qt(e,t,r))}async function z(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(b(r[n][0])),a.push(await V(e,t,r[n][1]));return g in n&&(i.push(I(e.base,g)),a.push(ft(zt(e.base),await V(e,t,Et(n))))),m in n&&(i.push(I(e.base,m)),a.push(pt(Bt(e.base),await V(e,t,Nt(n))))),_ in n&&(i.push(I(e.base,_)),a.push(Xe(n[_]))),h in n&&(i.push(I(e.base,h)),a.push(n[h]?ge:_e)),{k:i,v:a}}async function B(e,t,n,r,i){return Vt(n,r,i,await z(e,t,r))}async function Yt(e,t,n,r){return at(n,await V(e,t,r.valueOf()))}async function Xt(e,t,n,r){return r=R(e.base,r),ot(n,r,await V(e,t,r.buffer))}async function Zt(e,t,n,r){return r=R(e.base,r),st(n,r,await V(e,t,r.buffer))}async function Qt(e,t,n,r){return r=R(e.base,r),ct(n,r,await V(e,t,r.buffer))}async function $t(e,t,n,r){let i=qe(r,e.base.features);return lt(n,r,i?await z(e,t,i):void 0)}async function en(e,t,n,r){let i=qe(r,e.base.features);return ut(n,r,i?await z(e,t,i):void 0)}async function tn(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await V(e,t,n)),a.push(await V(e,t,o));return Ht(e.base,n,i,a)}async function nn(e,t,n,r){let i=[];for(let n of r.keys())i.push(await V(e,t,n));return dt(n,i)}async function rn(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return rt(n,o.tag,await o.parse.async(r,new Kt(e,t),{id:n}))}}async function an(e,t,n,r){let[i,a]=await It(r);return v(12,n,i,void 0,void 0,void 0,void 0,void 0,await V(e,t,a),void 0,void 0,void 0)}function on(e,t,n,r,i){let a=[],o=n.on({next:n=>{N(this.base,t),V(this,e,n).then(e=>{a.push(ht(t,e))},e=>{i(e),o()})},throw:n=>{N(this.base,t),V(this,e,n).then(e=>{a.push(gt(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{N(this.base,t),V(this,e,n).then(e=>{a.push(_t(t,e)),r(a),o()},e=>{i(e),o()})}})}async function sn(e,t,n,r){return mt(n,L(e.base,4),await new Promise(on.bind(e,t,n,r)))}async function cn(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await V(e,t,r.v[n]);return vt(n,i,r.t,r.d)}async function ln(e,t,n,r){if(Array.isArray(r))return Jt(e,t,n,r);if(Mt(r))return sn(e,t,n,r);if(wt(r))return cn(e,t,n,r);let i=r.constructor;if(i!==void 0&&typeof i!=`function`){let e=Object.getPrototypeOf(r);i=e===null?void 0:e.constructor}if(i===yt)return V(e,t,r.replacement);let a=await rn(e,t,n,r);if(a)return a;switch(i){case Object:return B(e,t,n,r,!1);case void 0:return B(e,t,n,r,!0);case Date:return $e(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return $t(e,t,n,r);case Number:case Boolean:case String:case BigInt:return Yt(e,t,n,r);case ArrayBuffer:return Wt(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Xt(e,t,n,r);case DataView:return Qt(e,t,n,r);case Map:return tn(e,t,n,r);case Set:return nn(e,t,n,r)}if(i===Promise||r instanceof Promise)return an(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return et(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return Zt(e,t,n,r)}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return en(e,t,n,r);if(o&64&&typeof Temporal<`u`)switch(i){case Temporal.Instant:return k(n,0,r);case Temporal.Duration:return k(n,1,r);case Temporal.PlainDate:return k(n,2,r);case Temporal.PlainDateTime:return k(n,3,r);case Temporal.PlainMonthDay:return k(n,4,r);case Temporal.PlainTime:return k(n,5,r);case Temporal.PlainYearMonth:return k(n,6,r);case Temporal.ZonedDateTime:return k(n,7,r)}if(r instanceof Error)return $t(e,t,n,r);if(g in r||m in r)return B(e,t,n,r,!!i);throw new C(r)}async function un(e,t,n){let r=F(e.base,n);if(r.type!==0)return r.value;let i=await rn(e,t,r.value,n);if(i)return i;throw new C(n)}async function V(e,t,n){if(t>=e.base.depthLimit)throw new Be(e.base.depthLimit);switch(typeof n){case`boolean`:return n?ge:_e;case`undefined`:return ve;case`string`:return Xe(n);case`number`:return Ye(n);case`bigint`:return Ze(n);case`object`:if(n){let r=F(e.base,n);return r.type===0?await ln(e,t+1,r.value,n):r.value}return ye;case`symbol`:return I(e.base,n);case`function`:return un(e,t,n);default:throw new C(n)}}async function dn(e,t){try{return await V(e,0,t)}catch(e){throw e instanceof Ne?e:new Ne(e)}}function H(e){return e}function fn(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&fn(e,r.extends))}}function pn(e){if(e){let t=new Set;return fn(t,e),[...t]}}function mn(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new ze(e)}}function hn(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function gn(e){switch(e){case m:case h:case _:case g:return!0;default:return!1}}var _n=1e6,vn=512,yn=1e4,bn=2e4;function xn(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var Sn=1e3;function Cn(e,t){let n=t.maxBase64Length??_n;if(!Number.isSafeInteger(n)||n<0)throw RangeError(`maxBase64Length must be a non-negative safe integer`);let r=t.refs||new Map;return`types`in r||Object.assign(r,{types:new Map}),{mode:e,plugins:t.plugins,refs:r,features:t.features??127^(t.disabledFeatures||0),depthLimit:t.depthLimit||Sn,maxBase64Length:n}}function wn(e){return{mode:2,base:Cn(2,e),child:void 0}}var Tn=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return q(this._p,this.depth,e)}};function En(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new T({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function Dn(e){return!!e&&typeof e==`object`&&`then`in e&&typeof e.then==`function`}function On(e,t,n){return En(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function kn(e,t,n){return En(e.base,t),e.base.refs.set(t,n),n}function U(e,t,n){return e.mode===1?On(e,t,n):kn(e,t,n)}function W(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new T(e)}function An(e,t){return U(e,t.i,Ge(x(t.s)))}function jn(e,t,n){let r=n.a,i=r.length,a=U(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=q(e,t,o));return xn(a,n.o),a}function Mn(e,t,n){hn(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function Nn(e,t,n,r,i){if(typeof r==`string`)Mn(n,x(r),q(e,t,i));else{let a=q(e,t,r);switch(typeof a){case`string`:Mn(n,a,q(e,t,i));break;case`symbol`:gn(a)&&(n[a]=q(e,t,i));break;default:throw new T(r)}}}function G(e,t,n){e.base.refs.types.set(t,n)}function K(e,t,n,r){if(e.base.refs.types.get(n)!==r)throw new T(t)}function Pn(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)Nn(e,t,r,i[a],o[a]);return r}function Fn(e,t,n){let r=U(e,n.i,n.t===10?{}:Object.create(null));return Pn(e,t,n.p,r),xn(r,n.o),r}function In(e,t){return U(e,t.i,new Date(t.s))}function Ln(e,t){if(!(e.base.features&64))throw new Fe(t);let n;switch(t.c){case 0:n=Temporal.Instant.from(t.s);break;case 1:n=Temporal.Duration.from(t.s);break;case 2:n=Temporal.PlainDate.from(t.s);break;case 3:n=Temporal.PlainDateTime.from(t.s);break;case 4:n=Temporal.PlainMonthDay.from(t.s);break;case 5:n=Temporal.PlainTime.from(t.s);break;case 6:n=Temporal.PlainYearMonth.from(t.s);break;case 7:n=Temporal.ZonedDateTime.from(t.s);break;default:throw new T(t)}return U(e,t.i,n)}function Rn(e,t){if(e.base.features&32){let n=x(t.c);if(n.length>bn)throw new T(t);return U(e,t.i,new RegExp(n,t.m))}throw new Fe(t)}function zn(e,t,n){let r=U(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(q(e,t,a[i]));return r}function Bn(e,t,n){let r=U(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(q(e,t,a[i]),q(e,t,o[i]));return r}function Vn(e,t){if(typeof t.s!=`string`)throw new T(t);if(t.s.length>e.base.maxBase64Length)throw RangeError(`ArrayBuffer exceeds maxBase64Length (`+e.base.maxBase64Length+`)`);let n=x(t.s),r;if(n.length<vn||typeof Buffer>`u`)r=Ct(n);else{let e=atob(n);r=new ArrayBuffer(e.length),Buffer.from(r).write(e,`latin1`)}return U(e,t.i,r)}function Hn(e,t,n){let r=mn(n.c),i=q(e,t,n.f);if(!(i instanceof ArrayBuffer))throw new T(n);let a=n.b??0;if(a<0||a>i.byteLength)throw new T(n);return U(e,n.i,new r(i,a,n.l))}function Un(e,t,n){let r=q(e,t,n.f);if(!(r instanceof ArrayBuffer))throw new T(n);let i=n.b??0;if(i<0||i>r.byteLength)throw new T(n);return U(e,n.i,new DataView(r,i,n.l))}function Wn(e,t,n,r){if(n.p){let i=Pn(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function Gn(e,t,n){return Wn(e,t,n,U(e,n.i,AggregateError([],x(n.m))))}function Kn(e,t,n){let r=W(n,he,n.s);return Wn(e,t,n,U(e,n.i,new r(x(n.m))))}function qn(e,t,n){let r=j(),i=U(e,n.i,r.p),a=q(e,t,n.f);if(Dn(a))throw new T(n.f);return n.s?r.s(a):r.f(a),i}function Jn(e,t,n){return U(e,n.i,Object(q(e,t,n.f)))}function Yn(e,t,n){let r=e.base.plugins;if(r){let i=x(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return U(e,n.i,o.deserialize(n.s,new Tn(e,t),{id:n.i}))}}throw new Ie(n.c)}function Xn(e,t){let n=U(e,t.i,U(e,t.s,j()).p);return G(e,t.s,22),n}function Zn(e,t,n){let r=e.base.refs.get(n.i);if(r){K(e,n,n.i,22);let i=q(e,t,n.a[1]);if(Dn(i))throw new T(n.a[1]);n.t===23?r.s(i):r.f(i);return}throw new w(`Promise`)}function Qn(e,t,n){q(e,t,n.a[0]);let r=q(e,t,n.a[1]);if(K(e,n,n.a[1].i,35),!r)throw new T(n.a[1]);return Ot(r)}function $n(e,t,n){q(e,t,n.a[0]);let r=q(e,t,n.a[1]);if(K(e,n,n.a[1].i,31),!r)throw new T(n.a[1]);return Ft(r)}function er(e,t,n){let r=U(e,n.i,M());G(e,n.i,31);let i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)q(e,t,i[n]);return r}function tr(e,t,n){let r=e.base.refs.get(n.i);if(r){K(e,n,n.i,31),r.next(q(e,t,n.f));return}throw new w(`Stream`)}function nr(e,t,n){let r=e.base.refs.get(n.i);if(r){K(e,n,n.i,31),r.throw(q(e,t,n.f));return}throw new w(`Stream`)}function rr(e,t,n){let r=e.base.refs.get(n.i);if(r){K(e,n,n.i,31),r.return(q(e,t,n.f));return}throw new w(`Stream`)}function ir(e,t,n){q(e,t,n.f)}function ar(e,t,n){q(e,t,n.a[1])}function or(e,t,n){let r=U(e,n.i,Tt([],n.s,n.l));G(e,n.i,35);for(let i=0,a=n.a.length;i<a;i++)r.v[i]=q(e,t,n.a[i]);return r}function q(e,t,n){if(t>e.base.depthLimit)throw new Be(e.base.depthLimit);switch(t+=1,n.t){case 2:return W(n,pe,n.s);case 0:return Number(n.s);case 1:return x(String(n.s));case 3:if(String(n.s).length>yn)throw new T(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return An(e,n);case 9:return jn(e,t,n);case 10:case 11:return Fn(e,t,n);case 5:return In(e,n);case 6:return Rn(e,n);case 7:return zn(e,t,n);case 8:return Bn(e,t,n);case 19:return Vn(e,n);case 16:case 15:return Hn(e,t,n);case 20:return Un(e,t,n);case 14:return Gn(e,t,n);case 13:return Kn(e,t,n);case 12:return qn(e,t,n);case 17:return W(n,fe,n.s);case 21:return Jn(e,t,n);case 25:return Yn(e,t,n);case 22:return Xn(e,n);case 23:case 24:return Zn(e,t,n);case 28:return Qn(e,t,n);case 30:return $n(e,t,n);case 31:return er(e,t,n);case 32:return tr(e,t,n);case 33:return nr(e,t,n);case 34:return rr(e,t,n);case 27:return ir(e,t,n);case 29:return ar(e,t,n);case 35:return or(e,t,n);case 36:return Ln(e,n);default:throw new Fe(n)}}function sr(e,t){try{return q(e,0,t)}catch(e){throw new Pe(e)}}function cr(e,t){let n=pn(t.plugins);return sr(wn({maxBase64Length:t.maxBase64Length,plugins:n,refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function lr(e,t={}){let n=pn(t.plugins),r=Gt(1,{compactArrayBufferViews:t.compactArrayBufferViews,plugins:n,disabledFeatures:t.disabledFeatures});return{t:await dn(r,e),f:r.base.features,m:Array.from(r.base.marked)}}function ur(e){return H({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n){return{v:n.parse(e.toSerializable(t))}},async async(t,n){return{v:await n.parse(e.toSerializable(t))}},stream(t,n){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n){return e.fromSerializable(n.deserialize(t.v))}})}function dr(e){if(Array.isArray(e))return e.flatMap(e=>dr(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n<e.length&&/\s/.test(e.charAt(n));)n+=1;return n<e.length},l=()=>(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n<e.length;){for(r=n,s=!1;c();)if(i=e.charAt(n),i===`,`){for(a=n,n+=1,c(),o=n;n<e.length&&l();)n+=1;n<e.length&&e.charAt(n)===`=`?(s=!0,n=o,t.push(e.slice(r,a)),r=n):n=a+1}else n+=1;(!s||n>=e.length)&&t.push(e.slice(r))}return t}function fr(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function pr(...e){return e.reduce((e,t)=>{let n=fr(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?dr(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var mr=H({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),hr=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}};function gr(e){let t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(``))}var _r=new TextDecoder(`utf-8`,{fatal:!0,ignoreBOM:!0});function vr(e){try{return`t`+_r.decode(e)}catch{return`b`+gr(e)}}function yr(e,t,n){n?.throwIfAborted();let r=M(),i=e.getReader(),a=!0,o=()=>{a=!1,n?.removeEventListener(`abort`,c),i.releaseLock()},s=e=>a?(i.cancel(e).catch(()=>{}),o(),!0):!1,c=()=>{s(n.reason)&&r.throw(n.reason)};return n?.addEventListener(`abort`,c),(async()=>{try{for(;a;){let{done:e,value:n}=await i.read();if(!a)return;if(e){o(),r.return(void 0);return}r.next(t(n))}}catch(e){s(e)&&r.throw(e)}})(),[r,s]}function br(e){return H({tag:`tss/RawStream`,test:e=>e instanceof hr,parse:{async:async(t,n)=>{let r=await n.parse(t.hint===`text`),[i]=yr(t.stream,t.hint===`text`?vr:gr,e);return{text:r,stream:await n.parse(i)}}},serialize:void 0,deserialize:void 0})}var xr=br(),J={},Sr=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(e)}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),Cr=H({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===J},parse:{sync(){return J},async async(){return await Promise.resolve(J)},stream(){return J}},serialize(){return Sr.toString()},deserialize(){return J}});async function wr(e,t){try{for(;;){let n=await t.read();if(n.done){e.return(n.value),t.releaseLock();break}e.next(n.value)}}catch(n){t.releaseLock(),e.throw(n)}}function Tr(e){e.cancel().catch(()=>{}),e.releaseLock()}function Er(e){let t=M(),n=e.getReader(),r=Tr.bind(null,n);return wr(t,n).catch(r),[t,r]}var Dr=H({tag:`seroval/plugins/web/ReadableStream`,extends:[Cr],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(J),stream:t.parse(M())}},async async(e,t){return{factory:await t.parse(J),stream:await t.parse(Er(e)[0])}},stream(e,t){let[n,r]=Er(e);return t.addCleanup(r),{factory:t.parse(J),stream:t.parse(n)}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){let n=t.deserialize(e.stream);if(!n||typeof n!=`object`||!Mt(n))throw Error(`Expected a stream source.`);return Sr(n)}});function Or(e){return[mr,e?br(e):xr,Dr]}[...Or()];function kr(e){return H({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize:void 0,deserialize(t,n){return e(n.deserialize(t.streamId))}})}function Ar(e){return[...(f()?.serializationAdapters)?.map(ur)??[],...e]}function jr(e){return Ar(Or(e))}var Mr=new TextDecoder,Y=new Uint8Array,Nr=new ByteLengthQueuingStrategy({highWaterMark:0});function Pr(e){let t=e.getReader(),n=new Map,r=0,i,a,o=()=>{i?.(),i=void 0},s=(e,t)=>{let n=e[1];e[1]=!1,n&&(t===1?n.close():n.error(t[0]))},c=new ReadableStream({start(e){a=e},pull:o,cancel(e){let i=[e===void 0?Error(`Framed response cancelled`):e];r=i,o(),t.cancel(e).catch(()=>{});for(let e of n.values())s(e,i)}});function l(e){let t=n.get(e);if(t)return t;if(n.size>=1024)throw Error(`Too many raw streams`);let i,a=[new ReadableStream({start(e){i=e},cancel(){a[1]!==!1&&(a[1]=null)}},Nr),i];return n.set(e,a),r!==0&&s(a,r),a}function u(e){if(e===0||e>>>0!==e)throw RangeError(`Invalid raw stream ID`);return l(e)[0]}return(async()=>{let e=Y,o=0;async function c(){for(;o===e.byteLength;){e=Y,o=0;let n=await t.read();if(r!==0||n.done)return!1;e=n.value}return!0}async function u(t,n){if(t===0)return Y;if(!await c()){if(n)return;throw Error(`Incomplete frame`)}if(e.byteLength-o>=t){let n=e.subarray(o,o+t);return o+=t,o===e.byteLength&&(e=Y,o=0),n}let r=new Uint8Array(t),i=0;for(;i<t;){if(!await c())throw Error(`Incomplete frame`);let n=Math.min(t-i,e.byteLength-o);r.set(e.subarray(o,o+n),i),o+=n,i+=n}return o===e.byteLength&&(e=Y,o=0),r}try{for(;r===0;){let e=await u(9,!0);if(r!==0)return;if(!e){for(let e of n.values())if(e[1])throw Error(`Incomplete raw stream`);r=1,a.close();return}let t=e[0],o=(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,c=(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0;if(e=Y,t>3||t===0!=(o===0)||c>16777216||t===2&&c!==0)throw Error(`Invalid frame`);let d=t===0?void 0:l(o);if(d?.[1]===!1)throw Error(`Raw stream already ended`);let f=await u(c);if(r!==0)return;if(!d){let e=Mr.decode(f);for(f=Y,a.enqueue(e);r===0&&a.desiredSize<=0;)await new Promise(e=>{i=e});continue}if(t===1){let e=d[1];if(e){if(-e.desiredSize>134217728){e.error(Error(`Raw stream ${o} has too many unread bytes`)),d[1]=null,f=Y;continue}let t=f.byteLength*4<f.buffer.byteLength?f.slice():f;f=Y,e.enqueue(t)}}else s(d,t===2?1:[Error(Mr.decode(f))])}}catch(e){if(r===0){let i=[e];r=i,t.cancel(e).catch(()=>{}),a.error(e);for(let e of n.values())s(e,i)}}finally{e=Y,t.releaseLock()}})(),[c,u]}var X;function Z(e,t,n){try{return cr(e,t)}catch(e){throw Ir(n),e}}async function Fr(e){e.length>0&&(await Promise.allSettled(e),e.length=0)}function Ir(e){for(let t of e)t.catch(()=>{});e.length=0}var Lr=Object.prototype.hasOwnProperty;function Rr(e){for(let t in e)if(Lr.call(e,t))return!0;return!1}async function zr(e,t,n){X||=jr();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData,o=new Headers(r.headers);if(o.set(`x-tsr-serverFn`,`true`),a||o.set(`accept`,`${d}, application/x-ndjson, application/json`),r.method===`GET`){if(a)throw Error(`FormData is not supported with GET requests`);let t=await Br(r);if(t!==void 0){let n=ee({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;return r.method===`POST`&&(s=await Hr(r),typeof s==`string`&&o.set(`content-type`,`application/json`)),Ur(()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function Br(e){let t;return e.data!==void 0&&(t={data:e.data}),e.context&&Rr(e.context)&&((t??={}).context=e.context),t?Vr(t,e.signal):void 0}async function Vr(e,t){t?.throwIfAborted();let n;try{n=await lr(e,{plugins:t?jr(t):X})}finally{t?.throwIfAborted()}return JSON.stringify(n)}async function Hr(e){if(e.data instanceof FormData){let t;return e.context&&Rr(e.context)&&(t=await Vr(e.context,e.signal)),t!==void 0&&e.data.set(c,t),e.data}return Br(e)}async function Ur(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let r=t.headers.get(`content-type`);if(r||n(),t.headers.get(`x-tss-serialized`)){let e;if(r.includes(`application/x-tss-framed`)){let n=/;\s*v=(\d+)/.exec(r)?.[1];if(n&&+n!=1)throw Error(`Unsupported framed protocol version ${n}`);if(!t.body)throw Error(`No response body for framed response`);let[i,a]=Pr(t.body);e=await Wr(i,[kr(a),...X])}else if(r.includes(`application/json`)){let n=await t.json(),r=[];e=Z(n,{plugins:X},r),await Fr(r)}if(e||n(),e instanceof Error)throw e;return e}if(r.includes(`application/json`)){let e=await t.json(),n=o(e);if(n)throw n;if(a(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function Wr(e,t){let n=e.getReader(),r={refs:new Map,plugins:t},i=e=>{n.cancel(e).catch(()=>{})},a,o=[];try{let e=await n.read();if(e.done)throw Error(`Stream ended before first object`);a=Z(JSON.parse(e.value),r,o)}catch(e){throw i(e),n.releaseLock(),e}return(async()=>{let e=[];try{for(;;){let t=await n.read();if(t.done)return;Z(JSON.parse(t.value),r,e),Ir(e)}}catch(e){i(e),console.error(`Stream processing error:`,e)}finally{n.releaseLock()}})(),await Fr(o),a}function Q(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=f()?.serverFns?.fetch;return zr(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[l]:!0})}var Gr=e(r(),1),Kr=Gr.use,qr=Gr.useLayoutEffect;function Jr(e){return e=>{let n=t(e);return n.isRoot=!1,n}}function Yr(e,t){let n,r,a,o=()=>(n||=(a=void 0,e().then(e=>{n=void 0,s.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,a=e})),n),s=function(e){if(a){if(i(a)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw a}if(!r){if(Kr)Kr(o());else throw o()}return Gr.createElement(r,e)};return s.preload=o,s}function Xr(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function Zr(e,t){let n=Object.create(null);if(e)for(let t of Object.keys(e))Xr(t)&&(n[t]=e[t]);if(t&&typeof t==`object`)for(let e of Object.keys(t))Xr(e)&&(n[e]=t[e]);return n}function Qr(e){if(!e)return Object.create(null);let t=Object.create(null);for(let n of Object.keys(e))Xr(n)&&(t[n]=e[n]);return t}var $r=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},$=(e,t)=>{let n=t||e||{};n.method===void 0&&(n.method=`GET`);let r=e=>$(void 0,{...n,validator:e,inputValidator:e});return Object.assign(e=>$(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.map(e=>{u in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=$(void 0,{...n,middleware:t});return r[u]=!0,r},validator:r,inputValidator:r,handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],ri(i)];return t.method=n.method,Object.assign(async e=>{let n=await ei(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:Qr()}),r=o(n.error);if(r)throw r;if(n.error)throw n.error;return n.result},{...t,method:n.method,__executeServer:async e=>{let n=$r(),r=n.contextAfterGlobalMiddlewares;return await ei(a,`server`,{...t,...e,serverFnMeta:t.serverFnMeta,context:Zr(e.context,r),request:n.request}).then(e=>({result:e.result,error:e.error,context:e.sendContext}))}})}})};async function ei(e,t,n){let r=ti([...f()?.functionMiddleware||[],...e]);if(t===`server`){let e=$r({throwIfNotFound:!1});e?.executedRequestMiddlewares&&(r=r.filter(t=>!e.executedRequestMiddlewares.has(t)))}let i=async e=>{let n=r.shift();if(!n)return e;try{let r=`validator`in n.options?n.options.validator:void 0;!r&&`inputValidator`in n.options&&(r=n.options.inputValidator),r&&t===`server`&&(e.data=await ni(r,e.data));let a;if(t===`client`?`client`in n.options&&(a=n.options.client):`server`in n.options&&(a=n.options.server),a){let t=async(t={})=>{let n=await i({...e,...t,context:Zr(e.context,t.context),sendContext:Zr(e.sendContext,t.sendContext),headers:pr(e.headers,t.headers),_callSiteFetch:e._callSiteFetch,fetch:e._callSiteFetch??t.fetch??e.fetch,result:t.result===void 0?t instanceof Response?t:e.result:t.result,error:t.error??e.error});if(n.error)throw n.error;return n},n=await a({...e,next:t});if(s(n))return{...e,error:n};if(n instanceof Response)return{...e,result:n};if(!n)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);return n}return i(e)}catch(t){return{...e,error:t}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||Qr(),_callSiteFetch:n.fetch})}function ti(e,t=100){let n=new Set,r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function ni(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function ri(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:async({next:t,...n})=>{let r=await e.serverFn?.(n);return t({...n,result:r})}}}}var ii=$({method:`GET`}).handler(Q(`65bc418eb60581304ebde68d2b8b775b58aa758789bcdd2e616a2bdd5657ef20`)),ai=$({method:`GET`}).handler(Q(`edb0cb28f3af0347a499a4c076ecc5f8247f0ace0fb524957f40f6a706d7224d`)),oi=$({method:`GET`}).handler(Q(`c1e4e973ed505d1515bcb9192482c65b1680975a5daa6973befb704515a618e3`)),si=$({method:`GET`}).handler(Q(`5eff62884e56f81742c81b44dc7dcd1afc2e67323a30591a8b94b8895eda0dc9`)),ci=$({method:`GET`}).handler(Q(`56c165307cd91159eb72bfa882932f9552f05a5bbd6b5725f0fd5f4ad6b8295d`)),li=$({method:`GET`}).handler(Q(`3772b5ea3e53d85a63e4df11f128b1c907e508d82cca6e71e6ee48dba1664133`)),ui=$({method:`GET`}).handler(Q(`06ff3639e7164884f56665ea621dc233dbfc78fa1557b1cb20105ff2fa90521e`)),di=$({method:`POST`}).handler(Q(`0f45629470ab3fbe618e9693d8685920d6ce48b2384512e5d9eb88f6b46ec2d9`)),fi=`modulepreload`,pi=function(e){return`/`+e},mi={},hi=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=pi(t,n),t=s(t),t in mi)return;mi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:fi,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{l as _,ci as a,ii as c,Jr as d,Kr as f,ee as g,te as h,li as i,di as l,Q as m,oi as n,ui as o,qr as p,ai as r,si as s,hi as t,Yr as u};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{C as t,Dt as n,Nt as r,O as i,Ot as a,R as o,S as s,T as c,U as l,V as u,Vt as d,_ as f,_n as p,_t as m,lt as h,n as g,p as _,r as v,v as y}from"./tabs-C1EijW_Z.js";import{l as b}from"./preload-helper-CIs162tl.js";import{i as x}from"./index-3VfD7Ktf.js";import{t as S}from"./split-Ddiw3mOT.js";var C=e(p()),w=d(),T=[{label:`Slowest requests`,sql:`SELECT id, method, host, path, status, duration_ms
|
|
2
|
+
FROM v_requests
|
|
3
|
+
ORDER BY duration_ms DESC
|
|
4
|
+
LIMIT 20`},{label:`Errors by host`,sql:`SELECT host, status, COUNT(*) AS n
|
|
5
|
+
FROM v_requests
|
|
6
|
+
WHERE status >= 400 OR error_name IS NOT NULL
|
|
7
|
+
GROUP BY host, status
|
|
8
|
+
ORDER BY n DESC`},{label:`Failed checks`,sql:`SELECT c.run_id, r.label, c.name, c.message
|
|
9
|
+
FROM v_checks c JOIN v_runs r ON r.id = c.run_id
|
|
10
|
+
WHERE c.status = 'fail'
|
|
11
|
+
ORDER BY c.ts DESC`},{label:`Search payloads`,sql:`SELECT q.id, q.method, q.path, q.status
|
|
12
|
+
FROM body_fts f
|
|
13
|
+
JOIN v_requests q ON q.response_body_id = f.body_id
|
|
14
|
+
WHERE body_fts MATCH 'error'
|
|
15
|
+
LIMIT 50`},{label:`Header usage`,sql:`SELECT name, COUNT(DISTINCT value) AS distinct_values, COUNT(*) AS n
|
|
16
|
+
FROM v_headers
|
|
17
|
+
WHERE kind = 'response'
|
|
18
|
+
GROUP BY name
|
|
19
|
+
ORDER BY n DESC`}];function E(){v({key:g.query(),title:`SQL`,icon:`query`});let e=x.useLoaderData(),t=x.useSearch(),i=r({from:x.fullPath}),[s,l]=C.useState(t.sql??T[0].sql),[u,d]=C.useState(null),[p,h]=C.useState(!1),_=C.useRef(null),y=C.useCallback(async e=>{if(e.trim()){h(!0);try{d(await b({data:{sql:e}}))}catch(e){d({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{h(!1)}i({search:{sql:e},replace:!0})}},[i]),E=C.useRef(!1);C.useEffect(()=>{!E.current&&t.sql&&(E.current=!0,y(t.sql))},[t.sql,y]);let k=e=>{let t=_.current;if(!t)return l(t=>t+e);let{selectionStart:n,selectionEnd:r}=t,i=s.slice(0,n)+e+s.slice(r);l(i),window.requestAnimationFrame(()=>{t.focus(),t.setSelectionRange(n+e.length,n+e.length)})},A=(0,w.jsxs)(`div`,{className:a({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,w.jsxs)(`div`,{className:a({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,h:`40px`,flexShrink:0,borderBottom:`1px solid`,borderColor:`line`}),children:[(0,w.jsxs)(f,{onClick:()=>void y(s),disabled:p,className:a({bg:`accent`,color:`accentFg`,borderColor:`accent`,_hover:{bg:`accent`,opacity:.9}}),children:[(0,w.jsx)(m,{size:12}),`Run`]}),(0,w.jsx)(c,{children:`⌘ ↵`}),(0,w.jsxs)(`select`,{"aria-label":`Example queries`,value:``,onChange:e=>{let t=T.find(t=>t.label===e.target.value);t&&l(t.sql)},className:a({h:`28px`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`raised`,px:`1.5`,fontSize:`12px`}),children:[(0,w.jsx)(`option`,{value:``,children:`Examples…`}),T.map(e=>(0,w.jsx)(`option`,{value:e.label,children:e.label},e.label))]}),(0,w.jsx)(`span`,{className:a({ml:`auto`,color:`faint`,fontSize:`12px`}),children:`Read-only connection`})]}),(0,w.jsx)(`textarea`,{ref:_,value:s,spellCheck:!1,onChange:e=>l(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),y(s))},className:n(o,a({flex:`1`,minH:`0`,resize:`none`,border:`none`,outline:`none`,p:`3`,bg:`well`,fontSize:`13px`,lineHeight:`1.6`,tabSize:2}))})]});return(0,w.jsxs)(`div`,{className:a({display:`flex`,h:`full`,minH:`0`}),children:[(0,w.jsx)(D,{schema:e,onInsert:k}),(0,w.jsx)(`div`,{className:a({flex:`1`,minW:`0`,display:`flex`,borderLeft:`1px solid`,borderColor:`line`}),children:(0,w.jsx)(S,{direction:`stacked`,storageKey:`query`,initial:.38,first:A,second:(0,w.jsx)(O,{result:u,running:p})})})]})}function D({schema:e,onInsert:r}){let[s,c]=C.useState(``),[u,d]=C.useState(`v_requests`),f=s.trim().toLowerCase(),p=e.filter(e=>!f||e.name.includes(f)||e.columns.some(e=>e.name.includes(f)));return(0,w.jsxs)(`div`,{className:a({w:`260px`,flexShrink:0,display:`flex`,flexDir:`column`,minH:`0`,bg:`canvas`}),children:[(0,w.jsx)(`div`,{className:a({p:`2.5`,flexShrink:0}),children:(0,w.jsx)(t,{placeholder:`Filter tables and columns`,value:s,onChange:e=>c(e.target.value)})}),(0,w.jsx)(`div`,{className:a({flex:`1`,minH:`0`,overflow:`auto`,px:`1.5`,pb:`3`}),children:p.map(e=>{let t=u===e.name||f.length>0;return(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`button`,{type:`button`,onClick:()=>d(t&&!f?null:e.name),onDoubleClick:()=>r(e.name),title:e.description??e.name,className:a({display:`flex`,alignItems:`center`,gap:`1.5`,w:`full`,h:`26px`,px:`1.5`,rounded:`sm`,border:`none`,bg:`transparent`,cursor:`pointer`,textAlign:`left`,_hover:{bg:`hover`}}),children:[(0,w.jsx)(`span`,{className:a({color:e.type===`view`?`accent`:`faint`,display:`inline-flex`}),children:(0,w.jsx)(h,{size:13})}),(0,w.jsx)(`span`,{className:n(o,l,a({flex:`1`})),children:e.name}),(0,w.jsx)(i,{children:e.type})]}),t?(0,w.jsxs)(`div`,{className:a({pl:`6`,pb:`1`}),children:[e.description?(0,w.jsx)(`div`,{className:a({color:`faint`,fontSize:`11px`,pr:`2`,pb:`1`}),children:e.description}):null,e.columns.filter(t=>!f||e.name.includes(f)||t.name.includes(f)).map(e=>(0,w.jsxs)(`button`,{type:`button`,onClick:()=>r(e.name),title:`Insert ${e.name}`,className:a({display:`flex`,w:`full`,gap:`2`,h:`22px`,alignItems:`center`,px:`1.5`,border:`none`,bg:`transparent`,rounded:`sm`,cursor:`pointer`,textAlign:`left`,_hover:{bg:`hover`}}),children:[(0,w.jsx)(`span`,{className:n(o,l,a({flex:`1`})),children:e.name}),(0,w.jsx)(`span`,{className:n(o,a({color:`faint`,fontSize:`10.5px`})),children:e.type||`?`})]},e.name))]}):null]},e.name)})})]})}function O({result:e,running:t}){return e?e.ok?(0,w.jsxs)(`div`,{className:a({display:`flex`,flexDir:`column`,h:`full`,minH:`0`,opacity:t?.6:1}),children:[(0,w.jsxs)(`div`,{className:a({display:`flex`,gap:`3`,px:`3`,h:`32px`,alignItems:`center`,flexShrink:0,fontSize:`12px`,color:`muted`,borderBottom:`1px solid`,borderColor:`line`}),children:[(0,w.jsxs)(`span`,{children:[e.rows.length.toLocaleString(`en-US`),` row`,e.rows.length===1?``:`s`,e.truncated?` (first 1,000)`:``]}),(0,w.jsx)(`span`,{children:_(e.ms)})]}),(0,w.jsx)(`div`,{className:a({flex:`1`,minH:`0`,overflow:`auto`}),children:e.columns.length===0?(0,w.jsx)(s,{title:`No columns`}):(0,w.jsxs)(`table`,{className:n(u,a({w:`auto`,minW:`full`,"& td":{fontFamily:`mono`,fontSize:`12px`,maxW:`420px`}})),children:[(0,w.jsx)(`thead`,{children:(0,w.jsx)(`tr`,{children:e.columns.map((e,t)=>(0,w.jsx)(`th`,{children:e},`${e}:${t}`))})}),(0,w.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,w.jsx)(`tr`,{children:e.map((e,t)=>(0,w.jsx)(`td`,{className:l,title:e==null?`NULL`:String(e),children:(0,w.jsx)(k,{value:e})},t))},t))})]})})]}):(0,w.jsx)(`div`,{className:a({p:`3`}),children:(0,w.jsx)(y,{tone:`bad`,title:`Query failed`,children:(0,w.jsx)(`span`,{className:o,children:e.error})})}):(0,w.jsxs)(s,{title:`Run a query`,icon:(0,w.jsx)(h,{size:22}),children:[`Views (`,(0,w.jsx)(`span`,{className:o,children:`v_runs`}),`, `,(0,w.jsx)(`span`,{className:o,children:`v_requests`}),`,`,` `,(0,w.jsx)(`span`,{className:o,children:`v_headers`}),`…) join the interned ids back to strings. Click a column on the left to insert it.`]})}function k({value:e}){return e===null?(0,w.jsx)(`span`,{className:a({color:`faint`,fontStyle:`italic`}),children:`NULL`}):typeof e==`number`?(0,w.jsx)(`span`,{className:a({color:`synNumber`}),children:e}):(0,w.jsx)(w.Fragment,{children:e})}export{E as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{A as t,C as n,D as r,Dt as i,E as a,F as o,J as s,L as c,Mt as l,Nt as u,O as d,Ot as f,P as p,R as m,S as h,T as g,Tt as _,U as v,Vt as y,W as b,Y as ee,Z as x,_n as S,b as C,bt as te,f as w,k as T,l as E,m as D,n as O,nt as k,ot as A,p as j,r as ne,rt as re,s as M,st as N,tt as P,ut as F,v as I,w as L,xt as R}from"./tabs-C1EijW_Z.js";import{d as z,n as B,u as V}from"./index-3VfD7Ktf.js";import{t as H}from"./split-Ddiw3mOT.js";import{i as U,n as W,r as G,t as K}from"./kv-table-Dv6o68aD.js";var q=e(S(),1),J=y();function Y({messages:e,openedAt:r}){let[a,o]=q.useState(`all`),[s,c]=q.useState(``),[l,u]=q.useState(e[0]?.id??null),d=s.trim().toLowerCase(),p=e.filter(e=>(a===`all`||e.direction===a)&&(!d||e.name.toLowerCase().includes(d)||(e.text??``).toLowerCase().includes(d))),g=e.find(e=>e.id===l)??null,y=e.filter(e=>e.direction===`sent`).length;if(e.length===0)return(0,J.jsx)(h,{title:`No messages`,children:`The connection opened but nothing was sent or received on it.`});let b=(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,px:`3`,py:`2`,alignItems:`center`,flexShrink:0}),children:[(0,J.jsx)(t,{items:[{id:`all`,label:`All ${e.length}`},{id:`sent`,label:`Sent ${y}`},{id:`received`,label:`Received ${e.length-y}`}],value:a,onSelect:o}),(0,J.jsx)(n,{className:f({flex:`1`}),placeholder:`Filter messages…`,value:s,onChange:e=>c(e.target.value)})]}),(0,J.jsxs)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`}),role:`listbox`,"aria-label":`Messages`,children:[p.map(e=>(0,J.jsxs)(`button`,{type:`button`,role:`option`,"aria-selected":e.id===l,onClick:()=>u(e.id),className:f({display:`grid`,gridTemplateColumns:`18px 76px 70px 1fr 64px`,alignItems:`center`,gap:`2`,w:`full`,px:`3`,py:`1`,border:`none`,borderBottom:`1px solid`,borderColor:`line`,bg:`transparent`,textAlign:`left`,cursor:`pointer`,_hover:{bg:`hover`},"&[aria-selected=true]":{bg:`selected`}}),children:[(0,J.jsx)(`span`,{title:e.direction,className:e.direction===`sent`?f({color:`post`}):f({color:`get`}),children:e.direction===`sent`?(0,J.jsx)(_,{size:14}):(0,J.jsx)(F,{size:14})}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`})),children:D(e.ts-r)}),(0,J.jsx)(`span`,{className:i(m,v,f({color:`muted`})),children:e.name}),(0,J.jsx)(`span`,{className:i(m,v),children:e.text??(e.code==null?`—`:`close ${e.code}`)}),(0,J.jsx)(`span`,{className:i(m,f({color:`faint`,textAlign:`right`})),children:M(e.bytes)})]},e.id)),p.length===0?(0,J.jsx)(`div`,{className:f({p:`4`,color:`faint`,textAlign:`center`}),children:`No messages match.`}):null]})]});return(0,J.jsx)(H,{direction:`stacked`,storageKey:`messages`,initial:.55,first:b,second:g?(0,J.jsx)(ie,{message:g,openedAt:r}):(0,J.jsx)(h,{title:`Select a message`})})}function ie({message:e,openedAt:t}){let n=q.useMemo(()=>ae(e.text),[e.text]);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(d,{tone:e.direction===`sent`?`warn`:`ok`,children:e.direction}),(0,J.jsxs)(`span`,{className:m,children:[`#`,e.seq]}),(0,J.jsx)(`span`,{className:i(m,f({color:`muted`})),children:e.name}),e.event_id?(0,J.jsxs)(`span`,{title:e.event_id,className:i(m,v,f({maxW:`240px`,color:`faint`,fontSize:`11px`})),children:[`id `,e.event_id]}):null,e.code==null?null:(0,J.jsxs)(d,{children:[`code `,e.code]}),e.truncated?(0,J.jsx)(d,{tone:`warn`,children:`truncated`}):null,(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`})),children:[D(e.ts-t),` · `,M(e.bytes)]}),(0,J.jsx)(`div`,{className:f({ml:`auto`}),children:(0,J.jsx)(C,{text:e.text})})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,overflow:`auto`,bg:`well`}),children:e.text==null?(0,J.jsx)(h,{title:e.body_id==null?`No payload`:`Binary payload`}):n===void 0?(0,J.jsx)(G,{text:e.text,wrap:!0}):(0,J.jsx)(U,{value:n})})]})}function ae(e){if(!e)return;let t=e.trimStart()[0];if(t===`{`||t===`[`)try{return JSON.parse(e)}catch{return}}var oe={dns:f({bg:`sse`}),connect:f({bg:`info`}),tls:f({bg:`patch`}),wait:f({bg:`post`}),download:f({bg:`get`}),other:f({bg:`faint`})};function se({request:e}){let t=P(e),n=Math.max(e.duration_ms,.001),r=0;return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{right:(0,J.jsx)(`span`,{className:i(m,f({fontWeight:`600`})),children:j(e.duration_ms)}),children:e.kind===`http`?`Timing`:`Connection`}),t.length===0?(0,J.jsx)(`p`,{className:c,children:`Only the total duration was measured for this exchange.`}):(0,J.jsx)(`div`,{className:f({display:`flex`,flexDir:`column`,gap:`1`}),children:t.map(e=>{let t=r/n*100,a=Math.max(e.ms/n*100,.4);return r+=e.ms,(0,J.jsxs)(`div`,{title:e.hint,className:f({display:`grid`,gridTemplateColumns:`150px 1fr 80px`,alignItems:`center`,gap:`3`,py:`1`}),children:[(0,J.jsx)(`span`,{className:f({color:`muted`,fontSize:`12px`}),children:e.label}),(0,J.jsx)(`div`,{className:f({position:`relative`,h:`10px`,bg:`hover`,rounded:`full`}),children:(0,J.jsx)(`div`,{className:i(f({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`}),oe[e.key]),style:{left:`${t}%`,width:`${Math.min(a,100-t)}%`}})}),(0,J.jsx)(`span`,{className:i(m,f({textAlign:`right`})),children:j(e.ms)})]},e.key)})}),e.kind===`http`&&e.dns_ms==null&&e.connect_ms==null?(0,J.jsx)(`p`,{className:i(c,f({mt:`2`,fontSize:`12px`})),children:`No DNS, connect or TLS phase: the request reused an open connection.`}):null]})}function ce({request:e,requestHeaders:t,responseHeaders:n}){let r=le(e,t,n);return(0,J.jsxs)(`div`,{children:[(0,J.jsx)(T,{children:`Transcript`}),(0,J.jsx)(`div`,{className:i(m,f({bg:`well`,border:`1px solid`,borderColor:`line`,rounded:`md`,p:`3`,lineHeight:`1.6`,overflowX:`auto`})),children:r.map((e,t)=>(0,J.jsxs)(`div`,{className:i(f({whiteSpace:`pre-wrap`,wordBreak:`break-all`}),e.tone===`sent`&&f({color:`post`}),e.tone===`received`&&f({color:`get`}),e.tone===`info`&&f({color:`faint`})),children:[e.prefix,` `,e.text]},t))})]})}function le(e,t,n){let r=[],i=e=>r.push({prefix:`*`,text:e,tone:`info`}),a=e=>r.push({prefix:`>`,text:e,tone:`sent`}),o=e=>r.push({prefix:`<`,text:e,tone:`received`});i(`${new Date(e.ts).toISOString()} ${e.kind.toUpperCase()} ${e.url}`);for(let t of X(e))i(t);let s=e.query?`${e.path}?${e.query}`:e.path;a(`${e.method} ${s}`),t.some(([e])=>e.toLowerCase()===`host`)||a(`host: ${e.host}`);for(let[e,n]of t)a(`${e}: ${n}`);if(e.request_bytes>0&&i(`${e.request_bytes} bytes sent`),e.status!=null){o(`${e.status} ${b[e.status]??``}`.trim());for(let[e,t]of n)o(`${e}: ${t}`);e.ttfb_ms!=null&&i(`First byte after ${j(e.ttfb_ms)}`),i(`${e.response_bytes} bytes received`)}return e.error_name&&i(`${e.error_name}: ${e.error_message??``}`),i(`Completed in ${j(e.duration_ms)}`),r}function X(e){if(e.dns_ms==null&&e.connect_ms==null&&e.tls_ms==null)return[`Re-using existing connection`];let t=[];return e.dns_ms!=null&&t.push(`Resolved ${e.host} in ${j(e.dns_ms)}`),e.connect_ms!=null&&t.push(`Connected in ${j(e.connect_ms)}`),e.tls_ms!=null&&t.push(`TLS handshake in ${j(e.tls_ms)}`),t}function ue(){let{detail:e,run:t,neighbours:n,runRequestCount:r}=B.useLoaderData(),a=B.useSearch(),o=u({from:B.fullPath}),{prefs:s}=V(),c=z(),p=e.request,h=p.error_name!=null||p.status==null||p.status>=400;ne({key:O.request(p.id),title:p.path,icon:`request`,method:p.method,kind:p.kind,failed:h});let g=q.useCallback(e=>{e!=null&&o({to:`/requests/$requestId`,params:{requestId:String(e)},search:e=>e})},[o]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&g(n.prev),e.key===`]`&&g(n.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[g,n.prev,n.next]),c)return c;let _=p.kind!==`http`,v=a.req??(p.query?`params`:e.requestBody.present?`body`:`headers`),y=_?`messages`:`body`,b=a.res&&(_?a.res!==`body`:a.res!==`messages`)?a.res:y;return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(`div`,{className:f({px:`4`,pt:`3`,pb:`2.5`,display:`flex`,flexDir:`column`,gap:`2`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2`,fontSize:`12px`,color:`muted`,minW:`0`}),children:[(0,J.jsxs)(l,{to:`/sessions`,search:{entry:t.entry},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),title:t.rel,children:[(0,J.jsx)(R,{size:12}),t.file]}),(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(l,{to:`/runs/$runId`,params:{runId:String(t.id)},className:f({display:`inline-flex`,alignItems:`center`,gap:`1`,color:`muted`,_hover:{color:`accent`}}),children:[(0,J.jsx)(te,{size:10}),`Run #`,t.id]}),t.env?(0,J.jsx)(d,{children:t.env}):null,(0,J.jsx)(`span`,{className:f({color:`faint`}),children:`›`}),(0,J.jsxs)(`span`,{className:f({whiteSpace:`nowrap`}),children:[p.seq+1,` of `,r]}),(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,whiteSpace:`nowrap`})),children:[w(Date.now(),p.ts),` `,E(p.ts),` ·`,` `,D(p.ts-t.started_at)]}),(0,J.jsxs)(`div`,{className:f({ml:`auto`,display:`flex`,alignItems:`center`,gap:`1`}),children:[(0,J.jsx)(L,{label:`Previous request in run ([)`,disabled:n.prev==null,onClick:()=>g(n.prev),children:(0,J.jsx)(A,{})}),(0,J.jsx)(L,{label:`Next request in run (])`,disabled:n.next==null,onClick:()=>g(n.next),children:(0,J.jsx)(N,{})})]})]}),(0,J.jsx)(de,{detail:e})]}),(0,J.jsx)(`div`,{className:f({flex:`1`,minH:`0`,display:`flex`,borderTop:`1px solid`,borderColor:`line`}),children:(0,J.jsx)(H,{direction:s.layout,storageKey:`request-${s.layout}`,initial:s.layout===`side`?.42:.4,first:(0,J.jsx)(fe,{detail:e,tab:v,onTab:e=>void o({search:t=>({...t,req:e}),replace:!0})}),second:(0,J.jsx)(pe,{detail:e,tab:b,onTab:e=>void o({search:t=>({...t,res:e}),replace:!0})})})})]})}function de({detail:e}){let t=e.request,n=t.kind===`http`?k(t,e.requestHeaders,e.requestBody):null,r=t.url.slice(0,t.url.indexOf(t.host)),o=t.url.slice(r.length+t.host.length);return(0,J.jsxs)(`div`,{className:f({display:`flex`,gap:`2`,alignItems:`stretch`}),children:[(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,flex:`1`,minW:`0`,h:`36px`,rounded:`md`,border:`1px solid`,borderColor:`lineStrong`,bg:`well`,overflow:`hidden`}),children:[(0,J.jsx)(`span`,{className:f({display:`flex`,alignItems:`center`,px:`3`,h:`full`,borderRight:`1px solid`,borderColor:`line`,flexShrink:0,"& > span":{fontSize:`12px`}}),children:(0,J.jsx)(a,{method:t.method,kind:t.kind})}),(0,J.jsxs)(`span`,{className:i(m,v,f({px:`3`,fontSize:`13px`,userSelect:`all`,flex:`1`})),title:t.url,children:[(0,J.jsx)(`span`,{className:f({color:`faint`}),children:r}),(0,J.jsx)(`span`,{children:t.host}),(0,J.jsx)(`span`,{className:f({color:`muted`}),children:o})]})]}),n?(0,J.jsx)(C,{text:n,label:`cURL`}):null,(0,J.jsx)(C,{text:t.url,label:`URL`})]})}function Z({title:e,children:t}){return(0,J.jsxs)(`div`,{className:f({display:`flex`,alignItems:`center`,gap:`2.5`,px:`3`,h:`36px`,flexShrink:0,bg:`chrome`,borderBottom:`1px solid`,borderColor:`line`}),children:[(0,J.jsx)(`span`,{className:f({fontWeight:`600`,fontSize:`12px`}),children:e}),t]})}var Q=f({flex:`1`,minH:`0`,overflow:`auto`});function fe({detail:e,tab:t,onTab:n}){let r=e.request,a=s(r.query),c=ee(e.requestHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsx)(Z,{title:r.kind===`http`?`Request`:`Handshake`,children:(0,J.jsxs)(`span`,{className:i(m,f({color:`faint`,fontSize:`11px`})),children:[M(r.request_bytes),` sent`]})}),(0,J.jsx)(o,{dense:!0,items:[{id:`params`,label:`Params`,count:a.length},{id:`headers`,label:`Headers`,count:e.requestHeaders.length},{id:`body`,label:`Body`,hidden:r.kind!==`http`,count:e.requestBody.present?`●`:void 0},{id:`cookies`,label:`Cookies`,count:c.length,hidden:c.length===0},{id:`tags`,label:`Tags`,count:e.tags.length,hidden:e.tags.length===0}],value:t,onSelect:n}),(0,J.jsxs)(`div`,{className:Q,children:[t===`params`?(0,J.jsx)(K,{rows:a.map(([e,t])=>({name:e,value:t})),empty:`No query parameters`}):null,t===`headers`?(0,J.jsx)(K,{rows:e.requestHeaders.map(([e,t])=>({name:e,value:t})),empty:`No request headers`,nameLabel:`Header`}):null,t===`body`?(0,J.jsx)(W,{body:e.requestBody,emptyTitle:`No request body`}):null,t===`cookies`?(0,J.jsx)($,{cookies:c}):null,t===`tags`?(0,J.jsx)(K,{rows:e.tags.map(e=>({name:e.key,value:e.value})),empty:`No tags`}):null]})]})}function pe({detail:e,tab:t,onTab:n}){let i=e.request,a=i.kind!==`http`,s=x(e.responseHeaders);return(0,J.jsxs)(`div`,{className:f({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(Z,{title:a?`Connection`:`Response`,children:[(0,J.jsx)(p,{status:i.status,error:i.error_name,pill:!0}),(0,J.jsx)(r,{label:a?`Open`:`Time`,value:j(i.duration_ms)}),(0,J.jsx)(r,{label:a?`Received`:`Size`,value:M(i.response_bytes)})]}),(0,J.jsx)(o,{dense:!0,items:[{id:`body`,label:`Body`,hidden:a},{id:`messages`,label:`Messages`,count:e.messages.length,hidden:!a},{id:`headers`,label:`Headers`,count:e.responseHeaders.length},{id:`cookies`,label:`Cookies`,count:s.length,hidden:s.length===0},{id:`timeline`,label:`Timeline`}],value:t,onSelect:n}),i.error_name?(0,J.jsx)(`div`,{className:f({px:`3`,pt:`2.5`,flexShrink:0}),children:(0,J.jsx)(I,{tone:`bad`,icon:(0,J.jsx)(re,{size:15}),title:i.status==null?`Could not get a response`:i.error_name,children:(0,J.jsxs)(`span`,{className:m,children:[i.error_name,`: `,i.error_message]})})}):null,(0,J.jsxs)(`div`,{className:Q,children:[t===`body`?(0,J.jsx)(W,{body:e.responseBody,emptyTitle:`No response body`}):null,t===`messages`?(0,J.jsx)(Y,{messages:e.messages,openedAt:i.ts}):null,t===`headers`?(0,J.jsx)(K,{rows:e.responseHeaders.map(([e,t])=>({name:e,value:t})),empty:`No response headers`,nameLabel:`Header`}):null,t===`cookies`?(0,J.jsx)($,{cookies:s}):null,t===`timeline`?(0,J.jsxs)(`div`,{className:f({p:`4`,display:`flex`,flexDir:`column`,gap:`5`}),children:[(0,J.jsx)(se,{request:i}),(0,J.jsx)(ce,{request:i,requestHeaders:e.requestHeaders,responseHeaders:e.responseHeaders})]}):null]}),(0,J.jsxs)(`div`,{className:f({px:`3`,py:`1`,borderTop:`1px solid`,borderColor:`line`,color:`faint`,fontSize:`11px`,flexShrink:0,display:`flex`,gap:`3`}),children:[(0,J.jsxs)(`span`,{children:[(0,J.jsx)(g,{children:`[`}),` `,(0,J.jsx)(g,{children:`]`}),` previous / next request`]}),i.ttfb_ms!=null&&!a?(0,J.jsxs)(`span`,{children:[`TTFB `,j(i.ttfb_ms)]}):null]})]})}function $({cookies:e}){let t=e.map(e=>({name:e.name,value:e.value,extra:Object.keys(e.attributes).length?(0,J.jsx)(`span`,{className:f({display:`flex`,gap:`1`,flexWrap:`wrap`}),children:Object.entries(e.attributes).map(([e,t])=>(0,J.jsx)(d,{children:t===`true`?e:`${e}=${t}`},e))}):null})),n=e.some(e=>Object.keys(e.attributes).length>0);return(0,J.jsx)(K,{rows:t,empty:`No cookies`,nameLabel:`Name`,extraLabel:n?`Attributes`:void 0})}export{ue as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{c as n,o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,B as t,Dt as n,E as r,Et as i,M as a,Mt as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,g as v,it as y,j as b,jt as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{r as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,o as F,u as I}from"./index-3VfD7Ktf.js";import{t as L}from"./scoped-CiNsRvyC.js";var R=g(),z=x(`__root__`);function B(){E({key:C.overview(),title:`Overview`,icon:`overview`});let a=N(),g=z.useLoaderData(),v=P(g.now),{prefs:b}=I(),x=s(),{data:D}=L(F.useLoaderData(),e=>M({data:{env:e}}));if(a)return a;let B=g.counts;if(!B)return null;let H=b.env===`*`?null:b.env===``?`No environment`:b.env;return(0,R.jsx)(`div`,{className:t,children:(0,R.jsxs)(`div`,{className:j,children:[(0,R.jsxs)(`header`,{children:[(0,R.jsx)(`h1`,{className:l({fontSize:`18px`,fontWeight:`600`,m:`0`}),children:`Overview`}),(0,R.jsx)(`p`,{className:n(f,l({color:`muted`,m:`0`,mt:`0.5`})),children:g.path})]}),(0,R.jsx)(V,{counts:B,envCount:g.envs.length,fileBytes:g.bytes}),H?(0,R.jsxs)(`p`,{className:l({color:`muted`,m:`0`,mt:`-2`}),children:[`Totals cover the whole file; the lists below are scoped to `,(0,R.jsx)(`b`,{children:H}),`.`]}):null,(0,R.jsxs)(`div`,{className:l({display:`grid`,gridTemplateColumns:{base:`1fr`,xl:`3fr 2fr`},gap:`5`}),children:[(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Recent runs`}),(0,R.jsx)(A,{children:D.runs.length===0?(0,R.jsx)(p,{title:`No runs in this environment`}):(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Session`}),(0,R.jsx)(`th`,{children:`Result`}),(0,R.jsx)(`th`,{children:`Env`}),(0,R.jsx)(`th`,{className:`num`,children:`Requests`}),(0,R.jsx)(`th`,{className:`num`,children:`Wall`}),(0,R.jsx)(`th`,{className:`num`,children:`When`})]})}),(0,R.jsx)(`tbody`,{children:D.runs.map(t=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void x({to:`/runs/$runId`,params:{runId:String(t.id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`260px`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`}),children:[(0,R.jsx)(k,{tone:d(t)}),(0,R.jsx)(`span`,{className:n(m,l({fontWeight:`500`})),title:t.rel,children:t.file}),(0,R.jsxs)(`span`,{className:n(f,l({color:`faint`})),children:[`#`,t.id]})]})}),(0,R.jsx)(`td`,{className:l({color:`muted`,whiteSpace:`nowrap`}),children:e(t)}),(0,R.jsx)(`td`,{children:t.env?(0,R.jsx)(c,{children:t.env}):null}),(0,R.jsxs)(`td`,{className:`num`,children:[O(t.request_count),t.error_count?(0,R.jsxs)(`span`,{className:l({color:`muted`}),title:_(t.error_count),children:[` `,`· `,t.error_count,`✕`]}):null]}),(0,R.jsx)(`td`,{className:n(`num`,f),children:t.finished_at?T(t.finished_at-t.started_at):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:w(v,t.started_at)})]},t.id))})]})})]}),(0,R.jsxs)(`section`,{className:l({display:`flex`,flexDir:`column`,gap:`5`}),children:[(0,R.jsxs)(`div`,{children:[(0,R.jsx)(S,{children:`Failing checks`}),(0,R.jsx)(A,{children:D.failedChecks.length===0?(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`center`,p:`3`,color:`ok`}),children:[(0,R.jsx)(y,{size:16}),` No failed checks.`]}):D.failedChecks.map(e=>(0,R.jsxs)(o,{to:`/runs/$runId`,params:{runId:String(e.run_id)},search:{tab:`checks`},className:l({display:`flex`,gap:`2`,px:`3`,py:`2`,borderBottom:`1px solid`,borderColor:`line`,color:`fg`,textDecoration:`none`,_hover:{bg:`hover`},_last:{borderBottom:`none`}}),children:[(0,R.jsx)(`span`,{className:l({color:`bad`,pt:`1px`}),children:(0,R.jsx)(i,{size:15})}),(0,R.jsxs)(`span`,{className:l({minW:`0`,flex:`1`}),children:[(0,R.jsx)(`span`,{className:n(m,l({display:`block`,fontWeight:`500`})),children:e.name}),e.message?(0,R.jsx)(`span`,{className:n(m,l({display:`block`,color:`bad`,fontSize:`12px`})),children:e.message}):null,(0,R.jsxs)(`span`,{className:l({display:`block`,color:`faint`,fontSize:`11px`}),children:[e.file,` · run #`,e.run_id,` · `,w(v,e.ts)]})]})]},e.id))})]}),(0,R.jsxs)(`div`,{children:[(0,R.jsx)(S,{children:`Failed requests`}),(0,R.jsx)(A,{children:D.failedRequests.length===0?(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`center`,p:`3`,color:`ok`}),children:[(0,R.jsx)(y,{size:16}),` Every request succeeded.`]}):D.failedRequests.map(e=>(0,R.jsxs)(o,{to:`/requests/$requestId`,params:{requestId:String(e.id)},className:l({display:`flex`,alignItems:`center`,gap:`2`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,color:`fg`,textDecoration:`none`,_hover:{bg:`hover`},_last:{borderBottom:`none`}}),children:[(0,R.jsx)(r,{method:e.method,kind:e.kind,width:`list`}),(0,R.jsx)(`span`,{className:n(m,f,l({flex:`1`})),title:`${e.host}${e.path}`,children:e.path}),(0,R.jsx)(`span`,{className:l({color:`faint`,fontSize:`11px`,whiteSpace:`nowrap`}),children:w(v,e.ts)}),(0,R.jsx)(u,{status:e.status,error:e.error_name})]},e.id))})]})]})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Slowest endpoints`}),(0,R.jsx)(A,{children:D.slowest.length===0?(0,R.jsx)(p,{title:`No HTTP requests yet`}):(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Endpoint`}),(0,R.jsx)(`th`,{className:`num`,children:`Calls`}),(0,R.jsx)(`th`,{className:`num`,children:`Errors`}),(0,R.jsx)(`th`,{className:`num`,children:`Avg`}),(0,R.jsx)(`th`,{className:`num`,children:`Max`})]})}),(0,R.jsx)(`tbody`,{children:D.slowest.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void x({to:`/requests/$requestId`,params:{requestId:String(e.slowest_request_id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,R.jsx)(r,{method:e.method,width:`list`}),(0,R.jsxs)(`span`,{className:n(m,f),children:[(0,R.jsx)(`span`,{className:l({color:`faint`}),children:e.host}),e.path]})]})}),(0,R.jsx)(`td`,{className:`num`,children:O(e.count)}),(0,R.jsx)(`td`,{className:n(`num`,e.errors?l({color:`warn`}):void 0),children:O(e.errors)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:T(e.avg_ms)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:T(e.max_ms)})]},`${e.method} ${e.host}${e.path}`))})]})})]})]})})}function V({counts:e,envCount:t,fileBytes:n}){return(0,R.jsxs)(a,{children:[(0,R.jsx)(b,{label:`Sessions`,value:O(e.scripts),sub:`scripts recorded`}),(0,R.jsx)(b,{label:`Runs`,value:O(e.runs),sub:`${v(t,`environment`)}`}),(0,R.jsx)(b,{label:`Requests`,value:O(e.requests),sub:e.connections?`+ ${v(e.connections,`connection`)} · ${v(e.messages,`message`)}`:`HTTP`}),(0,R.jsx)(b,{label:`Failed requests`,value:O(e.failedRequests),tone:e.failedRequests?`warn`:void 0,sub:`errors and ≥ 400`}),(0,R.jsx)(b,{label:`Checks`,value:e.checks?`${O(e.checks-e.failedChecks)}/${O(e.checks)}`:`—`,tone:e.failedChecks?`bad`:e.checks?`ok`:void 0,sub:e.failedChecks?`${O(e.failedChecks)} failed`:`passing`}),(0,R.jsx)(b,{label:`Stored payloads`,value:D(e.storedBodyBytes),sub:`${O(e.bodies)} unique · ${D(n)} on disk`})]})}export{B as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{$ as t,A as n,B as r,C as i,D as a,Dt as o,E as s,Et as c,F as l,H as u,N as d,Nt as f,O as p,Ot as m,P as ee,Q as h,R as g,S as _,U as v,V as y,Vt as b,X as x,_n as S,d as C,et as te,g as w,it as T,k as E,m as D,n as O,ot as k,p as A,q as j,r as M,rt as N,s as P,st as F,u as I,v as L,w as R,x as z,y as B,z as V}from"./tabs-C1EijW_Z.js";import{d as ne,l as H,t as U}from"./index-3VfD7Ktf.js";import{r as W,t as G}from"./kv-table-Dv6o68aD.js";import{t as K}from"./session-header-DMR_hFkk.js";var q=e(S()),J=b();function Y(){let{run:e,tags:t,requests:n,checks:r,analytics:i,neighbours:a}=U.useLoaderData(),{tab:o=`timeline`}=U.useSearch(),s=f({from:U.fullPath}),c=ne(),u=h(e);M({key:O.run(e.id),title:`${e.file} #${e.id}`,icon:`run`,failed:u===`bad`});let d=q.useCallback(e=>{e!=null&&s({to:`/runs/$runId`,params:{runId:String(e)},search:e=>({tab:e.tab})})},[s]);if(q.useEffect(()=>{let e=e=>{let t=e.target;t&&/^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)||(e.key===`[`&&d(a.prev),e.key===`]`&&d(a.next))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[d,a.prev,a.next]),c)return c;let p=r.filter(e=>e.status===`fail`).length;return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,J.jsxs)(K,{script:e,linked:!0,tone:u,children:[(0,J.jsx)(X,{run:e,neighbours:a,go:d}),(0,J.jsx)(l,{items:[{id:`timeline`,label:`Timeline`},{id:`requests`,label:`Requests`,count:n.length},{id:`checks`,label:`Checks`,count:r.length?`${r.length-p}/${r.length}`:0,tone:p?`bad`:r.length?`ok`:void 0},{id:`details`,label:`Details`,count:t.length||void 0}],value:o,onSelect:e=>void s({search:{tab:e===`timeline`?void 0:e}})})]}),o===`timeline`?(0,J.jsx)(Q,{run:e,requests:n,checks:r}):null,o===`requests`?(0,J.jsx)(Q,{run:e,requests:n,checks:[],analytics:i}):null,o===`checks`?(0,J.jsx)(ae,{run:e,checks:r}):null,o===`details`?(0,J.jsx)(le,{run:e,tags:t}):null]})}function X({run:e,neighbours:n,go:r}){let i=H(Date.now(),6e4),a=h(e),o=(0,J.jsx)(`span`,{className:m({color:`faint`}),children:`·`});return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2.5`,px:`5`,pt:`1.5`,pb:`2`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`}),children:[(0,J.jsxs)(`div`,{className:m({minW:`0`,flex:`1`,display:`flex`,alignItems:`center`,gap:`2`,flexWrap:`wrap`,fontSize:`12px`,color:`muted`}),children:[(0,J.jsx)(z,{tone:a}),(0,J.jsxs)(`h2`,{className:m({fontSize:`18px`,fontWeight:`600`,m:`0`,color:`fg`}),children:[`Run `,(0,J.jsxs)(`span`,{className:m({fontFamily:`mono`}),children:[`#`,e.id]})]}),(0,J.jsx)(p,{tone:a,title:e.error_count?x(e.error_count):void 0,children:t(e)}),e.env?(0,J.jsx)(p,{children:e.env}):null,(0,J.jsx)(`span`,{children:C(i,e.started_at)}),o,(0,J.jsxs)(`span`,{children:[`node `,e.node_version]}),e.label&&e.label!==e.file?(0,J.jsxs)(J.Fragment,{children:[o,(0,J.jsx)(`span`,{children:e.label})]}):null]}),(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`1`,flexShrink:0}),children:[(0,J.jsx)(R,{label:`Older run of this script ([)`,disabled:n.prev==null,onClick:()=>r(n.prev),children:(0,J.jsx)(k,{})}),(0,J.jsx)(R,{label:`Newer run of this script (])`,disabled:n.next==null,onClick:()=>r(n.next),children:(0,J.jsx)(F,{})})]})]}),e.exit_status===`error`?(0,J.jsx)(L,{tone:`bad`,icon:(0,J.jsx)(N,{size:15}),title:e.error_name??`The script threw`,children:(0,J.jsx)(`span`,{className:g,children:e.error_message})}):null,(0,J.jsx)(re,{run:e})]})}function re({run:e}){let t=e.finished_at?e.finished_at-e.started_at:null,n=e.request_count-e.connection_count,r=e.check_count,i=e.failed_check_count;return(0,J.jsx)(d,{items:[{label:`Wall time`,value:A(t),title:e.finished_at?`Start to finish`:`Never finished`},{label:`Requests`,value:e.connection_count?`${I(n)} + ${w(e.connection_count,`connection`)}`:I(n),title:`${A(e.total_duration_ms)} in flight`},{label:`Failed requests`,value:I(e.error_count),tone:e.error_count?`warn`:void 0,title:`Errors and ≥ 400 responses — they don't fail the run`},{label:`Checks`,value:r?`${r-i}/${r}`:`—`,tone:i?`bad`:r?`ok`:void 0,title:r?i?`${i} failed`:`All passed`:`None recorded`},{label:`Data`,value:P(e.total_bytes),title:`Sent + received`}]})}var Z={ok:m({bg:`ok`}),info:m({bg:`info`}),warn:m({bg:`warn`}),bad:m({bg:`bad`}),neutral:m({bg:`faint`})};function Q({run:e,requests:t,checks:a,analytics:c}){let l=f(),[u,d]=q.useState(``),[p,h]=q.useState(`all`),[b,x]=q.useState(null),[S,C]=q.useState(`time`),T=u.trim().toLowerCase(),E=q.useMemo(()=>{let e=e=>!T||e.toLowerCase().includes(T),n=t.filter(t=>(p===`all`||j(t))&&(b==null||t.host===b)&&e(`${t.method} ${t.host}${t.path} ${t.status??``}`)),r=(S===`slowest`?n.toSorted((e,t)=>t.duration_ms-e.duration_ms):n).map(e=>({type:`request`,row:e}));if(a.length===0)return r;for(let t of a)(p!==`failed`||t.status===`fail`)&&e(`${t.name} ${t.message??``}`)&&r.push({type:`check`,row:t});return r.toSorted((e,t)=>e.row.ts-t.row.ts)},[t,a,T,p,b,S]),O=e.started_at,k=Math.max(e.finished_at??0,...t.map(e=>e.ts+e.duration_ms),...a.map(e=>e.ts),O+1)-O,M=t.filter(j).length+a.filter(e=>e.status===`fail`).length;return t.length===0&&a.length===0?(0,J.jsx)(_,{title:`This run made no requests`}):(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,flex:`1`,minH:`0`}),children:[c&&c.total>0?(0,J.jsx)(oe,{run:e,analytics:c,host:b,onHost:x}):null,(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,px:`5`,py:`2`,alignItems:`center`,flexShrink:0,flexWrap:`wrap`}),children:[(0,J.jsx)(i,{className:m({w:`280px`}),placeholder:a.length?`Filter by method, path, status or check`:`Filter by method, path or status`,value:u,onChange:e=>d(e.target.value)}),(0,J.jsx)(n,{items:[{id:`all`,label:`All ${t.length+a.length}`},{id:`failed`,label:`Failed ${M}`}],value:p,onSelect:h}),c?(0,J.jsx)(n,{items:[{id:`time`,label:`In order`},{id:`slowest`,label:`Slowest first`}],value:S,onSelect:C}):null,(0,J.jsxs)(`span`,{className:m({ml:`auto`,color:`faint`,fontSize:`12px`}),children:[`Timeline spans `,A(k)]})]}),(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`table`,{className:y,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`th`,{className:`num`,style:{width:40},children:`#`}),(0,J.jsx)(`th`,{children:`Request`}),(0,J.jsx)(`th`,{children:`Status`}),(0,J.jsx)(`th`,{className:`num`,children:`Time`}),(0,J.jsx)(`th`,{className:`num`,children:`Size`}),(0,J.jsx)(`th`,{style:{width:`32%`},children:`Timeline`})]})}),(0,J.jsxs)(`tbody`,{children:[E.map(e=>e.type===`check`?(0,J.jsx)(ie,{check:e.row,start:O,span:k},`c${e.row.id}`):(0,J.jsxs)(`tr`,{"data-link":!0,onClick:()=>void l({to:`/requests/$requestId`,params:{requestId:String(e.row.id)}}),children:[(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`faint`})),children:e.row.seq+1}),(0,J.jsx)(`td`,{className:m({maxW:`0`,w:`full`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,J.jsx)(s,{method:e.row.method,kind:e.row.kind,width:`list`}),(0,J.jsxs)(`span`,{className:o(v,g),title:`${e.row.host}${e.row.path}`,children:[(0,J.jsx)(`span`,{className:m({color:`faint`}),children:e.row.host}),e.row.path]}),e.row.kind===`http`?null:(0,J.jsx)(`span`,{className:m({color:`faint`,fontSize:`11px`,whiteSpace:`nowrap`}),children:w(e.row.message_count,`message`)})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(ee,{status:e.row.status,error:e.row.error_name})}),(0,J.jsx)(`td`,{className:o(`num`,g),children:A(e.row.duration_ms)}),(0,J.jsx)(`td`,{className:o(`num`,g,m({color:`muted`})),children:P(e.row.response_bytes)}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),title:`${D(e.row.ts-O)} · ${A(e.row.duration_ms)}`,children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`0`,bottom:`0`,rounded:`full`,minW:`2px`}),Z[te(e.row.status,e.row.error_name)]),style:{left:`${(e.row.ts-O)/k*100}%`,width:`${e.row.duration_ms/k*100}%`,opacity:e.row.kind===`http`?1:.5}})})})]},e.row.id)),E.length===0?(0,J.jsx)(`tr`,{children:(0,J.jsx)(`td`,{colSpan:6,className:m({textAlign:`center`,color:`faint`,py:`6`}),children:a.length?`Nothing matches.`:`No requests match.`})}):null]})]})})]})}function ie({check:e,start:t,span:n}){let r=e.status===`pass`;return(0,J.jsxs)(`tr`,{children:[(0,J.jsx)(`td`,{className:`num`,children:(0,J.jsx)(`span`,{className:o(m({display:`inline-flex`,verticalAlign:`middle`}),u(r?`ok`:`bad`)),title:r?`Passed`:`Failed`,children:r?(0,J.jsx)(T,{size:13}):(0,J.jsx)(c,{size:13})})}),(0,J.jsx)(`td`,{colSpan:4,className:m({maxW:`0`}),children:(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`,fontSize:`12px`}),children:[(0,J.jsx)(`span`,{className:m({display:`inline-block`,w:`46px`,flexShrink:0,fontFamily:`mono`,fontSize:`10.5px`,fontWeight:`700`,letterSpacing:`0.02em`,color:`faint`}),children:e.mode===`assert`?`ASSERT`:`CHECK`}),(0,J.jsxs)(`span`,{className:o(v,m(r?{color:`muted`}:{color:`bad`,fontWeight:`500`})),children:[e.name,!r&&e.message?` — ${e.message}`:``]})]})}),(0,J.jsx)(`td`,{children:(0,J.jsx)(`div`,{className:m({position:`relative`,h:`8px`}),children:(0,J.jsx)(`div`,{className:o(m({position:`absolute`,top:`-1px`,w:`2px`,h:`10px`,rounded:`full`}),r?Z.ok:Z.bad),style:{left:`${(e.ts-t)/n*100}%`}})})})]})}function ae({run:e,checks:t}){return t.length===0?(0,J.jsxs)(_,{title:`No checks in this run`,icon:(0,J.jsx)(T,{size:22}),children:[`A script records expectations with `,(0,J.jsx)(`code`,{children:`check()`}),` and `,(0,J.jsx)(`code`,{children:`assert()`}),` from`,` `,(0,J.jsx)(`code`,{children:`@apisurf/wire/kit`}),`.`]}):(0,J.jsx)(`div`,{className:r,children:(0,J.jsx)(`div`,{className:V,children:(0,J.jsx)(B,{children:t.map(t=>{let n=t.status===`pass`;return(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2.5`,px:`3`,py:`2`,borderBottom:`1px solid`,borderColor:`line`,_last:{borderBottom:`none`}}),children:[(0,J.jsx)(`span`,{className:o(m({pt:`1px`}),u(n?`ok`:`bad`)),children:n?(0,J.jsx)(T,{size:16}):(0,J.jsx)(c,{size:16})}),(0,J.jsxs)(`div`,{className:m({flex:`1`,minW:`0`}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,gap:`2`,alignItems:`center`}),children:[(0,J.jsx)(`span`,{className:m({fontWeight:`500`}),children:t.name}),t.mode===`assert`?(0,J.jsx)(p,{tone:n?`neutral`:`bad`,children:`assert`}):null]}),!n&&t.message?(0,J.jsx)(`div`,{className:o(g,m({color:`bad`,mt:`0.5`,wordBreak:`break-word`})),children:t.message}):null]}),(0,J.jsx)(`span`,{className:o(g,m({color:`faint`,whiteSpace:`nowrap`})),children:D(t.ts-e.started_at)})]},t.id)})})})})}var $={"1xx":`info`,"2xx":`ok`,"3xx":`info`,"4xx":`warn`,"5xx":`bad`,error:`bad`};function oe({run:e,analytics:t,host:n,onHost:r}){let i=`Over ${w(t.latencySamples,`HTTP request`)}. A WebSocket or SSE connection's duration is how long it stayed open, so it is left out.`+(e.connection_count?` This run opened ${w(e.connection_count,`connection`)}.`:``);return(0,J.jsxs)(`div`,{className:m({display:`flex`,flexDir:`column`,gap:`2`,px:`5`,pt:`3`,pb:`1`,flexShrink:0}),children:[(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,rowGap:`2`,columnGap:`5`}),children:[(0,J.jsx)(a,{label:`p50`,value:A(t.p50),title:i}),(0,J.jsx)(a,{label:`p95`,value:A(t.p95),title:i}),(0,J.jsx)(a,{label:`p99`,value:A(t.p99),title:i}),(0,J.jsx)(se,{analytics:t})]}),t.byHost.length>1||n!=null?(0,J.jsxs)(`div`,{className:m({display:`flex`,flexWrap:`wrap`,alignItems:`center`,gap:`1.5`}),children:[(0,J.jsx)(`span`,{className:m({color:`muted`,fontSize:`12px`,mr:`1`}),children:`Hosts`}),t.byHost.map(e=>(0,J.jsx)(ce,{row:e,pressed:n===e.host,onClick:()=>r(n===e.host?null:e.host)},e.host))]}):null]})}function se({analytics:e}){return(0,J.jsxs)(`div`,{className:m({display:`flex`,alignItems:`center`,gap:`3`,minW:`0`}),children:[(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`2px`,h:`8px`,w:`160px`,flexShrink:0}),role:`img`,"aria-label":`Status mix`,children:e.statusMix.map(e=>(0,J.jsx)(`div`,{title:`${e.status_class}: ${e.count}`,className:o(m({rounded:`full`,minW:`4px`}),Z[$[e.status_class]??`neutral`]),style:{flexGrow:e.count}},e.status_class))}),(0,J.jsx)(`div`,{className:m({display:`flex`,gap:`3`,flexWrap:`wrap`,fontSize:`12px`}),children:e.statusMix.map(t=>(0,J.jsxs)(`span`,{className:m({display:`inline-flex`,alignItems:`center`,gap:`1`}),title:`${Math.round(t.count/e.total*100)}% of requests`,children:[(0,J.jsx)(`span`,{className:o(g,u($[t.status_class]??`neutral`)),children:t.status_class}),(0,J.jsx)(`span`,{className:m({color:`muted`}),children:t.count})]},t.status_class))})]})}function ce({row:e,pressed:t,onClick:n}){return(0,J.jsxs)(`button`,{type:`button`,"aria-pressed":t,onClick:n,title:`${w(e.count,`call`)} · p95 ${A(e.p95)}${e.errors?` · ${w(e.errors,`error`)}`:``} — click to ${t?`show every host`:`show only this host`}`,className:m({display:`inline-flex`,alignItems:`center`,gap:`1.5`,h:`24px`,px:`2`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`raised`,color:`fg`,cursor:`pointer`,fontSize:`12px`,_hover:{borderColor:`lineStrong`,bg:`hover`},"&[aria-pressed=true]":{borderColor:`accent`,bg:`accentSoft`,color:`accent`}}),children:[(0,J.jsx)(`span`,{className:g,children:e.host}),(0,J.jsx)(`span`,{className:m({color:`muted`,fontVariantNumeric:`tabular-nums`}),children:e.count}),e.errors?(0,J.jsxs)(`span`,{className:m({color:`warn`,fontVariantNumeric:`tabular-nums`}),children:[e.errors,`✕`]}):null]})}function le({run:e,tags:t}){let n=H(Date.now(),6e4),i=[{name:`id`,value:String(e.id)},{name:`uid`,value:e.uid},{name:`label`,value:e.label??`—`},{name:`entry`,value:e.entry},{name:`cwd`,value:e.cwd},{name:`env`,value:e.env??`—`},{name:`node`,value:e.node_version},{name:`started`,value:C(n,e.started_at)},{name:`finished`,value:e.finished_at?C(n,e.finished_at):`—`},{name:`exit status`,value:e.exit_status??`—`}];return(0,J.jsx)(`div`,{className:r,children:(0,J.jsxs)(`div`,{className:V,children:[(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Run`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:i,empty:``,filterable:!1,nameLabel:`Field`})})]}),(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Tags`}),(0,J.jsx)(B,{children:(0,J.jsx)(G,{rows:t.map(e=>({name:e.key,value:e.value})),empty:`No tags — add them with wire execute --tag key=value`,filterable:!1})})]}),e.entry_source?(0,J.jsxs)(`section`,{children:[(0,J.jsx)(E,{children:`Inline source`}),(0,J.jsx)(B,{children:(0,J.jsx)(`div`,{className:m({bg:`well`}),children:(0,J.jsx)(W,{text:e.entry_source})})})]}):null]})})}export{Y as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{_n as t}from"./tabs-C1EijW_Z.js";import{c as n,u as r}from"./index-3VfD7Ktf.js";var i=e(t(),1);function a(e,t){let{prefs:a,refreshKey:o}=r(),[s,c]=i.useState(null),l=i.useRef(t);return l.current=t,i.useEffect(()=>{if(a.env===`*`)return;let e=!1;return l.current(n(a.env)).then(t=>{e||c({env:a.env,data:t})}),()=>{e=!0}},[a.env,o,e]),a.env===`*`?{data:e,pending:!1}:s&&s.env===a.env?{data:s.data,pending:!1}:{data:e,pending:!0}}export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,Dt as t,Mt as n,O as r,Ot as i,Q as a,R as o,U as s,Vt as c,g as l,jt as u,o as d,xt as f}from"./tabs-C1EijW_Z.js";import{l as p,s as m}from"./index-3VfD7Ktf.js";var h=c(),g=u(`__root__`),_={ok:`Passing`,warn:``,bad:`Failing`,info:`Unfinished`,neutral:``},v={ok:i({bg:`ok`}),info:i({bg:`info`}),warn:i({bg:`warn`}),bad:i({bg:`bad`}),neutral:i({bg:`lineStrong`})};function y({script:c,linked:u=!1,tone:y,children:b}){let x=g.useLoaderData(),S=p(x.now,6e4),C=m(c.entry),w=C?a(C.latest):null,T=y??w??`neutral`,E=u?(0,h.jsx)(n,{to:`/sessions`,search:{entry:c.entry},title:`Open the session`,className:t(s,i({fontSize:`13px`,fontWeight:`600`,color:`fg`,textDecoration:`none`,_hover:{color:`accent`,textDecoration:`underline`}})),children:c.file}):(0,h.jsx)(`h1`,{className:t(s,i({fontSize:`18px`,fontWeight:`600`,m:`0`,color:`fg`})),children:c.file}),D=C&&w&&_[w]?(0,h.jsx)(r,{tone:w,title:`Latest run: ${e(C.latest)}`,children:_[w]}):null,O=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{className:t(o,s,i({minW:`0`})),title:c.entry,children:c.rel}),C?(0,h.jsxs)(`span`,{className:i({whiteSpace:`nowrap`,flexShrink:0}),children:[`· `,l(C.runCount,`run`),` · last ran`,` `,d(S,C.latest.last_started_at)]}):null]}),k=i({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`});return(0,h.jsxs)(`header`,{className:i({position:`relative`,flexShrink:0,bg:`masthead`,borderBottom:`1px solid`,borderColor:`lineStrong`,"& > [role=tablist]":{borderBottom:`none`}}),children:[(0,h.jsx)(`span`,{"aria-hidden":!0,className:t(i({position:`absolute`,left:`0`,top:`0`,bottom:`0`,w:`3px`}),v[T])}),(0,h.jsx)(`div`,{className:i({display:`flex`,flexDir:`column`,gap:`0.5`,px:`5`,pt:u?`2.5`:`4`,pb:b?`1`:`3`,fontSize:`12px`,color:`muted`}),children:u?(0,h.jsxs)(`div`,{className:k,children:[(0,h.jsx)(`span`,{className:i({display:`inline-flex`}),children:(0,h.jsx)(f,{size:14})}),E,D,(0,h.jsx)(`span`,{className:i({ml:`1`,minW:`0`,display:`flex`,gap:`1`}),children:O})]}):(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(`div`,{className:k,children:[(0,h.jsx)(`span`,{className:i({display:`inline-flex`}),children:(0,h.jsx)(f,{size:18})}),E,D]}),(0,h.jsx)(`div`,{className:t(k,i({gap:`1`,pl:`26px`})),children:O})]})}),b]})}export{y as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,B as t,Dt as n,E as r,Et as i,F as a,M as o,Nt as s,O as c,Ot as l,P as u,Q as d,R as f,S as p,U as m,V as h,Vt as g,X as _,d as v,g as y,it as b,j as x,k as S,n as C,o as w,p as T,r as E,s as D,u as O,x as k,y as A,z as j}from"./tabs-C1EijW_Z.js";import{s as M}from"./preload-helper-CIs162tl.js";import{d as N,l as P,r as F}from"./index-3VfD7Ktf.js";import{t as I}from"./scoped-CiNsRvyC.js";import{t as L}from"./session-header-DMR_hFkk.js";var R=g();function z(){let e=F.useLoaderData(),{tab:n=`runs`,entry:r}=F.useSearch(),i=s({from:F.fullPath}),o=N(),c=P(Date.now()),{data:u}=I(e,async t=>await M({data:{entry:r,env:t}})??e),{script:d,runs:f,endpoints:p,checks:m}=u;if(E({key:C.script(d.entry),title:d.file,icon:`session`}),o)return o;let h=m.filter(e=>e.last_status===`fail`).length;return(0,R.jsxs)(`div`,{className:l({display:`flex`,flexDir:`column`,h:`full`,minH:`0`}),children:[(0,R.jsx)(L,{script:d,children:(0,R.jsx)(a,{items:[{id:`runs`,label:`Runs`,count:f.length},{id:`requests`,label:`Requests`,count:p.length},{id:`checks`,label:`Checks`,count:m.length,tone:h?`bad`:void 0,hidden:m.length===0}],value:n,onSelect:e=>void i({search:t=>({...t,tab:e===`runs`?void 0:e})})})}),(0,R.jsx)(`div`,{className:t,children:(0,R.jsxs)(`div`,{className:j,children:[n===`runs`?(0,R.jsx)(B,{runs:f,now:c}):null,n===`requests`?(0,R.jsx)(G,{endpoints:p,now:c}):null,n===`checks`?(0,R.jsx)(K,{checks:m}):null]})})]})}function B({runs:t,now:r}){let i=s();if(t.length===0)return(0,R.jsx)(p,{title:`No runs in this environment`});let a=t.filter(e=>e.finished_at!=null),u=a.map(e=>e.finished_at-e.started_at).toSorted((e,t)=>e-t),g=u.length?u[Math.floor((u.length-1)/2)]:null,b=t.filter(e=>d(e)===`bad`).length,C=t.reduce((e,t)=>e+t.request_count,0);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(o,{children:[(0,R.jsx)(x,{label:`Runs`,value:O(t.length),sub:`last ${w(r,t[0].started_at)}`}),(0,R.jsx)(x,{label:`Failed runs`,value:O(b),tone:b?`bad`:`ok`,sub:`threw, or a check failed`}),(0,R.jsx)(x,{label:`Median wall time`,value:T(g),sub:`${y(a.length,`finished run`)}`}),(0,R.jsx)(x,{label:`Requests`,value:O(C),sub:`${O(Math.round(C/t.length))} per run`})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`Wall time per run`}),(0,R.jsx)(U,{runs:t})]}),(0,R.jsxs)(`section`,{children:[(0,R.jsx)(S,{children:`History`}),(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Run`}),(0,R.jsx)(`th`,{children:`Result`}),(0,R.jsx)(`th`,{children:`Env`}),(0,R.jsx)(`th`,{className:`num`,children:`Requests`}),(0,R.jsx)(`th`,{className:`num`,children:`Checks`}),(0,R.jsx)(`th`,{className:`num`,children:`Data`}),(0,R.jsx)(`th`,{className:`num`,children:`Wall`}),(0,R.jsx)(`th`,{className:`num`,children:`Started`})]})}),(0,R.jsx)(`tbody`,{children:t.map(t=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void i({to:`/runs/$runId`,params:{runId:String(t.id)}}),children:[(0,R.jsx)(`td`,{children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`}),children:[(0,R.jsx)(k,{tone:d(t)}),(0,R.jsxs)(`span`,{className:f,children:[`#`,t.id]}),t.label&&t.label!==t.entry.split(`/`).pop()?(0,R.jsx)(`span`,{className:n(m,l({color:`muted`})),children:t.label}):null]})}),(0,R.jsx)(`td`,{className:l({color:`muted`,whiteSpace:`nowrap`}),children:e(t)}),(0,R.jsx)(`td`,{children:t.env?(0,R.jsx)(c,{children:t.env}):null}),(0,R.jsxs)(`td`,{className:`num`,children:[O(t.request_count),t.error_count?(0,R.jsxs)(`span`,{className:l({color:`muted`}),title:_(t.error_count),children:[` `,`· `,t.error_count,`✕`]}):null]}),(0,R.jsx)(`td`,{className:n(`num`,t.failed_check_count?l({color:`bad`}):void 0),children:t.check_count?`${t.check_count-t.failed_check_count}/${t.check_count}`:`—`}),(0,R.jsx)(`td`,{className:n(`num`,f),children:D(t.total_bytes)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:t.finished_at?T(t.finished_at-t.started_at):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:v(r,t.started_at)})]},t.id))})]})})]})]})}var V={ok:l({bg:`ok`}),warn:l({bg:`warn`}),bad:l({bg:`bad`}),info:l({bg:`info`}),neutral:l({bg:`faint`})},H=60;function U({runs:t}){let r=s(),i=t.slice(0,H).toReversed(),a=i.map(e=>e.finished_at?e.finished_at-e.started_at:0),o=Math.max(...a,1);return(0,R.jsxs)(A,{className:l({p:`3`}),children:[(0,R.jsx)(`div`,{className:l({display:`flex`,alignItems:`flex-end`,gap:`2px`,h:`88px`}),children:i.map((t,i)=>(0,R.jsx)(`button`,{type:`button`,title:`#${t.id} · ${T(a[i])} · ${e(t)}`,onClick:()=>void r({to:`/runs/$runId`,params:{runId:String(t.id)}}),className:l({flex:`1`,maxW:`22px`,minW:`4px`,h:`full`,display:`flex`,alignItems:`flex-end`,border:`none`,bg:`transparent`,p:`0`,cursor:`pointer`,rounded:`xs`,_hover:{bg:`hover`}}),children:(0,R.jsx)(`span`,{className:n(l({display:`block`,w:`full`,roundedTop:`sm`}),V[d(t)]),style:{height:`${Math.max(a[i]/o*100,3)}%`}})},t.id))}),(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`4`,mt:`2`,fontSize:`11px`,color:`muted`,flexWrap:`wrap`}),children:[(0,R.jsxs)(`span`,{children:[`max `,T(o)]}),(0,R.jsx)(W,{tone:`ok`,label:`Passed`}),(0,R.jsx)(W,{tone:`bad`,label:`Threw or failed a check`}),(0,R.jsx)(W,{tone:`info`,label:`Unfinished`})]})]})}function W({tone:e,label:t}){return(0,R.jsxs)(`span`,{className:l({display:`inline-flex`,alignItems:`center`,gap:`1`}),children:[(0,R.jsx)(`span`,{className:n(l({w:`8px`,h:`8px`,rounded:`xs`}),V[e])}),t]})}function G({endpoints:e,now:t}){let i=s();return e.length===0?(0,R.jsx)(p,{title:`No requests in this environment`}):(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Request`}),(0,R.jsx)(`th`,{children:`Last`}),(0,R.jsx)(`th`,{className:`num`,children:`Calls`}),(0,R.jsx)(`th`,{className:`num`,children:`Errors`}),(0,R.jsx)(`th`,{className:`num`,children:`Avg`}),(0,R.jsx)(`th`,{className:`num`,children:`Last seen`})]})}),(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void i({to:`/requests/$requestId`,params:{requestId:String(e.last_request_id)}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,alignItems:`center`,gap:`2`,minW:`0`}),children:[(0,R.jsx)(r,{method:e.method,kind:e.kind,width:`list`}),(0,R.jsxs)(`span`,{className:n(m,f),title:`${e.host}${e.path}`,children:[(0,R.jsx)(`span`,{className:l({color:`faint`}),children:e.host}),e.path]})]})}),(0,R.jsx)(`td`,{children:(0,R.jsx)(u,{status:e.last_status,error:e.last_error_name})}),(0,R.jsx)(`td`,{className:`num`,children:O(e.count)}),(0,R.jsx)(`td`,{className:n(`num`,e.errors?l({color:`warn`}):void 0),children:O(e.errors)}),(0,R.jsx)(`td`,{className:n(`num`,f),children:e.kind===`http`?T(e.avg_ms):`—`}),(0,R.jsx)(`td`,{className:n(`num`,l({color:`muted`})),children:w(t,e.last_ts)})]},`${e.kind} ${e.method} ${e.host}${e.path}`))})]})})}function K({checks:e}){let t=s();return(0,R.jsx)(A,{children:(0,R.jsxs)(`table`,{className:h,children:[(0,R.jsx)(`thead`,{children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{children:`Check`}),(0,R.jsx)(`th`,{children:`Latest`}),(0,R.jsx)(`th`,{className:`num`,children:`Pass rate`}),(0,R.jsx)(`th`,{className:`num`,children:`Failures`})]})}),(0,R.jsx)(`tbody`,{children:e.map(e=>(0,R.jsxs)(`tr`,{"data-link":!0,onClick:()=>void t({to:`/runs/$runId`,params:{runId:String(e.last_run_id)},search:{tab:`checks`}}),children:[(0,R.jsx)(`td`,{className:l({maxW:`0`,w:`full`}),children:(0,R.jsxs)(`div`,{className:l({display:`flex`,gap:`2`,alignItems:`flex-start`}),children:[(0,R.jsx)(`span`,{className:e.last_status===`pass`?l({color:`ok`}):l({color:`bad`}),children:e.last_status===`pass`?(0,R.jsx)(b,{size:15}):(0,R.jsx)(i,{size:15})}),(0,R.jsxs)(`span`,{className:l({minW:`0`}),children:[(0,R.jsx)(`span`,{className:n(m,l({display:`block`})),children:e.name}),e.last_status===`fail`&&e.last_message?(0,R.jsx)(`span`,{className:n(m,l({display:`block`,color:`bad`,fontSize:`12px`})),children:e.last_message}):null]})]})}),(0,R.jsx)(`td`,{children:e.last_status===`pass`?(0,R.jsx)(c,{tone:`ok`,children:`pass`}):(0,R.jsx)(c,{tone:`bad`,children:`fail`})}),(0,R.jsxs)(`td`,{className:`num`,children:[Math.round((e.total-e.failures)/e.total*100),`%`]}),(0,R.jsxs)(`td`,{className:n(`num`,e.failures?l({color:`bad`}):void 0),children:[e.failures,`/`,e.total]})]},e.name))})]})})}export{z as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{Dt as t,Ot as n,Vt as r,_n as i}from"./tabs-C1EijW_Z.js";var a=e(i(),1),o=r(),s=.15,c=.85;function l(e,t){try{let n=Number(localStorage.getItem(`wireui:split:${e}`));return n>=s&&n<=c?n:t}catch{return t}}function u({direction:e,first:r,second:i,initial:u=.5,storageKey:d}){let f=a.useRef(null),[p,m]=a.useState(u),[h,g]=a.useState(!1),_=e===`side`;a.useEffect(()=>m(l(d,u)),[d,u]);let v=e=>{e.preventDefault(),e.target.setPointerCapture(e.pointerId),g(!0)},y=e=>{if(!h||!f.current)return;let t=f.current.getBoundingClientRect(),n=_?(e.clientX-t.left)/t.width:(e.clientY-t.top)/t.height;m(Math.min(c,Math.max(s,n)))},b=()=>{if(h){g(!1);try{localStorage.setItem(`wireui:split:${d}`,String(p))}catch{}}},x=n({minW:`0`,minH:`0`,overflow:`hidden`,display:`flex`,flexDir:`column`});return(0,o.jsxs)(`div`,{ref:f,className:t(n({display:`flex`,flex:`1`,minH:`0`,minW:`0`,h:`full`}),n(_?{flexDir:`row`}:{flexDir:`column`}),h&&n({userSelect:`none`,cursor:_?`col-resize`:`row-resize`})),children:[(0,o.jsx)(`div`,{className:x,style:{flexBasis:`${p*100}%`,flexGrow:0,flexShrink:0},children:r}),(0,o.jsx)(`div`,{role:`separator`,"aria-orientation":_?`vertical`:`horizontal`,onPointerDown:v,onPointerMove:y,onPointerUp:b,onDoubleClick:()=>m(u),className:t(n({flexShrink:0,bg:`line`,position:`relative`,transition:`background 80ms`,_hover:{bg:`accent`},_after:{content:`""`,position:`absolute`}}),n(_?{w:`1px`,cursor:`col-resize`,_after:{top:`0`,bottom:`0`,left:`-3px`,right:`-3px`}}:{h:`1px`,cursor:`row-resize`,_after:{left:`0`,right:`0`,top:`-3px`,bottom:`-3px`}}),h&&n({bg:`accent`}))}),(0,o.jsx)(`div`,{className:t(x,n({flex:`1`})),children:i})]})}export{u as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function I(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function L(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else I(L.bind(null,e))}var R={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=R,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=L,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ee.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ee.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=I,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),r=t(((e,t)=>{t.exports=n()}));function i(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function a(e){return e?.isNotFound===!0}function o(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function s(e){return e instanceof Response&&!!e.options}function c(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return o(e)}function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty;function f(e){for(let t in e)if(d.call(e,t))return!0;return!1}var p=()=>Object.create(null),m=(e,t)=>h(e,t,!0);function h(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(g(e)&&g(t)))return t;let a=Object.keys(e),o=a.length,s=Object.keys(t),c=s.length;if(i?o!==e.length||c!==t.length||o&&l(a)!==`${o-1}`||c&&l(s)!==`${c-1}`:o!==Object.getOwnPropertyNames(e).length||c!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let u=0,f,m,_;if(i){for(;u<c&&(_=u,m=e[_],f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f,f===m);u++);if(u===c&&o===c)return e}else{let i=o===c,l=!0;for(;u<c;u++){_=s[u],m=e[_];let o=t[_];f=m===o?m:typeof m==`object`?h(m,o,n,r):o,i&&=f===m&&(a[u]===_||d.call(e,_)),l&&=Object.is(f,o),a[u]=f}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(l)return t}let v=i?s.fill(0):n?p():{};for(let o=0;o<c;o++)_=i?o:s[o],i?(m=e[_],o>u&&(f=t[_],f=m===f?m:typeof m==`object`?h(m,f,n,r):f),v[_]=o<u?m:f):v[_]=a[o];return v}function g(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function _(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!_(a,o,n,r))return!1}return!0}if(g(e)&&g(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!_(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!_(e[a],t[a],n,r)))return!1;return i===0}return!1}function v(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var y=/[\x00-\x1f\x7f"<>`{}]/g;function b(e){return e.replace(y,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function x(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return b(t)}var S=[`http:`,`https:`,`mailto:`,`tel:`];function C(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var w=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function T(e,t){if(!e)return!1;if(w.test(e))return!0;let n=C(e);return n?!t.has(n):!1}var ee={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},E=/[&><\u2028\u2029]/g;function D(e){return e.replace(E,e=>ee[e])}function O(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=x(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=x(r?e.slice(r):e)}return t}function k(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function te(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function A(e){return e.replace(/\/{2,}/g,`/`)}function j(e){return e===`/`?e:e.replace(/^\/+/,``)}function M(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function N(e){return M(j(e))}function P(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function F(e,t,n=`never`,r){if(t.includes(`//`)&&(t=A(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=A(e)),o=e.split(`/`);o.length>1&&l(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?A(s):s)||`/`;return a&&r&&r.set(a,c),c}function I(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function L(e){return e==null||e===``}function R(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ne(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&L(f)){if(c===`/`&&!d)continue;f=``}o+=c+R(s,f,r)+(d||``)}}return o+a||`/`}function z(){throw Error(`Invariant failed`)}var B=`__root__`,re=`Error preloading route! ☝️`,ie=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=B:this.parentRoute||z();let r=n?B:t?.path;r&&r!==`/`&&(r=j(r));let i=t?.id||r,a=n?B:A((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:A(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=M(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>o({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ae=class{constructor({id:e}){this.notFound=e=>i({routeId:this.id,...e}),this.redirect=e=>o({from:this.id,...e}),this.id=e}},oe=class extends ie{constructor(e){super(e)}},se=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ce=t(((e,t)=>{t.exports=se()})),V=e(r(),1),H=ce(),le=()=>!0,ue=()=>!1;function de({children:e,fallback:t=null}){return(0,H.jsx)(V.Fragment,{children:fe()?e:t})}function fe(e=!0){return V.useSyncExternalStore(pe,le,e?ue:le)}function pe(){return()=>{}}var me=V.createContext(null);function U(e){return V.useContext(me)}var he=V.createContext(void 0),ge=V.createContext(void 0),_e=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),ve=t(((e,t)=>{t.exports=_e()})),ye=t((e=>{var t=r(),n=ve();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),be=t(((e,t)=>{t.exports=ye()}))();function xe(e,t){return e===t}function Se(e,t=e=>e,n){let r=n?.compare??xe,i=(0,V.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,V.useCallback)(()=>e.get(),[e]);return(0,be.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var Ce={};function we(e,t){let n=V.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=h(n.current,i):i}}function W(e){let t=U(),n=V.useContext(e.from?ge:he),r=e.from??n,i=t.stores.getMatchStore(r),a=we(e,t),o=Se(i,e=>e?a(e):Ce);if(o!==Ce)return o;(e.shouldThrow??!0)&&z()}function Te(e){return W({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Ee(e){let{select:t,...n}=e;return W({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function De(e){return W({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Oe(e){return W({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function G(e){let t=U();return V.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ke(e){return W({...e,select:t=>e.select?e.select(t.context):t.context})}function Ae(...e){let t=V.useRef(e),n=t.current;return e.forEach((e,t)=>{_(n[t],e,!1,!0)||(n[t]=e)}),t.current}function K(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(re)})}var je={compare:(e,t)=>e[0]===t[0]&&e[1]===t[1]};function Me(e,t){let n=typeof e==`string`&&C(e);if(n)return t.has(n)?e:null}function Ne(e,t,n,r,i){let a=P(e.pathname,r),o=P(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!_(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||i&&e.hash===t.hash}function Pe(e,t,n){let r=U(),i=V.useRef(null),a=V.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:o,to:s,preload:c,preloadDelay:l,hashScrollIntoView:u,replace:d,startTransition:f,resetScroll:p,viewTransition:m,ignoreBlocker:h,disabled:g,target:_,onClick:v,onBlur:y,onFocus:b,onMouseEnter:x,onMouseLeave:S,onTouchStart:w}=e,T=fe(!!o?.includeHash),[ee,E,D]=Ae(e.search,e.params,o),[O,k]=V.useMemo(()=>[e,{...e}],[r,e.from,e._fromLocation,e.hash,e.to,ee,E,e.state,e.mask,e.unsafeRelative]),te=V.useCallback(e=>{let t=Me(s,r.protocolAllowlist);if(t!==void 0)return[t??void 0];O._fromLocation||(k._fromLocation=e);let n=r.buildLocation(k),i=Ve(n,r,g);return[i,!g&&(!i||C(i))?void 0:Ne(e,n,D,r.basepath,T)]},[D,g,T,O,k,r,s]),[A,j]=Se(r.stores.location,te,je),M=j===void 0?A:void 0,N=g||A===void 0,P=V.useRef(!1),F=e.reloadDocument||M||N?!1:c??r.options.defaultPreload,I=l??r.options.defaultPreloadDelay??0,L=V.useCallback(e=>{let t=e?.isIntersecting;if(!(t??F===`intent`)){t===!1&&Be(i);return}if(!I){K(r,O);return}q.has(i)||q.set(i,setTimeout(()=>{q.delete(i),K(r,O)},I))},[r,O,i,F,I]);V.useEffect(()=>{F===`render`&&!P.current&&(P.current=!0,K(r,O));let e;return F===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(e=new IntersectionObserver(e=>L(e.pop()),{rootMargin:`100px`}),e.observe(i.current)),()=>{e?.disconnect(),Be(i)}},[r,O,F,L,i]);let R=Re(e,n);if(R.ref=t?a:i,M)return R.href=M,R;let ne=e=>{let t=_??e.currentTarget.getAttribute(`target`);!N&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!t||t===`_self`)&&e.button===0&&(e.preventDefault(),r.navigate({...O,replace:d,resetScroll:p,hashScrollIntoView:u,startTransition:f,viewTransition:m,ignoreBlocker:h}))},z=()=>{F===`intent`&&K(r,O)},B=()=>{F===`intent`&&Be(i)};return R.onClick=J(v,ne),R.onBlur=J(y,B),R.onFocus=J(b,L),R.onMouseEnter=J(x,L),R.onMouseLeave=J(S,B),R.onTouchStart=J(w,z),ze(R,e,j,A,N,n)}var Fe={},Ie={className:`active`},Le=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`_fromLocation`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Re(e,t){let n={};for(let r in e)Le.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ze(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:d}=t,f=u(n?o:s,{})??(n?Ie:Fe);Object.assign(e,f),e.href=r,a!==`a`&&(e.disabled=i),e.target=d;let p=f.style;(l||p)&&(e.style=l&&p?{...l,...p}:l||p);let m=f.className;return(c||m)&&(e.className=c?m?`${c} ${m}`:c:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var q=new WeakMap,Be=e=>{clearTimeout(q.get(e)),q.delete(e)},J=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Ve(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!T(i,t.protocolAllowlist))return i}var He=V.memo(V.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Pe(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return V.createElement(n,r,i)}),Ue);function Ue(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Le.has(r)||!_(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}function We(e){return new Ge({id:e})}var Ge=class extends ae{constructor({id:e}){super({id:e}),this.useMatch=e=>W({...e,from:this.id}),this.useRouteContext=e=>ke({...e,from:this.id}),this.useSearch=e=>Oe({...e,from:this.id}),this.useParams=e=>De({...e,from:this.id}),this.useLoaderDeps=e=>Ee({...e,from:this.id,strict:!1}),this.useLoaderData=e=>Te({...e,from:this.id,strict:!1}),this.useNavigate=()=>G({from:U().routesById[this.id].fullPath}),this.notFound=e=>i({routeId:this.id,...e}),this.Link=V.forwardRef((e,t)=>{let n=U().routesById[this.id].fullPath;return(0,H.jsx)(He,{ref:t,from:n,...e})})}},Ke=class extends ie{constructor(e){super(e),this.useMatch=e=>W({...e,from:this.id}),this.useRouteContext=e=>ke({...e,from:this.id}),this.useSearch=e=>Oe({...e,from:this.id}),this.useParams=e=>De({...e,from:this.id}),this.useLoaderDeps=e=>Ee({...e,from:this.id}),this.useLoaderData=e=>Te({...e,from:this.id}),this.useNavigate=()=>G({from:this.fullPath}),this.Link=V.forwardRef((e,t)=>(0,H.jsx)(He,{ref:t,from:this.fullPath,...e}))}};function qe(e){return new Ke(e)}var Je=class extends oe{constructor(e){super(e),this.useMatch=e=>W({...e,from:this.id}),this.useRouteContext=e=>ke({...e,from:this.id}),this.useSearch=e=>Oe({...e,from:this.id}),this.useParams=e=>De({...e,from:this.id}),this.useLoaderDeps=e=>Ee({...e,from:this.id}),this.useLoaderData=e=>Te({...e,from:this.id}),this.useNavigate=()=>G({from:this.fullPath}),this.Link=V.forwardRef((e,t)=>(0,H.jsx)(He,{ref:t,from:this.fullPath,...e}))}};function Ye(e){return new Je(e)}function Xe(e){let t=U();return Se(t.stores.location,we(e,t))}function Ze(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Qe=e=>typeof e==`object`&&!!e;function $e(e){return Object.fromEntries(Object.entries(e??{}).filter(([e,t])=>t!==void 0))}var et=e=>e===`base`;function tt(e){return e.slice().filter(e=>!et(e))}function nt(e){return String.fromCharCode(e+(e>25?39:97))}function rt(e){let t=``,n;for(n=Math.abs(e);n>52;n=n/52|0)t=nt(n%52)+t;return nt(n%52)+t}function it(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function at(e){return rt(it(5381,e)>>>0)}var ot=/\s*!(important)?/i;function st(e){return typeof e==`string`&&ot.test(e)}function ct(e){return typeof e==`string`?e.replace(ot,``).trim():e}function lt(e){return typeof e==`string`?e.replaceAll(` `,`_`):e}var ut=e=>{let t=new Map;return(...n)=>{let r=JSON.stringify(n);if(t.has(r))return t.get(r);let i=e(...n);return t.set(r,i),i}},dt=new Set([`__proto__`,`constructor`,`prototype`]);function ft(...e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{if(dt.has(n))return;let r=e[n],i=t[n];e[n]=Ze(r)&&Ze(i)?ft(r,i):i}),e),{})}var pt=e=>e!=null;function mt(e,t,n={}){let{stop:r,getKey:i}=n;function a(e,n=[]){if(Qe(e)){let o={};for(let[s,c]of Object.entries(e)){let l=i?.(s,c)??s,u=[...n,l];if(r?.(e,u))return t(e,n);let d=a(c,u);pt(d)&&(o[l]=d)}return o}return t(e,n)}return a(e)}function ht(e,t){return e.reduce((e,n,r)=>{let i=t[r];return n!=null&&(e[i]=n),e},{})}function gt(e,t,n=!0){let{utility:r,conditions:i}=t,{hasShorthand:a,resolveShorthand:o}=r;return mt(e,e=>Array.isArray(e)?ht(e,i.breakpoints.keys):e,{stop:e=>Array.isArray(e),getKey:n?e=>a?o(e):e:void 0})}var _t={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},vt=e=>typeof e==`string`?e.replaceAll(/[\n\s]+/g,` `):e;function yt(e){let{utility:t,hash:n,conditions:r=_t}=e,i=e=>[t.prefix,e].filter(Boolean).join(`-`),a=(e,a)=>{let o;if(n){let n=[...r.finalize(e),a];o=i(t.toHash(n,at))}else o=[...r.finalize(e),i(a)].join(`:`);return o};return ut(({base:n,...i}={})=>{let o=gt(Object.assign(i,n),e),s=new Set;return mt(o,(e,n)=>{if(e==null)return;let i=st(e),[o,...c]=r.shift(n),l=tt(c),u=t.transform(o,ct(vt(e))),d=a(l,u.className);i&&(d=`${d}!`),s.add(d)}),Array.from(s).join(` `)})}function bt(...e){return e.flat().filter(e=>Ze(e)&&Object.keys($e(e)).length>0)}function xt(e){function t(t){let n=bt(...t);return n.length===1?n:n.map(t=>gt(t,e))}function n(...e){return ft(...t(e))}function r(...e){return Object.assign({},...t(e))}return{mergeCss:ut(n),assignCss:r}}var St=/([A-Z])/g,Ct=/^ms-/,wt=ut(e=>e.startsWith(`--`)?e:e.replace(St,`-$1`).replace(Ct,`-ms-`).toLowerCase());RegExp(`^(${[`min`,`max`,`clamp`,`calc`].join(`|`)})\\(.*\\)`);var Tt=`(?:${`cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%`.split(`,`).join(`|`)})`;RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${Tt}$`);var Et=new Set(`_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,base`.split(`,`)),Dt=/^@|&|&$/;function Ot(e){return Et.has(e)||Dt.test(e)}var kt=/^_/,At=/&|@/;function jt(e){return e.map(e=>Et.has(e)?e.replace(kt,``):At.test(e)?`[${lt(e.trim())}]`:e)}function Mt(e){return e.sort((e,t)=>{let n=Ot(e),r=Ot(t);return n&&!r?1:!n&&r?-1:0})}var Nt=`aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,WebkitTextFillColor:wktf-c,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:trs,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle`,Pt=new Map,Ft=new Map;Nt.split(`,`).forEach(e=>{let[t,n]=e.split(`:`),[r,...i]=n.split(`/`);Pt.set(t,r),i.length&&i.forEach(e=>{Ft.set(e===`1`?r:e,t)})});var It=e=>Ft.get(e)||e,Lt={conditions:{shift:Mt,finalize:jt,breakpoints:{keys:[`base`,`sm`,`md`,`lg`,`xl`,`2xl`]}},utility:{transform:(e,t)=>{let n=It(e);return{className:`${Pt.get(n)||wt(n)}_${lt(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(`:`)),resolveShorthand:It}},Rt=yt(Lt),Y=(...e)=>Rt(zt(...e));Y.raw=(...e)=>zt(...e);var{mergeCss:zt,assignCss:Bt}=xt(Lt);function X(){let e=``,t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n==`string`&&(e&&(e+=` `),e+=n);return e}function Z(e){return function({size:t=16,title:n,...r}){return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.75,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!n||void 0,role:n?`img`:void 0,...r,children:[n?(0,H.jsx)(`title`,{children:n}):null,e]})}}var Vt=Z((0,H.jsx)(H.Fragment,{children:(0,H.jsx)(`path`,{d:`M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`})})),Ht=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M3 12a9 9 0 1 0 3-6.7L3 8`}),(0,H.jsx)(`path`,{d:`M3 3v5h5`}),(0,H.jsx)(`path`,{d:`M12 7v5l3 2`})]})),Ut=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M3 12h18`}),(0,H.jsx)(`path`,{d:`M12 3a14 14 0 0 1 0 18a14 14 0 0 1 0-18`})]})),Wt=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`ellipse`,{cx:`12`,cy:`5`,rx:`8`,ry:`3`}),(0,H.jsx)(`path`,{d:`M4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5`}),(0,H.jsx)(`path`,{d:`M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3`})]})),Gt=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`3`,y:`3`,width:`7`,height:`9`,rx:`1.5`}),(0,H.jsx)(`rect`,{x:`14`,y:`3`,width:`7`,height:`5`,rx:`1.5`}),(0,H.jsx)(`rect`,{x:`14`,y:`12`,width:`7`,height:`9`,rx:`1.5`}),(0,H.jsx)(`rect`,{x:`3`,y:`16`,width:`7`,height:`5`,rx:`1.5`})]})),Kt=Z((0,H.jsx)(`path`,{d:`M7 4v16l13-8z`})),qt=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M4 12h16`}),(0,H.jsx)(`path`,{d:`M14 6l6 6-6 6`})]})),Jt=Z((0,H.jsx)(`path`,{d:`M9 6l6 6-6 6`})),Yt=Z((0,H.jsx)(`path`,{d:`M6 9l6 6 6-6`})),Xt=Z((0,H.jsx)(`path`,{d:`M15 6l-6 6 6 6`})),Zt=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M6 6l12 12`}),(0,H.jsx)(`path`,{d:`M18 6L6 18`})]})),Qt=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M20 11a8 8 0 0 0-14.6-4.5L4 8`}),(0,H.jsx)(`path`,{d:`M4 4v4h4`}),(0,H.jsx)(`path`,{d:`M4 13a8 8 0 0 0 14.6 4.5L20 16`}),(0,H.jsx)(`path`,{d:`M20 20v-4h-4`})]})),$t=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,H.jsx)(`path`,{d:`M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4`})]})),en=Z((0,H.jsx)(`path`,{d:`M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z`})),tn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`12`,rx:`2`}),(0,H.jsx)(`path`,{d:`M8 20h8M12 16v4`})]})),nn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`9`,y:`9`,width:`11`,height:`11`,rx:`2`}),(0,H.jsx)(`path`,{d:`M5 15V6a2 2 0 0 1 2-2h8`})]})),rn=Z((0,H.jsx)(`path`,{d:`M5 12l5 5L20 7`})),an=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,H.jsx)(`path`,{d:`M20 20l-3.5-3.5`})]})),on=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,H.jsx)(`path`,{d:`M12 4v16`})]})),sn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`16`,rx:`2`}),(0,H.jsx)(`path`,{d:`M3 12h18`})]})),cn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M12 19V5`}),(0,H.jsx)(`path`,{d:`M6 11l6-6 6 6`})]})),ln=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M12 5v14`}),(0,H.jsx)(`path`,{d:`M6 13l6 6 6-6`})]})),un=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M12 3l9.5 17h-19z`}),(0,H.jsx)(`path`,{d:`M12 10v4M12 17.5v.01`})]})),dn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M8 12.5l2.5 2.5L16 9.5`})]})),fn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,H.jsx)(`path`,{d:`M9 9l6 6M15 9l-6 6`})]})),pn=Z((0,H.jsx)(`path`,{d:`M8 5v14l11-7z`})),mn=Z((0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`path`,{d:`M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z`}),(0,H.jsx)(`path`,{d:`M14 3v5h5`})]})),hn={100:`Continue`,101:`Switching Protocols`,200:`OK`,201:`Created`,202:`Accepted`,204:`No Content`,206:`Partial Content`,301:`Moved Permanently`,302:`Found`,303:`See Other`,304:`Not Modified`,307:`Temporary Redirect`,308:`Permanent Redirect`,400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,406:`Not Acceptable`,408:`Request Timeout`,409:`Conflict`,410:`Gone`,413:`Payload Too Large`,415:`Unsupported Media Type`,422:`Unprocessable Content`,429:`Too Many Requests`,500:`Internal Server Error`,501:`Not Implemented`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`};function gn(e,t){return t||e==null||e>=500?`bad`:e>=400?`warn`:e>=300?`info`:e>=100?`ok`:`neutral`}function _n(e){return e.error_name!=null||e.status==null||e.status>=400}function vn(e,t=`http`){if(t===`ws`)return`ws`;if(t===`sse`)return`sse`;switch(e.toUpperCase()){case`GET`:return`get`;case`POST`:return`post`;case`PUT`:return`put`;case`PATCH`:return`patch`;case`DELETE`:return`delete`;default:return`other`}}function yn(e,t=`http`){return t===`ws`?`WS`:t===`sse`?`SSE`:e.toUpperCase()}function bn(e){if(!e)return[];let t=[];for(let[n,r]of new URLSearchParams(e))t.push([n,r]);return t}function xn(e){return e.filter(([e])=>e.toLowerCase()===`cookie`).flatMap(([,e])=>e.split(`;`)).map(e=>e.trim()).filter(Boolean).map(e=>{let t=e.indexOf(`=`);return t<0?{name:e,value:``,attributes:{}}:{name:e.slice(0,t),value:e.slice(t+1),attributes:{}}})}function Sn(e){return e.filter(([e])=>e.toLowerCase()===`set-cookie`).map(([,e])=>{let[t=``,...n]=e.split(`;`),r=t.indexOf(`=`),i={};for(let e of n){let t=e.trim();if(!t)continue;let n=t.indexOf(`=`);n<0?i[t]=`true`:i[t.slice(0,n)]=t.slice(n+1)}return{name:r<0?t.trim():t.slice(0,r).trim(),value:r<0?``:t.slice(r+1).trim(),attributes:i}})}function Cn(e){return e.kind===`json`?JSON.stringify(e.json,null,2):e.kind===`text`||e.kind===`image`?e.text:null}function wn(e){return e.kind===`json`?JSON.stringify(e.json):Cn(e)}var Tn=new Set([`content-length`,`host`,`connection`,`accept-encoding`]);function En(e){return`'${e.replace(/'/g,`'\\''`)}'`}function Dn(e,t,n){let r=[`curl ${e.method===`GET`?``:`-X ${e.method} `}${En(e.url)}`];for(let[e,n]of t)Tn.has(e.toLowerCase())||r.push(` -H ${En(`${e}: ${n}`)}`);let i=wn(n);return i!=null&&i!==``&&r.push(` --data-raw ${En(i)}`),r.join(` \\
|
|
2
|
+
`)}function On(e){let t=(e.dns_ms??0)+(e.connect_ms??0)+(e.tls_ms??0),n=[],r=(e,t,r,i)=>{i!=null&&i>.005&&n.push({key:e,label:t,hint:r,ms:i})},i=e.kind!==`http`;if(r(`dns`,`DNS lookup`,`Resolving the hostname`,e.dns_ms),r(`connect`,i?`Handshake`:`TCP connect`,`Opening the connection`,e.connect_ms),r(`tls`,`TLS handshake`,`Negotiating encryption`,e.tls_ms),e.ttfb_ms!=null){let n=Math.max(0,e.ttfb_ms-t);r(`wait`,i?`First message`:`Waiting (TTFB)`,i?`Until the first message arrived`:`Server processing, until the first byte`,n)}i||r(`download`,`Content download`,`Reading the response body`,e.download_ms);let a=n.reduce((e,t)=>e+t.ms,0),o=e.duration_ms-a;return r(`other`,i?`Open`:`Other`,i?`The rest of the connection's lifetime`:`Time the phase marks do not cover`,o>.5?o:null),n}function kn(e){return e.exit_status===`error`||e.failed_check_count>0?`bad`:e.finished_at==null?`info`:`ok`}function An(e){return e.exit_status===`error`?`Threw`:e.failed_check_count>0?`${e.failed_check_count} failed check${e.failed_check_count===1?``:`s`}`:e.finished_at==null?`Running or killed`:`Passed`}function jn(e){return`${e} request${e===1?``:`s`} errored or got a status ≥ 400. That alone does not fail a run — only a throw or a failed check does.`}var Mn=Y({fontFamily:`mono`,fontSize:`12px`}),Nn=Y({overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}),Pn=Y({color:`faint`});Y({color:`muted`});var Fn={get:Y({color:`get`}),post:Y({color:`post`}),put:Y({color:`put`}),patch:Y({color:`patch`}),delete:Y({color:`delete`}),other:Y({color:`other`}),ws:Y({color:`ws`}),sse:Y({color:`sse`})};function In({method:e,kind:t=`http`,width:n}){return(0,H.jsx)(`span`,{className:X(Y({fontFamily:`mono`,fontSize:`10.5px`,fontWeight:`700`,letterSpacing:`0.02em`,flexShrink:0}),n===`list`&&Y({display:`inline-block`,w:`46px`}),Fn[vn(e,t)]),children:yn(e,t)})}var Q={ok:Y({color:`ok`}),info:Y({color:`info`}),warn:Y({color:`warn`}),bad:Y({color:`bad`}),neutral:Y({color:`muted`})},Ln={ok:Y({color:`ok`,bg:`okSoft`}),info:Y({color:`info`,bg:`accentSoft`}),warn:Y({color:`warn`,bg:`warnSoft`}),bad:Y({color:`bad`,bg:`badSoft`}),neutral:Y({color:`muted`,bg:`hover`})},Rn={ok:Y({bg:`ok`}),info:Y({bg:`info`}),warn:Y({bg:`warn`}),bad:Y({bg:`bad`}),neutral:Y({bg:`faint`})};function zn(e){return Q[e]}function Bn({status:e,error:t,pill:n=!1}){let r=gn(e,t),i=e==null?t??`ERR`:String(e);if(!n)return(0,H.jsx)(`span`,{className:X(Mn,Y({fontWeight:`600`,flexShrink:0}),Q[r]),children:e==null?`ERR`:i});let a=e==null?null:hn[e];return(0,H.jsxs)(`span`,{className:X(Y({display:`inline-flex`,alignItems:`center`,gap:`1`,px:`2`,py:`0.5`,rounded:`sm`,fontWeight:`600`,fontSize:`12px`,whiteSpace:`nowrap`}),Ln[r]),children:[(0,H.jsx)(`span`,{className:Mn,children:i}),a?(0,H.jsx)(`span`,{children:a}):null]})}function Vn({tone:e,title:t}){return(0,H.jsx)(`span`,{title:t,className:X(Y({display:`inline-block`,w:`7px`,h:`7px`,rounded:`full`,flexShrink:0}),Rn[e])})}function Hn({children:e,tone:t=`neutral`,title:n}){return(0,H.jsx)(`span`,{title:n,className:X(Y({display:`inline-flex`,alignItems:`center`,gap:`1`,px:`1.5`,py:`0`,rounded:`sm`,fontSize:`11px`,fontWeight:`500`,whiteSpace:`nowrap`,lineHeight:`18px`}),Ln[t]),children:e})}var Un=Y({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:`1.5`,h:`28px`,px:`2.5`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`raised`,color:`fg`,cursor:`pointer`,whiteSpace:`nowrap`,fontWeight:`500`,fontSize:`12px`,transition:`background 80ms`,_hover:{bg:`hover`},_disabled:{opacity:.45,cursor:`default`,_hover:{bg:`raised`}},_focusVisible:{outline:`2px solid`,outlineColor:`accent`,outlineOffset:`1px`}});function Wn({className:e,...t}){return(0,H.jsx)(`button`,{type:`button`,className:X(Un,e),...t})}var Gn=Y({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,w:`28px`,h:`28px`,rounded:`md`,border:`none`,bg:`transparent`,color:`muted`,cursor:`pointer`,flexShrink:0,_hover:{bg:`hover`,color:`fg`},_disabled:{opacity:.35,cursor:`default`,_hover:{bg:`transparent`}},_focusVisible:{outline:`2px solid`,outlineColor:`accent`},"&[aria-pressed=true]":{color:`accent`,bg:`accentSoft`}});function Kn({label:e,className:t,...n}){return(0,H.jsx)(`button`,{type:`button`,"aria-label":e,title:e,className:X(Gn,t),...n})}function qn({text:e,label:t=`Copy`}){let[n,r]=V.useState(!1);return V.useEffect(()=>{if(!n)return;let e=window.setTimeout(()=>r(!1),1200);return()=>window.clearTimeout(e)},[n]),(0,H.jsxs)(Wn,{disabled:e==null,onClick:()=>{e!=null&&navigator.clipboard?.writeText(e).then(()=>r(!0))},children:[n?(0,H.jsx)(rn,{size:14}):(0,H.jsx)(nn,{size:14}),n?`Copied`:t]})}function Jn({items:e,value:t,onSelect:n,right:r,dense:i=!1}){return(0,H.jsxs)(`div`,{role:`tablist`,className:X(Y({display:`flex`,alignItems:`stretch`,px:`2`,borderBottom:`1px solid`,borderColor:`line`,flexShrink:0,overflowX:`auto`,scrollbarWidth:`none`}),Y(i?{h:`36px`}:{h:`42px`})),children:[e.filter(e=>!e.hidden).map(e=>{let r=e.id===t;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>n(e.id),className:Y({position:`relative`,display:`inline-flex`,alignItems:`center`,px:`0.5`,border:`none`,bg:`transparent`,cursor:`pointer`,color:`muted`,fontSize:`13px`,fontWeight:`500`,whiteSpace:`nowrap`,_focusVisible:{outline:`none`},"& > .tab-label":{display:`inline-flex`,alignItems:`center`,gap:`1.5`,px:`2.5`,h:`calc(100% - 10px)`,rounded:`md`,transition:`background 80ms, color 80ms`},_hover:{color:`fg`,"& > .tab-label":{bg:`hover`}},"&:focus-visible > .tab-label":{outline:`2px solid`,outlineColor:`accent`,outlineOffset:`-2px`},"&[aria-selected=true]":{color:`fg`,fontWeight:`600`,_after:{content:`""`,position:`absolute`,left:`2`,right:`2`,bottom:`-1px`,h:`2px`,roundedTop:`full`,bg:`accent`}}}),children:(0,H.jsxs)(`span`,{className:`tab-label`,children:[e.label,e.count===void 0?null:(0,H.jsx)(`span`,{className:X(Y({fontSize:`11px`,fontWeight:`500`,fontVariantNumeric:`tabular-nums`,lineHeight:`16px`,minW:`16px`,px:`1.5`,rounded:`full`,textAlign:`center`}),e.tone?Ln[e.tone]:Y(r?{color:`accent`,bg:`accentSoft`}:{color:`muted`,bg:`hover`})),children:e.count})]})},e.id)}),r?(0,H.jsx)(`div`,{className:Y({ml:`auto`,display:`flex`,alignItems:`center`,gap:`1.5`,pl:`2`}),children:r}):null]})}function Yn({checked:e,onChange:t,label:n}){return(0,H.jsx)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(!e),className:Y({h:`26px`,px:`2`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`transparent`,color:`muted`,cursor:`pointer`,fontSize:`12px`,_hover:{color:`fg`},"&[aria-pressed=true]":{color:`accent`,borderColor:`accent`,bg:`accentSoft`}}),children:n})}function Xn({items:e,value:t,onSelect:n}){return(0,H.jsx)(`div`,{className:Y({display:`inline-flex`,p:`2px`,gap:`2px`,rounded:`md`,bg:`hover`,flexShrink:0}),children:e.map(e=>(0,H.jsx)(`button`,{type:`button`,title:e.title,"aria-pressed":e.id===t,onClick:()=>n(e.id),className:Y({display:`inline-flex`,alignItems:`center`,gap:`1`,h:`22px`,px:`2`,rounded:`sm`,border:`none`,bg:`transparent`,color:`muted`,cursor:`pointer`,fontSize:`12px`,fontWeight:`500`,_hover:{color:`fg`},"&[aria-pressed=true]":{bg:`raised`,color:`fg`,boxShadow:`0 1px 2px rgba(0,0,0,0.08)`}}),children:e.label},e.id))})}var Zn=V.forwardRef(function({shortcut:e,className:t,...n},r){return(0,H.jsxs)(`label`,{className:X(Y({display:`flex`,alignItems:`center`,gap:`1.5`,h:`28px`,px:`2`,rounded:`md`,border:`1px solid`,borderColor:`line`,bg:`canvas`,color:`faint`,minW:`0`,_focusWithin:{borderColor:`accent`,color:`muted`}}),t),children:[(0,H.jsx)(an,{size:14}),(0,H.jsx)(`input`,{ref:r,type:`search`,spellCheck:!1,autoComplete:`off`,className:Y({flex:`1`,minW:`0`,border:`none`,outline:`none`,bg:`transparent`,color:`fg`,fontSize:`12px`,"&::placeholder":{color:`faint`},"&::-webkit-search-cancel-button":{display:`none`}}),...n}),e?(0,H.jsx)(Qn,{children:e}):null]})});function Qn({children:e}){return(0,H.jsx)(`kbd`,{className:Y({fontFamily:`mono`,fontSize:`10px`,color:`faint`,border:`1px solid`,borderColor:`line`,rounded:`xs`,px:`1`,lineHeight:`16px`,flexShrink:0}),children:e})}function $n({label:e,value:t,sub:n,tone:r}){return(0,H.jsxs)(`div`,{className:Y({display:`flex`,flexDir:`column`,gap:`0.5`,px:`3.5`,py:`2.5`,rounded:`lg`,border:`1px solid`,borderColor:`line`,bg:`raised`,minW:`0`}),children:[(0,H.jsx)(`span`,{className:Y({fontSize:`11px`,color:`muted`,fontWeight:`500`}),children:e}),(0,H.jsx)(`span`,{className:X(Y({fontSize:`20px`,fontWeight:`600`,fontVariantNumeric:`tabular-nums`,lineHeight:`1.2`}),r?Q[r]:void 0),children:t}),n?(0,H.jsx)(`span`,{className:X(Y({fontSize:`11px`}),Pn,Nn),children:n}):null]})}function er({label:e,value:t,tone:n,title:r}){return(0,H.jsxs)(`span`,{title:r,className:Y({display:`inline-flex`,alignItems:`baseline`,gap:`1`,fontSize:`12px`,whiteSpace:`nowrap`}),children:[(0,H.jsx)(`span`,{className:Y({color:`muted`}),children:e}),(0,H.jsx)(`span`,{className:X(Mn,Y({fontWeight:`600`}),n?Q[n]:void 0),children:t})]})}function tr({items:e}){return(0,H.jsx)(`div`,{className:Y({display:`inline-flex`,flexWrap:`wrap`,alignSelf:`flex-start`,maxW:`full`,rounded:`md`,border:`1px solid`,borderColor:`lineStrong`,bg:`raised`,overflow:`hidden`}),children:e.map(e=>(0,H.jsxs)(`div`,{title:e.title,className:Y({display:`flex`,flexDir:`column`,px:`3`,py:`1`,minW:`88px`,borderRight:`1px solid`,borderColor:`line`,_last:{borderRight:`none`}}),children:[(0,H.jsx)(`span`,{className:Y({fontSize:`11px`,color:`muted`,fontWeight:`500`,whiteSpace:`nowrap`}),children:e.label}),(0,H.jsx)(`span`,{className:X(Y({fontSize:`15px`,fontWeight:`600`,fontVariantNumeric:`tabular-nums`,lineHeight:`1.35`,whiteSpace:`nowrap`}),e.tone?Q[e.tone]:void 0),children:e.value})]},e.label))})}function nr({children:e}){return(0,H.jsx)(`div`,{className:Y({display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(150px, 1fr))`,gap:`2.5`}),children:e})}function rr({children:e,right:t}){return(0,H.jsxs)(`div`,{className:Y({display:`flex`,alignItems:`center`,gap:`2`,mb:`2`,mt:`1`}),children:[(0,H.jsx)(`h2`,{className:Y({fontSize:`11px`,fontWeight:`600`,textTransform:`uppercase`,letterSpacing:`0.06em`,color:`muted`,m:`0`}),children:e}),t?(0,H.jsx)(`div`,{className:Y({ml:`auto`}),children:t}):null]})}function ir({children:e,className:t}){return(0,H.jsx)(`div`,{className:X(Y({rounded:`lg`,border:`1px solid`,borderColor:`line`,bg:`raised`,overflow:`hidden`}),t),children:e})}function ar({tone:e,title:t,children:n,icon:r}){return(0,H.jsxs)(`div`,{className:X(Y({display:`flex`,gap:`2.5`,px:`3`,py:`2.5`,rounded:`md`,alignItems:`flex-start`}),Ln[e]),children:[r?(0,H.jsx)(`span`,{className:Y({mt:`1px`,flexShrink:0}),children:r}):null,(0,H.jsxs)(`div`,{className:Y({minW:`0`,flex:`1`}),children:[(0,H.jsx)(`div`,{className:Y({fontWeight:`600`}),children:t}),n?(0,H.jsx)(`div`,{className:Y({color:`fg`,mt:`0.5`,wordBreak:`break-word`}),children:n}):null]})]})}function or({title:e,children:t,icon:n}){return(0,H.jsxs)(`div`,{className:Y({display:`flex`,flexDir:`column`,alignItems:`center`,justifyContent:`center`,textAlign:`center`,gap:`1.5`,px:`6`,py:`10`,color:`muted`,h:`full`,minH:`0`}),children:[n?(0,H.jsx)(`div`,{className:Y({color:`faint`,mb:`1`}),children:n}):null,(0,H.jsx)(`div`,{className:Y({fontWeight:`600`,color:`fg`,fontSize:`14px`}),children:e}),t?(0,H.jsx)(`div`,{className:Y({maxW:`440px`}),children:t}):null]})}var sr=Y({w:`full`,borderCollapse:`separate`,borderSpacing:`0`,fontSize:`12.5px`,"& th":{position:`sticky`,top:`0`,zIndex:`1`,bg:`chrome`,textAlign:`left`,fontWeight:`500`,fontSize:`11px`,color:`muted`,px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,whiteSpace:`nowrap`},"& td":{px:`3`,py:`1.5`,borderBottom:`1px solid`,borderColor:`line`,verticalAlign:`middle`},"& tbody tr":{cursor:`default`},"& tbody tr[data-link]":{cursor:`pointer`},"& tbody tr:hover td":{bg:`hover`},"& td.num, & th.num":{textAlign:`right`,fontVariantNumeric:`tabular-nums`,whiteSpace:`nowrap`}}),cr=Y({flex:`1`,minH:`0`,minW:`0`,overflow:`auto`}),lr=Y({px:`5`,py:`4`,display:`flex`,flexDir:`column`,gap:`5`});function ur(e){return e==null?`—`:e<1?`${e.toFixed(2)} ms`:e<1e3?`${Math.round(e)} ms`:e<6e4?`${(e/1e3).toFixed(2)} s`:`${Math.floor(e/6e4)}m ${Math.round(e%6e4/1e3)}s`}function dr(e){return e==null?`—`:e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} kB`:e<1073741824?`${(e/1048576).toFixed(1)} MB`:`${(e/1073741824).toFixed(2)} GB`}function fr(e){return e==null?`—`:e.toLocaleString(`en-US`)}function pr(e,t,n=`${t}s`){return`${fr(e)} ${e===1?t:n}`}var mr=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],hr=(e,t=2)=>String(e).padStart(t,`0`);function gr(e){let t=new Date(e);return`${hr(t.getHours())}:${hr(t.getMinutes())}:${hr(t.getSeconds())}`}function _r(e){return`${gr(e)}.${hr(new Date(e).getMilliseconds(),3)}`}function vr(e,t){let n=new Date(t),r=`${n.getDate()} ${mr[n.getMonth()]}`;return n.getFullYear()===new Date(e).getFullYear()?r:`${r} ${n.getFullYear()}`}function yr(e,t){return`${vr(e,t)}, ${gr(t)}`}function br(e,t){let n=wr(t,e);return n===0?`Today`:n===1?`Yesterday`:vr(e,t)}function xr(e,t,n){let r=[];for(let i of e){let e=br(t,n(i)),a=r[r.length-1];a&&a.day===e?a.rows.push(i):r.push({day:e,rows:[i]})}return r}function Sr(e,t){let n=Math.max(0,e-t)/1e3;if(n<10)return`just now`;if(n<60)return`${Math.floor(n)} s ago`;let r=n/60;if(r<60)return`${Math.floor(r)} min ago`;let i=r/60;if(i<24)return`${Math.floor(i)} h ago`;let a=wr(t,e);return a<7?`${a} d ago`:vr(e,t)}function Cr(e){return`+${ur(Math.max(0,e))}`}function wr(e,t){let n=new Date(e),r=new Date(t),i=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate()),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate());return Math.round((a-i)/864e5)}function Tr(e){let t=e.lastIndexOf(`/`);return t<0?e:e.slice(t+1)}var $={overview:()=>`overview`,history:()=>`history`,environments:()=>`environments`,query:()=>`query`,run:e=>`run:${e}`,request:e=>`request:${e}`,script:e=>`script:${e}`},Er=new Set([`history`,`environments`,`query`]);function Dr(e,t={}){let n=e.replace(/\/+$/,``)||`/`;if(n===`/`)return $.overview();let r=/^\/runs\/(\d+)$/.exec(n);if(r)return $.run(Number(r[1]));let i=/^\/requests\/(\d+)$/.exec(n);if(i)return $.request(Number(i[1]));if(n===`/sessions`)return typeof t.entry==`string`&&t.entry?$.script(t.entry):null;let a=n.slice(1);return Er.has(a)?a:null}function Or(e){let[t=``,n=``]=e.split(`#`)[0].split(`?`);return Dr(t,{entry:new URLSearchParams(n).get(`entry`)??void 0})}var kr=V.createContext(null);function Ar(){let e=V.useContext(kr);if(!e)throw Error(`useTabs outside TabsProvider`);return e}var jr=`wireui:tabs`;function Mr(e){let{register:t}=Ar(),{key:n,title:r,icon:i,method:a,kind:o,failed:s}=e;V.useEffect(()=>{t({key:n,title:r,icon:i,method:a,kind:o,failed:s})},[t,n,r,i,a,o,s])}function Nr({children:e}){let t=Xe(),n=G(),[r,i]=V.useState([]),[a,o]=V.useState(!1),s=t.href,c=Dr(t.pathname,t.search),l=V.useRef({href:s,key:c});l.current={href:s,key:c},V.useEffect(()=>{try{let e=sessionStorage.getItem(jr);e&&i(t=>Ir(JSON.parse(e),t))}catch{}o(!0)},[]),V.useEffect(()=>{if(a)try{sessionStorage.setItem(jr,JSON.stringify(r))}catch{}},[r,a]),V.useEffect(()=>{c&&i(e=>e.map(e=>e.key===c&&e.href!==s?{...e,href:s}:e))},[s,c]);let u=V.useCallback(e=>{if(e.key!==l.current.key)return;let t=l.current.href;i(n=>{let r=n.findIndex(t=>t.key===e.key);if(r>=0){let t=[...n];return t[r]={...t[r],...e},t}let i={...e,href:t,preview:!0},a=n.findIndex(e=>e.preview);if(a>=0){let e=[...n];return e[a]=i,e}return[...n,i]})},[]),d=V.useCallback(e=>{i(t=>t.map(t=>t.key===e?{...t,preview:!1}:t))},[]),f=V.useCallback(e=>{let t=r.findIndex(t=>t.key===e);if(t<0)return;let a=r.filter(t=>t.key!==e);if(i(a),e===c){let e=a[Math.min(t,a.length-1)];n({href:e?.href??`/`})}},[r,c,n]),p=V.useCallback(e=>{i(t=>t.filter(t=>t.key===e))},[]),m=V.useMemo(()=>({tabs:r,activeKey:c,register:u,pin:d,close:f,closeOthers:p}),[r,c,u,d,f,p]);return(0,H.jsx)(kr.Provider,{value:m,children:e})}function Pr(e){if(Or(e.href)===e.key)return e;let t=Fr(e.key);return t?{...e,href:t}:null}function Fr(e){let t=e.indexOf(`:`),n=t<0?e:e.slice(0,t),r=t<0?``:e.slice(t+1);return n===`overview`?`/`:(n===`run`||n===`request`)&&r?`/${n}s/${r}`:n===`script`&&r?`/sessions?entry=${encodeURIComponent(r)}`:Er.has(n)?`/${n}`:null}function Ir(e,t){let n=Array.isArray(e)?e.filter(e=>e&&typeof e.key==`string`&&typeof e.href==`string`).map(Pr).filter(e=>e!=null):[],r=new Set(n.map(e=>e.key)),i=t.filter(e=>!r.has(e.key)),a=[...n,...i],o=!1;return a.toReversed().map(e=>e.preview?o?{...e,preview:!1}:(o=!0,e):e).toReversed()}export{An as $,O as $t,Xn as A,qe as At,cr as B,fe as Bt,Zn as C,sn as Ct,er as D,X as Dt,In as E,fn as Et,Jn as F,Se as Ft,wn as G,I as Gt,zn as H,B as Ht,Yn as I,he as It,bn as J,N as Jt,Cn as K,ne as Kt,Pn as L,U as Lt,nr as M,He as Mt,tr as N,G as Nt,Hn as O,Y as Ot,Bn as P,we as Pt,kn as Q,p as Qt,Mn as R,me as Rt,or as S,on as St,Qn as T,cn as Tt,Nn as U,z as Ut,sr as V,ce as Vt,hn as W,A as Wt,jn as X,S as Xt,xn as Y,M as Yt,Sn as Z,te as Zt,Wn as _,r as _n,pn as _t,Tr as a,f as an,Yt as at,qn as b,Kt as bt,gr as c,v as cn,Zt as ct,yr as d,w as dn,Ut as dt,_ as en,gn as et,vr as f,h as fn,mn as ft,pr as g,i as gn,Gt as gt,xr as h,a as hn,en as ht,Ar as i,C as in,dn as it,$n as j,We as jt,rr as k,Ye as kt,_r as l,l as ln,Wt as lt,Cr as m,c as mn,tn as mt,$ as n,D as nn,Dn as nt,Sr as o,d as on,Xt as ot,ur as p,s as pn,Ht as pt,_n as q,F as qt,Mr as r,u as rn,un as rt,dr as s,T as sn,Jt as st,Nr as t,k as tn,On as tt,fr as u,m as un,ln as ut,ar as v,Qt as vt,Kn as w,$t as wt,Vn as x,Vt as xt,ir as y,qt as yt,lr as z,de as zt};
|
|
@@ -3,7 +3,7 @@ import { existsSync, statSync } from "node:fs";
|
|
|
3
3
|
import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
4
|
import Database from "better-sqlite3";
|
|
5
5
|
import { homedir } from "node:os";
|
|
6
|
-
//#region node_modules/.nitro/vite/services/ssr/assets/api-
|
|
6
|
+
//#region node_modules/.nitro/vite/services/ssr/assets/api-DUem3i24.js
|
|
7
7
|
var createServerRpc = (serverFnMeta, splitImportFn) => {
|
|
8
8
|
const url = "/_serverFn/" + serverFnMeta.id;
|
|
9
9
|
return Object.assign(splitImportFn, {
|
|
@@ -500,6 +500,28 @@ function listEnvs(db) {
|
|
|
500
500
|
FROM runs GROUP BY env ORDER BY last_started_at DESC`).all();
|
|
501
501
|
}
|
|
502
502
|
/**
|
|
503
|
+
* Every script's runs per environment, so the session list can be scoped to
|
|
504
|
+
* the environment picker without holding the runs themselves.
|
|
505
|
+
*
|
|
506
|
+
* The bare columns come from the row that produced MAX(started_at) — the same
|
|
507
|
+
* documented SQLite guarantee `listScripts` relies on — so they describe each
|
|
508
|
+
* group's newest run.
|
|
509
|
+
*/
|
|
510
|
+
function listScriptEnvs(db) {
|
|
511
|
+
return db.prepare(`SELECT entry,
|
|
512
|
+
env,
|
|
513
|
+
COUNT(*) AS run_count,
|
|
514
|
+
id AS last_run_id,
|
|
515
|
+
MAX(started_at) AS last_started_at,
|
|
516
|
+
exit_status,
|
|
517
|
+
finished_at,
|
|
518
|
+
error_count,
|
|
519
|
+
failed_check_count
|
|
520
|
+
FROM v_runs
|
|
521
|
+
GROUP BY entry, env
|
|
522
|
+
ORDER BY last_started_at DESC`).all();
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
503
525
|
* An FTS5 MATCH expression for free text.
|
|
504
526
|
*
|
|
505
527
|
* Every term is quoted, so what someone types is always searched for as words
|
|
@@ -579,9 +601,9 @@ function slowestEndpoints(db, env, limit = 8) {
|
|
|
579
601
|
ORDER BY avg_ms DESC LIMIT ?`).all(...e.params, limit);
|
|
580
602
|
}
|
|
581
603
|
/**
|
|
582
|
-
* The requests a script makes, once each —
|
|
604
|
+
* The requests a script makes, once each — the Requests tab of its session.
|
|
583
605
|
*
|
|
584
|
-
* A script has no saved request definitions; its
|
|
606
|
+
* A script has no saved request definitions; its endpoint list is whatever it
|
|
585
607
|
* actually called. Ordered by where each endpoint first appears in a run, which
|
|
586
608
|
* reads as the script's own order. The `last_*` columns come from joining the
|
|
587
609
|
* newest exchange back in: SQLite only takes bare columns from the MAX() row
|
|
@@ -732,8 +754,6 @@ function describe(row) {
|
|
|
732
754
|
...describeEntry(pathRoot(dbPath()), row.entry)
|
|
733
755
|
};
|
|
734
756
|
}
|
|
735
|
-
/** Runs the sidebar holds. Older ones stay reachable from their script's page. */
|
|
736
|
-
var RUN_WINDOW = 500;
|
|
737
757
|
var getWorkspace_createServerFn_handler = createServerRpc({
|
|
738
758
|
id: "65bc418eb60581304ebde68d2b8b775b58aa758789bcdd2e616a2bdd5657ef20",
|
|
739
759
|
name: "getWorkspace",
|
|
@@ -760,7 +780,7 @@ var getWorkspace = createServerFn({ method: "GET" }).handler(getWorkspace_create
|
|
|
760
780
|
counts: null,
|
|
761
781
|
envs: [],
|
|
762
782
|
scripts: [],
|
|
763
|
-
|
|
783
|
+
scriptEnvs: []
|
|
764
784
|
};
|
|
765
785
|
return {
|
|
766
786
|
...base,
|
|
@@ -768,7 +788,7 @@ var getWorkspace = createServerFn({ method: "GET" }).handler(getWorkspace_create
|
|
|
768
788
|
counts: workspaceCounts(db),
|
|
769
789
|
envs: listEnvs(db),
|
|
770
790
|
scripts: listScripts(db).map(describe),
|
|
771
|
-
|
|
791
|
+
scriptEnvs: listScriptEnvs(db)
|
|
772
792
|
};
|
|
773
793
|
});
|
|
774
794
|
var getOverview_createServerFn_handler = createServerRpc({
|
|
@@ -850,15 +870,6 @@ var getScript = createServerFn({ method: "GET" }).validator((input) => {
|
|
|
850
870
|
checks: listCheckHistory(db, data.entry, data.env)
|
|
851
871
|
};
|
|
852
872
|
});
|
|
853
|
-
var getRunRequests_createServerFn_handler = createServerRpc({
|
|
854
|
-
id: "3828e982aebdd19568d199b4820f9fb3ca9fab2c60ce502ee35e3f6075d422c9",
|
|
855
|
-
name: "getRunRequests",
|
|
856
|
-
filename: "src/server/api.ts"
|
|
857
|
-
}, (opts) => getRunRequests.__executeServer(opts));
|
|
858
|
-
var getRunRequests = createServerFn({ method: "GET" }).validator((input) => ({ runId: id(record(input).runId, "runId") })).handler(getRunRequests_createServerFn_handler, async ({ data }) => {
|
|
859
|
-
const db = readable();
|
|
860
|
-
return db ? listRequests(db, data.runId) : [];
|
|
861
|
-
});
|
|
862
873
|
var getRun_createServerFn_handler = createServerRpc({
|
|
863
874
|
id: "56c165307cd91159eb72bfa882932f9552f05a5bbd6b5725f0fd5f4ad6b8295d",
|
|
864
875
|
name: "getRun",
|
|
@@ -928,4 +939,4 @@ var runSql = createServerFn({ method: "POST" }).validator((input) => {
|
|
|
928
939
|
return runQuery(db, data.sql);
|
|
929
940
|
});
|
|
930
941
|
//#endregion
|
|
931
|
-
export { getHistory_createServerFn_handler, getOverview_createServerFn_handler, getRequest_createServerFn_handler,
|
|
942
|
+
export { getHistory_createServerFn_handler, getOverview_createServerFn_handler, getRequest_createServerFn_handler, getRun_createServerFn_handler, getSchema_createServerFn_handler, getScript_createServerFn_handler, getWorkspace_createServerFn_handler, runSql_createServerFn_handler };
|