omnigateway 0.15.2 → 0.15.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 +90 -6
- package/bin/omni.js +218 -190
- package/gateway.js +390 -338
- package/package.json +1 -1
- package/public/assets/_app-kgxk7ake.js +1 -0
- package/public/assets/_app.accounts-3jabfvcs.js +1 -0
- package/public/assets/_app.console-y69399jc.js +1 -0
- package/public/assets/_app.database-r5kg3838.js +1 -0
- package/public/assets/_app.index-22awhb38.js +1 -0
- package/public/assets/_app.keys-7vh81n1w.js +1 -0
- package/public/assets/_app.logs-rssv5a6z.js +1 -0
- package/public/assets/_app.models-82m2f0kr.js +1 -0
- package/public/assets/_app.plugins.$pluginId-e4xva5tz.js +1 -0
- package/public/assets/_app.settings-fqzg7wnn.js +1 -0
- package/public/assets/_app.usage-32vje0s7.js +1 -0
- package/public/assets/client-d3mjj5ey.js +1 -0
- package/public/assets/index-0j7sghrn.js +2 -0
- package/public/assets/index-4dz4bgrb.js +2 -0
- package/public/assets/index-85cnhw3e.js +2 -0
- package/public/assets/index-8bewp9z1.js +6 -0
- package/public/assets/index-938qd7p2.js +2 -0
- package/public/assets/index-d09hs7ex.js +2 -0
- package/public/assets/index-d0t1fj1y.js +2 -0
- package/public/assets/index-dq2f7yk0.js +2 -0
- package/public/assets/index-f7t0kve8.js +2 -0
- package/public/assets/index-fcew0gga.js +2 -0
- package/public/assets/index-h3nb7n4d.css +1 -0
- package/public/assets/index-hk28xepa.js +2 -0
- package/public/assets/index-nnpqs2w6.js +2 -0
- package/public/assets/index-p9vbm21a.js +46 -0
- package/public/assets/index-sbe0ydnc.js +2 -0
- package/public/assets/index-t1cs42r4.js +2 -0
- package/public/assets/index-v31xha7b.js +2 -0
- package/public/assets/index-wjqdtafp.js +2 -0
- package/public/assets/index-xdyjb1an.js +2 -0
- package/public/assets/index-z7c4qz9d.js +54 -0
- package/public/assets/index-zkt5p0qd.js +2 -0
- package/public/assets/login-p97b96t9.js +1 -0
- package/public/index.html +5 -13
- package/public/shared/chunks/react-e7vf2dk6.js +2 -0
- package/public/shared/chunks/react-mv7wrde1.js +2 -0
- package/public/shared/chunks/react-ybbhws22.js +2 -0
- package/public/shared/chunks/react-z0w6knjn.js +2 -0
- package/public/shared/dashboard-sdk.js +1 -1
- package/public/shared/jsx-runtime.js +1 -1
- package/public/shared/react-dom-client.js +9 -9
- package/public/shared/react-dom.js +1 -1
- package/public/shared/react-query.js +1 -1
- package/public/shared/react.js +1 -1
- package/public/shared/styled-components.js +5 -6
- package/public/assets/Chip-C3dIFd8s.js +0 -37
- package/public/assets/CopyValue-DG88CWpN.js +0 -27
- package/public/assets/Field-EvdVyEqx.js +0 -83
- package/public/assets/Lamp-CL0i4yaa.js +0 -26
- package/public/assets/Meter-stpt3vQu.js +0 -14
- package/public/assets/Panel-CsovmtxF.js +0 -225
- package/public/assets/Rack-DMrfn4-H.js +0 -483
- package/public/assets/Readout-DlT5oxGO.js +0 -31
- package/public/assets/RequestTable-CtuuMOT2.js +0 -93
- package/public/assets/SummaryDeck-DHsYYpYO.js +0 -15
- package/public/assets/Table-CVDZ69Zx.js +0 -38
- package/public/assets/Toggle-BTie3NY8.js +0 -39
- package/public/assets/TokenBreakdown-Bf0zsKcd.js +0 -32
- package/public/assets/WindowChart-CaPUJ4GJ.js +0 -11
- package/public/assets/_app-CSru2YTE.js +0 -1
- package/public/assets/_app.accounts-xCJhRd32.js +0 -70
- package/public/assets/_app.console-DS37cfIu.js +0 -24
- package/public/assets/_app.database-BCwEMrEA.js +0 -24
- package/public/assets/_app.index-DW6wain4.js +0 -67
- package/public/assets/_app.keys-CCU2NB3-.js +0 -120
- package/public/assets/_app.logs-CRC5qDK3.js +0 -46
- package/public/assets/_app.models-B4brzRdK.js +0 -148
- package/public/assets/_app.plugins._pluginId-CD9KXknf.js +0 -20
- package/public/assets/_app.settings-NJSb_L2B.js +0 -88
- package/public/assets/_app.usage-BR6a92zI.js +0 -78
- package/public/assets/chevron-down-3tlYNJqZ.js +0 -1
- package/public/assets/chevron-right-kvaJRnfj.js +0 -1
- package/public/assets/client-B9t0CsmA.js +0 -46
- package/public/assets/dist-B8iuo_hI.js +0 -1
- package/public/assets/index-6rZSWe9j.js +0 -14
- package/public/assets/index-Co2s5xMk.css +0 -1
- package/public/assets/limits-iRyDMg04.js +0 -1
- package/public/assets/login-NuwPF5SS.js +0 -45
- package/public/assets/plus-CVqm87L-.js +0 -1
- package/public/assets/preload-helper-1xe0b53X.js +0 -1
- package/public/assets/reasons-Du1OBWAM.js +0 -1
- package/public/assets/rotate-ccw-Dionx_MW.js +0 -1
- package/public/assets/shared-HVgLEGgl.js +0 -77
- package/public/assets/trash-Bsi60qJc.js +0 -1
- package/public/shared/chunks/jsx-runtime-CznXPbDH.js +0 -1
- package/public/shared/chunks/react-DK6rpPfu.js +0 -1
- package/public/shared/chunks/react-dom-Wr82bmbV.js +0 -1
- package/public/shared/chunks/rolldown-runtime-CbXtAM7H.js +0 -1
- /package/public/assets/{archivo-latin-ext-standard-normal-7khWdh9v.woff2 → archivo-latin-ext-standard-normal-5717f37059660ca5.woff2} +0 -0
- /package/public/assets/{archivo-latin-standard-normal-DY7AcnAa.woff2 → archivo-latin-standard-normal-e3a28eade21a900c.woff2} +0 -0
- /package/public/assets/{archivo-vietnamese-standard-normal-rJmnGBSt.woff2 → archivo-vietnamese-standard-normal-332e6f66de84927c.woff2} +0 -0
- /package/public/assets/{spline-sans-mono-latin-ext-wght-normal-Dh0aNLWd.woff2 → spline-sans-mono-latin-ext-wght-normal-0ca9a3989044d1f9.woff2} +0 -0
- /package/public/assets/{spline-sans-mono-latin-wght-normal-DlaB5ohX.woff2 → spline-sans-mono-latin-wght-normal-46b7dcafe3e51dbe.woff2} +0 -0
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import{y as e}from"./Panel-CsovmtxF.js";import{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"styled-components";var a=`
|
|
2
|
-
width: 100%;
|
|
3
|
-
border-radius: 3px;
|
|
4
|
-
transition: border-color 120ms ease;
|
|
5
|
-
`,o=i.input`
|
|
6
|
-
${a}
|
|
7
|
-
height: 30px;
|
|
8
|
-
padding: 0 8px;
|
|
9
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
10
|
-
border: 1px solid ${({theme:e})=>e.color.ruleStrong};
|
|
11
|
-
color: ${({theme:e})=>e.color.ink};
|
|
12
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
13
|
-
font-size: 12px;
|
|
14
|
-
|
|
15
|
-
&::placeholder {
|
|
16
|
-
color: ${({theme:e})=>e.color.inkFaint};
|
|
17
|
-
font-family: ${({theme:e})=>e.font.sans};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:hover:not(:disabled) {
|
|
21
|
-
border-color: ${({theme:e})=>e.color.accent};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:disabled {
|
|
25
|
-
opacity: 0.5;
|
|
26
|
-
}
|
|
27
|
-
`,s=i.textarea`
|
|
28
|
-
${a}
|
|
29
|
-
min-height: 120px;
|
|
30
|
-
padding: 6px 8px;
|
|
31
|
-
resize: vertical;
|
|
32
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
33
|
-
border: 1px solid ${({theme:e})=>e.color.ruleStrong};
|
|
34
|
-
color: ${({theme:e})=>e.color.ink};
|
|
35
|
-
font-family: ${({theme:e})=>e.font.sans};
|
|
36
|
-
font-size: 12px;
|
|
37
|
-
line-height: 1.5;
|
|
38
|
-
|
|
39
|
-
&:hover:not(:disabled) {
|
|
40
|
-
border-color: ${({theme:e})=>e.color.accent};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:disabled {
|
|
44
|
-
opacity: 0.5;
|
|
45
|
-
}
|
|
46
|
-
`,c=i.select`
|
|
47
|
-
${a}
|
|
48
|
-
appearance: none;
|
|
49
|
-
height: 30px;
|
|
50
|
-
padding: 0 26px 0 8px;
|
|
51
|
-
background-color: ${({theme:e})=>e.color.panelSunk};
|
|
52
|
-
background-image:
|
|
53
|
-
linear-gradient(45deg, transparent 50%, ${({theme:e})=>e.color.inkDim} 50%),
|
|
54
|
-
linear-gradient(135deg, ${({theme:e})=>e.color.inkDim} 50%, transparent 50%);
|
|
55
|
-
background-position:
|
|
56
|
-
calc(100% - 15px) 50%,
|
|
57
|
-
calc(100% - 10px) 50%;
|
|
58
|
-
background-size: 5px 5px;
|
|
59
|
-
background-repeat: no-repeat;
|
|
60
|
-
border: 1px solid ${({theme:e})=>e.color.ruleStrong};
|
|
61
|
-
color: ${({theme:e})=>e.color.ink};
|
|
62
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
63
|
-
font-size: 12px;
|
|
64
|
-
cursor: pointer;
|
|
65
|
-
|
|
66
|
-
&:hover:not(:disabled) {
|
|
67
|
-
border-color: ${({theme:e})=>e.color.accent};
|
|
68
|
-
}
|
|
69
|
-
`,l=i.div`
|
|
70
|
-
display: flex;
|
|
71
|
-
flex-direction: column;
|
|
72
|
-
gap: 4px;
|
|
73
|
-
min-width: 0;
|
|
74
|
-
`,u=i.p`
|
|
75
|
-
font-size: 11px;
|
|
76
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
77
|
-
`,d=i.p`
|
|
78
|
-
font-size: 11px;
|
|
79
|
-
color: ${({theme:e})=>e.color.down};
|
|
80
|
-
`;function f({label:i,hint:a,problem:o,children:s}){let c=t(),f=o===void 0?a===void 0?void 0:`${c}-hint`:`${c}-problem`;return r(l,{children:[n(e,{as:`label`,htmlFor:c,children:i}),s({id:c,"aria-describedby":f}),o===void 0?a===void 0?null:n(u,{id:`${c}-hint`,children:a}):n(d,{id:`${c}-problem`,children:o})]})}var p=i(o).attrs({type:`number`,inputMode:`decimal`})`
|
|
81
|
-
text-align: right;
|
|
82
|
-
padding-right: 6px;
|
|
83
|
-
`;export{s as a,c as i,o as n,p as r,f as t};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{d as e,f as t,g as n,h as r,j as i,m as a,p as o,u as s}from"./Panel-CsovmtxF.js";import{queryOptions as c,useInfiniteQuery as l,useMutation as u,useQuery as d,useQueryClient as f}from"@tanstack/react-query";import*as p from"react";import m,{useCallback as h,useDebugValue as g,useEffect as _,useMemo as v,useRef as y,useSyncExternalStore as b}from"react";import{jsx as x}from"react/jsx-runtime";import S,{css as C,keyframes as w}from"styled-components";var T=p.use,E=p.useLayoutEffect;function ee(e,t,n){p.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function te(e){let t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}function D(e){return e[e.length-1]}function ne(e,t){return typeof e==`function`?e(t):e}var O=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable;function ie(e){for(let t in e)if(O.call(e,t))return!0;return!1}var ae=()=>Object.create(null),oe=(e,t)=>se(e,t,ae);function se(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=de(e)&&de(i);if(!a&&!(le(e)&&le(i)))return i;let o=a?e:ce(e);if(!o)return i;let s=a?i:ce(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:O.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=se(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ce(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!re.call(e,r))return!1;t.push(r)}return t}function le(e){if(!ue(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ue(n)||!n.hasOwnProperty(`isPrototypeOf`))}function ue(e){return Object.prototype.toString.call(e)===`[object Object]`}function de(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!k(e[r],t[r],n))return!1;return!0}if(le(e)&&le(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!k(e[i],t[i],n))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++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!k(e[o],t[o],n)))return!1;return i===a}return!1}function fe(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 pe=/[\x00-\x1f\x7f"<>`{}]/g;function me(e){return e.replace(pe,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function he(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 me(t)}var ge=[`http:`,`https:`,`mailto:`,`tel:`];function A(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 j=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function M(e,t){if(!e)return!1;if(j.test(e))return!0;let n=A(e);return n?!t.has(n):!1}function _e(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+=he(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=he(r?e.slice(r):e)}return t}function N(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function P(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 F(){throw Error(`Invariant failed`)}function I(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var L=4,R=5;function z(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function B(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=z(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=H(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=U(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=H(r);e.kind=R,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=H(r);e.kind=L,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)B(e,t,r,c,i,a,o,s)}function V(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function H(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function U(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function ve(e,t){let n=H(`/`),r=new Uint16Array(6),i=[];for(let t of e)B(!1,r,t,1,n,0,i);for(let e of i)e.sort(V);t.masksTree=n,t.flatCache=I(1e3)}function W(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Ce(e,t.masksTree);return t.flatCache.set(e,r),r}function ye(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=H(`/`),B(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Ce(r,o,n)}function be(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Ce(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Te(a.route)),t.matchCache.set(r,a),a}function xe(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function Se(e,t=!1,n){let r=H(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;B(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&F(),o[e.id]=e,c!==0&&e.path){let t=xe(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(V);return{processedTree:{segmentTree:r,singleCache:I(1e3),matchCache:I(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Ce(e,t,n=!1){let r=e.split(`/`),i=De(e,r,t,n);if(!i)return null;let[a]=we(e,r,i);return{route:i.node.route,rawParams:a}}function we(e,t,n){let r=Ee(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===L)break;if(u.kind===R){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function Te(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ee(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function De(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!D(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Ae(l,n))continue;if(i.parse){if(!ke(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==L&&Ae(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===L||i.kind===2)&&Ae(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(ke(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Oe(f,o))return n;Ae(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+G(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+G(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+G(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+G(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function G(e,t){return 2**(e-t-1)}function Oe(e,t){return e===2**(t-1)-1}function ke(e,t,n){let r,i;try{[r,i]=we(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Ae(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===L)>(e.node.kind===L)||t.node.kind===L==(e.node.kind===L)&&t.node.depth>e.node.depth)))}function je(e){return Me(e.filter(e=>e!==void 0).join(`/`))}function Me(e){return e.replace(/\/{2,}/g,`/`)}function Ne(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function Pe(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Fe(e){return Pe(Ne(e))}function Ie(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Le({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=Me(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=Me(e)),o=e.split(`/`);o.length>1&&D(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&&(D(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?Me(s):s)||`/`;return a&&r&&r.set(a,c),c}function Re(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function ze(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ve(e,n)).join(`/`):Ve(r,n):r}function Be({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=z(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=ze(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ze(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ze(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ve(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var He=`Error preloading route! ☝️`;function Ue({children:e,fallback:t=null}){return x(m.Fragment,{children:We()?e:t})}function We(){return m.useSyncExternalStore(Ge,()=>!0,()=>!1)}function Ge(){return()=>{}}function Ke(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var qe=typeof Object.is==`function`?Object.is:Ke;function Je(e,t,n,r,i){let a=y(null),o;a.current===null?(o={hasValue:!1,value:null},a.current=o):o=a.current;let[s,c]=v(()=>{let e=!1,a,s,c=t=>{if(!e){e=!0,a=t;let n=r(t);if(i!==void 0&&o.hasValue){let e=o.value;if(i(e,n))return s=e,e}return s=n,n}let n=s;if(qe(a,t))return n;let c=r(t);return i?.(n,c)?(a=t,n):(a=t,s=c,c)},l=n===void 0?null:n;return[()=>c(t()),l===null?void 0:()=>c(l())]},[t,n,r,i,o]),l=b(e,s,c);return _(()=>{o.hasValue=!0,o.value=l},[l,o]),g(l),l}function Ye(e,t){return e===t}function Xe(e,t,n=Ye){let r=h(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=h(()=>e?.get(),[e]);return Je(r,i,i,t,n)}function Ze(e){let t=i();return p.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Qe(e){let t=p.useRef(e);return k(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function $e(e,t){return e[0]===t[0]&&e[1]===t[1]}function et(e,t){let n=typeof e==`string`&&A(e);if(n)return t.has(n)?e:null}function tt(e,t,n,r,i){let a=Ie(e.pathname,r),o=Ie(t.pathname,r);return(n?.exact?a!==o:!a.startsWith(o)||a.length!==o.length&&a[o.length]!==`/`)||(n?.includeSearch??!0)&&!k(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function nt(e,t){let n=i(),r=te(t),{activeProps:a,inactiveProps:o,activeOptions:s,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:re,params:ie,search:ae,hash:oe,state:se,mask:ce,reloadDocument:le,unsafeRelative:ue,from:de,_fromLocation:k,...fe}=e,pe=c,me=We(),he=Qe(e.search),ge=Qe(e.params),j=Qe(s),M=p.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,he,ge,e.state,e.mask,e.unsafeRelative]),_e=p.useCallback(e=>{let t=et(pe,n.protocolAllowlist);if(t!==void 0)return[t??void 0];let r=n.buildLocation({_fromLocation:e,...M}),i=ct(r,n,b);return[i,!b&&(!i||A(i))?void 0:tt(e,r,j,n.basepath,me)]},[j,b,me,M,n,pe]),[N,P]=Xe(n.stores.location,_e,$e),F=P===void 0?N:void 0,I=b||N===void 0,L=p.useRef(!1),R=e.reloadDocument||F||I?!1:l??n.options.defaultPreload,z=u??n.options.defaultPreloadDelay??0,B=p.useCallback(()=>{n.preloadRoute(M).catch(e=>{console.warn(e),console.warn(He)})},[n,M]),V=p.useCallback(e=>{if(!e){st(r);return}if(!(e.isIntersecting??R===`intent`)){e.isIntersecting===!1&&st(r);return}if(!z){B();return}K.has(r)||K.set(r,setTimeout(()=>{K.delete(r),B()},z))},[B,r,R,z]);if(ee(r,V,R!==`viewport`),p.useEffect(()=>{L.current||R===`render`&&(B(),L.current=!0)},[B,R]),F)return{...fe,ref:r,href:F,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let H=ne(P?a:o,{})??(P?it:rt),U=H.className,ve=S?U?`${S} ${U}`:S:U,W=H.style,ye=x&&W?{...x,...W}:x||W,be=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;!I&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...M,replace:m,resetScroll:g,hashScrollIntoView:f,startTransition:h,viewTransition:_,ignoreBlocker:re}))},xe=()=>{R===`intent`&&B()},Se=()=>{R===`intent`&&st(r)};return{...fe,...H,href:N,ref:r,onClick:q(C,be),onBlur:q(w,Se),onFocus:q(T,V),onMouseEnter:q(E,V),onMouseLeave:q(D,Se),onTouchStart:q(O,xe),disabled:!!I,target:y,...ye&&{style:ye},...ve&&{className:ve},...I&&at,...P&&ot}}var rt={},it={className:`active`},at={role:`link`,"aria-disabled":!0},ot={"data-status":`active`,"aria-current":`page`},K=new WeakMap,st=e=>{clearTimeout(K.get(e)),K.delete(e)},q=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function ct(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||!M(i,t.protocolAllowlist))return i}var lt=p.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=nt(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;a=t}return p.createElement(n||`a`,a,o)}),ut=[`since`,`until`,`state`,`failed`,`provider`,`requestedModel`,`resolvedModel`,`model`,`credentialId`,`apiKeyId`,`errorCode`],dt=e=>JSON.stringify(ut.map(t=>e[t]??null)),ft=e=>{let t={};for(let n of ut){let r=e[n];r!==void 0&&r!==``&&(t[n]=r)}return t},J={status:[`status`],credentials:[`credentials`],credentialHealth:[`credentials`,`health`],models:[`models`],keys:[`keys`],settings:[`settings`],agentSetup:(e,t)=>[`agent-setup`,e,t??null],usage:e=>[`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null,e.credentialId??null,e.apiKeyId??null],quotaHistory:e=>[`quota-history`,e.credentialId,e.since,e.until??null],logs:e=>[`logs`,e],logPages:(e,t)=>[`logPages`,t,dt(e)],requestBody:e=>[`logs`,`body`,e],clientSummary:[`client`,`summary`],clientUsage:e=>[`client`,`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],clientLogs:e=>[`client`,`logs`,e],clientLogPages:(e,t)=>[`client`,`logPages`,t,dt(e)],clientQuota:[`client`,`quota`],clientQuotaHistory:e=>[`client`,`quota-history`,e.since,e.until??null],console:(e,t,n)=>[`console`,e,t,n],nodes:[`nodes`],database:[`database`],snapshots:[`database`,`snapshots`],lifecycle:[`lifecycle`],plugins:[`plugins`],catalog:[`catalog`]},pt=c({queryKey:J.catalog,queryFn:async({signal:t})=>{let{providers:n}=await e(`/api/catalog`,t);return[...n].sort((e,t)=>e.order-t.order)},staleTime:3e5});function mt(){return d(pt)}function ht(e,t){return e.find(e=>e.id===t)}function gt(){return d({queryKey:J.status,queryFn:({signal:t})=>e(`/api/status`,t),staleTime:3e4})}function _t(){return d({queryKey:J.credentials,queryFn:async({signal:t})=>(await e(`/api/credentials`,t)).credentials})}function vt(t=1e4){return d({queryKey:J.credentialHealth,queryFn:({signal:t})=>e(`/api/credentials/health`,t),refetchInterval:t})}function yt(t,r=!0){return d({queryKey:J.quotaHistory(t),enabled:r,queryFn:({signal:r})=>e(n(`/api/credentials/quota/history`,{credentialId:t.credentialId,since:t.since,...t.until===void 0?{}:{until:t.until}}),r),refetchInterval:!1})}function bt(){return d({queryKey:J.models,queryFn:async({signal:t})=>(await e(`/api/models`,t)).models})}function xt(){return d({queryKey:J.keys,queryFn:async({signal:t})=>(await e(`/api/keys`,t)).keys})}var St={queryKey:J.settings,queryFn:({signal:t})=>e(`/api/settings`,t)};function Ct(){return d({...St,select:e=>e.settings})}function wt(){return d({...St,select:e=>e.bodyLoggingAllowed&&e.settings.bodyLoggingEnabled})}function Tt(){return d({...St,select:e=>e.bodyLoggingAllowed})}function Et(){return d({...St,select:e=>e.dayOffsetMinutes??null})}function Dt(t,r){return d({queryKey:J.agentSetup(t,r),enabled:r!==void 0,queryFn:async({signal:i})=>(await e(n(`/api/agent-setup`,{client:t,...r??{}}),i)).files})}function Ot(t,r=6e4){return d({queryKey:J.usage(t),queryFn:async({signal:r})=>(await e(n(`/api/usage`,{groupBy:t.groupBy,since:t.since,...t.grain===void 0?{}:{grain:t.grain},...t.splitBy===void 0?{}:{splitBy:t.splitBy},...t.until===void 0?{}:{until:t.until},...t.credentialId===void 0?{}:{credentialId:t.credentialId},...t.apiKeyId===void 0?{}:{apiKeyId:t.apiKeyId}}),r)).rows,refetchInterval:r})}var Y=2e3;function kt(t=100,r=Y){return d({queryKey:J.logs(t),queryFn:async({signal:r})=>(await e(n(`/api/logs`,{limit:t}),r)).logs,refetchInterval:r})}function At(e){if(e===void 0)return!0;let t=e?.pages;return!Array.isArray(t)||t.length<=1}function jt(e){let t=f();return()=>{t.cancelQueries({queryKey:e}).then(()=>{t.setQueryData(e,e=>e===void 0?e:{pages:e.pages.slice(0,1),pageParams:e.pageParams.slice(0,1)})})}}function Mt(t,r=100,i=Y){return l({queryKey:J.logPages(t,r),initialPageParam:null,queryFn:async({pageParam:i,signal:a})=>{let o=await e(n(`/api/logs`,{...ft(t),limit:r,...i===null?{}:{cursor:i}}),a);return{logs:o.logs,nextCursor:o.nextCursor??null}},getNextPageParam:e=>e.nextCursor,refetchInterval:e=>At(e.state.data)?i:!1})}function Nt(t){return d({queryKey:J.requestBody(t??``),enabled:t!==null,queryFn:({signal:n})=>e(`/api/requests/${encodeURIComponent(t??``)}/body`,n),refetchInterval:!1})}var Pt=5e3;function Ft(t=200,r=``,i=Pt,a=``){return d({queryKey:J.console(t,r,a),queryFn:async({signal:i})=>e(n(`/api/console`,{lines:t,...r===``?{}:{level:r},...a===``?{}:{node:a}}),i),refetchInterval:i})}var It=3e4;function Lt(){return d({queryKey:J.nodes,queryFn:async({signal:t})=>e(`/api/nodes`,t),refetchInterval:It})}function Rt(){return d({queryKey:J.database,queryFn:({signal:t})=>e(`/api/database`,t),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0})}function zt(e){return`/api/database/snapshots/${encodeURIComponent(e)}/download`}function Bt(){return d({queryKey:J.snapshots,queryFn:async({signal:t})=>(await e(`/api/database/snapshots`,t)).snapshots,refetchInterval:!1})}function X(e){e.invalidateQueries({queryKey:J.database})}function Vt(){let e=f();return u({mutationFn:()=>o(`/api/database/snapshots`),onSuccess:()=>X(e)})}function Ht(){let e=f();return u({mutationFn:e=>a(`/api/database/retention`,e),onSuccess:()=>{X(e),e.invalidateQueries({queryKey:J.settings})}})}function Ut(){let e=f();return u({mutationFn:()=>o(`/api/database/vacuum`),onSuccess:()=>X(e)})}function Wt(){let e=f();return u({mutationFn:()=>s(`/api/database/bodies`),onSuccess:()=>{X(e),e.invalidateQueries({queryKey:[`logs`]})}})}function Gt(){let e=f();return u({mutationFn:e=>s(`/api/database/snapshots/${encodeURIComponent(e)}`),onSuccess:()=>X(e)})}function Kt(){return u({mutationFn:e=>o(`/api/database/snapshots/${encodeURIComponent(e)}/restore`)})}function qt(){return u({mutationFn:e=>o(`/api/database/import`,e)})}function Jt(){return d({queryKey:J.lifecycle,queryFn:({signal:t})=>e(`/api/lifecycle`,t),refetchInterval:!1})}function Yt(){return u({mutationFn:()=>o(`/api/lifecycle/restart`)})}function Xt(){return u({mutationFn:()=>o(`/api/lifecycle/shutdown`)})}function Zt(){let e=f();return u({mutationFn:({mode:e,secret:t})=>e===`client`?o(`/api/client/login`,{key:t}):o(`/api/login`,{password:t,...e===`viewer`?{mode:`viewer`}:{}}),onSuccess:()=>e.invalidateQueries()})}function Qt(){let e=f();return u({mutationFn:e=>o(`/api/setup`,{password:e}),onSuccess:()=>e.invalidateQueries()})}function $t(){let e=f();return u({mutationFn:()=>o(`/api/logout`),onSuccess:()=>{e.clear()}})}function en(){let e=f();return u({mutationFn:()=>o(`/api/client/logout`),onSuccess:()=>e.clear()})}var tn={queryKey:J.clientSummary,queryFn:({signal:t})=>e(`/api/client/summary`,t)};function nn(){return d(tn)}function rn(){return d({...tn,select:e=>e.dayOffsetMinutes??null})}function an(t,r=6e4){return d({queryKey:J.clientUsage(t),queryFn:({signal:r})=>e(n(`/api/client/usage`,{groupBy:t.groupBy,since:t.since,...t.grain===void 0?{}:{grain:t.grain},...t.splitBy===void 0?{}:{splitBy:t.splitBy},...t.until===void 0?{}:{until:t.until}}),r),refetchInterval:r})}function on(t=100,r=Y){return d({queryKey:J.clientLogs(t),queryFn:async({signal:r})=>(await e(n(`/api/client/logs`,{limit:t}),r)).logs,refetchInterval:r})}function sn(t,r=100,i=Y){return l({queryKey:J.clientLogPages(t,r),initialPageParam:null,queryFn:async({pageParam:i,signal:a})=>{let{credentialId:o,apiKeyId:s,...c}=t,l=await e(n(`/api/client/logs`,{...ft(c),limit:r,...i===null?{}:{cursor:i}}),a);return{logs:l.logs,nextCursor:l.nextCursor??null}},getNextPageParam:e=>e.nextCursor,refetchInterval:e=>At(e.state.data)?i:!1})}function cn(t=6e4){return d({queryKey:J.clientQuota,queryFn:async({signal:t})=>(await e(`/api/client/quota`,t)).accounts,refetchInterval:t})}function ln(t,r=!0){return d({queryKey:J.clientQuotaHistory(t),enabled:r,queryFn:({signal:r})=>e(n(`/api/client/quota/history`,{since:t.since,...t.until===void 0?{}:{until:t.until}}),r),refetchInterval:3e5})}function un(){let e=f();return u({mutationFn:({id:e,patch:n})=>t(`/api/credentials/${e}`,n),onSuccess:()=>{e.invalidateQueries({queryKey:J.credentials}),e.invalidateQueries({queryKey:J.credentialHealth})}})}function dn(){return gt().data?.principal?.kind===`admin`}function fn(){let e=f();return u({mutationFn:e=>o(`/api/credentials/quota/refresh`,e),onSuccess:()=>{e.invalidateQueries({queryKey:J.credentialHealth}),e.invalidateQueries({queryKey:[`quota-history`]})}})}function pn(t){return d({queryKey:[`credentials`,`resets`,t],queryFn:({signal:n})=>e(`/api/credentials/${t}/resets`,n),enabled:t!==null,staleTime:0})}function mn(){let e=f();return u({mutationFn:({credentialId:e,creditId:t})=>o(`/api/credentials/${e}/resets/redeem`,{creditId:t}),onSuccess:()=>{e.invalidateQueries({queryKey:J.credentialHealth}),e.invalidateQueries({queryKey:[`quota-history`]}),e.invalidateQueries({queryKey:[`credentials`,`resets`]})}})}function hn(){let e=f();return u({mutationFn:e=>s(`/api/credentials/${e}`),onSuccess:()=>{e.invalidateQueries({queryKey:J.credentials}),e.invalidateQueries({queryKey:J.credentialHealth})}})}function gn(){let e=f();return u({mutationFn:e=>a(`/api/models/${encodeURIComponent(e.id)}`,e),onSuccess:()=>e.invalidateQueries({queryKey:J.models})})}function _n(){let e=f();return u({mutationFn:e=>s(`/api/models/${encodeURIComponent(e)}`),onSuccess:()=>e.invalidateQueries({queryKey:J.models})})}function vn(){return u({mutationFn:({modelId:e,need:t})=>o(`/api/models/${encodeURIComponent(e)}/dry-run`,t)})}function yn(){let e=f();return u({mutationFn:e=>o(`/api/keys`,e),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function bn(){let e=f();return u({mutationFn:({id:e,limits:t})=>a(`/api/keys/${e}/limits`,{limits:t}),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function xn(){let e=f();return u({mutationFn:({id:e,modelAllowlist:t})=>a(`/api/keys/${e}/models`,{modelAllowlist:t}),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function Sn(){let e=f();return u({mutationFn:({id:e,expiresAt:t})=>a(`/api/keys/${e}/expiry`,{expiresAt:t}),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function Cn(){let e=f();return u({mutationFn:({id:e,policy:t})=>a(`/api/keys/${e}/guardrail`,{policy:t}),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function wn(){let e=f();return u({mutationFn:e=>s(`/api/keys/${e}`),onSuccess:()=>e.invalidateQueries({queryKey:J.keys})})}function Tn(){let e=f();return u({mutationFn:e=>a(`/api/settings`,e),onSuccess:()=>e.invalidateQueries({queryKey:J.settings})})}function En(){return u({mutationFn:e=>a(`/api/settings/password`,e)})}function Dn(){let e=f();return u({mutationFn:e=>a(`/api/settings/viewer-password`,{password:e}),onSuccess:()=>e.invalidateQueries({queryKey:J.status})})}function On(){return u({mutationFn:e=>o(`/api/connect/start`,e)})}function kn(){let e=f();return u({mutationFn:e=>o(`/api/credentials`,e),onSuccess:()=>e.invalidateQueries({queryKey:J.credentials})})}function An(){let e=f();return u({mutationFn:e=>o(`/api/connect/finish`,e),onSuccess:()=>e.invalidateQueries({queryKey:J.credentials})})}function jn(){return d({queryKey:J.plugins,queryFn:async({signal:t})=>(await e(`/api/plugins`,t)).plugins,staleTime:3e5})}async function Mn(e){let t=await r(`/api/connect/poll`,{method:`POST`,body:{flowId:e},accept:[202]});return t.status===202?{status:`pending`}:t.data}var Nn=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),Pn=new Intl.NumberFormat(`en-US`);function Fn(e){return Number.isFinite(e)?e<1e4?Pn.format(Math.round(e)):Nn.format(e).toLowerCase():`—`}function In(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${Nn.format(e).toLowerCase()}`:`—`}function Ln(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function Rn(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var zn=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function Bn(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=zn.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function Vn(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${Bn(n)} ago`:`in ${Bn(n)}`}function Hn(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}var Un=864e5;function Wn(e,t){let n=new Date(e),r=n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,hour12:!1});return Gn(t)?`${n.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})} ${r}`:r}function Gn(e){return e>=Un}function Kn(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var qn=[`B`,`KiB`,`MiB`,`GiB`,`TiB`];function Jn(e){if(e==null||!Number.isFinite(e))return`—`;if(Math.abs(e)<1024)return`${Math.round(e)} B`;let t=e,n=0;for(;Math.abs(t)>=1024&&n<qn.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${qn[n]}`}function Yn(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var Xn={fiveHour:18e6,daily:864e5,weekly:6048e5};function Zn(e,t){return t!==null&&t>0?t:Xn[e]}var Qn=6e4;function Z(e,t){return e===null||t===null?e===t:Math.abs(e-t)<=Qn}function $n(e,t){return e.resetsAt!==null&&e.resetsAt<=t}function er(e,t){return t===void 0?`unknown`:e.observedAt>0&&t.stale?`stale`:t.ratePerHour===null||e.limit===null||e.limit<=0?`unknown`:t.survives===!1&&t.exhaustsAt!==null?`empty`:t.survives===!0?`ok`:`unknown`}function tr(e,t){if(t.provider!==e.provider)return!1;let n=Symbol(`unusable-endpoint`);return(e=>e===void 0||e===``?void 0:e)(e.endpointId)===(e=>{if(e!==void 0)return typeof e==`string`&&e!==``?e:n})(t.providerData.endpointId)?e.credentialId===void 0||t.id===e.credentialId:!1}var nr=4e3,rr=6e4,ir=(e,t)=>e.revokedAt===null&&(e.expiresAt===null||e.expiresAt>t);function ar(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function Q(e){return e.state===`pending`}function or(e){return e.filter(e=>!Q(e))}function $(e){return Q(e)?!1:e.status>=400||e.errorCode!==null}var sr={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function cr(e){return Q(e)?`live`:$(e)?`down`:`ok`}function lr(e){return Q(e)?`in flight`:$(e)?`failed with ${e.status}`:`succeeded`}function ur(e,t){let n=or(e),r=[],i=0,a=0,o=0,s=0,c=0,l=0;for(let e of n)$(e)&&(i+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),a+=e.costUsd,o+=e.inputTokens,s+=e.outputTokens,c+=e.cacheReadTokens,l+=e.cacheWriteTokens;let u=t/6e4;return{requests:n.length,errors:i,errorRate:n.length===0?0:i/n.length,ratePerMin:u<=0?0:n.length/u,ttftP50:ar(r,.5),ttftP95:ar(r,.95),costUsd:a,inputTokens:o,outputTokens:s,cacheReadTokens:c,cacheWriteTokens:l}}function dr(e,t){let n=or(e),{now:r,spanMs:i,count:a}=t,o=i/a,s=r-i,c=Array.from({length:a},(e,t)=>({at:s+t*o,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),l=Array.from({length:a},()=>[]);for(let e of n){if(e.at<s||e.at>r)continue;let t=Math.min(a-1,Math.floor((e.at-s)/o)),n=c[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,$(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&l[t]?.push(e.ttftMs))}for(let[e,t]of c.entries())t.ttftMs=ar(l[e]??[],.5);return c}var fr={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function pr(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?fr[r]:`disabled`,consecutiveFailures:0}}let i=`ok`,a=``,o=0;for(let n of e){if(o=Math.max(o,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,consecutiveFailures:o}}var mr={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function hr(e){return Math.max(e,6e4)*3}function gr(e,t,n){return e.observedAt<=0||t-e.observedAt>hr(n)}function _r(e,t){return t?.ratePerHour===void 0||t.ratePerHour===null||e.limit===null||e.limit<=0?null:t.ratePerHour/e.limit}function vr(e,t){return e.find(e=>e.windowType===t)}function yr(e,t,n,r,i){return br(e,{stale:gr(e,t,n),rolledOver:$n(e,t),estimateStale:i===void 0||i.stale,survives:i?.survives??null,exhaustsAt:i?.exhaustsAt??null},t,r)}function br(e,t,n,r){let i=mr[e.windowType];if(e.observedAt<=0)return`${i} · never observed`;if(t.stale)return`${i} · stale, read ${r(e.observedAt,n)}`;if(t.rolledOver)return`${i} · rolled over, waiting for the next reading`;if(e.resetsAt===null)return i;let a=`resets ${r(e.resetsAt,n)}`;return t.estimateStale||t.survives!==!1||t.exhaustsAt===null?`${i} · ${a}`:`${i} · ${t.exhaustsAt<=n?`empty now`:`empty ~${Bn(t.exhaustsAt-n)}`} · ${a}`}function xr(e){return{observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.limit===null||e.limit<=0?null:Math.min(1,Math.max(0,e.used/e.limit))}}function Sr(e,t){if(e.usedRatio!==0||t.usedRatio!==0)return!1;let n=Zn(e.windowType,e.windowMs),r=Zn(t.windowType,t.windowMs);return n===r&&Z(e.resetsAt,e.observedAt+n)&&Z(t.resetsAt,t.observedAt+r)&&!Z(t.resetsAt,e.resetsAt)}function Cr(e){let t=e.filter(e=>e.usedRatio!==null).sort((e,t)=>e.observedAt-t.observedAt),n=[],r;for(let e of t){let t={at:e.observedAt,percent:Math.min(100,e.usedRatio*100)},i={resetsAt:e.resetsAt,startsAt:e.resetsAt===null?null:e.resetsAt-Zn(e.windowType,e.windowMs)},a=n[n.length-1],o=r!==void 0&&Sr(r,e);a===void 0||r===void 0||!o&&!Z(e.resetsAt,r.resetsAt)?n.push({key:`window-${n.length}`,points:[t],...i}):(a.points.push(t),a.resetsAt=o?null:i.resetsAt,a.startsAt=o?null:i.startsAt),r=e}return n}function wr(e,t){let{usedRatio:n,observedAt:r}=t;if(n===null)return[...e];let i=e.findLastIndex(e=>Z(e.resetsAt,t.resetsAt)),a=e[i];if(a===void 0)return[...e];let o=a.points[a.points.length-1];if(o===void 0||o.at>=r)return[...e];let s={at:r,percent:Math.min(100,n*100)};return e.map((e,t)=>t===i?{...e,points:[...e.points,s]}:e)}function Tr(e){return e.startsAt===null||e.resetsAt===null?null:{from:{at:e.startsAt,percent:0},to:{at:e.resetsAt,percent:100}}}var Er=36e5;function Dr(e,t){let{usedRatio:n,resetsAt:r,observedAt:i}=e,a=t;if(n===null||r===null||a===null||a<=0)return null;let o=Math.min(100,n*100),s=a*100,c={at:i,percent:o},l=o+s*((r-i)/Er);return l<=100?{from:c,to:{at:r,percent:l}}:{from:c,to:{at:i+(100-o)/s*Er,percent:100}}}var Or={fiveHour:0,daily:1,weekly:2};function kr(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>Or[e.window.windowType]-Or[t.window.windowType])}function Ar(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var jr=w`
|
|
2
|
-
0%, 100% { opacity: 1; }
|
|
3
|
-
50% { opacity: 0.28; }
|
|
4
|
-
`,Mr=C`
|
|
5
|
-
color: ${({theme:e})=>e.color.ok};
|
|
6
|
-
animation: ${jr} 1.2s ease-in-out infinite;
|
|
7
|
-
|
|
8
|
-
@media (prefers-reduced-motion: reduce) {
|
|
9
|
-
animation: none;
|
|
10
|
-
}
|
|
11
|
-
`,Nr={ok:C`
|
|
12
|
-
color: ${({theme:e})=>e.color.ok};
|
|
13
|
-
`,warn:C`
|
|
14
|
-
color: ${({theme:e})=>e.color.warn};
|
|
15
|
-
`,down:C`
|
|
16
|
-
color: ${({theme:e})=>e.color.down};
|
|
17
|
-
`,idle:C`
|
|
18
|
-
color: ${({theme:e})=>e.color.inkFaint};
|
|
19
|
-
`,live:Mr},Pr=S.span`
|
|
20
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
21
|
-
font-size: 12px;
|
|
22
|
-
line-height: 1;
|
|
23
|
-
flex: none;
|
|
24
|
-
transform: translateY(-1.5px);
|
|
25
|
-
${({$state:e})=>Nr[e]}
|
|
26
|
-
`;function Fr({state:e,label:t,className:n}){return x(Pr,{$state:e,className:n,role:`img`,"aria-label":t,title:t,children:sr[e]})}export{En as $,Xt as $t,Jn as A,N as An,kt as At,Gn as B,T as Bn,Yt as Bt,nr as C,Se as Cn,qt as Ct,$n as D,P as Dn,Mt as Dt,ir as E,ge as En,Jt as Et,Bn as F,fe as Fn,yt as Ft,ht as G,Tn as Gt,Pt as H,wn as Ht,Ln as I,D as In,mn as It,J,bn as Jt,At as K,Sn as Kt,Rn as L,oe as Ln,fn as Lt,Hn as M,A as Mn,Lt as Mt,Fn as N,ie as Nn,jn as Nt,er as O,_e as On,Zt as Ot,Kn as P,M as Pn,mt as Pt,Tt as Q,Qt,Vn as R,j as Rn,Nt as Rt,wr as S,ve as Sn,vn as St,Zn as T,F as Tn,xt as Tt,Y as U,gn as Ut,Yn as V,E as Vn,Kt as Vt,pt as W,Ht as Wt,Dt as X,Dn as Xt,zt as Y,xn as Yt,wt as Z,Ct as Zt,Cr as _,Pe as _n,Rt as _t,Tr as a,Ut as an,cn as at,xr as b,be as bn,_n as bt,Ar as c,Xe as cn,an as ct,gr as d,Re as dn,Ft as dt,Bt as en,Wt as et,lr as f,Be as fn,kn as ft,br as g,Ne as gn,_t as gt,yr as h,Fe as hn,vt as ht,dr as i,Ot as in,on as it,Wn as j,ne as jn,bt as jt,tr as k,k as kn,$t as kt,$ as l,Je as ln,An as lt,Dr as m,Le as mn,Vt as mt,mr as n,jt as nn,sn as nt,vr as o,lt as on,ln as ot,cr as p,je as pn,yn as pt,Mn as q,Cn as qt,Or as r,un as rn,en as rt,pr as s,Ze as sn,nn as st,Fr as t,gt as tn,rn as tt,Q as u,Ue as un,On as ut,kr as v,Te as vn,Et as vt,rr as w,I as wn,dn as wt,ur as x,ye as xn,Gt as xt,_r as y,W as yn,hn as yt,In as z,se as zn,pn as zt};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t from"styled-components";var n=t.div`
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: ${({$height:e})=>e}px;
|
|
5
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
6
|
-
border: 1px solid ${({theme:e})=>e.color.rule};
|
|
7
|
-
border-radius: 2px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
`,r=t.div`
|
|
10
|
-
height: 100%;
|
|
11
|
-
width: ${({$fraction:e})=>`${Math.max(0,Math.min(1,e))*100}%`};
|
|
12
|
-
background: ${({$tone:e})=>e};
|
|
13
|
-
transition: width 240ms ease;
|
|
14
|
-
`;function i(e){return e>=.9?`var(--down)`:e>=.7?`var(--warn)`:`var(--ok)`}function a({fraction:t,label:a,height:o=6,tone:s,className:c}){return e(n,{className:c,$height:o,role:`meter`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(Math.max(0,Math.min(1,t))*100),"aria-label":a,title:a,children:e(r,{$fraction:t,$tone:s??i(t)})})}export{a as t};
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import*as e from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r,{css as i,keyframes as a}from"styled-components";var o=e.createContext(null);function s(t){return e.useContext(o)}var c={primary:i`
|
|
2
|
-
background: ${({theme:e})=>e.color.accent};
|
|
3
|
-
color: ${({theme:e})=>e.color.accentInk};
|
|
4
|
-
border-color: ${({theme:e})=>e.color.accent};
|
|
5
|
-
|
|
6
|
-
&:hover:not(:disabled) {
|
|
7
|
-
filter: brightness(1.08);
|
|
8
|
-
}
|
|
9
|
-
`,default:i`
|
|
10
|
-
background: ${({theme:e})=>e.color.panelRaised};
|
|
11
|
-
color: ${({theme:e})=>e.color.ink};
|
|
12
|
-
border-color: ${({theme:e})=>e.color.ruleStrong};
|
|
13
|
-
|
|
14
|
-
&:hover:not(:disabled) {
|
|
15
|
-
border-color: ${({theme:e})=>e.color.accent};
|
|
16
|
-
color: ${({theme:e})=>e.color.accent};
|
|
17
|
-
}
|
|
18
|
-
`,ghost:i`
|
|
19
|
-
background: transparent;
|
|
20
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
21
|
-
border-color: transparent;
|
|
22
|
-
|
|
23
|
-
&:hover:not(:disabled) {
|
|
24
|
-
background: ${({theme:e})=>e.color.panelRaised};
|
|
25
|
-
color: ${({theme:e})=>e.color.ink};
|
|
26
|
-
}
|
|
27
|
-
`,danger:i`
|
|
28
|
-
background: transparent;
|
|
29
|
-
color: ${({theme:e})=>e.color.down};
|
|
30
|
-
border-color: ${({theme:e})=>e.color.down};
|
|
31
|
-
|
|
32
|
-
&:hover:not(:disabled) {
|
|
33
|
-
background: ${({theme:e})=>e.color.downWash};
|
|
34
|
-
}
|
|
35
|
-
`},l={sm:i`
|
|
36
|
-
height: 24px;
|
|
37
|
-
padding: 0 ${({theme:e})=>e.space(2)};
|
|
38
|
-
font-size: 11px;
|
|
39
|
-
`,md:i`
|
|
40
|
-
height: 30px;
|
|
41
|
-
padding: 0 ${({theme:e})=>e.space(3)};
|
|
42
|
-
font-size: 13px;
|
|
43
|
-
`},u=r.button`
|
|
44
|
-
display: inline-flex;
|
|
45
|
-
align-items: center;
|
|
46
|
-
justify-content: center;
|
|
47
|
-
line-height: 1;
|
|
48
|
-
gap: ${({theme:e})=>e.space(1.5)};
|
|
49
|
-
border: 1px solid transparent;
|
|
50
|
-
border-radius: ${({theme:e})=>e.radius.control};
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
white-space: nowrap;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
transition:
|
|
55
|
-
background 120ms ease,
|
|
56
|
-
color 120ms ease,
|
|
57
|
-
border-color 120ms ease;
|
|
58
|
-
|
|
59
|
-
${({$size:e})=>l[e??`md`]}
|
|
60
|
-
${({$variant:e})=>c[e??`default`]}
|
|
61
|
-
|
|
62
|
-
&:disabled {
|
|
63
|
-
opacity: 0.45;
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
svg {
|
|
68
|
-
width: 14px;
|
|
69
|
-
height: 14px;
|
|
70
|
-
transform: translateY(-0.5px);
|
|
71
|
-
}
|
|
72
|
-
`,d=r(u)`
|
|
73
|
-
padding: 0;
|
|
74
|
-
width: ${({$size:e})=>e===`sm`?`24px`:`30px`};
|
|
75
|
-
|
|
76
|
-
svg {
|
|
77
|
-
transform: none;
|
|
78
|
-
}
|
|
79
|
-
`,f=r.span`
|
|
80
|
-
font-size: 10px;
|
|
81
|
-
font-weight: 600;
|
|
82
|
-
font-stretch: 74%;
|
|
83
|
-
letter-spacing: 0.16em;
|
|
84
|
-
text-transform: uppercase;
|
|
85
|
-
color: ${({theme:e})=>e.color.inkFaint};
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
`,p=r.span`
|
|
88
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
89
|
-
font-variant-numeric: tabular-nums;
|
|
90
|
-
font-size: ${({$size:e})=>e??`12px`};
|
|
91
|
-
color: ${({theme:e,$dim:t})=>t===!0?e.color.inkDim:`inherit`};
|
|
92
|
-
`,m=r.span`
|
|
93
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
94
|
-
`,h=r.div`
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: ${({$align:e})=>e??`center`};
|
|
97
|
-
justify-content: ${({$justify:e})=>e??`flex-start`};
|
|
98
|
-
gap: ${({theme:e,$gap:t})=>e.space(t??2)};
|
|
99
|
-
${({$wrap:e})=>e===!0?`flex-wrap: wrap;`:``}
|
|
100
|
-
min-width: 0;
|
|
101
|
-
`,g=r.div`
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
gap: ${({theme:e,$gap:t})=>e.space(t??2)};
|
|
105
|
-
min-width: 0;
|
|
106
|
-
`,_=r.div`
|
|
107
|
-
display: grid;
|
|
108
|
-
grid-template-columns: repeat(auto-fit, minmax(${({$min:e})=>e??`220px`}, 1fr));
|
|
109
|
-
gap: ${({theme:e,$gap:t})=>e.space(t??3)};
|
|
110
|
-
/* Panels size to their content; a short one does not stretch to match a tall one.
|
|
111
|
-
$stretch opts a grid out of that, for a row of tiles that read as one
|
|
112
|
-
instrument: there, one card carrying a meter leaves the rest looking cropped
|
|
113
|
-
rather than merely shorter. */
|
|
114
|
-
align-items: ${({$stretch:e})=>e===!0?`stretch`:`start`};
|
|
115
|
-
`,v=r.hr`
|
|
116
|
-
height: 1px;
|
|
117
|
-
border: 0;
|
|
118
|
-
margin: 0;
|
|
119
|
-
background: ${({theme:e})=>e.color.rule};
|
|
120
|
-
`,y=r.div`
|
|
121
|
-
flex: 1 1 auto;
|
|
122
|
-
min-width: 0;
|
|
123
|
-
`,b=r.div`
|
|
124
|
-
overflow-x: auto;
|
|
125
|
-
overscroll-behavior-x: contain;
|
|
126
|
-
`,x=r.span`
|
|
127
|
-
overflow: hidden;
|
|
128
|
-
text-overflow: ellipsis;
|
|
129
|
-
white-space: nowrap;
|
|
130
|
-
min-width: 0;
|
|
131
|
-
`;r.span`
|
|
132
|
-
position: absolute;
|
|
133
|
-
width: 1px;
|
|
134
|
-
height: 1px;
|
|
135
|
-
padding: 0;
|
|
136
|
-
margin: -1px;
|
|
137
|
-
overflow: hidden;
|
|
138
|
-
clip-path: inset(50%);
|
|
139
|
-
white-space: nowrap;
|
|
140
|
-
`;var S=a`
|
|
141
|
-
0%, 100% { opacity: 1; }
|
|
142
|
-
50% { opacity: 0.35; }
|
|
143
|
-
`,C=i`
|
|
144
|
-
animation: ${S} 2.4s ease-in-out infinite;
|
|
145
|
-
`,w=i`
|
|
146
|
-
background-image: repeating-linear-gradient(
|
|
147
|
-
to bottom,
|
|
148
|
-
var(--grid-line) 0 1px,
|
|
149
|
-
transparent 1px 4px
|
|
150
|
-
);
|
|
151
|
-
`,T=class extends Error{status;code;constructor(e,t,n){super(n),this.name=`ApiError`,this.status=e,this.code=t}get isUnauthenticated(){return this.status===401||this.code===`AUTH`}};function E(e){if(typeof e!=`object`||!e)return!1;let t=e.error;return typeof t!=`object`||!t?!1:typeof t.message==`string`}async function D(e,t={}){let n=t.method??`GET`,r=t.body instanceof Blob?t.body:null,i={method:n,credentials:`same-origin`,headers:t.body===void 0?{}:{"content-type":r===null?`application/json`:`application/octet-stream`},...t.body===void 0?{}:{body:r===null?JSON.stringify(t.body):r},...t.signal===void 0?{}:{signal:t.signal}},a=await fetch(e,i),o=t.accept??[],s=null;if(a.status!==204){let e=await a.text();if(e.length>0)try{s=JSON.parse(e)}catch{s=null}}if(!a.ok&&!o.includes(a.status)){let e=E(s)?s.error.code??`INTERNAL`:`INTERNAL`,t=E(s)?s.error.message:`request failed with status ${a.status}`;throw new T(a.status,String(e),t)}return{status:a.status,data:s}}async function O(e,t){return(await D(e,t===void 0?{}:{signal:t})).data}async function k(e,t){return(await D(e,{method:`POST`,...t===void 0?{}:{body:t}})).data}async function A(e,t){return(await D(e,{method:`PUT`,body:t})).data}async function j(e,t){return(await D(e,{method:`PATCH`,body:t})).data}async function M(e){return(await D(e,{method:`DELETE`})).data}function N(e,t){let n=new URLSearchParams;for(let[e,r]of Object.entries(t))r!==void 0&&n.set(e,String(r));let r=n.toString();return r.length===0?e:`${e}?${r}`}var P=r.div`
|
|
152
|
-
display: flex;
|
|
153
|
-
flex-direction: column;
|
|
154
|
-
align-items: center;
|
|
155
|
-
justify-content: center;
|
|
156
|
-
gap: ${({theme:e})=>e.space(2)};
|
|
157
|
-
padding: ${({theme:e})=>e.space(8)} ${({theme:e})=>e.space(4)};
|
|
158
|
-
text-align: center;
|
|
159
|
-
`,F=r.p`
|
|
160
|
-
/* Wide enough for the console's uncaptured-fleet advice to read as a paragraph
|
|
161
|
-
rather than a column; the horizontal padding keeps it off the card edge. */
|
|
162
|
-
max-width: min(96ch, 100%);
|
|
163
|
-
font-size: 13px;
|
|
164
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
165
|
-
`;function I({legend:e,message:r,action:i}){return n(P,{children:[t(f,{children:e}),t(F,{children:r}),i]})}var L=r(F)`
|
|
166
|
-
color: ${({theme:e})=>e.color.down};
|
|
167
|
-
`;function R(e){return e instanceof T||e instanceof Error?e.message:`The gateway did not answer.`}function z({legend:e=`Request failed`,error:r,onRetry:i}){return n(P,{children:[t(f,{children:e}),t(L,{children:R(r)}),i===void 0?null:t(u,{type:`button`,$size:`sm`,onClick:i,children:`Try again`})]})}var B=a`
|
|
168
|
-
0% { opacity: 0.35; }
|
|
169
|
-
50% { opacity: 0.7; }
|
|
170
|
-
100% { opacity: 0.35; }
|
|
171
|
-
`,V=r.div`
|
|
172
|
-
height: ${({$height:e})=>e??12}px;
|
|
173
|
-
width: ${({$width:e})=>e??`100%`};
|
|
174
|
-
border-radius: 2px;
|
|
175
|
-
background: ${({theme:e})=>e.color.ruleStrong};
|
|
176
|
-
animation: ${B} 1.4s ease-in-out infinite;
|
|
177
|
-
`,H=r.div`
|
|
178
|
-
display: flex;
|
|
179
|
-
flex-direction: column;
|
|
180
|
-
gap: ${({theme:e})=>e.space(2)};
|
|
181
|
-
padding: ${({theme:e})=>e.space(1)} 0;
|
|
182
|
-
`;function U({rows:e=4}){let n=Array.from({length:e},(e,t)=>`row-${t}:${t%3==0?`72%`:`100%`}`);return t(H,{"aria-hidden":`true`,children:n.map(e=>t(V,{$width:e.split(`:`)[1]??`100%`},e))})}var W=r.section`
|
|
183
|
-
background: ${({theme:e})=>e.color.panel};
|
|
184
|
-
border: 1px solid ${({theme:e})=>e.color.rule};
|
|
185
|
-
border-radius: ${({theme:e})=>e.radius.panel};
|
|
186
|
-
box-shadow: ${({theme:e})=>e.color.shadow};
|
|
187
|
-
overflow: hidden;
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-direction: column;
|
|
190
|
-
min-width: 0;
|
|
191
|
-
/* A panel is a flex item of the rack's scrolling column, and overflow: hidden
|
|
192
|
-
drops its automatic minimum height to zero: left shrinkable it squeezes to the
|
|
193
|
-
viewport and clips its own rows instead of letting the column scroll. Boards
|
|
194
|
-
that want a panel to fill and scroll inside itself say so with flex: 1. */
|
|
195
|
-
flex-shrink: 0;
|
|
196
|
-
`,G=r(X)`
|
|
197
|
-
flex: 1;
|
|
198
|
-
min-height: 0;
|
|
199
|
-
|
|
200
|
-
> div {
|
|
201
|
-
display: flex;
|
|
202
|
-
flex: 1;
|
|
203
|
-
flex-direction: column;
|
|
204
|
-
min-height: 0;
|
|
205
|
-
}
|
|
206
|
-
`,K=r(b)`
|
|
207
|
-
flex: 1;
|
|
208
|
-
min-height: 0;
|
|
209
|
-
overflow-y: auto;
|
|
210
|
-
`,q=r.header`
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
gap: ${({theme:e})=>e.space(2)};
|
|
214
|
-
padding: ${({theme:e})=>`${e.space(2)} ${e.space(3)}`};
|
|
215
|
-
border-bottom: 1px solid ${({theme:e})=>e.color.rule};
|
|
216
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
217
|
-
min-height: 34px;
|
|
218
|
-
`,J=r.div`
|
|
219
|
-
padding: ${({theme:e,$flush:t})=>t===!0?`0`:e.space(3)};
|
|
220
|
-
min-width: 0;
|
|
221
|
-
`,Y=r.footer`
|
|
222
|
-
padding: ${({theme:e})=>`${e.space(2)} ${e.space(3)}`};
|
|
223
|
-
border-top: 1px solid ${({theme:e})=>e.color.rule};
|
|
224
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
225
|
-
`;function X({legend:e,meta:r,actions:i,footer:a,flush:o,className:s,children:c}){return n(W,{className:s,children:[n(q,{children:[t(f,{children:e}),r===void 0?null:t(f,{as:`span`,children:r}),t(y,{}),i===void 0?null:t(h,{$gap:1,children:i})]}),t(J,{...o===!0?{$flush:!0}:{},children:c}),a===void 0?null:t(Y,{children:a})]})}export{d as A,b as C,C as D,x as E,o as M,w as O,h as S,g as T,v as _,I as a,p as b,R as c,O as d,j as f,N as g,D as h,W as i,s as j,u as k,T as l,A as m,K as n,z as o,k as p,X as r,U as s,G as t,M as u,_ as v,y as w,m as x,f as y};
|