@dudousxd/nestjs-agent-dashboard 0.15.4 → 0.16.0

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.
@@ -0,0 +1 @@
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-\[3px\]{top:3px;right:3px;bottom:3px;left:3px}.inset-y-0{top:0;bottom:0}.left-1{left:.25rem}.right-0{right:0}.z-10{z-index:10}.z-50{z-index:50}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-5{margin-bottom:1.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-8{height:2rem}.h-dvh{height:100dvh}.h-full{height:100%}.max-h-\[520px\]{max-height:520px}.min-h-full{min-height:100%}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[520px\]{min-width:520px}.min-w-\[560px\]{min-width:560px}.min-w-\[640px\]{min-width:640px}.min-w-\[700px\]{min-width:700px}.min-w-\[760px\]{min-width:760px}.min-w-\[860px\]{min-width:860px}.min-w-\[var\(--anchor-width\)\]{min-width:var(--anchor-width)}.max-w-\[1180px\]{max-width:1180px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[240px\]{max-width:240px}.max-w-\[260px\]{max-width:260px}.max-w-\[420px\]{max-width:420px}.max-w-\[720px\]{max-width:720px}.max-w-\[min\(28rem\,90vw\)\]{max-width:min(28rem,90vw)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-\[var\(--transform-origin\)\]{transform-origin:var(--transform-origin)}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-3{row-gap:.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-dashed{border-style:dashed}.border-\[var\(--line\)\]{border-color:var(--line)}.border-bad\/40{border-color:color-mix(in srgb,var(--bad) 40%,transparent)}.border-bad\/50{border-color:color-mix(in srgb,var(--bad) 50%,transparent)}.border-brand\/40{border-color:color-mix(in srgb,var(--accent) 40%,transparent)}.border-brand\/50{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.border-good\/50{border-color:color-mix(in srgb,var(--good) 50%,transparent)}.border-input,.border-line{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-line-soft{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--line-soft) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.border-transparent{border-color:transparent}.border-warn\/40{border-color:color-mix(in srgb,var(--warn) 40%,transparent)}.border-warn\/50{border-color:color-mix(in srgb,var(--warn) 50%,transparent)}.bg-bad\/10{background-color:color-mix(in srgb,var(--bad) 10%,transparent)}.bg-bad\/5{background-color:color-mix(in srgb,var(--bad) 5%,transparent)}.bg-black\/60{background-color:#0009}.bg-brand\/10{background-color:color-mix(in srgb,var(--accent) 10%,transparent)}.bg-brand\/20{background-color:color-mix(in srgb,var(--accent) 20%,transparent)}.bg-good\/10{background-color:color-mix(in srgb,var(--good) 10%,transparent)}.bg-line{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--line) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-panel-2,.bg-popover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.bg-transparent{background-color:transparent}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-bad{--tw-gradient-from: var(--bad) var(--tw-gradient-from-position);--tw-gradient-to: color-mix(in srgb, var(--bad) 0% , transparent) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-brand{--tw-gradient-from: var(--accent) var(--tw-gradient-from-position);--tw-gradient-to: color-mix(in srgb, var(--accent) 0% , transparent) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-panel-2{--tw-gradient-from: var(--panel-2) var(--tw-gradient-from-position);--tw-gradient-to: color-mix(in srgb, var(--panel-2) 0% , transparent) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-live{--tw-gradient-to: var(--live) var(--tw-gradient-to-position)}.to-panel{--tw-gradient-to: var(--panel) var(--tw-gradient-to-position)}.to-warn{--tw-gradient-to: var(--warn) var(--tw-gradient-to-position)}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-2{padding-right:.5rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-4{line-height:1rem}.leading-none{line-height:1}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[var\(--muted\)\]{color:var(--muted)}.text-bad{--tw-text-opacity: 1;color:color-mix(in srgb,var(--bad) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-brand{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-good{--tw-text-opacity: 1;color:color-mix(in srgb,var(--good) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-live{--tw-text-opacity: 1;color:color-mix(in srgb,var(--live) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-muted-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-popover-foreground{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.text-warn{--tw-text-opacity: 1;color:color-mix(in srgb,var(--warn) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.underline{text-decoration-line:underline}.decoration-line{text-decoration-color:var(--line)}.decoration-dotted{text-decoration-style:dotted}.underline-offset-4{text-underline-offset:4px}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/50{--tw-shadow-color: rgb(0 0 0 / .5);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-\[2px\]{--tw-backdrop-blur: blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[opacity\,transform\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}:root{--bg: #09090b;--panel: #0c0c0f;--panel-2: #101017;--line: #1c1c22;--line-soft: #16161a;--text: #e7e7ea;--muted: #76767f;--good: #34d399;--warn: #fbbf24;--bad: #f87171;--live: #60a5fa;--accent: #a78bfa}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Space Grotesk,ui-sans-serif,system-ui,sans-serif;-webkit-font-smoothing:antialiased}.app-bg{position:fixed;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none;background-image:radial-gradient(900px 420px at 82% -10%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 70%),radial-gradient(700px 360px at 8% -12%,color-mix(in srgb,var(--live) 6%,transparent),transparent 70%),linear-gradient(to right,var(--line-soft) 1px,transparent 1px),linear-gradient(to bottom,var(--line-soft) 1px,transparent 1px);background-size:100% 100%,100% 100%,46px 46px,46px 46px;-webkit-mask-image:linear-gradient(to bottom,black,black 62%,transparent);mask-image:linear-gradient(to bottom,black,black 62%,transparent);opacity:.55}.mono{font-family:JetBrains Mono,ui-monospace,monospace}.tnum{font-variant-numeric:tabular-nums}.dot{width:7px;height:7px;border-radius:999px;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 18%,transparent);display:inline-block}.live-pulse{animation:live-pulse 1.6s ease-in-out infinite}@keyframes live-pulse{0%,to{opacity:1}50%{opacity:.35}}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.rise{animation:rise .32s cubic-bezier(.2,.7,.2,1) both}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--line) 70%,var(--muted));border:3px solid var(--bg);border-radius:999px}.placeholder\:text-muted-foreground::-moz-placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity: 1;color:color-mix(in srgb,var(--muted) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:border-brand\/50:hover{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.hover\:bg-bad\/20:hover{background-color:color-mix(in srgb,var(--bad) 20%,transparent)}.hover\:bg-brand\/20:hover{background-color:color-mix(in srgb,var(--accent) 20%,transparent)}.hover\:bg-good\/20:hover{background-color:color-mix(in srgb,var(--good) 20%,transparent)}.hover\:bg-panel-2:hover{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.hover\:text-brand:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--accent) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:text-foreground:hover{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.hover\:decoration-brand:hover{text-decoration-color:var(--accent)}.focus\:border-brand\/50:focus{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.focus-visible\:border-brand\/50:focus-visible{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color: color-mix(in srgb, var(--accent) 50% , transparent)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:opacity-50:disabled{opacity:.5}.data-\[ending-style\]\:translate-x-full[data-ending-style],.data-\[starting-style\]\:translate-x-full[data-starting-style]{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[ending-style\]\:scale-95[data-ending-style],.data-\[starting-style\]\:scale-95[data-starting-style]{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[active\]\:border-brand[data-active]{--tw-border-opacity: 1;border-color:color-mix(in srgb,var(--accent) calc(var(--tw-border-opacity, 1) * 100%),transparent)}.data-\[popup-open\]\:border-brand\/50[data-popup-open]{border-color:color-mix(in srgb,var(--accent) 50%,transparent)}.data-\[active\]\:bg-brand\/10[data-active]{background-color:color-mix(in srgb,var(--accent) 10%,transparent)}.data-\[highlighted\]\:bg-accent[data-highlighted]{--tw-bg-opacity: 1;background-color:color-mix(in srgb,var(--panel-2) calc(var(--tw-bg-opacity, 1) * 100%),transparent)}.data-\[active\]\:text-foreground[data-active],.data-\[highlighted\]\:text-accent-foreground[data-highlighted],.data-\[selected\]\:text-foreground[data-selected]{--tw-text-opacity: 1;color:color-mix(in srgb,var(--text) calc(var(--tw-text-opacity, 1) * 100%),transparent)}.data-\[ending-style\]\:opacity-0[data-ending-style],.data-\[starting-style\]\:opacity-0[data-starting-style]{opacity:0}@media (min-width: 640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}}@media (min-width: 768px){.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}
@@ -0,0 +1 @@
1
+ var zt=t=>{throw TypeError(t)};var vt=(t,e,s)=>e.has(t)||zt("Cannot "+s);var n=(t,e,s)=>(vt(t,e,"read from private field"),s?s.call(t):e.get(t)),d=(t,e,s)=>e.has(t)?zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),c=(t,e,s,r)=>(vt(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),y=(t,e,s)=>(vt(t,e,"access private method"),s);var ut=(t,e,s,r)=>({set _(i){c(t,e,i,s)},get _(){return n(t,e,r)}});import{u as Cs,A as Zs,D as Xs,R as er,T as tr,C as sr,E as rr,I as nr,a as ir,S as Ps,b as ar,G as or,M as ur,P as cr,c as lr,d as hr,e as dr,f as fr,g as pr,p as yr,h as mr,i as gr,U as vr,W as Vt,j as br,k as Sr,L as wr,l as Cr,m as Pr,n as xr,B as xs,o as Rr,q as Or,r as Tr,s as Er,t as jr,v as Dr,w as Fr,x as Ir}from"./index-CnY2UUny.js";import{r as b,j as l,P as Qr,b as Mr,d as Ar,e as qr,f as kr}from"./base-ui-Bm0nR785.js";import"./recharts-CURTGZ5d.js";const Rs=b.createContext(void 0),ot=t=>{const e=b.useContext(Rs);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ur=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(Rs.Provider,{value:t,children:e})),Nr={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var le,Ut,ls,Lr=(ls=class{constructor(){d(this,le,Nr);d(this,Ut,!1)}setTimeoutProvider(t){c(this,le,t)}setTimeout(t,e){return n(this,le).setTimeout(t,e)}clearTimeout(t){n(this,le).clearTimeout(t)}setInterval(t,e){return n(this,le).setInterval(t,e)}clearInterval(t){n(this,le).clearInterval(t)}},le=new WeakMap,Ut=new WeakMap,ls);const be=new Lr;function _r(t){setTimeout(t,0)}const Kr=typeof window>"u"||"Deno"in globalThis;function _(){}function $r(t,e){return typeof t=="function"?t(e):t}function Os(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ts(t,e){return Math.max(t+(e||0)-Date.now(),0)}function j(t,e){return typeof t=="function"?t(e):t}function Jt(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:u}=t;if(o){if(r){if(e.queryHash!==Nt(o,e.options))return!1}else if(!ze(e.queryKey,o))return!1}if(s!=="all"){const h=e.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||i&&i!==e.state.fetchStatus||a&&!a(e))}function Yt(t,e){const{exact:s,status:r,predicate:i,mutationKey:a}=t;if(a){if(!e.options.mutationKey)return!1;if(s){if(Fe(e.options.mutationKey)!==Fe(a))return!1}else if(!ze(e.options.mutationKey,a))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function Nt(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fe)(t)}function Fe(t){return JSON.stringify(t,(e,s)=>bt(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function ze(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(e.length>t.length)return!1;for(let r=0;r<e.length;r++)if(!ze(t[r],e[r]))return!1;return!0}const s=Object.keys(e);for(const r of s)if(!ze(t[r],e[r]))return!1;return!0}return!1}const Hr=Object.prototype.hasOwnProperty;function Lt(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=Zt(t)&&Zt(e);if(!r&&!(bt(t)&&bt(e)))return e;const i=(r?t:Object.keys(t)).length,a=r?e:Object.keys(e),o=a.length,u=r?new Array(o):{};let h=0;for(let g=0;g<o;g++){const p=r?g:a[g],m=t[p],f=e[p];if(m===f){u[p]=m,(r?g<i:Hr.call(t,p))&&h++;continue}if(m===null||f===null||typeof m!="object"||typeof f!="object"){u[p]=f;continue}const C=Lt(m,f,s+1);u[p]=C,C===m&&h++}return i===o&&h===i?t:u}function Ye(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Zt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function bt(t){if(!Xt(t))return!1;const e=Object.getPrototypeOf(t),s=e==null?void 0:e.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const r=s.prototype;return!(!Xt(r)||!r.hasOwnProperty("isPrototypeOf")||e!==Object.prototype)}function Xt(t){return Object.prototype.toString.call(t)==="[object Object]"}function Br(t){return new Promise(e=>{be.setTimeout(e,t)})}function St(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Lt(t,e):e}function pt(t){return t}function Gr(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Wr(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}const _t=Symbol();function Es(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===_t?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Kt(t,e){return typeof t=="function"?t(...e):!!t}function zr(t,e,s){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t}let Vr=()=>Kr;const $t=()=>Vr();var Ie=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Se,he,Qe,hs,Jr=(hs=class extends Ie{constructor(){super();d(this,Se);d(this,he);d(this,Qe);c(this,Qe,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,he)||this.setEventListener(n(this,Qe))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,he))==null||e.call(this),c(this,he,void 0))}setEventListener(e){var s;c(this,Qe,e),(s=n(this,he))==null||s.call(this),c(this,he,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){n(this,Se)!==e&&(c(this,Se,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof n(this,Se)=="boolean"?n(this,Se):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Se=new WeakMap,he=new WeakMap,Qe=new WeakMap,hs);const Ht=new Jr,Yr=_r;function Zr(){let t=[],e=0,s=u=>{u()},r=u=>{u()},i=Yr;const a=u=>{e?t.push(u):i(()=>{s(u)})},o=()=>{const u=t;t=[],u.length&&i(()=>{r(()=>{u.forEach(h=>{s(h)})})})};return{batch:u=>{let h;e++;try{h=u()}finally{e--,e||o()}return h},batchCalls:u=>(...h)=>{a(()=>{u(...h)})},schedule:a,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}const I=Zr();var Me,de,Ae,ds,Xr=(ds=class extends Ie{constructor(){super();d(this,Me,!0);d(this,de);d(this,Ae);c(this,Ae,e=>{if(typeof window<"u"&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,de)||this.setEventListener(n(this,Ae))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,de))==null||e.call(this),c(this,de,void 0))}setEventListener(e){var s;c(this,Ae,e),(s=n(this,de))==null||s.call(this),c(this,de,e(this.setOnline.bind(this)))}setOnline(e){n(this,Me)!==e&&(c(this,Me,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return n(this,Me)}},Me=new WeakMap,de=new WeakMap,Ae=new WeakMap,ds);const dt=new Xr;function en(t){return Math.min(1e3*2**t,3e4)}function js(t){return(t??"online")==="online"?dt.isOnline():!0}var wt=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ds(t){let e=!1,s=0,r,i="pending",a,o;const u=new Promise((x,R)=>{a=x,o=R});u.catch(_);const h=()=>i!=="pending",g=x=>{var R;if(!h()){const T=new wt(x);S(T),(R=t.onCancel)==null||R.call(t,T)}},p=()=>{e=!0},m=()=>{e=!1},f=()=>Ht.isFocused()&&(t.networkMode==="always"||dt.isOnline())&&t.canRun(),C=()=>js(t.networkMode)&&t.canRun(),Q=x=>{h()||(r==null||r(),i="resolved",a(x))},S=x=>{h()||(r==null||r(),i="rejected",o(x))},w=()=>new Promise(x=>{var R;r=T=>{(h()||f())&&x(T)},(R=t.onPause)==null||R.call(t)}).then(()=>{var x;r=void 0,h()||(x=t.onContinue)==null||x.call(t)}),E=()=>{if(h())return;let x;const R=s===0?t.initialPromise:void 0;try{x=R??t.fn()}catch(T){x=Promise.reject(T)}Promise.resolve(x).then(Q).catch(T=>{var D;if(h())return;const v=t.retry??($t()?0:3),K=t.retryDelay??en,M=typeof K=="function"?K(s,T):K,J=v===!0||typeof v=="number"&&s<v||typeof v=="function"&&v(s,T);if(e||!J){S(T);return}s++,(D=t.onFail)==null||D.call(t,s,T),Br(M).then(()=>f()?void 0:w()).then(()=>{e?S(T):E()})})};return{promise:u,status:()=>i,cancel:g,continue:()=>(r==null||r(),u),cancelRetry:p,continueRetry:m,canStart:C,start:()=>(C()?E():w().then(E),u)}}var we,fs,Fs=(fs=class{constructor(){d(this,we)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Os(this.gcTime)&&c(this,we,be.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??($t()?1/0:3e5))}clearGcTimeout(){n(this,we)!==void 0&&(be.clearTimeout(n(this,we)),c(this,we,void 0))}},we=new WeakMap,fs);function tn(t){return{onFetch:(e,s)=>{var p,m,f,C,Q;const r=e.options,i=(f=(m=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:f.direction,a=((C=e.state.data)==null?void 0:C.pages)||[],o=((Q=e.state.data)==null?void 0:Q.pageParams)||[];let u={pages:[],pageParams:[]},h=0;const g=async()=>{let S=!1;const w=R=>{zr(R,()=>e.signal,()=>S=!0)},E=Es(e.options,e.fetchOptions),x=async(R,T,v)=>{if(S)return Promise.reject(e.signal.reason);if(T==null&&R.pages.length)return Promise.resolve(R);const M=(()=>{const Wt={client:e.client,queryKey:e.queryKey,pageParam:T,direction:v?"backward":"forward",meta:e.options.meta};return w(Wt),Wt})(),J=await E(M),{maxPages:D}=e.options,$=v?Wr:Gr;return{pages:$(R.pages,J,D),pageParams:$(R.pageParams,T,D)}};if(i&&a.length){const R=i==="backward",T=R?sn:es,v={pages:a,pageParams:o};u=await x(v,T(r,v),R)}else{const R=t??a.length;do{const T=h===0?o[0]??r.initialPageParam:es(r,u);if(h>0&&T==null)break;u=await x(u,T),h++}while(h<R)}return u};e.options.persister?e.fetchFn=()=>{var S,w;return(w=(S=e.options).persister)==null?void 0:w.call(S,g,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=g}}}function es(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function sn(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}var qe,Ce,ke,V,Pe,A,Ze,xe,Y,re,ps,rn=(ps=class extends Fs{constructor(e){super();d(this,Y);d(this,qe);d(this,Ce);d(this,ke);d(this,V);d(this,Pe);d(this,A);d(this,Ze);d(this,xe);c(this,xe,!1),c(this,Ze,e.defaultOptions),this.setOptions(e.options),this.observers=[],c(this,Pe,e.client),c(this,V,n(this,Pe).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,c(this,Ce,ss(this.options)),this.state=e.state??n(this,Ce),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return n(this,qe)}get promise(){var e;return(e=n(this,A))==null?void 0:e.promise}setOptions(e){if(this.options={...n(this,Ze),...e},e!=null&&e._type&&c(this,qe,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=ss(this.options);s.data!==void 0&&(this.setState(ts(s.data,s.dataUpdatedAt)),c(this,Ce,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,V).remove(this)}setData(e,s){const r=St(this.state.data,e,this.options);return y(this,Y,re).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e){y(this,Y,re).call(this,{type:"setState",state:e})}cancel(e){var r,i;const s=(r=n(this,A))==null?void 0:r.promise;return(i=n(this,A))==null||i.cancel(e),s?s.then(_).catch(_):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return n(this,Ce)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>j(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===_t||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>j(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ts(this.state.dataUpdatedAt,e)}onFocus(){var e,s;(e=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||e.refetch({cancelRefetch:!1}),(s=n(this,A))==null||s.continue()}onOnline(){var e,s;(e=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||e.refetch({cancelRefetch:!1}),(s=n(this,A))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),n(this,V).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const s=this.observers.indexOf(e);s!==-1&&(this.observers.splice(s,1),this.observers.length||(n(this,A)&&(n(this,xe)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?n(this,A).cancel({revert:!0}):n(this,A).cancelRetry()),this.scheduleGc()),n(this,V).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||y(this,Y,re).call(this,{type:"invalidate"})}async fetch(e,s){var g,p,m,f,C,Q,S,w,E,x,R,T;if(this.state.fetchStatus!=="idle"&&((g=n(this,A))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,A))return n(this,A).continueRetry(),n(this,A).promise}if(e&&this.setOptions(e),!this.options.queryFn){const v=this.observers.find(K=>K.options.queryFn);v&&this.setOptions(v.options)}const r=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(c(this,xe,!0),r.signal)})},a=()=>{const v=Es(this.options,s),M=(()=>{const J={client:n(this,Pe),queryKey:this.queryKey,meta:this.meta};return i(J),J})();return c(this,xe,!1),this.options.persister?this.options.persister(v,M,this):v(M)},u=(()=>{const v={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,Pe),state:this.state,fetchFn:a};return i(v),v})();(p=n(this,qe)==="infinite"?tn(this.options.pages):this.options.behavior)==null||p.onFetch(u,this),c(this,ke,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=u.fetchOptions)==null?void 0:m.meta))&&y(this,Y,re).call(this,{type:"fetch",meta:(f=u.fetchOptions)==null?void 0:f.meta});const h=c(this,A,Ds({initialPromise:s==null?void 0:s.initialPromise,fn:u.fetchFn,onCancel:v=>{v instanceof wt&&v.revert&&this.setState({...n(this,ke),fetchStatus:"idle"}),r.abort()},onFail:(v,K)=>{y(this,Y,re).call(this,{type:"failed",failureCount:v,error:K})},onPause:()=>{y(this,Y,re).call(this,{type:"pause"})},onContinue:()=>{y(this,Y,re).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const v=await h.start();if(v===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(v),(Q=(C=n(this,V).config).onSuccess)==null||Q.call(C,v,this),(w=(S=n(this,V).config).onSettled)==null||w.call(S,v,this.state.error,this),v}catch(v){if(v instanceof wt){if(v.silent)return n(this,A).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw y(this,Y,re).call(this,{type:"error",error:v}),(x=(E=n(this,V).config).onError)==null||x.call(E,v,this),(T=(R=n(this,V).config).onSettled)==null||T.call(R,this.state.data,v,this),v}finally{n(this,A)===h&&c(this,A,void 0),this.scheduleGc()}}},qe=new WeakMap,Ce=new WeakMap,ke=new WeakMap,V=new WeakMap,Pe=new WeakMap,A=new WeakMap,Ze=new WeakMap,xe=new WeakMap,Y=new WeakSet,re=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Is(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...ts(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return c(this,ke,e.manual?i:void 0),i;case"error":const a=e.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=s(this.state),I.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),n(this,V).notify({query:this,type:"updated",action:e})})},ps);function Is(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:js(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ts(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ss(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var H,P,Xe,B,Re,Ue,ne,et,Ne,Le,Oe,Te,fe,_e,O,Ve,Ct,Pt,xt,Rt,Ot,Tt,Et,jt,ys,yt=(ys=class extends Ie{constructor(e,s){super();d(this,O);d(this,H);d(this,P);d(this,Xe);d(this,B);d(this,Re);d(this,Ue);d(this,ne);d(this,et);d(this,Ne);d(this,Le);d(this,Oe);d(this,Te);d(this,fe);d(this,_e,new Set);this.options=s,c(this,H,e),c(this,ne,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(n(this,P).addObserver(this),rs(n(this,P),this.options)?y(this,O,Ve).call(this):this.updateResult(),y(this,O,Ot).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dt(n(this,P),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dt(n(this,P),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,y(this,O,Tt).call(this),y(this,O,Et).call(this),n(this,P).removeObserver(this)}setOptions(e){const s=this.options,r=n(this,P);if(this.options=n(this,H).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof j(this.options.enabled,n(this,P))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");y(this,O,jt).call(this),n(this,P).setOptions(this.options),s._defaulted&&!Ye(this.options,s)&&n(this,H).getQueryCache().notify({type:"observerOptionsUpdated",query:n(this,P),observer:this});const i=this.hasListeners();i&&ns(n(this,P),r,this.options,s)&&y(this,O,Ve).call(this),this.updateResult(),i&&(n(this,P)!==r||j(this.options.enabled,n(this,P))!==j(s.enabled,n(this,P))||j(this.options.staleTime,n(this,P))!==j(s.staleTime,n(this,P)))&&y(this,O,Pt).call(this);const a=y(this,O,xt).call(this);i&&(n(this,P)!==r||j(this.options.enabled,n(this,P))!==j(s.enabled,n(this,P))||a!==n(this,fe))&&y(this,O,Rt).call(this,a)}getOptimisticResult(e){const s=n(this,H).getQueryCache().build(n(this,H),e),r=this.createResult(s,e);return Ye(this.getCurrentResult(),r)||(c(this,B,r),c(this,Ue,this.options),c(this,Re,n(this,P).state)),r}getCurrentResult(){return n(this,B)}trackResult(e,s){return new Proxy(e,{get:(r,i)=>(this.trackProp(i),s==null||s(i),Reflect.get(r,i))})}trackProp(e){n(this,_e).add(e)}getCurrentQuery(){return n(this,P)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const s=n(this,H).defaultQueryOptions(e),r=n(this,H).getQueryCache().build(n(this,H),s);let i=()=>{},a;const o=new Promise(u=>{a=u,i=n(this,H).getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===r.queryHash&&r.state.data!==void 0&&(i(),u(this.createResult(r,s)))})});return Promise.race([r.fetch().then(()=>{const u=this.createResult(r,s);return a==null||a(u),u}).finally(()=>{i()}),o])}fetch(e){return y(this,O,Ve).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),n(this,B)))}createResult(e,s){var K;const r=n(this,P),i=this.options,a=n(this,B),o=n(this,Re),u=n(this,Ue),h=e!==r?e.state:n(this,Xe),{state:g}=e;let p={...g},m=!1,f;if(s._optimisticResults){const M=this.hasListeners(),J=!M&&rs(e,s),D=M&&ns(e,r,s,i);(J||D)&&(p={...p,...Is(g.data,e.options)}),s._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:C,errorUpdatedAt:Q,status:S}=p;f=p.data;let w=!1;if(s.placeholderData!==void 0&&f===void 0&&S==="pending"){let M;a!=null&&a.isPlaceholderData&&s.placeholderData===(u==null?void 0:u.placeholderData)?(M=a.data,w=!0):M=typeof s.placeholderData=="function"?s.placeholderData((K=n(this,Le))==null?void 0:K.state.data,n(this,Le)):s.placeholderData,M!==void 0&&(S="success",f=St(a==null?void 0:a.data,M,s),m=!0)}if(s.select&&f!==void 0&&!w)if(a&&f===(o==null?void 0:o.data)&&s.select===n(this,et))f=n(this,Ne);else try{c(this,et,s.select),f=s.select(f),f=St(a==null?void 0:a.data,f,s),c(this,Ne,f),c(this,ne,null)}catch(M){c(this,ne,M)}else f===void 0&&c(this,ne,null);n(this,ne)&&(C=n(this,ne),f=n(this,Ne),Q=Date.now(),S="error",m=!1);const E=p.fetchStatus==="fetching",x=S==="pending",R=S==="error",T=x&&E,v=f!==void 0;return{status:S,fetchStatus:p.fetchStatus,isPending:x,isSuccess:S==="success",isError:R,isInitialLoading:T,isLoading:T,data:f,dataUpdatedAt:p.dataUpdatedAt,error:C,errorUpdatedAt:Q,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!x,isLoadingError:R&&!v,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:R&&v,isStale:Bt(e,s),refetch:this.refetch,isEnabled:j(s.enabled,e)!==!1}}updateResult(){const e=n(this,B),s=this.createResult(n(this,P),this.options);if(c(this,Re,n(this,P).state),c(this,Ue,this.options),n(this,Re).data!==void 0&&c(this,Le,n(this,P)),Ye(s,e))return;c(this,B,s);const i=(()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,o=typeof a=="function"?a():a;if(o==="all"||!o&&!n(this,_e).size)return!0;const u=new Set(o??n(this,_e));return this.options.throwOnError&&u.add("error"),Object.keys(n(this,B)).some(h=>{const g=h;return n(this,B)[g]!==e[g]&&u.has(g)})})();I.batch(()=>{i&&this.listeners.forEach(a=>{a(n(this,B))}),n(this,H).getQueryCache().notify({query:n(this,P),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&y(this,O,Ot).call(this)}},H=new WeakMap,P=new WeakMap,Xe=new WeakMap,B=new WeakMap,Re=new WeakMap,Ue=new WeakMap,ne=new WeakMap,et=new WeakMap,Ne=new WeakMap,Le=new WeakMap,Oe=new WeakMap,Te=new WeakMap,fe=new WeakMap,_e=new WeakMap,O=new WeakSet,Ve=function(e){y(this,O,jt).call(this);let s=n(this,P).fetch(this.options,e);return e!=null&&e.throwOnError||(s=s.catch(_)),s},Ct=function(e){return!$t()&&j(this.options.enabled,n(this,P))!==!1&&Os(e)},Pt=function(){y(this,O,Tt).call(this);const e=j(this.options.staleTime,n(this,P));if(n(this,B).isStale||!y(this,O,Ct).call(this,e))return;const s=Ts(n(this,B).dataUpdatedAt,e)+1;c(this,Oe,be.setTimeout(()=>{n(this,B).isStale||this.updateResult()},s))},xt=function(){return j(this.options.refetchInterval,n(this,P))??!1},Rt=function(e){y(this,O,Et).call(this),c(this,fe,e),!(n(this,fe)===0||!y(this,O,Ct).call(this,n(this,fe)))&&c(this,Te,be.setInterval(()=>{(this.options.refetchIntervalInBackground||Ht.isFocused())&&y(this,O,Ve).call(this)},n(this,fe)))},Ot=function(){y(this,O,Pt).call(this),y(this,O,Rt).call(this,y(this,O,xt).call(this))},Tt=function(){n(this,Oe)!==void 0&&(be.clearTimeout(n(this,Oe)),c(this,Oe,void 0))},Et=function(){n(this,Te)!==void 0&&(be.clearInterval(n(this,Te)),c(this,Te,void 0))},jt=function(){const e=n(this,H).getQueryCache().build(n(this,H),this.options);if(e===n(this,P))return;const s=n(this,P);c(this,P,e),c(this,Xe,e.state),this.hasListeners()&&(s==null||s.removeObserver(this),e.addObserver(this))},ys);function nn(t,e){return j(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&j(e.retryOnMount,t)===!1)}function rs(t,e){return nn(t,e)||t.state.data!==void 0&&Dt(t,e,e.refetchOnMount)}function Dt(t,e,s){if(j(e.enabled,t)!==!1&&j(e.staleTime,t)!=="static"){const r=j(s,t);return r==="always"||r!==!1&&Bt(t,e)}return!1}function ns(t,e,s,r){return(t!==e||j(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Bt(t,s)}function Bt(t,e){return j(e.enabled,t)!==!1&&t.isStaleByTime(j(e.staleTime,t))}var tt,X,N,Ee,ee,ce,ms,an=(ms=class extends Fs{constructor(e){super();d(this,ee);d(this,tt);d(this,X);d(this,N);d(this,Ee);c(this,tt,e.client),this.mutationId=e.mutationId,c(this,N,e.mutationCache),c(this,X,[]),this.state=e.state||Qs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){n(this,X).includes(e)||(n(this,X).push(e),this.clearGcTimeout(),n(this,N).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){c(this,X,n(this,X).filter(s=>s!==e)),this.scheduleGc(),n(this,N).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){n(this,X).length||(this.state.status==="pending"?this.scheduleGc():n(this,N).remove(this))}continue(){var e;return((e=n(this,Ee))==null?void 0:e.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){var u,h,g,p,m,f,C,Q,S,w,E,x,R,T,v,K,M,J;const s=()=>{y(this,ee,ce).call(this,{type:"continue"})},r={client:n(this,tt),meta:this.options.meta,mutationKey:this.options.mutationKey},i=c(this,Ee,Ds({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(D,$)=>{y(this,ee,ce).call(this,{type:"failed",failureCount:D,error:$})},onPause:()=>{y(this,ee,ce).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>n(this,N).canRun(this)})),a=this.state.status==="pending",o=!i.canStart();try{if(a)s();else{y(this,ee,ce).call(this,{type:"pending",variables:e,isPaused:o}),n(this,N).config.onMutate&&await n(this,N).config.onMutate(e,this,r);const $=await((h=(u=this.options).onMutate)==null?void 0:h.call(u,e,r));$!==this.state.context&&y(this,ee,ce).call(this,{type:"pending",context:$,variables:e,isPaused:o})}const D=await i.start();return await((p=(g=n(this,N).config).onSuccess)==null?void 0:p.call(g,D,e,this.state.context,this,r)),await((f=(m=this.options).onSuccess)==null?void 0:f.call(m,D,e,this.state.context,r)),await((Q=(C=n(this,N).config).onSettled)==null?void 0:Q.call(C,D,null,this.state.variables,this.state.context,this,r)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,D,null,e,this.state.context,r)),y(this,ee,ce).call(this,{type:"success",data:D}),D}catch(D){try{await((x=(E=n(this,N).config).onError)==null?void 0:x.call(E,D,e,this.state.context,this,r))}catch($){Promise.reject($)}try{await((T=(R=this.options).onError)==null?void 0:T.call(R,D,e,this.state.context,r))}catch($){Promise.reject($)}try{await((K=(v=n(this,N).config).onSettled)==null?void 0:K.call(v,void 0,D,this.state.variables,this.state.context,this,r))}catch($){Promise.reject($)}try{await((J=(M=this.options).onSettled)==null?void 0:J.call(M,void 0,D,e,this.state.context,r))}catch($){Promise.reject($)}throw y(this,ee,ce).call(this,{type:"error",error:D}),D}finally{n(this,Ee)===i&&c(this,Ee,void 0),n(this,N).runNext(this)}}},tt=new WeakMap,X=new WeakMap,N=new WeakMap,Ee=new WeakMap,ee=new WeakSet,ce=function(e){const s=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),I.batch(()=>{n(this,X).forEach(r=>{r.onMutationUpdate(e)}),n(this,N).notify({mutation:this,type:"updated",action:e})})},ms);function Qs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ie,Z,st,gs,on=(gs=class extends Ie{constructor(e={}){super();d(this,ie);d(this,Z);d(this,st);this.config=e,c(this,ie,new Set),c(this,Z,new Map),c(this,st,0)}build(e,s,r){const i=new an({client:e,mutationCache:this,mutationId:++ut(this,st)._,options:e.defaultMutationOptions(s),state:r});return this.add(i),i}add(e){n(this,ie).add(e);const s=ct(e);if(typeof s=="string"){const r=n(this,Z).get(s);r?r.push(e):n(this,Z).set(s,[e])}this.notify({type:"added",mutation:e})}remove(e){if(n(this,ie).delete(e)){const s=ct(e);if(typeof s=="string"){const r=n(this,Z).get(s);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&n(this,Z).delete(s)}}this.notify({type:"removed",mutation:e})}canRun(e){var r;const s=ct(e);if(typeof s=="string"){const i=(r=n(this,Z).get(s))==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r,i;const s=ct(e);return typeof s=="string"?((i=(r=n(this,Z).get(s))==null?void 0:r.find(a=>a!==e&&a.state.isPaused))==null?void 0:i.continue())??Promise.resolve():Promise.resolve()}clear(){I.batch(()=>{n(this,ie).forEach(e=>{this.notify({type:"removed",mutation:e})}),n(this,ie).clear(),n(this,Z).clear()})}getAll(){return Array.from(n(this,ie))}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Yt(s,r))}findAll(e={}){return this.getAll().filter(s=>Yt(e,s))}notify(e){I.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return I.batch(()=>Promise.all(e.map(s=>s.continue().catch(_))))}},ie=new WeakMap,Z=new WeakMap,st=new WeakMap,gs);function ct(t){var e;return(e=t.options.scope)==null?void 0:e.id}var ae,pe,L,oe,se,Je,Ft,vs,un=(vs=class extends Ie{constructor(e,s){super();d(this,se);d(this,ae);d(this,pe);d(this,L);d(this,oe);c(this,ae,e),this.setOptions(s),this.bindMethods(),y(this,se,Je).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const s=this.options;this.options=n(this,ae).defaultMutationOptions(e),Ye(this.options,s)||n(this,ae).getMutationCache().notify({type:"observerOptionsUpdated",mutation:n(this,L),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Fe(s.mutationKey)!==Fe(this.options.mutationKey)?this.reset():((r=n(this,L))==null?void 0:r.state.status)==="pending"&&n(this,L).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&n(this,L)&&(n(this,L).addObserver(this),y(this,se,Je).call(this))}onUnsubscribe(){var e;this.hasListeners()||(e=n(this,L))==null||e.removeObserver(this)}onMutationUpdate(e){y(this,se,Je).call(this),y(this,se,Ft).call(this,e)}getCurrentResult(){return n(this,pe)}reset(){var e;(e=n(this,L))==null||e.removeObserver(this),c(this,L,void 0),y(this,se,Je).call(this),y(this,se,Ft).call(this)}mutate(e,s){var r;return c(this,oe,s),(r=n(this,L))==null||r.removeObserver(this),c(this,L,n(this,ae).getMutationCache().build(n(this,ae),this.options)),n(this,L).addObserver(this),n(this,L).execute(e)}},ae=new WeakMap,pe=new WeakMap,L=new WeakMap,oe=new WeakMap,se=new WeakSet,Je=function(){var s;const e=((s=n(this,L))==null?void 0:s.state)??Qs();c(this,pe,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},Ft=function(e){I.batch(()=>{var s,r,i,a,o,u,h,g;if(n(this,oe)&&this.hasListeners()){const p=n(this,pe).variables,m=n(this,pe).context,f={client:n(this,ae),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(r=(s=n(this,oe)).onSuccess)==null||r.call(s,e.data,p,m,f)}catch(C){Promise.reject(C)}try{(a=(i=n(this,oe)).onSettled)==null||a.call(i,e.data,null,p,m,f)}catch(C){Promise.reject(C)}}else if((e==null?void 0:e.type)==="error"){try{(u=(o=n(this,oe)).onError)==null||u.call(o,e.error,p,m,f)}catch(C){Promise.reject(C)}try{(g=(h=n(this,oe)).onSettled)==null||g.call(h,void 0,e.error,p,m,f)}catch(C){Promise.reject(C)}}}this.listeners.forEach(p=>{p(n(this,pe))})})},vs);function is(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}var Ke,G,$e,je,z,De,rt,nt,it,at,q,It,Qt,Ms,Mt,At,qt,bs,cn=(bs=class extends Ie{constructor(e,s,r){super();d(this,q);d(this,Ke);d(this,G);d(this,$e);d(this,je);d(this,z);d(this,De);d(this,rt);d(this,nt);d(this,it);d(this,at,[]);c(this,Ke,e),c(this,je,r),c(this,$e,[]),c(this,z,[]),c(this,G,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&n(this,z).forEach(e=>{e.subscribe(s=>{y(this,q,At).call(this,e,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,n(this,z).forEach(e=>{e.destroy()})}setQueries(e,s){c(this,$e,e),c(this,je,s),I.batch(()=>{const r=n(this,z),i=y(this,q,Mt).call(this,n(this,$e));i.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const a=i.map(m=>m.observer),o=a.map(m=>m.getCurrentResult()),u=r.length!==a.length,h=a.some((m,f)=>m!==r[f]),g=u||h,p=g?!0:o.some((m,f)=>{const C=n(this,G)[f];return!C||!Ye(m,C)});!g&&!p||(g&&(c(this,at,i),c(this,z,a)),c(this,G,o),this.hasListeners()&&(g&&(is(r,a).forEach(m=>{m.destroy()}),is(a,r).forEach(m=>{m.subscribe(f=>{y(this,q,At).call(this,m,f)})})),y(this,q,qt).call(this)))})}getCurrentResult(){return n(this,G)}getQueries(){return n(this,z).map(e=>e.getCurrentQuery())}getObservers(){return n(this,z)}getOptimisticResult(e,s){const r=y(this,q,Mt).call(this,e),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),a=r.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>y(this,q,Qt).call(this,o??i,s,a),()=>y(this,q,It).call(this,i,r)]}},Ke=new WeakMap,G=new WeakMap,$e=new WeakMap,je=new WeakMap,z=new WeakMap,De=new WeakMap,rt=new WeakMap,nt=new WeakMap,it=new WeakMap,at=new WeakMap,q=new WeakSet,It=function(e,s){const r=new Set;return s.map((i,a)=>{const o=e[a];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,u=>{r.has(u)||(r.add(u),s.forEach(h=>{h.observer.trackProp(u)}))})})},Qt=function(e,s,r){if(s){const i=n(this,it),a=r!==void 0&&i!==void 0&&(i.length!==r.length||r.some((o,u)=>o!==i[u]));return(n(this,G)!==n(this,nt)||a||s!==n(this,rt))&&(c(this,rt,s),c(this,nt,n(this,G)),r!==void 0&&c(this,it,r),c(this,De,Lt(n(this,De),s(e)))),n(this,De)}return e},Ms=function(){var e;return!((e=n(this,je))!=null&&e.combine)||n(this,z).some((s,r)=>{var i;return s.options.suspense&&((i=n(this,G)[r])==null?void 0:i.data)===void 0})},Mt=function(e){const s=new Map;n(this,z).forEach(i=>{const a=i.options.queryHash;if(!a)return;const o=s.get(a);o?o.push(i):s.set(a,[i])});const r=[];return e.forEach(i=>{var u;const a=n(this,Ke).defaultQueryOptions(i),o=((u=s.get(a.queryHash))==null?void 0:u.shift())??new yt(n(this,Ke),a);r.push({defaultedQueryOptions:a,observer:o})}),r},At=function(e,s){const r=n(this,z).indexOf(e);r!==-1&&(c(this,G,n(this,G).slice()),n(this,G)[r]=s,y(this,q,qt).call(this))},qt=function(){var e;if(this.hasListeners()){const s=y(this,q,Ms).call(this),r=n(this,De),i=s?r:y(this,q,Qt).call(this,y(this,q,It).call(this,n(this,G),n(this,at)),(e=n(this,je))==null?void 0:e.combine);(s||r!==i)&&I.batch(()=>{this.listeners.forEach(a=>{a(n(this,G))})})}},bs),te,Ss,ln=(Ss=class extends Ie{constructor(e={}){super();d(this,te);this.config=e,c(this,te,new Map)}build(e,s,r){const i=s.queryKey,a=s.queryHash??Nt(i,s);let o=this.get(a);return o||(o=new rn({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(s),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){n(this,te).has(e.queryHash)||(n(this,te).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){n(this,te).get(e.queryHash)===e&&(e.destroy(),n(this,te).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){I.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return n(this,te).get(e)}getAll(){return[...n(this,te).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Jt(s,r))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(r=>Jt(e,r)):s}notify(e){I.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){I.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},te=new WeakMap,Ss),F,ye,me,He,Be,ge,Ge,We,ws,hn=(ws=class{constructor(t={}){d(this,F);d(this,ye);d(this,me);d(this,He);d(this,Be);d(this,ge);d(this,Ge);d(this,We);c(this,F,t.queryCache||new ln),c(this,ye,t.mutationCache||new on),c(this,me,t.defaultOptions||{}),c(this,He,new Map),c(this,Be,new Map),c(this,ge,0)}mount(){ut(this,ge)._++,n(this,ge)===1&&(c(this,Ge,Ht.subscribe(async t=>{t&&(await this.resumePausedMutations(),n(this,F).onFocus())})),c(this,We,dt.subscribe(async t=>{t&&(await this.resumePausedMutations(),n(this,F).onOnline())})))}unmount(){var t,e;ut(this,ge)._--,n(this,ge)===0&&((t=n(this,Ge))==null||t.call(this),c(this,Ge,void 0),(e=n(this,We))==null||e.call(this),c(this,We,void 0))}isFetching(t){return n(this,F).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return n(this,ye).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=n(this,F).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=n(this,F).build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(j(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return n(this,F).findAll(t).map(({queryKey:e,state:s})=>[e,s.data])}setQueryData(t,e,s){var o;const r=this.defaultQueryOptions({queryKey:t}),i=(o=n(this,F).get(r.queryHash))==null?void 0:o.state.data,a=$r(e,i);if(a!==void 0)return n(this,F).build(this,r).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return I.batch(()=>n(this,F).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=n(this,F).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=n(this,F);I.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=n(this,F);return I.batch(()=>{const r=s.findAll(t),i=new Set(r);return r.forEach(a=>{a.reset()}),this.refetchQueries({type:"active",predicate:a=>i.has(a)},e)})}cancelQueries(t,e={}){const s={revert:!0,...e},r=I.batch(()=>n(this,F).findAll(t).map(i=>i.cancel(s)));return Promise.all(r).then(_).catch(_)}invalidateQueries(t,e={}){return I.batch(()=>(n(this,F).findAll(t).forEach(s=>{s.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=I.batch(()=>n(this,F).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,s);return s.throwOnError||(a=a.catch(_)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(_)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=n(this,F).build(this,e),r=s.isStaleByTime(j(e.staleTime,s))?await s.fetch(e):s.state.data,i=e.select;return i?i(r):r}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=n(this,F).build(this,e);return s.isStaleByTime(j(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(_).catch(_)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(_).catch(_)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return dt.isOnline()?n(this,ye).resumePausedMutations():Promise.resolve()}getQueryCache(){return n(this,F)}getMutationCache(){return n(this,ye)}getDefaultOptions(){return n(this,me)}setDefaultOptions(t){c(this,me,t)}setQueryDefaults(t,e){n(this,He).set(Fe(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...n(this,He).values()],s={};return e.forEach(r=>{ze(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){n(this,Be).set(Fe(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...n(this,Be).values()],s={};return e.forEach(r=>{ze(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...n(this,me).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Nt(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===_t&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...n(this,me).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){n(this,F).clear(),n(this,ye).clear()}},F=new WeakMap,ye=new WeakMap,me=new WeakMap,He=new WeakMap,Be=new WeakMap,ge=new WeakMap,Ge=new WeakMap,We=new WeakMap,ws);const As=b.createContext(!1),qs=()=>b.useContext(As);As.Provider;const ks=(t,e,s)=>{const r=s!=null&&s.state.error&&typeof t.throwOnError=="function"?Kt(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(e.isReset()||(t.retryOnMount=!1))},Us=t=>{b.useEffect(()=>{t.clearReset()},[t])},Ns=({result:t,errorResetBoundary:e,throwOnError:s,query:r,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(i&&t.data===void 0||Kt(s,[t.error,r])),Ls=(t,e)=>e.state.data===void 0,_s=t=>{if(t.suspense){const s=i=>i==="static"?i:Math.max(i??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...i)=>s(r(...i)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},kt=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,Ks=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function dn({queries:t,...e},s){const r=ot(),i=qs(),a=Cs(),o=e.subscribed!==!1,u=b.useMemo(()=>t.map(S=>{const w=r.defaultQueryOptions(S);return w._optimisticResults=i?"isRestoring":o?"optimistic":void 0,w}),[t,r,i,o]);u.forEach(S=>{_s(S);const w=r.getQueryCache().get(S.queryHash);ks(S,a,w)}),Us(a);const[h]=b.useState(()=>new cn(r,u,e)),[g,p,m]=h.getOptimisticResult(u,e.combine),f=!i&&o;b.useSyncExternalStore(b.useCallback(S=>f?h.subscribe(I.batchCalls(S)):_,[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),b.useEffect(()=>{h.setQueries(u,e)},[u,e,h]);const C=g.some((S,w)=>kt(u[w],S))?g.flatMap((S,w)=>{const E=u[w];if(E&&kt(E,S)){const x=new yt(r,E);return Ks(E,x,a)}return[]}):[];if(C.length>0)throw Promise.all(C);const Q=g.find((S,w)=>{const E=u[w];return E&&Ns({result:S,errorResetBoundary:a,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(Q)throw Q.error;return p(m())}function $s(t,e,s){const r=qs(),i=Cs(),a=ot(),o=a.defaultQueryOptions(t),u=a.getQueryCache().get(o.queryHash),h=t.subscribed!==!1;o._optimisticResults=r?"isRestoring":h?"optimistic":void 0,_s(o),ks(o,i,u),Us(i);const[g]=b.useState(()=>new e(a,o)),p=g.getOptimisticResult(o),m=!r&&h;if(b.useSyncExternalStore(b.useCallback(f=>{const C=m?g.subscribe(I.batchCalls(f)):_;return g.updateResult(),C},[g,m]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),b.useEffect(()=>{g.setOptions(o)},[o,g]),kt(o,p))throw Ks(o,g,i);if(Ns({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:u,suspense:o.suspense}))throw p.error;return o.notifyOnChangeProps?p:g.trackResult(p)}function ue(t,e){return $s(t,yt)}function mt(t,e){return $s({...t,enabled:!0,suspense:!0,throwOnError:Ls,placeholderData:void 0},yt)}function fn(t,e){return dn({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:Ls,enabled:!0,placeholderData:void 0}))})}function Hs(t,e){const s=ot(),[r]=b.useState(()=>new un(s,t));b.useEffect(()=>{r.setOptions(t)},[r,t]);const i=b.useSyncExternalStore(b.useCallback(o=>r.subscribe(I.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=b.useCallback((...o)=>{r.mutate(o[0],o[1]).catch(_)},[r]);if(i.error&&Kt(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const pn=864e5,yn=/^\d{4}-\d{2}-\d{2}$/;function as(t,e=Date.now()){return new Date(e-t*pn).toISOString().slice(0,10)}function mn(t=30,e=Date.now()){return{fromDay:as(t-1,e),toDay:as(0,e)}}function gn(t){return yn.test(t)}function ht(){return typeof window<"u"&&window.__AGENT_API__?window.__AGENT_API__:`${typeof window<"u"&&window.__AGENT_BASE__||"/ai-gateway"}/api`}async function U(t,e){const s=await fetch(ht()+t,e);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return await s.json()}function lt(t){const e=new URLSearchParams({page:`${t.page}`,limit:`${t.pageSize}`});if(t.where!==void 0)for(const[s,r]of Object.entries(t.where))typeof r=="string"&&r!==""&&e.set(`where[${s}]`,r);return e}const k={spend(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return U(`/spend?${e.toString()}`)},topThreads(t,e=10){const s=new URLSearchParams({from:t.fromDay,to:t.toDay,limit:`${e}`});return U(`/top-threads?${s.toString()}`)},reliability(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return U(`/reliability?${e.toString()}`)},runs(t=50){return U(`/runs?limit=${t}`)},toolCalls(t=50){return U(`/tool-calls?limit=${t}`)},toolCallsPage(t){return U(`/tool-calls-page?${lt(t)}`)},approvals(t=50){return U(`/approvals?limit=${t}`)},approvalsPage(t){return U(`/approvals-page?${lt(t)}`)},runDetail(t){return U(`/runs/${encodeURIComponent(t)}`)},threadDetail(t,e={}){const s=new URLSearchParams;e.messages!==void 0&&s.set("messages",`${e.messages}`),e.runs!==void 0&&s.set("runs",`${e.runs}`);const r=s.size>0?`?${s.toString()}`:"";return U(`/threads/${encodeURIComponent(t)}${r}`)},async decideApproval(t,e){const s=await fetch(`${ht()}/approvals/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`)},toolStats(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return U(`/tools?${e.toString()}`)},genuiStats(t){const e=new URLSearchParams({from:t.fromDay,to:t.toDay});return U(`/genui?${e.toString()}`)},threads(t=50){return U(`/threads?limit=${t}`)},threadsPage(t){return U(`/threads-page?${lt(t)}`)},runsPage(t){return U(`/runs-page?${lt(t)}`)},pricing(){return U("/pricing")},async upsertPrice(t){const e=await fetch(`${ht()}/pricing`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`)},streamEvents(t){const e=new EventSource(`${ht()}/stream`);return e.onmessage=s=>{try{t(JSON.parse(s.data))}catch{}},()=>e.close()}},W={aggregate:6e4,activity:15e3,queue:0,config:5*6e4,detail:3e4};function Bs(t){return{queryKey:["spend",t.fromDay,t.toDay],queryFn:()=>k.spend(t),staleTime:W.aggregate}}function Gs(t){return mt(Bs(t))}function vn(t,e=10){const[s,r]=fn({queries:[Bs(t),{queryKey:["top-threads",t.fromDay,t.toDay,e],queryFn:()=>k.topThreads(t,e),staleTime:W.aggregate}]});return{overview:s.data,topThreads:r.data}}function bn(t){return mt({queryKey:["reliability",t.fromDay,t.toDay],queryFn:()=>k.reliability(t),staleTime:W.aggregate})}function Sn(t){return mt({queryKey:["tool-stats",t.fromDay,t.toDay],queryFn:()=>k.toolStats(t),staleTime:W.aggregate})}function wn(t=50){return mt({queryKey:["tool-calls",t],queryFn:()=>k.toolCalls(t),staleTime:W.activity})}function Cn(t,e,s){return ue({queryKey:["runs-page",t,e,s],queryFn:()=>k.runsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:W.activity})}function Pn(t,e,s){return ue({queryKey:["tool-calls-page",t,e,s],queryFn:()=>k.toolCallsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:W.activity})}function xn(t,e,s){return ue({queryKey:["threads-page",t,e,s],queryFn:()=>k.threadsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:W.activity})}function Rn(t,e,s){return ue({queryKey:["approvals-page",t,e,s],queryFn:()=>k.approvalsPage({page:t,pageSize:e,where:s}),placeholderData:pt,staleTime:W.queue})}function On(){return ue({queryKey:["approvals-count"],queryFn:async()=>(await k.approvalsPage({page:1,pageSize:1})).total,staleTime:W.queue,refetchInterval:2e4,refetchIntervalInBackground:!0})}function Tn(t){return ue({queryKey:["run-detail",t],queryFn:()=>k.runDetail(t),staleTime:W.detail})}function En(t){return ue({queryKey:["thread-detail",t],queryFn:()=>k.threadDetail(t),staleTime:W.detail})}function jn(t){return ue({queryKey:["genui",t.fromDay,t.toDay],queryFn:()=>k.genuiStats(t),staleTime:W.aggregate})}function Dn(){return ue({queryKey:["pricing"],queryFn:()=>k.pricing(),staleTime:W.config})}const Fn=[["approvals"],["approvals-page"],["approvals-count"],["tool-calls"],["tool-calls-page"],["tool-stats"],["run-detail"]];function In(){const t=ot();return Hs({mutationFn:({toolCallId:e,input:s})=>k.decideApproval(e,s),onSuccess:()=>{for(const e of Fn)t.invalidateQueries({queryKey:e})}})}const Qn=[["pricing"],["spend"],["top-threads"],["thread-detail"]];function Mn(){const t=ot();return Hs({mutationFn:e=>k.upsertPrice(e),onSuccess:()=>{for(const e of Qn)t.invalidateQueries({queryKey:e})}})}function An({range:t}){return l.jsx(Zs,{rows:Gs(t).data.byActor})}const qn=["spend","models","actors","runs","reliability","approvals","tools","genui","pricing","live"],Ws="spend";function kn(t){return qn.some(e=>e===t)}function os(t){const e=t.replace(/^#\/?/,""),s=e.indexOf("?"),r=s===-1?e:e.slice(0,s);return kn(r)?{section:r,params:new URLSearchParams(s===-1?"":e.slice(s+1))}:{section:Ws,params:new URLSearchParams}}function Gt(t,e){const s=e===void 0?"":new URLSearchParams(e).toString();return s===""?`#/${t}`:`#/${t}?${s}`}const zs=b.createContext({open:()=>{}});function gt(){return b.useContext(zs)}function Un({children:t}){const[e,s]=b.useState([]),r=b.useCallback(u=>{s(h=>[...h,u])},[]),i=b.useCallback(()=>s([]),[]),a=b.useCallback(()=>s(u=>u.slice(0,-1)),[]);b.useEffect(()=>(window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)),[i]);const o=e[e.length-1];return l.jsxs(zs.Provider,{value:{open:r},children:[t,o!==void 0&&l.jsx(Xs,{title:o.kind==="run"?"Run":"Thread",subtitle:o.kind==="run"?o.runId:o.threadId,onClose:i,...e.length>1?{onBack:a}:{},children:o.kind==="run"?l.jsx(Kn,{runId:o.runId,onOpenThread:Ln(r)}):l.jsx($n,{threadId:o.threadId,onOpenRun:_n(r)})},Nn(o))]})}function Nn(t){return t.kind==="run"?`run:${t.runId}`:`thread:${t.threadId}`}function Ln(t){return e=>t({kind:"thread",threadId:e})}function _n(t){return e=>t({kind:"run",runId:e})}function Kn({runId:t,onOpenThread:e}){const s=Tn(t);return s.isPending?l.jsx(Js,{label:"run"}):s.isError?l.jsx(Vs,{label:"This run",error:s.error,onRetry:()=>void s.refetch(),goneLabel:"This run no longer exists in the read-model."}):l.jsx(er,{detail:s.data,onOpenThread:e})}function $n({threadId:t,onOpenRun:e}){const s=En(t);return s.isPending?l.jsx(Js,{label:"thread"}):s.isError?l.jsx(Vs,{label:"This thread",error:s.error,onRetry:()=>void s.refetch(),goneLabel:"This thread no longer exists in the read-model."}):l.jsx(tr,{detail:s.data,onOpenRun:e,runsHref:Gt("reliability",{threadId:t})})}function Vs({label:t,error:e,onRetry:s,goneLabel:r}){return e instanceof Error&&e.message.startsWith("404")?l.jsx(rr,{label:r}):l.jsx(nr,{label:t,error:e,onRetry:s})}function Js({label:t}){return l.jsxs(sr,{className:"animate-pulse p-6 text-sm text-muted-foreground","aria-busy":"true",children:["Loading ",t,"…"]})}const ve=25;function ft(t,e,s){return{page:t.data??{rows:[],total:0,page:e,pageSize:s},error:t.isError?t.error:null,retry:()=>void t.refetch()}}function Hn(){const{open:t}=gt(),[e,s]=b.useState(1),r=Rn(e,ve,{}),i=In();return l.jsx(ir,{table:ft(r,e,ve),onPageChange:s,onDecide:(a,o)=>i.mutateAsync({toolCallId:a,input:o}),onOpenRun:a=>t({kind:"run",runId:a})})}const Bn="501";function Gn({range:t}){const e=jn(t),s=e.isError&&e.error.message.startsWith(Bn);return e.isError&&!s?l.jsx(Ps,{label:"Generative UI",error:e.error,onRetry:()=>void e.refetch()}):e.isPending?l.jsx(ar,{label:"Generative UI"}):l.jsx(or,{stats:e.data??null,unavailable:s})}function Wn({range:t}){return l.jsx(ur,{rows:Gs(t).data.byModel})}const zn="501";function Vn(){const t=Dn(),e=Mn(),s=t.isError&&t.error.message.startsWith(zn);return t.isError&&!s?l.jsx(Ps,{label:"Pricing",error:t.error,onRetry:()=>void t.refetch()}):l.jsx(cr,{prices:t.data??[],loading:t.isPending,unavailable:s,onUpsert:r=>e.mutateAsync(r),saving:e.isPending})}function Jn({range:t,threadId:e}){const{open:s}=gt(),r=bn(t),[i,a]=b.useState(1),[o,u]=b.useState(""),[h,g]=b.useState(""),p={...o!==""?{status:o}:{},...h!==""?{agentName:h}:{},...e!==void 0&&e!==""?{threadId:e}:{}},m=Cn(i,ve,p);return l.jsx(lr,{overview:r.data,runsTable:ft(m,i,ve),runsWhere:p,onRunsStatusChange:f=>{u(f),a(1)},onRunsAgentNameChange:f=>{g(f),a(1)},onRunsThreadIdClear:()=>{a(1),window.location.hash=Gt("reliability")},onRunsPageChange:a,onOpenRun:f=>s({kind:"run",runId:f})})}function Yn(){const{open:t}=gt(),e=wn(),[s,r]=b.useState(1),[i,a]=b.useState(""),[o,u]=b.useState(""),h={...i!==""?{toolName:i}:{},...o!==""?{status:o}:{}},g=Pn(s,ve,h),[p,m]=b.useState(1),[f,C]=b.useState(""),Q={...f!==""?{title:f}:{}},S=xn(p,ve,Q);return l.jsx(hr,{toolCalls:e.data,toolCallsTable:ft(g,s,ve),toolCallsWhere:h,onToolCallsToolNameChange:w=>{a(w),r(1)},onToolCallsStatusChange:w=>{u(w),r(1)},onToolCallsPageChange:r,threadsTable:ft(S,p,ve),threadsWhere:Q,onThreadsTitleChange:w=>{C(w),m(1)},onThreadsPageChange:m,onOpenRun:w=>t({kind:"run",runId:w}),onOpenThread:w=>t({kind:"thread",threadId:w})})}function Zn({range:t}){const{open:e}=gt(),{overview:s,topThreads:r}=vn(t);return l.jsx(dr,{overview:s,topThreads:r,onOpenThread:i=>e({kind:"thread",threadId:i})})}function Xn({range:t}){return l.jsx(fr,{rows:Sn(t).data})}const ei=Qr,ti=Mr;function si({className:t,align:e="end",sideOffset:s=6,...r}){return l.jsx(Ar,{children:l.jsx(qr,{align:e,sideOffset:s,className:"z-50 outline-none",children:l.jsx(kr,{className:pr("origin-[var(--transform-origin)] rounded-lg border border-line bg-popover p-3 text-popover-foreground shadow-lg shadow-black/50 outline-none","transition-[opacity,transform] duration-150 ease-out","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0",t),...r})})})}function ri(t=200){const[e,s]=b.useState([]),[r,i]=b.useState(!1),a=b.useRef(0);return b.useEffect(()=>{i(!0);const o=k.streamEvents(u=>{a.current+=1,s(h=>yr(h,u,a.current,t))});return()=>{i(!1),o()}},[t]),{events:e,connected:r}}const Ys=[{key:"spend",label:"Spend & usage",icon:l.jsx(mr,{})},{key:"models",label:"Models",icon:l.jsx(gr,{})},{key:"actors",label:"Actors & budgets",icon:l.jsx(vr,{})},{key:"runs",label:"Runs & tools",icon:l.jsx(Vt,{})},{key:"reliability",label:"Reliability",icon:l.jsx(br,{})},{key:"approvals",label:"Approvals",icon:l.jsx(Sr,{})},{key:"tools",label:"Tools",icon:l.jsx(Vt,{})},{key:"genui",label:"Generative UI",icon:l.jsx(wr,{})},{key:"pricing",label:"Pricing",icon:l.jsx(Cr,{})},{key:"live",label:"Live",icon:l.jsx(Pr,{})}],ni=Object.fromEntries(Ys.map(t=>[t.key,t.label]));function ii(){const[t,e]=b.useState(()=>typeof window>"u"?{section:Ws,params:new URLSearchParams}:os(window.location.hash));return b.useEffect(()=>{function s(){e(os(window.location.hash))}return window.addEventListener("hashchange",s),()=>window.removeEventListener("hashchange",s)},[]),t}function ai(){const[t,e]=b.useState(mn()),{section:s,params:r}=ii(),i=ri(),a=On();return l.jsx(xr,{delay:400,closeDelay:0,timeout:300,children:l.jsx(Un,{children:l.jsxs("div",{className:"relative min-h-full",children:[l.jsx("div",{className:"app-bg"}),l.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] px-5 py-5",children:[l.jsx(ui,{range:t,onRange:e,connected:i.connected,liveCount:i.events.length}),l.jsx("nav",{className:"mb-5 flex flex-wrap gap-1",children:Ys.map(o=>{const u=o.key==="live"?i.events.length:o.key==="approvals"?a.data??0:0,h=s===o.key;return l.jsxs(xs,{render:l.jsx("a",{href:Gt(o.key),...h?{"aria-current":"page"}:{}}),size:"md",variant:h?"default":"ghost",className:"gap-2 rounded-lg",children:[o.icon,o.label,u>0&&l.jsx(Rr,{variant:"accent",className:"tnum border-transparent bg-brand/20",children:u})]},o.key)})}),l.jsx(Or,{label:ni[s],children:l.jsx(oi,{section:s,range:t,params:r,liveEvents:i.events,connected:i.connected})},s)]})]})})})}function oi({section:t,range:e,params:s,liveEvents:r,connected:i}){switch(t){case"spend":return l.jsx(Zn,{range:e});case"models":return l.jsx(Wn,{range:e});case"actors":return l.jsx(An,{range:e});case"runs":return l.jsx(Yn,{});case"reliability":return l.jsx(Jn,{range:e,threadId:s.get("threadId")??void 0});case"approvals":return l.jsx(Hn,{});case"tools":return l.jsx(Xn,{range:e});case"genui":return l.jsx(Gn,{range:e});case"pricing":return l.jsx(Vn,{});case"live":return l.jsx(jr,{events:r,connected:i});default:return null}}function ui({range:t,onRange:e,connected:s,liveCount:r}){return l.jsxs("header",{className:"mb-5 flex flex-wrap items-center gap-4",children:[l.jsxs("div",{className:"flex items-center gap-2.5",children:[l.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-brand/40 bg-brand/10",children:l.jsx(Tr,{className:"h-4 w-4 text-brand"})}),l.jsxs("div",{className:"leading-none",children:[l.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway"}),l.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"governance console"})]})]}),l.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[l.jsx(ci,{range:t,onRange:e}),l.jsxs("span",{className:"flex items-center gap-1.5 rounded-lg border border-line px-2.5 py-1.5 text-[11px] text-muted-foreground",children:[l.jsx(Er,{tone:s?"live":"bad"}),"live ",r>0?`· ${r}`:""]})]})]})}function ci({range:t,onRange:e}){return l.jsxs(ei,{children:[l.jsxs(ti,{render:l.jsx(xs,{size:"md",variant:"outline",className:"mono gap-2 rounded-lg"}),children:[l.jsx(Dr,{width:12,height:12}),l.jsxs("span",{className:"tnum text-foreground",children:[t.fromDay," → ",t.toDay]})]}),l.jsxs(si,{className:"flex flex-col gap-2",children:[l.jsx(us,{label:"From",value:t.fromDay,onChange:s=>e({...t,fromDay:s})}),l.jsx(us,{label:"To",value:t.toDay,onChange:s=>e({...t,toDay:s})}),l.jsx("p",{className:"text-[10px] text-muted-foreground",children:"Whole UTC days, inclusive."})]})]})}function us({label:t,value:e,onChange:s}){return l.jsxs("label",{className:"flex items-center justify-between gap-3 rounded-lg border border-line bg-panel px-2.5 py-1 text-[11px] text-muted-foreground",children:[l.jsx("span",{className:"uppercase tracking-wider",children:t}),l.jsx(Fr,{type:"date",value:e,onChange:r=>{const i=r.target.value;gn(i)&&s(i)}})]})}const li=new hn({defaultOptions:{queries:{retry:1}}}),cs=document.getElementById("root");cs&&Ir.createRoot(cs).render(l.jsx(b.StrictMode,{children:l.jsx(Ur,{client:li,children:l.jsx(ai,{})})}));
@@ -0,0 +1 @@
1
+ import{x as C,n as O,r as A,e as _,M as R,A as N,d as m,c as v,a as M,f as j,G as c,P as k,t as E,S as g,b as P,C as U,B as h,D as L,R as K,T as q}from"./index-CnY2UUny.js";import{j as e,r as w}from"./base-ui-Bm0nR785.js";import"./recharts-CURTGZ5d.js";const G=[{modelId:"gpt-4o",requests:4200,inputTokens:84e5,outputTokens:21e5,costUsd:84.2},{modelId:"claude-3-5-sonnet",requests:2600,inputTokens:52e5,outputTokens:13e5,costUsd:41.6},{modelId:"gpt-4o-mini",requests:9800,inputTokens:12e6,outputTokens:3e6,costUsd:9.4},{modelId:"llama-3-70b",requests:1200,inputTokens:21e5,outputTokens:64e4,costUsd:0}],H=[{actorRef:"tenant:acme",requests:8200,totalTokens:184e5,costUsd:78.1,actorLabel:"Acme Corp"},{actorRef:"user:davi@goflip.ai",requests:3100,totalTokens:69e5,costUsd:34.2,actorLabel:"Davi de Carvalho"},{actorRef:"tenant:globex",requests:4400,totalTokens:92e5,costUsd:21.8,actorLabel:null},{actorRef:"user:ops-bot",requests:2100,totalTokens:394e4,costUsd:1.1,actorLabel:null}],B={"tenant:acme":2e7,"user:davi@goflip.ai":5e6,"tenant:globex":12e6};function F(){const a=[];for(let t=29;t>=0;t-=1){const r=new Date(Date.now()-t*864e5).toISOString().slice(0,10),s=Math.sin(t/3)*.5+1;a.push({day:r,totalTokens:Math.round(7e5*s+t*4e3),costUsd:Number((4.2*s+t*.05).toFixed(2))})}return a}function z(){const a=[];for(let t=29;t>=0;t-=1){const r=new Date(Date.now()-t*864e5).toISOString().slice(0,10),s=Math.sin(t/3)*.5+1,l=Math.round(18*s+t*.3);a.push({day:r,runs:l,failed:Math.max(0,Math.round(l*.06))})}return a}const u={byModel:G,byActor:H,trend:F()},W={metrics:{runs:482,completed:461,failed:21,successRate:461/482,retries:34,durationP50Ms:640,durationP95Ms:2400},byAgent:[{agentName:"analyst",runs:210,failed:8,retries:14},{agentName:"billing-agent",runs:150,failed:9,retries:12},{agentName:"(default)",runs:122,failed:4,retries:8}],errors:[{errorCode:"TIMEOUT",count:9},{errorCode:"TOOL_ERROR",count:6},{errorCode:"RATE_LIMIT",count:4},{errorCode:"UNKNOWN",count:2}],trend:z()},x={runId:"r-7c31",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"failed",durationMs:4200,errorCode:"TIMEOUT",errorMessage:"upstream model request timed out after 3 attempts",retries:2,startedAt:new Date(Date.now()-21e4).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:null},D=[{runId:"r-9f2a",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"completed",durationMs:820,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-4e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},x,{runId:"r-a114",threadId:"th3",actorRef:"user:davi@goflip.ai",agentName:null,status:"completed",durationMs:1150,errorCode:null,errorMessage:null,retries:1,startedAt:new Date(Date.now()-54e4).toISOString(),promptHash:null,parentRunId:null},{runId:"r-b902",threadId:"th1",actorRef:"tenant:acme",agentName:"analyst",status:"failed",durationMs:980,errorCode:"TOOL_ERROR",errorMessage:"search_records returned a 500",retries:0,startedAt:new Date(Date.now()-132e4).toISOString(),promptHash:"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678901234567890abcdef01234",parentRunId:null},{runId:"r-c447",threadId:"th2",actorRef:"user:ops-bot",agentName:"billing-agent",status:"running",durationMs:null,errorCode:null,errorMessage:null,retries:0,startedAt:new Date(Date.now()-8e3).toISOString(),promptHash:"ffeeddccbbaa99887766554433221100ffeeddccbbaa99887766554433221",parentRunId:"r-7c31"}],Q=[{toolCallId:"tc-approve-1",runId:"r-c447",toolName:"delete_asset",input:{assetId:"asset-42",reason:"stale"},threadId:"th2",threadTitle:"Incident triage",actorRef:"user:ops-bot",agentName:"billing-agent",requestedAt:new Date(Date.now()-3e5).toISOString()},{toolCallId:"tc-approve-2",runId:"r-9f2a",toolName:"send_email",input:{to:"finance@acme.example",subject:"Q3 invoice adjustment"},threadId:"th1",threadTitle:"Q3 procurement review",actorRef:"tenant:acme",agentName:"analyst",requestedAt:new Date(Date.now()-9e5).toISOString()}],V=[{toolName:"search_records",toolType:"read",calls:420,failed:6,rejected:0,p50ExecutionMs:42,p95ExecutionMs:180},{toolName:"delete_asset",toolType:"action",calls:34,failed:1,rejected:4,p50ExecutionMs:310,p95ExecutionMs:620},{toolName:"send_email",toolType:"action",calls:58,failed:2,rejected:2,p50ExecutionMs:96,p95ExecutionMs:410},{toolName:"fetch_pricing",toolType:"read",calls:210,failed:0,rejected:0,p50ExecutionMs:88,p95ExecutionMs:95}],Y=B,p=[{toolCallId:"tc1",runId:"r-9f2a",toolName:"search_records",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-12e3).toISOString()},{toolCallId:"tc2",runId:"r-7c31",toolName:"delete_asset",toolType:"action",status:"forbidden",threadId:"th2",createdAt:new Date(Date.now()-9e4).toISOString()},{toolCallId:"tc3",runId:"r-9f2a",toolName:"fetch_pricing",toolType:"read",status:"ok",threadId:"th1",createdAt:new Date(Date.now()-24e4).toISOString()},{toolCallId:"tc4",runId:"r-a114",toolName:"send_email",toolType:"action",status:"failed",threadId:"th3",createdAt:new Date(Date.now()-62e4).toISOString()},{toolCallId:"tc5",runId:null,toolName:"summarize_thread",toolType:"read",status:"ok",threadId:"th2",createdAt:new Date(Date.now()-12e5).toISOString()}],y={threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",messageCount:11,totalTokens:62e3,lastActivityAt:new Date(Date.now()-4e5).toISOString(),actorLabel:null},J=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",messageCount:24,totalTokens:184e3,lastActivityAt:new Date(Date.now()-3e4).toISOString(),actorLabel:"Acme Corp"},y,{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",messageCount:6,totalTokens:28400,lastActivityAt:new Date(Date.now()-18e5).toISOString(),actorLabel:"Davi de Carvalho"}],X=[{threadId:"th1",title:"Q3 procurement review",actorRef:"tenant:acme",requests:24,totalTokens:184e3,costUsd:18.4,actorLabel:"Acme Corp"},{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",requests:11,totalTokens:62e3,costUsd:6.2,actorLabel:null},{threadId:"th3",title:"Contract summary",actorRef:"user:davi@goflip.ai",requests:6,totalTokens:28400,costUsd:2.8,actorLabel:"Davi de Carvalho"}],f={rows:p,total:137,page:1,pageSize:25},I={rows:J,total:46,page:1,pageSize:25},Z={rows:D,total:482,page:1,pageSize:25},$={rows:Q,total:7,page:1,pageSize:25},T={run:x,thread:{threadId:"th2",title:"Incident triage",actorRef:"user:ops-bot",deleted:!1,actorLabel:null},toolCalls:[{toolCallId:"tc2",toolName:"delete_asset",toolType:"action",status:"forbidden",executionMs:null,executedByRef:"user:davi@goflip.ai",error:null,createdAt:new Date(Date.now()-215e3).toISOString()},{toolCallId:"tc9",toolName:"fetch_pricing",toolType:"read",status:"ok",executionMs:96,executedByRef:null,error:null,createdAt:new Date(Date.now()-213e3).toISOString()},{toolCallId:"tc10",toolName:"search_records",toolType:"read",status:"failed",executionMs:3980,executedByRef:null,error:"upstream returned 500 after 3 attempts",createdAt:new Date(Date.now()-212e3).toISOString()}]},S={thread:y,deleted:!1,usage:{requests:11,inputTokens:48e3,outputTokens:14e3,totalTokens:62e3,costUsd:6.2},runs:D.filter(a=>a.threadId==="th2"),runTotal:34,messages:[{messageId:"m1",role:"user",content:"The billing sync failed again overnight — can you find out which asset broke it?",truncated:!1,agentName:null,toolCallCount:0,createdAt:new Date(Date.now()-4e5).toISOString()},{messageId:"m2",role:"assistant",content:"I found 3 assets with a null billing code. Asset-42 is the only one touched by last night’s sync, so I want to delete it — that needs your approval.",truncated:!1,agentName:"billing-agent",toolCallCount:2,createdAt:new Date(Date.now()-38e4).toISOString()},{messageId:"m3",role:"assistant",content:"Here is the full audit trail for asset-42 across the last 90 days, starting with the ingest that first assigned it a billing code and continuing through every subsequent",truncated:!0,agentName:"billing-agent",toolCallCount:1,createdAt:new Date(Date.now()-36e4).toISOString()}]},ee=[{modelId:"gpt-4o",inputPricePer1m:2.5,outputPricePer1m:10,cacheReadPricePer1m:1.25,effectiveFrom:new Date(Date.now()-5*864e5).toISOString()},{modelId:"claude-3-5-sonnet",inputPricePer1m:3,outputPricePer1m:15,cacheWritePricePer1m:3.75,cacheReadPricePer1m:.3,effectiveFrom:new Date(Date.now()-12*864e5).toISOString()},{modelId:"gpt-4o-mini",inputPricePer1m:.15,outputPricePer1m:.6,effectiveFrom:new Date(Date.now()-2*864e5).toISOString()}],te=[{id:"e1",event:"run.started",ts:Date.now()-2e3,payload:{runId:"r-9f2",agentName:"analyst"}},{id:"e2",event:"tool-call",ts:Date.now()-5e3,payload:{toolName:"search_records",toolType:"read",status:"ok"}},{id:"e3",event:"quota.exceeded",ts:Date.now()-9e3,payload:{actorId:"tenant:globex",usedTokens:124e5,limitTokens:12e6}},{id:"e4",event:"tool-call",ts:Date.now()-14e3,payload:{toolName:"delete_asset",toolType:"action",status:"forbidden"}},{id:"e5",event:"delegated",ts:Date.now()-2e4,payload:{fromAgent:"router",toAgent:"billing-agent"}},{id:"e6",event:"run.finished",ts:Date.now()-26e3,payload:{runId:"r-8a1",steps:7,inputTokens:4200,outputTokens:1100}}];function ae(){const a=[];for(let t=29;t>=0;t-=1){const r=new Date(Date.now()-t*864e5).toISOString().slice(0,10),s=Math.sin(t/4)*.4+1,l=Math.round(26*s+(29-t)*.6),i=Math.round(l*1.28);a.push({day:r,calls:i,turns:l,inputTokens:i*3400,outputTokens:i*1150,costUsd:Number((i*.0123).toFixed(4)),firstTryRate:Number((.82+Math.cos(t/5)*.06).toFixed(3))})}return a}const n=ae(),oe={totals:{calls:n.reduce((a,t)=>a+t.calls,0),turns:n.reduce((a,t)=>a+t.turns,0),firstAttempts:1014,firstTrySuccesses:842,firstTryRate:842/1014,retried:131,failed:207,inputTokens:n.reduce((a,t)=>a+t.inputTokens,0),outputTokens:n.reduce((a,t)=>a+t.outputTokens,0),costUsd:n.reduce((a,t)=>a+(t.costUsd??0),0)},byToolModel:[{toolName:"ui__render",modelId:"arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-sonnet-4-5",mode:"tree",calls:612,firstAttempts:498,firstTrySuccesses:461,firstTryRate:461/498,retried:41,failed:58,costUsd:6.84},{toolName:"ui__sandbox",modelId:"arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-sonnet-4-5",mode:"sandbox",calls:284,firstAttempts:201,firstTrySuccesses:139,firstTryRate:139/201,retried:52,failed:93,costUsd:5.12},{toolName:"ui__show_order_card",modelId:"gpt-4o-mini",mode:"per-component",calls:241,firstAttempts:232,firstTrySuccesses:221,firstTryRate:221/232,retried:7,failed:13,costUsd:.41},{toolName:"ui__show",modelId:"gpt-4o-mini",mode:"show",calls:108,firstAttempts:83,firstTrySuccesses:21,firstTryRate:21/83,retried:31,failed:43,costUsd:null}],errors:[{category:"syntax",message:"invalid Sandbox code: jsx line 14:22: Unexpected token — check that every JSX tag is closed in order",toolName:"ui__sandbox",count:48,lastAt:new Date(Date.now()-12*6e4).toISOString()},{category:"shape",message:'invalid UI tree: children[2].props.columns: Expected array, received "…"',toolName:"ui__render",count:37,lastAt:new Date(Date.now()-40*6e4).toISOString()},{category:"unknown-component",message:"invalid UI tree code: children[0] jsx line 3:22: `<Slider>` is not a kit component — use one of `Button`, `Card`, or a plain element",toolName:"ui__render",count:21,lastAt:new Date(Date.now()-3*36e5).toISOString()},{category:"missing-app",message:"invalid Sandbox code: jsx: no `App` — rename `function Calculator` to `function App`; App is what gets drawn",toolName:"ui__sandbox",count:19,lastAt:new Date(Date.now()-5*36e5).toISOString()},{category:"unavailable",message:'component "…" is not available here',toolName:"ui__show",count:14,lastAt:new Date(Date.now()-26*36e5).toISOString()},{category:"bridge",message:"invalid Sandbox code: html line 1:18: `flippy.send` — the bridge is `agent.send(payload)`",toolName:"ui__sandbox",count:9,lastAt:new Date(Date.now()-2*864e5).toISOString()},{category:"other",message:"Request timed out after 30000ms",toolName:"ui__show",count:3,lastAt:new Date(Date.now()-4*864e5).toISOString()}],byDay:n,costPerTurn:{turns:n.reduce((a,t)=>a+t.turns,0),avgUsd:.0157,p50Usd:.0112,p95Usd:.0441},latency:{firstFrame:{samples:1002,p50Ms:740,p95Ms:2310},complete:{samples:931,p50Ms:3480,p95Ms:9120}}},ne={totals:{calls:0,turns:0,firstAttempts:0,firstTrySuccesses:0,firstTryRate:null,retried:0,failed:0,inputTokens:0,outputTokens:0,costUsd:null},byToolModel:[],errors:[],byDay:[],costPerTurn:{turns:0,avgUsd:null,p50Usd:null,p95Usd:null},latency:{firstFrame:{samples:0,p50Ms:null,p95Ms:null},complete:{samples:0,p50Ms:null,p95Ms:null}}};function d(a){return{page:a,error:null,retry:()=>{}}}function se(a,t){return{page:a,error:t,retry:()=>{}}}function re(){const[a,t]=w.useState(null);return e.jsx(O,{delay:400,closeDelay:0,timeout:300,children:e.jsxs("div",{className:"relative min-h-full",children:[e.jsx("div",{className:"app-bg"}),e.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] space-y-6 px-5 py-6",children:[e.jsxs("header",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-brand/40 bg-brand/10",children:e.jsx(A,{className:"h-4 w-4 text-brand"})}),e.jsxs("div",{className:"leading-none",children:[e.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway — preview"}),e.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-muted-foreground",children:"mock data · no backend"})]})]}),e.jsx(o,{label:"Spend & usage",children:e.jsx(_,{overview:u,topThreads:X,onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Models",children:e.jsx(R,{rows:u.byModel})}),e.jsx(o,{label:"Actors & budgets",children:e.jsx(N,{rows:u.byActor,budgets:Y})}),e.jsx(o,{label:"Runs & tools",children:e.jsx(m,{toolCalls:p,toolCallsTable:d(f),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:d(I),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{},onOpenRun:()=>t("run"),onOpenThread:()=>t("thread")})}),e.jsx(o,{label:"Reliability",children:e.jsx(v,{overview:W,runsTable:d(Z),runsWhere:{threadId:"th2"},onRunsStatusChange:()=>{},onRunsAgentNameChange:()=>{},onRunsThreadIdClear:()=>{},onRunsPageChange:()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Approvals",children:e.jsx(M,{table:d($),onPageChange:()=>{},onDecide:async()=>{},onOpenRun:()=>t("run")})}),e.jsx(o,{label:"Tools",children:e.jsx(j,{rows:V})}),e.jsx(o,{label:"Generative UI",children:e.jsx(c,{stats:oe})}),e.jsx(o,{label:"Pricing",children:e.jsx(k,{prices:ee,loading:!1,unavailable:!1,onUpsert:async()=>{},saving:!1})}),e.jsx(o,{label:"Live",children:e.jsx(E,{events:te,connected:!0})}),e.jsx(o,{label:"Failure & loading states",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(g,{label:"Spend & usage",error:new Error("503 Service Unavailable"),onRetry:()=>{}}),e.jsx(g,{label:"Pricing",error:new Error("401 Unauthorized"),onRetry:()=>{}}),e.jsx(P,{label:"Reliability"}),e.jsx(c,{stats:null,unavailable:!0}),e.jsx(c,{stats:ne}),e.jsx(m,{toolCalls:p,toolCallsTable:se(f,new Error("500 Internal Server Error")),toolCallsWhere:{},onToolCallsToolNameChange:()=>{},onToolCallsStatusChange:()=>{},onToolCallsPageChange:()=>{},threadsTable:d(I),threadsWhere:{},onThreadsTitleChange:()=>{},onThreadsPageChange:()=>{}})]})}),e.jsx(o,{label:"Drill-downs",children:e.jsxs(U,{className:"flex flex-wrap gap-2 p-4 text-xs",children:[e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("run"),children:"Open a run"}),e.jsx(h,{size:"md",className:"rounded-lg",onClick:()=>t("thread"),children:"Open a thread"})]})})]}),a!==null&&e.jsx(L,{title:a==="run"?"Run":"Thread",subtitle:a==="run"?T.run.runId:S.thread.threadId,onClose:()=>t(null),...a==="run"?{onBack:()=>t("thread")}:{},children:a==="run"?e.jsx(K,{detail:T,onOpenThread:()=>t("thread")}):e.jsx(q,{detail:S,onOpenRun:()=>t("run"),runsHref:"#/reliability?threadId=th2"})})]})})}function o({label:a,children:t}){return e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"mono text-[11px] uppercase tracking-[0.2em] text-muted-foreground",children:a}),t]})}const b=document.getElementById("root");b&&C.createRoot(b).render(e.jsx(w.StrictMode,{children:e.jsx(re,{})}));