blokctl 0.3.0 → 0.4.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.
- package/dist/commands/create/project.js +9 -3
- package/dist/commands/migrate/index.js +11 -0
- package/dist/commands/migrate/paths.d.ts +2 -0
- package/dist/commands/migrate/paths.js +267 -0
- package/dist/index.js +0 -0
- package/dist/studio-dist/assets/index-D6hOoOID.css +1 -0
- package/dist/studio-dist/assets/index-D_CdNmTc.js +42 -0
- package/dist/studio-dist/index.html +2 -2
- package/package.json +2 -2
- package/dist/studio-dist/assets/index-D6JA5F-X.js +0 -42
- package/dist/studio-dist/assets/index-mdQkg9ul.css +0 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var og=Object.defineProperty;var ug=(s,o,r)=>o in s?og(s,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[o]=r;var B0=(s,o,r)=>ug(s,typeof o!="symbol"?o+"":o,r);import{a as dg,j as a,R as ki,r as D,u as Ze,b as Gt,d as Bn,g as fg,Q as mg,e as xg}from"./tanstack-query-Day3Mt-4.js";import{r as hg,a as pg,L as Qe,b as xl,c as gg,O as bg,d as Dt,e as vg,f as yg,R as jg}from"./tanstack-router-BB95iErN.js";import{af as Ng,ag as Nm,ah as zm,ai as Sm,aj as wm,ak as Em,al as Tm,am as bo,an as zg}from"./charts-Dh48HebV.js";import{C as is,a as sa,L as Sg,b as Cm,A as Gn,F as wg,T as Eg,G as cs,c as So,W as rs,S as wo,d as Tg,B as G0,e as Cg,X as Bt,I as Rg,f as Rm,g as Eo,h as Q0,i as Ye,j as Dg,k as la,l as To,m as Co,R as Dm,P as fl,n as Mm,o as Ro,D as Mg,p as Do,q as os,M as Ag,r as kg,s as Og,t as Am,u as _g,v as Ug,w as Lg,x as qg,E as Hg,y as Y0,z as Mo,Z as Bg,H as Gg,J as X0,K as Qg,N as ia,O as vo,Q as as,U as yo,V as Yg,Y as Xg,_ as Kg,$ as Vg,a0 as Ao,a1 as Zg,a2 as Jg,a3 as oo,a4 as $g,a5 as Fg,a6 as km}from"./icons-N5J4OhGx.js";import{u as Wg,f as uo,g as Ig,a as Pg}from"./tanstack-table-Biem1hxK.js";import{r as eb,i as tb,B as nb,C as lb,M as ab,H as K0,P as V0}from"./graph-DWteCadQ.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const m of f)if(m.type==="childList")for(const x of m.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&u(x)}).observe(document,{childList:!0,subtree:!0});function r(f){const m={};return f.integrity&&(m.integrity=f.integrity),f.referrerPolicy&&(m.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?m.credentials="include":f.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(f){if(f.ep)return;f.ep=!0;const m=r(f);fetch(f.href,m)}})();var fo={exports:{}},es={},mo={exports:{}},xo={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* scheduler.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Z0;function sb(){return Z0||(Z0=1,(function(s){function o(O,V){var I=O.length;O.push(V);e:for(;0<I;){var me=I-1>>>1,ve=O[me];if(0<f(ve,V))O[me]=V,O[I]=ve,I=me;else break e}}function r(O){return O.length===0?null:O[0]}function u(O){if(O.length===0)return null;var V=O[0],I=O.pop();if(I!==V){O[0]=I;e:for(var me=0,ve=O.length,Se=ve>>>1;me<Se;){var Re=2*(me+1)-1,he=O[Re],Xe=Re+1,_t=O[Xe];if(0>f(he,I))Xe<ve&&0>f(_t,he)?(O[me]=_t,O[Xe]=I,me=Xe):(O[me]=he,O[Re]=I,me=Re);else if(Xe<ve&&0>f(_t,I))O[me]=_t,O[Xe]=I,me=Xe;else break e}}return V}function f(O,V){var I=O.sortIndex-V.sortIndex;return I!==0?I:O.id-V.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;s.unstable_now=function(){return m.now()}}else{var x=Date,p=x.now();s.unstable_now=function(){return x.now()-p}}var b=[],z=[],y=1,g=null,C=3,S=!1,A=!1,q=!1,U=!1,Q=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;function G(O){for(var V=r(z);V!==null;){if(V.callback===null)u(z);else if(V.startTime<=O)u(z),V.sortIndex=V.expirationTime,o(b,V);else break;V=r(z)}}function K(O){if(q=!1,G(O),!A)if(r(b)!==null)A=!0,L||(L=!0,X());else{var V=r(z);V!==null&&tt(K,V.startTime-O)}}var L=!1,te=-1,J=5,ae=-1;function Ae(){return U?!0:!(s.unstable_now()-ae<J)}function _e(){if(U=!1,L){var O=s.unstable_now();ae=O;var V=!0;try{e:{A=!1,q&&(q=!1,k(te),te=-1),S=!0;var I=C;try{t:{for(G(O),g=r(b);g!==null&&!(g.expirationTime>O&&Ae());){var me=g.callback;if(typeof me=="function"){g.callback=null,C=g.priorityLevel;var ve=me(g.expirationTime<=O);if(O=s.unstable_now(),typeof ve=="function"){g.callback=ve,G(O),V=!0;break t}g===r(b)&&u(b),G(O)}else u(b);g=r(b)}if(g!==null)V=!0;else{var Se=r(z);Se!==null&&tt(K,Se.startTime-O),V=!1}}break e}finally{g=null,C=I,S=!1}V=void 0}}finally{V?X():L=!1}}}var X;if(typeof Y=="function")X=function(){Y(_e)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,Ue=P.port2;P.port1.onmessage=_e,X=function(){Ue.postMessage(null)}}else X=function(){Q(_e,0)};function tt(O,V){te=Q(function(){O(s.unstable_now())},V)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(O){O.callback=null},s.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<O?Math.floor(1e3/O):5},s.unstable_getCurrentPriorityLevel=function(){return C},s.unstable_next=function(O){switch(C){case 1:case 2:case 3:var V=3;break;default:V=C}var I=C;C=V;try{return O()}finally{C=I}},s.unstable_requestPaint=function(){U=!0},s.unstable_runWithPriority=function(O,V){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var I=C;C=O;try{return V()}finally{C=I}},s.unstable_scheduleCallback=function(O,V,I){var me=s.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?me+I:me):I=me,O){case 1:var ve=-1;break;case 2:ve=250;break;case 5:ve=1073741823;break;case 4:ve=1e4;break;default:ve=5e3}return ve=I+ve,O={id:y++,callback:V,priorityLevel:O,startTime:I,expirationTime:ve,sortIndex:-1},I>me?(O.sortIndex=I,o(z,O),r(b)===null&&O===r(z)&&(q?(k(te),te=-1):q=!0,tt(K,I-me))):(O.sortIndex=ve,o(b,O),A||S||(A=!0,L||(L=!0,X()))),O},s.unstable_shouldYield=Ae,s.unstable_wrapCallback=function(O){var V=C;return function(){var I=C;C=V;try{return O.apply(this,arguments)}finally{C=I}}}})(xo)),xo}var J0;function ib(){return J0||(J0=1,mo.exports=sb()),mo.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-dom-client.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $0;function cb(){if($0)return es;$0=1;var s=ib(),o=dg(),r=hg();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function x(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(m(e)!==e)throw Error(u(188))}function z(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var i=n.return;if(i===null)break;var c=i.alternate;if(c===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===n)return b(i),e;if(c===l)return b(i),t;c=c.sibling}throw Error(u(188))}if(n.return!==l.return)n=i,l=c;else{for(var d=!1,h=i.child;h;){if(h===n){d=!0,n=i,l=c;break}if(h===l){d=!0,l=i,n=c;break}h=h.sibling}if(!d){for(h=c.child;h;){if(h===n){d=!0,n=c,l=i;break}if(h===l){d=!0,l=c,n=i;break}h=h.sibling}if(!d)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var g=Object.assign,C=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),Y=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),_e=Symbol.iterator;function X(e){return e===null||typeof e!="object"?null:(e=_e&&e[_e]||e["@@iterator"],typeof e=="function"?e:null)}var P=Symbol.for("react.client.reference");function Ue(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case Q:return"Profiler";case U:return"StrictMode";case K:return"Suspense";case L:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case Y:return e.displayName||"Context";case k:return(e._context.displayName||"Context")+".Consumer";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:Ue(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return Ue(e(t))}catch{}}return null}var tt=Array.isArray,O=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},me=[],ve=-1;function Se(e){return{current:e}}function Re(e){0>ve||(e.current=me[ve],me[ve]=null,ve--)}function he(e,t){ve++,me[ve]=e.current,e.current=t}var Xe=Se(null),_t=Se(null),un=Se(null),ms=Se(null);function xs(e,t){switch(he(un,t),he(_t,e),he(Xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?o0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=o0(t),e=u0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Re(Xe),he(Xe,e)}function hl(){Re(Xe),Re(_t),Re(un)}function Xi(e){e.memoizedState!==null&&he(ms,e);var t=Xe.current,n=u0(t,e.type);t!==n&&(he(_t,e),he(Xe,n))}function hs(e){_t.current===e&&(Re(Xe),Re(_t)),ms.current===e&&(Re(ms),Fa._currentValue=I)}var Ki,qo;function Xn(e){if(Ki===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ki=t&&t[1]||"",qo=-1<n.stack.indexOf(`
|
|
18
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
+
`+Ki+e+qo}var Vi=!1;function Zi(e,t){if(!e||Vi)return"";Vi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(R){var T=R}Reflect.construct(e,[],H)}else{try{H.call()}catch(R){T=R}e.call(H.prototype)}}else{try{throw Error()}catch(R){T=R}(H=e())&&typeof H.catch=="function"&&H.catch(function(){})}}catch(R){if(R&&T&&typeof R.stack=="string")return[R.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=l.DetermineComponentFrameRoot(),d=c[0],h=c[1];if(d&&h){var v=d.split(`
|
|
20
|
+
`),E=h.split(`
|
|
21
|
+
`);for(i=l=0;l<v.length&&!v[l].includes("DetermineComponentFrameRoot");)l++;for(;i<E.length&&!E[i].includes("DetermineComponentFrameRoot");)i++;if(l===v.length||i===E.length)for(l=v.length-1,i=E.length-1;1<=l&&0<=i&&v[l]!==E[i];)i--;for(;1<=l&&0<=i;l--,i--)if(v[l]!==E[i]){if(l!==1||i!==1)do if(l--,i--,0>i||v[l]!==E[i]){var M=`
|
|
22
|
+
`+v[l].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=l&&0<=i);break}}}finally{Vi=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Xn(n):""}function Bx(e,t){switch(e.tag){case 26:case 27:case 5:return Xn(e.type);case 16:return Xn("Lazy");case 13:return e.child!==t&&t!==null?Xn("Suspense Fallback"):Xn("Suspense");case 19:return Xn("SuspenseList");case 0:case 15:return Zi(e.type,!1);case 11:return Zi(e.type.render,!1);case 1:return Zi(e.type,!0);case 31:return Xn("Activity");default:return""}}function Ho(e){try{var t="",n=null;do t+=Bx(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
23
|
+
Error generating stack: `+l.message+`
|
|
24
|
+
`+l.stack}}var Ji=Object.prototype.hasOwnProperty,$i=s.unstable_scheduleCallback,Fi=s.unstable_cancelCallback,Gx=s.unstable_shouldYield,Qx=s.unstable_requestPaint,ot=s.unstable_now,Yx=s.unstable_getCurrentPriorityLevel,Bo=s.unstable_ImmediatePriority,Go=s.unstable_UserBlockingPriority,ps=s.unstable_NormalPriority,Xx=s.unstable_LowPriority,Qo=s.unstable_IdlePriority,Kx=s.log,Vx=s.unstable_setDisableYieldValue,ra=null,ut=null;function dn(e){if(typeof Kx=="function"&&Vx(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(ra,e)}catch{}}var dt=Math.clz32?Math.clz32:$x,Zx=Math.log,Jx=Math.LN2;function $x(e){return e>>>=0,e===0?32:31-(Zx(e)/Jx|0)|0}var gs=256,bs=262144,vs=4194304;function Kn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ys(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var i=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~c,l!==0?i=Kn(l):(d&=h,d!==0?i=Kn(d):n||(n=h&~e,n!==0&&(i=Kn(n))))):(h=l&~c,h!==0?i=Kn(h):d!==0?i=Kn(d):n||(n=l&~e,n!==0&&(i=Kn(n)))),i===0?0:t!==0&&t!==i&&(t&c)===0&&(c=i&-i,n=t&-t,c>=n||c===32&&(n&4194048)!==0)?t:i}function oa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Fx(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yo(){var e=vs;return vs<<=1,(vs&62914560)===0&&(vs=4194304),e}function Wi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ua(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Wx(e,t,n,l,i,c){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var h=e.entanglements,v=e.expirationTimes,E=e.hiddenUpdates;for(n=d&~n;0<n;){var M=31-dt(n),H=1<<M;h[M]=0,v[M]=-1;var T=E[M];if(T!==null)for(E[M]=null,M=0;M<T.length;M++){var R=T[M];R!==null&&(R.lane&=-536870913)}n&=~H}l!==0&&Xo(e,l,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function Xo(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-dt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Ko(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-dt(n),i=1<<l;i&t|e[l]&t&&(e[l]|=t),n&=~i}}function Vo(e,t){var n=t&-t;return n=(n&42)!==0?1:Ii(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ii(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Pi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zo(){var e=V.p;return e!==0?e:(e=window.event,e===void 0?32:k0(e.type))}function Jo(e,t){var n=V.p;try{return V.p=e,t()}finally{V.p=n}}var fn=Math.random().toString(36).slice(2),Je="__reactFiber$"+fn,nt="__reactProps$"+fn,pl="__reactContainer$"+fn,ec="__reactEvents$"+fn,Ix="__reactListeners$"+fn,Px="__reactHandles$"+fn,$o="__reactResources$"+fn,da="__reactMarker$"+fn;function tc(e){delete e[Je],delete e[nt],delete e[ec],delete e[Ix],delete e[Px]}function gl(e){var t=e[Je];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pl]||n[Je]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=g0(e);e!==null;){if(n=e[Je])return n;e=g0(e)}return t}e=n,n=e.parentNode}return null}function bl(e){if(e=e[Je]||e[pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function vl(e){var t=e[$o];return t||(t=e[$o]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[da]=!0}var Fo=new Set,Wo={};function Vn(e,t){yl(e,t),yl(e+"Capture",t)}function yl(e,t){for(Wo[e]=t,e=0;e<t.length;e++)Fo.add(t[e])}var eh=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Io={},Po={};function th(e){return Ji.call(Po,e)?!0:Ji.call(Io,e)?!1:eh.test(e)?Po[e]=!0:(Io[e]=!0,!1)}function js(e,t,n){if(th(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ns(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Qt(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function yt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nh(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var i=l.get,c=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(d){n=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nc(e){if(!e._valueTracker){var t=eu(e)?"checked":"value";e._valueTracker=nh(e,t,""+e[t])}}function tu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=eu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function zs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var lh=/[\n"\\]/g;function jt(e){return e.replace(lh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lc(e,t,n,l,i,c,d,h){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+yt(t)):e.value!==""+yt(t)&&(e.value=""+yt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?ac(e,d,yt(t)):n!=null?ac(e,d,yt(n)):l!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+yt(h):e.removeAttribute("name")}function nu(e,t,n,l,i,c,d,h){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||n!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){nc(e);return}n=n!=null?""+yt(n):"",t=t!=null?""+yt(t):n,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),nc(e)}function ac(e,t,n){t==="number"&&zs(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function jl(e,t,n,l){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&l&&(e[n].defaultSelected=!0)}else{for(n=""+yt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,l&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function lu(e,t,n){if(t!=null&&(t=""+yt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+yt(n):""}function au(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(tt(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=yt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),nc(e)}function Nl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ah=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function su(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||ah.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function iu(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var i in t)l=t[i],t.hasOwnProperty(i)&&n[i]!==l&&su(e,i,l)}else for(var c in t)t.hasOwnProperty(c)&&su(e,c,t[c])}function sc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ih=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ss(e){return ih.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yt(){}var ic=null;function cc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zl=null,Sl=null;function cu(e){var t=bl(e);if(t&&(e=t.stateNode)){var n=e[nt]||null;e:switch(e=t.stateNode,t.type){case"input":if(lc(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+jt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var i=l[nt]||null;if(!i)throw Error(u(90));lc(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&tu(l)}break e;case"textarea":lu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&jl(e,!!n.multiple,t,!1)}}}var rc=!1;function ru(e,t,n){if(rc)return e(t,n);rc=!0;try{var l=e(t);return l}finally{if(rc=!1,(zl!==null||Sl!==null)&&(di(),zl&&(t=zl,e=Sl,Sl=zl=null,cu(t),e)))for(t=0;t<e.length;t++)cu(e[t])}}function ma(e,t){var n=e.stateNode;if(n===null)return null;var l=n[nt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),oc=!1;if(Xt)try{var xa={};Object.defineProperty(xa,"passive",{get:function(){oc=!0}}),window.addEventListener("test",xa,xa),window.removeEventListener("test",xa,xa)}catch{oc=!1}var mn=null,uc=null,ws=null;function ou(){if(ws)return ws;var e,t=uc,n=t.length,l,i="value"in mn?mn.value:mn.textContent,c=i.length;for(e=0;e<n&&t[e]===i[e];e++);var d=n-e;for(l=1;l<=d&&t[n-l]===i[c-l];l++);return ws=i.slice(e,1<l?1-l:void 0)}function Es(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ts(){return!0}function uu(){return!1}function lt(e){function t(n,l,i,c,d){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(n=e[h],this[h]=n?n(c):c[h]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Ts:uu,this.isPropagationStopped=uu,this}return g(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ts)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ts)},persist:function(){},isPersistent:Ts}),t}var Zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cs=lt(Zn),ha=g({},Zn,{view:0,detail:0}),ch=lt(ha),dc,fc,pa,Rs=g({},ha,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pa&&(pa&&e.type==="mousemove"?(dc=e.screenX-pa.screenX,fc=e.screenY-pa.screenY):fc=dc=0,pa=e),dc)},movementY:function(e){return"movementY"in e?e.movementY:fc}}),du=lt(Rs),rh=g({},Rs,{dataTransfer:0}),oh=lt(rh),uh=g({},ha,{relatedTarget:0}),mc=lt(uh),dh=g({},Zn,{animationName:0,elapsedTime:0,pseudoElement:0}),fh=lt(dh),mh=g({},Zn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xh=lt(mh),hh=g({},Zn,{data:0}),fu=lt(hh),ph={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bh[e])?!!t[e]:!1}function xc(){return vh}var yh=g({},ha,{key:function(e){if(e.key){var t=ph[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Es(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xc,charCode:function(e){return e.type==="keypress"?Es(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Es(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jh=lt(yh),Nh=g({},Rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mu=lt(Nh),zh=g({},ha,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xc}),Sh=lt(zh),wh=g({},Zn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Eh=lt(wh),Th=g({},Rs,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ch=lt(Th),Rh=g({},Zn,{newState:0,oldState:0}),Dh=lt(Rh),Mh=[9,13,27,32],hc=Xt&&"CompositionEvent"in window,ga=null;Xt&&"documentMode"in document&&(ga=document.documentMode);var Ah=Xt&&"TextEvent"in window&&!ga,xu=Xt&&(!hc||ga&&8<ga&&11>=ga),hu=" ",pu=!1;function gu(e,t){switch(e){case"keyup":return Mh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function kh(e,t){switch(e){case"compositionend":return bu(t);case"keypress":return t.which!==32?null:(pu=!0,hu);case"textInput":return e=t.data,e===hu&&pu?null:e;default:return null}}function Oh(e,t){if(wl)return e==="compositionend"||!hc&&gu(e,t)?(e=ou(),ws=uc=mn=null,wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return xu&&t.locale!=="ko"?null:t.data;default:return null}}var _h={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_h[e.type]:t==="textarea"}function yu(e,t,n,l){zl?Sl?Sl.push(l):Sl=[l]:zl=l,t=bi(t,"onChange"),0<t.length&&(n=new Cs("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ba=null,va=null;function Uh(e){l0(e,0)}function Ds(e){var t=fa(e);if(tu(t))return e}function ju(e,t){if(e==="change")return t}var Nu=!1;if(Xt){var pc;if(Xt){var gc="oninput"in document;if(!gc){var zu=document.createElement("div");zu.setAttribute("oninput","return;"),gc=typeof zu.oninput=="function"}pc=gc}else pc=!1;Nu=pc&&(!document.documentMode||9<document.documentMode)}function Su(){ba&&(ba.detachEvent("onpropertychange",wu),va=ba=null)}function wu(e){if(e.propertyName==="value"&&Ds(va)){var t=[];yu(t,va,e,cc(e)),ru(Uh,t)}}function Lh(e,t,n){e==="focusin"?(Su(),ba=t,va=n,ba.attachEvent("onpropertychange",wu)):e==="focusout"&&Su()}function qh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ds(va)}function Hh(e,t){if(e==="click")return Ds(t)}function Bh(e,t){if(e==="input"||e==="change")return Ds(t)}function Gh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ft=typeof Object.is=="function"?Object.is:Gh;function ya(e,t){if(ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!Ji.call(t,i)||!ft(e[i],t[i]))return!1}return!0}function Eu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tu(e,t){var n=Eu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Eu(n)}}function Cu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ru(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zs(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zs(e.document)}return t}function bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Qh=Xt&&"documentMode"in document&&11>=document.documentMode,El=null,vc=null,ja=null,yc=!1;function Du(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yc||El==null||El!==zs(l)||(l=El,"selectionStart"in l&&bc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ja&&ya(ja,l)||(ja=l,l=bi(vc,"onSelect"),0<l.length&&(t=new Cs("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=El)))}function Jn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tl={animationend:Jn("Animation","AnimationEnd"),animationiteration:Jn("Animation","AnimationIteration"),animationstart:Jn("Animation","AnimationStart"),transitionrun:Jn("Transition","TransitionRun"),transitionstart:Jn("Transition","TransitionStart"),transitioncancel:Jn("Transition","TransitionCancel"),transitionend:Jn("Transition","TransitionEnd")},jc={},Mu={};Xt&&(Mu=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function $n(e){if(jc[e])return jc[e];if(!Tl[e])return e;var t=Tl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Mu)return jc[e]=t[n];return e}var Au=$n("animationend"),ku=$n("animationiteration"),Ou=$n("animationstart"),Yh=$n("transitionrun"),Xh=$n("transitionstart"),Kh=$n("transitioncancel"),_u=$n("transitionend"),Uu=new Map,Nc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Nc.push("scrollEnd");function Mt(e,t){Uu.set(e,t),Vn(t,[e])}var Ms=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nt=[],Cl=0,zc=0;function As(){for(var e=Cl,t=zc=Cl=0;t<e;){var n=Nt[t];Nt[t++]=null;var l=Nt[t];Nt[t++]=null;var i=Nt[t];Nt[t++]=null;var c=Nt[t];if(Nt[t++]=null,l!==null&&i!==null){var d=l.pending;d===null?i.next=i:(i.next=d.next,d.next=i),l.pending=i}c!==0&&Lu(n,i,c)}}function ks(e,t,n,l){Nt[Cl++]=e,Nt[Cl++]=t,Nt[Cl++]=n,Nt[Cl++]=l,zc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Sc(e,t,n,l){return ks(e,t,n,l),Os(e)}function Fn(e,t){return ks(e,null,null,t),Os(e)}function Lu(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var i=!1,c=e.return;c!==null;)c.childLanes|=n,l=c.alternate,l!==null&&(l.childLanes|=n),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&t!==null&&(i=31-dt(n),e=c.hiddenUpdates,l=e[i],l===null?e[i]=[t]:l.push(t),t.lane=n|536870912),c):null}function Os(e){if(50<Ya)throw Ya=0,kr=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rl={};function Vh(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mt(e,t,n,l){return new Vh(e,t,n,l)}function wc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kt(e,t){var n=e.alternate;return n===null?(n=mt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function qu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _s(e,t,n,l,i,c){var d=0;if(l=e,typeof e=="function")wc(e)&&(d=1);else if(typeof e=="string")d=Wp(e,n,Xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=mt(31,n,t,i),e.elementType=ae,e.lanes=c,e;case q:return Wn(n.children,i,c,t);case U:d=8,i|=24;break;case Q:return e=mt(12,n,t,i|2),e.elementType=Q,e.lanes=c,e;case K:return e=mt(13,n,t,i),e.elementType=K,e.lanes=c,e;case L:return e=mt(19,n,t,i),e.elementType=L,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Y:d=10;break e;case k:d=9;break e;case G:d=11;break e;case te:d=14;break e;case J:d=16,l=null;break e}d=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=mt(d,n,t,i),t.elementType=e,t.type=l,t.lanes=c,t}function Wn(e,t,n,l){return e=mt(7,e,l,t),e.lanes=n,e}function Ec(e,t,n){return e=mt(6,e,null,t),e.lanes=n,e}function Hu(e){var t=mt(18,null,null,0);return t.stateNode=e,t}function Tc(e,t,n){return t=mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bu=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var n=Bu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Ho(t)},Bu.set(e,t),t)}return{value:e,source:t,stack:Ho(t)}}var Dl=[],Ml=0,Us=null,Na=0,St=[],wt=0,xn=null,Ut=1,Lt="";function Vt(e,t){Dl[Ml++]=Na,Dl[Ml++]=Us,Us=e,Na=t}function Gu(e,t,n){St[wt++]=Ut,St[wt++]=Lt,St[wt++]=xn,xn=e;var l=Ut;e=Lt;var i=32-dt(l)-1;l&=~(1<<i),n+=1;var c=32-dt(t)+i;if(30<c){var d=i-i%5;c=(l&(1<<d)-1).toString(32),l>>=d,i-=d,Ut=1<<32-dt(t)+i|n<<i|l,Lt=c+e}else Ut=1<<c|n<<i|l,Lt=e}function Cc(e){e.return!==null&&(Vt(e,1),Gu(e,1,0))}function Rc(e){for(;e===Us;)Us=Dl[--Ml],Dl[Ml]=null,Na=Dl[--Ml],Dl[Ml]=null;for(;e===xn;)xn=St[--wt],St[wt]=null,Lt=St[--wt],St[wt]=null,Ut=St[--wt],St[wt]=null}function Qu(e,t){St[wt++]=Ut,St[wt++]=Lt,St[wt++]=xn,Ut=t.id,Lt=t.overflow,xn=e}var $e=null,we=null,oe=!1,hn=null,Et=!1,Dc=Error(u(519));function pn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw za(zt(t,e)),Dc}function Yu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[Je]=e,t[nt]=l,n){case"dialog":ie("cancel",t),ie("close",t);break;case"iframe":case"object":case"embed":ie("load",t);break;case"video":case"audio":for(n=0;n<Ka.length;n++)ie(Ka[n],t);break;case"source":ie("error",t);break;case"img":case"image":case"link":ie("error",t),ie("load",t);break;case"details":ie("toggle",t);break;case"input":ie("invalid",t),nu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ie("invalid",t);break;case"textarea":ie("invalid",t),au(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||c0(t.textContent,n)?(l.popover!=null&&(ie("beforetoggle",t),ie("toggle",t)),l.onScroll!=null&&ie("scroll",t),l.onScrollEnd!=null&&ie("scrollend",t),l.onClick!=null&&(t.onclick=Yt),t=!0):t=!1,t||pn(e,!0)}function Xu(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Et=!1;return;case 27:case 3:Et=!0;return;default:$e=$e.return}}function Al(e){if(e!==$e)return!1;if(!oe)return Xu(e),oe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Jr(e.type,e.memoizedProps)),n=!n),n&&we&&pn(e),Xu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));we=p0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));we=p0(e)}else t===27?(t=we,Dn(e.type)?(e=Pr,Pr=null,we=e):we=t):we=$e?Ct(e.stateNode.nextSibling):null;return!0}function In(){we=$e=null,oe=!1}function Mc(){var e=hn;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),hn=null),e}function za(e){hn===null?hn=[e]:hn.push(e)}var Ac=Se(null),Pn=null,Zt=null;function gn(e,t,n){he(Ac,t._currentValue),t._currentValue=n}function Jt(e){e._currentValue=Ac.current,Re(Ac)}function kc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Oc(e,t,n,l){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var d=i.child;c=c.firstContext;e:for(;c!==null;){var h=c;c=i;for(var v=0;v<t.length;v++)if(h.context===t[v]){c.lanes|=n,h=c.alternate,h!==null&&(h.lanes|=n),kc(c.return,n,e),l||(d=null);break e}c=h.next}}else if(i.tag===18){if(d=i.return,d===null)throw Error(u(341));d.lanes|=n,c=d.alternate,c!==null&&(c.lanes|=n),kc(d,n,e),d=null}else d=i.child;if(d!==null)d.return=i;else for(d=i;d!==null;){if(d===e){d=null;break}if(i=d.sibling,i!==null){i.return=d.return,d=i;break}d=d.return}i=d}}function kl(e,t,n,l){e=null;for(var i=t,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var d=i.alternate;if(d===null)throw Error(u(387));if(d=d.memoizedProps,d!==null){var h=i.type;ft(i.pendingProps.value,d.value)||(e!==null?e.push(h):e=[h])}}else if(i===ms.current){if(d=i.alternate,d===null)throw Error(u(387));d.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Fa):e=[Fa])}i=i.return}e!==null&&Oc(t,e,n,l),t.flags|=262144}function Ls(e){for(e=e.firstContext;e!==null;){if(!ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function el(e){Pn=e,Zt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Fe(e){return Ku(Pn,e)}function qs(e,t){return Pn===null&&el(e),Ku(e,t)}function Ku(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zt===null){if(e===null)throw Error(u(308));Zt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zt=Zt.next=t;return n}var Zh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Jh=s.unstable_scheduleCallback,$h=s.unstable_NormalPriority,Le={$$typeof:Y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _c(){return{controller:new Zh,data:new Map,refCount:0}}function Sa(e){e.refCount--,e.refCount===0&&Jh($h,function(){e.controller.abort()})}var wa=null,Uc=0,Ol=0,_l=null;function Fh(e,t){if(wa===null){var n=wa=[];Uc=0,Ol=Hr(),_l={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Uc++,t.then(Vu,Vu),t}function Vu(){if(--Uc===0&&wa!==null){_l!==null&&(_l.status="fulfilled");var e=wa;wa=null,Ol=0,_l=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wh(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var Zu=O.S;O.S=function(e,t){Mf=ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Fh(e,t),Zu!==null&&Zu(e,t)};var tl=Se(null);function Lc(){var e=tl.current;return e!==null?e:ze.pooledCache}function Hs(e,t){t===null?he(tl,tl.current):he(tl,t.pool)}function Ju(){var e=Lc();return e===null?null:{parent:Le._currentValue,pool:e}}var Ul=Error(u(460)),qc=Error(u(474)),Bs=Error(u(542)),Gs={then:function(){}};function $u(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Fu(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Yt,Yt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e;default:if(typeof t.status=="string")t.then(Yt,Yt);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=l}},function(l){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e}throw ll=t,Ul}}function nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ll=n,Ul):n}}var ll=null;function Wu(){if(ll===null)throw Error(u(459));var e=ll;return ll=null,e}function Iu(e){if(e===Ul||e===Bs)throw Error(u(483))}var Ll=null,Ea=0;function Qs(e){var t=Ea;return Ea+=1,Ll===null&&(Ll=[]),Fu(Ll,e,t)}function Ta(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ys(e,t){throw t.$$typeof===C?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pu(e){function t(N,j){if(e){var w=N.deletions;w===null?(N.deletions=[j],N.flags|=16):w.push(j)}}function n(N,j){if(!e)return null;for(;j!==null;)t(N,j),j=j.sibling;return null}function l(N){for(var j=new Map;N!==null;)N.key!==null?j.set(N.key,N):j.set(N.index,N),N=N.sibling;return j}function i(N,j){return N=Kt(N,j),N.index=0,N.sibling=null,N}function c(N,j,w){return N.index=w,e?(w=N.alternate,w!==null?(w=w.index,w<j?(N.flags|=67108866,j):w):(N.flags|=67108866,j)):(N.flags|=1048576,j)}function d(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function h(N,j,w,_){return j===null||j.tag!==6?(j=Ec(w,N.mode,_),j.return=N,j):(j=i(j,w),j.return=N,j)}function v(N,j,w,_){var F=w.type;return F===q?M(N,j,w.props.children,_,w.key):j!==null&&(j.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===J&&nl(F)===j.type)?(j=i(j,w.props),Ta(j,w),j.return=N,j):(j=_s(w.type,w.key,w.props,null,N.mode,_),Ta(j,w),j.return=N,j)}function E(N,j,w,_){return j===null||j.tag!==4||j.stateNode.containerInfo!==w.containerInfo||j.stateNode.implementation!==w.implementation?(j=Tc(w,N.mode,_),j.return=N,j):(j=i(j,w.children||[]),j.return=N,j)}function M(N,j,w,_,F){return j===null||j.tag!==7?(j=Wn(w,N.mode,_,F),j.return=N,j):(j=i(j,w),j.return=N,j)}function H(N,j,w){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Ec(""+j,N.mode,w),j.return=N,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case S:return w=_s(j.type,j.key,j.props,null,N.mode,w),Ta(w,j),w.return=N,w;case A:return j=Tc(j,N.mode,w),j.return=N,j;case J:return j=nl(j),H(N,j,w)}if(tt(j)||X(j))return j=Wn(j,N.mode,w,null),j.return=N,j;if(typeof j.then=="function")return H(N,Qs(j),w);if(j.$$typeof===Y)return H(N,qs(N,j),w);Ys(N,j)}return null}function T(N,j,w,_){var F=j!==null?j.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return F!==null?null:h(N,j,""+w,_);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case S:return w.key===F?v(N,j,w,_):null;case A:return w.key===F?E(N,j,w,_):null;case J:return w=nl(w),T(N,j,w,_)}if(tt(w)||X(w))return F!==null?null:M(N,j,w,_,null);if(typeof w.then=="function")return T(N,j,Qs(w),_);if(w.$$typeof===Y)return T(N,j,qs(N,w),_);Ys(N,w)}return null}function R(N,j,w,_,F){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return N=N.get(w)||null,h(j,N,""+_,F);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case S:return N=N.get(_.key===null?w:_.key)||null,v(j,N,_,F);case A:return N=N.get(_.key===null?w:_.key)||null,E(j,N,_,F);case J:return _=nl(_),R(N,j,w,_,F)}if(tt(_)||X(_))return N=N.get(w)||null,M(j,N,_,F,null);if(typeof _.then=="function")return R(N,j,w,Qs(_),F);if(_.$$typeof===Y)return R(N,j,w,qs(j,_),F);Ys(j,_)}return null}function Z(N,j,w,_){for(var F=null,ue=null,$=j,ne=j=0,re=null;$!==null&&ne<w.length;ne++){$.index>ne?(re=$,$=null):re=$.sibling;var de=T(N,$,w[ne],_);if(de===null){$===null&&($=re);break}e&&$&&de.alternate===null&&t(N,$),j=c(de,j,ne),ue===null?F=de:ue.sibling=de,ue=de,$=re}if(ne===w.length)return n(N,$),oe&&Vt(N,ne),F;if($===null){for(;ne<w.length;ne++)$=H(N,w[ne],_),$!==null&&(j=c($,j,ne),ue===null?F=$:ue.sibling=$,ue=$);return oe&&Vt(N,ne),F}for($=l($);ne<w.length;ne++)re=R($,N,ne,w[ne],_),re!==null&&(e&&re.alternate!==null&&$.delete(re.key===null?ne:re.key),j=c(re,j,ne),ue===null?F=re:ue.sibling=re,ue=re);return e&&$.forEach(function(_n){return t(N,_n)}),oe&&Vt(N,ne),F}function W(N,j,w,_){if(w==null)throw Error(u(151));for(var F=null,ue=null,$=j,ne=j=0,re=null,de=w.next();$!==null&&!de.done;ne++,de=w.next()){$.index>ne?(re=$,$=null):re=$.sibling;var _n=T(N,$,de.value,_);if(_n===null){$===null&&($=re);break}e&&$&&_n.alternate===null&&t(N,$),j=c(_n,j,ne),ue===null?F=_n:ue.sibling=_n,ue=_n,$=re}if(de.done)return n(N,$),oe&&Vt(N,ne),F;if($===null){for(;!de.done;ne++,de=w.next())de=H(N,de.value,_),de!==null&&(j=c(de,j,ne),ue===null?F=de:ue.sibling=de,ue=de);return oe&&Vt(N,ne),F}for($=l($);!de.done;ne++,de=w.next())de=R($,N,ne,de.value,_),de!==null&&(e&&de.alternate!==null&&$.delete(de.key===null?ne:de.key),j=c(de,j,ne),ue===null?F=de:ue.sibling=de,ue=de);return e&&$.forEach(function(rg){return t(N,rg)}),oe&&Vt(N,ne),F}function Ne(N,j,w,_){if(typeof w=="object"&&w!==null&&w.type===q&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case S:e:{for(var F=w.key;j!==null;){if(j.key===F){if(F=w.type,F===q){if(j.tag===7){n(N,j.sibling),_=i(j,w.props.children),_.return=N,N=_;break e}}else if(j.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===J&&nl(F)===j.type){n(N,j.sibling),_=i(j,w.props),Ta(_,w),_.return=N,N=_;break e}n(N,j);break}else t(N,j);j=j.sibling}w.type===q?(_=Wn(w.props.children,N.mode,_,w.key),_.return=N,N=_):(_=_s(w.type,w.key,w.props,null,N.mode,_),Ta(_,w),_.return=N,N=_)}return d(N);case A:e:{for(F=w.key;j!==null;){if(j.key===F)if(j.tag===4&&j.stateNode.containerInfo===w.containerInfo&&j.stateNode.implementation===w.implementation){n(N,j.sibling),_=i(j,w.children||[]),_.return=N,N=_;break e}else{n(N,j);break}else t(N,j);j=j.sibling}_=Tc(w,N.mode,_),_.return=N,N=_}return d(N);case J:return w=nl(w),Ne(N,j,w,_)}if(tt(w))return Z(N,j,w,_);if(X(w)){if(F=X(w),typeof F!="function")throw Error(u(150));return w=F.call(w),W(N,j,w,_)}if(typeof w.then=="function")return Ne(N,j,Qs(w),_);if(w.$$typeof===Y)return Ne(N,j,qs(N,w),_);Ys(N,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,j!==null&&j.tag===6?(n(N,j.sibling),_=i(j,w),_.return=N,N=_):(n(N,j),_=Ec(w,N.mode,_),_.return=N,N=_),d(N)):n(N,j)}return function(N,j,w,_){try{Ea=0;var F=Ne(N,j,w,_);return Ll=null,F}catch($){if($===Ul||$===Bs)throw $;var ue=mt(29,$,null,N.mode);return ue.lanes=_,ue.return=N,ue}finally{}}}var al=Pu(!0),ed=Pu(!1),bn=!1;function Hc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yn(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(xe&2)!==0){var i=l.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),l.pending=t,t=Os(e),Lu(e,null,n),t}return ks(e,l,t,n),Os(e)}function Ca(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ko(e,n)}}function Gc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,c=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};c===null?i=c=d:c=c.next=d,n=n.next}while(n!==null);c===null?i=c=t:c=c.next=t}else i=c=t;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qc=!1;function Ra(){if(Qc){var e=_l;if(e!==null)throw e}}function Da(e,t,n,l){Qc=!1;var i=e.updateQueue;bn=!1;var c=i.firstBaseUpdate,d=i.lastBaseUpdate,h=i.shared.pending;if(h!==null){i.shared.pending=null;var v=h,E=v.next;v.next=null,d===null?c=E:d.next=E,d=v;var M=e.alternate;M!==null&&(M=M.updateQueue,h=M.lastBaseUpdate,h!==d&&(h===null?M.firstBaseUpdate=E:h.next=E,M.lastBaseUpdate=v))}if(c!==null){var H=i.baseState;d=0,M=E=v=null,h=c;do{var T=h.lane&-536870913,R=T!==h.lane;if(R?(ce&T)===T:(l&T)===T){T!==0&&T===Ol&&(Qc=!0),M!==null&&(M=M.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var Z=e,W=h;T=t;var Ne=n;switch(W.tag){case 1:if(Z=W.payload,typeof Z=="function"){H=Z.call(Ne,H,T);break e}H=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=W.payload,T=typeof Z=="function"?Z.call(Ne,H,T):Z,T==null)break e;H=g({},H,T);break e;case 2:bn=!0}}T=h.callback,T!==null&&(e.flags|=64,R&&(e.flags|=8192),R=i.callbacks,R===null?i.callbacks=[T]:R.push(T))}else R={lane:T,tag:h.tag,payload:h.payload,callback:h.callback,next:null},M===null?(E=M=R,v=H):M=M.next=R,d|=T;if(h=h.next,h===null){if(h=i.shared.pending,h===null)break;R=h,h=R.next,R.next=null,i.lastBaseUpdate=R,i.shared.pending=null}}while(!0);M===null&&(v=H),i.baseState=v,i.firstBaseUpdate=E,i.lastBaseUpdate=M,c===null&&(i.shared.lanes=0),wn|=d,e.lanes=d,e.memoizedState=H}}function td(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function nd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)td(n[e],t)}var ql=Se(null),Xs=Se(0);function ld(e,t){e=ln,he(Xs,e),he(ql,t),ln=e|t.baseLanes}function Yc(){he(Xs,ln),he(ql,ql.current)}function Xc(){ln=Xs.current,Re(ql),Re(Xs)}var xt=Se(null),Tt=null;function jn(e){var t=e.alternate;he(ke,ke.current&1),he(xt,e),Tt===null&&(t===null||ql.current!==null||t.memoizedState!==null)&&(Tt=e)}function Kc(e){he(ke,ke.current),he(xt,e),Tt===null&&(Tt=e)}function ad(e){e.tag===22?(he(ke,ke.current),he(xt,e),Tt===null&&(Tt=e)):Nn()}function Nn(){he(ke,ke.current),he(xt,xt.current)}function ht(e){Re(xt),Tt===e&&(Tt=null),Re(ke)}var ke=Se(0);function Ks(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Wr(n)||Ir(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $t=0,ee=null,ye=null,qe=null,Vs=!1,Hl=!1,sl=!1,Zs=0,Ma=0,Bl=null,Ih=0;function De(){throw Error(u(321))}function Vc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ft(e[n],t[n]))return!1;return!0}function Zc(e,t,n,l,i,c){return $t=c,ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?Gd:rr,sl=!1,c=n(l,i),sl=!1,Hl&&(c=id(t,n,l,i)),sd(e),c}function sd(e){O.H=Oa;var t=ye!==null&&ye.next!==null;if($t=0,qe=ye=ee=null,Vs=!1,Ma=0,Bl=null,t)throw Error(u(300));e===null||He||(e=e.dependencies,e!==null&&Ls(e)&&(He=!0))}function id(e,t,n,l){ee=e;var i=0;do{if(Hl&&(Bl=null),Ma=0,Hl=!1,25<=i)throw Error(u(301));if(i+=1,qe=ye=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}O.H=Qd,c=t(n,l)}while(Hl);return c}function Ph(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?Aa(t):t,e=e.useState()[0],(ye!==null?ye.memoizedState:null)!==e&&(ee.flags|=1024),t}function Jc(){var e=Zs!==0;return Zs=0,e}function $c(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Fc(e){if(Vs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vs=!1}$t=0,qe=ye=ee=null,Hl=!1,Ma=Zs=0,Bl=null}function et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?ee.memoizedState=qe=e:qe=qe.next=e,qe}function Oe(){if(ye===null){var e=ee.alternate;e=e!==null?e.memoizedState:null}else e=ye.next;var t=qe===null?ee.memoizedState:qe.next;if(t!==null)qe=t,ye=e;else{if(e===null)throw ee.alternate===null?Error(u(467)):Error(u(310));ye=e,e={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},qe===null?ee.memoizedState=qe=e:qe=qe.next=e}return qe}function Js(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Aa(e){var t=Ma;return Ma+=1,Bl===null&&(Bl=[]),e=Fu(Bl,e,t),t=ee,(qe===null?t.memoizedState:qe.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?Gd:rr),e}function $s(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Aa(e);if(e.$$typeof===Y)return Fe(e)}throw Error(u(438,String(e)))}function Wc(e){var t=null,n=ee.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ee.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Js(),ee.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ae;return t.index++,n}function Ft(e,t){return typeof t=="function"?t(e):t}function Fs(e){var t=Oe();return Ic(t,ye,e)}function Ic(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var i=e.baseQueue,c=l.pending;if(c!==null){if(i!==null){var d=i.next;i.next=c.next,c.next=d}t.baseQueue=i=c,l.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{t=i.next;var h=d=null,v=null,E=t,M=!1;do{var H=E.lane&-536870913;if(H!==E.lane?(ce&H)===H:($t&H)===H){var T=E.revertLane;if(T===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),H===Ol&&(M=!0);else if(($t&T)===T){E=E.next,T===Ol&&(M=!0);continue}else H={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},v===null?(h=v=H,d=c):v=v.next=H,ee.lanes|=T,wn|=T;H=E.action,sl&&n(c,H),c=E.hasEagerState?E.eagerState:n(c,H)}else T={lane:H,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},v===null?(h=v=T,d=c):v=v.next=T,ee.lanes|=H,wn|=H;E=E.next}while(E!==null&&E!==t);if(v===null?d=c:v.next=h,!ft(c,e.memoizedState)&&(He=!0,M&&(n=_l,n!==null)))throw n;e.memoizedState=c,e.baseState=d,e.baseQueue=v,l.lastRenderedState=c}return i===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Pc(e){var t=Oe(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,i=n.pending,c=t.memoizedState;if(i!==null){n.pending=null;var d=i=i.next;do c=e(c,d.action),d=d.next;while(d!==i);ft(c,t.memoizedState)||(He=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),n.lastRenderedState=c}return[c,l]}function cd(e,t,n){var l=ee,i=Oe(),c=oe;if(c){if(n===void 0)throw Error(u(407));n=n()}else n=t();var d=!ft((ye||i).memoizedState,n);if(d&&(i.memoizedState=n,He=!0),i=i.queue,nr(ud.bind(null,l,i,e),[e]),i.getSnapshot!==t||d||qe!==null&&qe.memoizedState.tag&1){if(l.flags|=2048,Gl(9,{destroy:void 0},od.bind(null,l,i,n,t),null),ze===null)throw Error(u(349));c||($t&127)!==0||rd(l,t,n)}return n}function rd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ee.updateQueue,t===null?(t=Js(),ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function od(e,t,n,l){t.value=n,t.getSnapshot=l,dd(t)&&fd(e)}function ud(e,t,n){return n(function(){dd(t)&&fd(e)})}function dd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ft(e,n)}catch{return!0}}function fd(e){var t=Fn(e,2);t!==null&&rt(t,e,2)}function er(e){var t=et();if(typeof e=="function"){var n=e;if(e=n(),sl){dn(!0);try{n()}finally{dn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:e},t}function md(e,t,n,l){return e.baseState=n,Ic(e,ye,typeof l=="function"?l:Ft)}function ep(e,t,n,l,i){if(Ps(e))throw Error(u(485));if(e=t.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};O.T!==null?n(!0):c.isTransition=!1,l(c),n=t.pending,n===null?(c.next=t.pending=c,xd(t,c)):(c.next=n.next,t.pending=n.next=c)}}function xd(e,t){var n=t.action,l=t.payload,i=e.state;if(t.isTransition){var c=O.T,d={};O.T=d;try{var h=n(i,l),v=O.S;v!==null&&v(d,h),hd(e,t,h)}catch(E){tr(e,t,E)}finally{c!==null&&d.types!==null&&(c.types=d.types),O.T=c}}else try{c=n(i,l),hd(e,t,c)}catch(E){tr(e,t,E)}}function hd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){pd(e,t,l)},function(l){return tr(e,t,l)}):pd(e,t,n)}function pd(e,t,n){t.status="fulfilled",t.value=n,gd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xd(e,n)))}function tr(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,gd(t),t=t.next;while(t!==l)}e.action=null}function gd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bd(e,t){return t}function vd(e,t){if(oe){var n=ze.formState;if(n!==null){e:{var l=ee;if(oe){if(we){t:{for(var i=we,c=Et;i.nodeType!==8;){if(!c){i=null;break t}if(i=Ct(i.nextSibling),i===null){i=null;break t}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){we=Ct(i.nextSibling),l=i.data==="F!";break e}}pn(l)}l=!1}l&&(t=n[0])}}return n=et(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bd,lastRenderedState:t},n.queue=l,n=qd.bind(null,ee,l),l.dispatch=n,l=er(!1),c=cr.bind(null,ee,!1,l.queue),l=et(),i={state:t,dispatch:null,action:e,pending:null},l.queue=i,n=ep.bind(null,ee,i,c,n),i.dispatch=n,l.memoizedState=e,[t,n,!1]}function yd(e){var t=Oe();return jd(t,ye,e)}function jd(e,t,n){if(t=Ic(e,t,bd)[0],e=Fs(Ft)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Aa(t)}catch(d){throw d===Ul?Bs:d}else l=t;t=Oe();var i=t.queue,c=i.dispatch;return n!==t.memoizedState&&(ee.flags|=2048,Gl(9,{destroy:void 0},tp.bind(null,i,n),null)),[l,c,e]}function tp(e,t){e.action=t}function Nd(e){var t=Oe(),n=ye;if(n!==null)return jd(t,n,e);Oe(),t=t.memoizedState,n=Oe();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Gl(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ee.updateQueue,t===null&&(t=Js(),ee.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function zd(){return Oe().memoizedState}function Ws(e,t,n,l){var i=et();ee.flags|=e,i.memoizedState=Gl(1|t,{destroy:void 0},n,l===void 0?null:l)}function Is(e,t,n,l){var i=Oe();l=l===void 0?null:l;var c=i.memoizedState.inst;ye!==null&&l!==null&&Vc(l,ye.memoizedState.deps)?i.memoizedState=Gl(t,c,n,l):(ee.flags|=e,i.memoizedState=Gl(1|t,c,n,l))}function Sd(e,t){Ws(8390656,8,e,t)}function nr(e,t){Is(2048,8,e,t)}function np(e){ee.flags|=4;var t=ee.updateQueue;if(t===null)t=Js(),ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function wd(e){var t=Oe().memoizedState;return np({ref:t,nextImpl:e}),function(){if((xe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Ed(e,t){return Is(4,2,e,t)}function Td(e,t){return Is(4,4,e,t)}function Cd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rd(e,t,n){n=n!=null?n.concat([e]):null,Is(4,4,Cd.bind(null,t,e),n)}function lr(){}function Dd(e,t){var n=Oe();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Vc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Md(e,t){var n=Oe();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Vc(t,l[1]))return l[0];if(l=e(),sl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[l,t],l}function ar(e,t,n){return n===void 0||($t&1073741824)!==0&&(ce&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=kf(),ee.lanes|=e,wn|=e,n)}function Ad(e,t,n,l){return ft(n,t)?n:ql.current!==null?(e=ar(e,n,l),ft(e,t)||(He=!0),e):($t&42)===0||($t&1073741824)!==0&&(ce&261930)===0?(He=!0,e.memoizedState=n):(e=kf(),ee.lanes|=e,wn|=e,t)}function kd(e,t,n,l,i){var c=V.p;V.p=c!==0&&8>c?c:8;var d=O.T,h={};O.T=h,cr(e,!1,t,n);try{var v=i(),E=O.S;if(E!==null&&E(h,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var M=Wh(v,l);ka(e,t,M,bt(e))}else ka(e,t,l,bt(e))}catch(H){ka(e,t,{then:function(){},status:"rejected",reason:H},bt())}finally{V.p=c,d!==null&&h.types!==null&&(d.types=h.types),O.T=d}}function lp(){}function sr(e,t,n,l){if(e.tag!==5)throw Error(u(476));var i=Od(e).queue;kd(e,i,t,I,n===null?lp:function(){return _d(e),n(l)})}function Od(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:I},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ft,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _d(e){var t=Od(e);t.next===null&&(t=e.alternate.memoizedState),ka(e,t.next.queue,{},bt())}function ir(){return Fe(Fa)}function Ud(){return Oe().memoizedState}function Ld(){return Oe().memoizedState}function ap(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bt();e=vn(n);var l=yn(t,e,n);l!==null&&(rt(l,t,n),Ca(l,t,n)),t={cache:_c()},e.payload=t;return}t=t.return}}function sp(e,t,n){var l=bt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Hd(t,n):(n=Sc(e,t,n,l),n!==null&&(rt(n,e,l),Bd(n,t,l)))}function qd(e,t,n){var l=bt();ka(e,t,n,l)}function ka(e,t,n,l){var i={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Hd(t,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,h=c(d,n);if(i.hasEagerState=!0,i.eagerState=h,ft(h,d))return ks(e,t,i,0),ze===null&&As(),!1}catch{}finally{}if(n=Sc(e,t,i,l),n!==null)return rt(n,e,l),Bd(n,t,l),!0}return!1}function cr(e,t,n,l){if(l={lane:2,revertLane:Hr(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(u(479))}else t=Sc(e,n,l,2),t!==null&&rt(t,e,2)}function Ps(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function Hd(e,t){Hl=Vs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Ko(e,n)}}var Oa={readContext:Fe,use:$s,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useLayoutEffect:De,useInsertionEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useSyncExternalStore:De,useId:De,useHostTransitionStatus:De,useFormState:De,useActionState:De,useOptimistic:De,useMemoCache:De,useCacheRefresh:De};Oa.useEffectEvent=De;var Gd={readContext:Fe,use:$s,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:Fe,useEffect:Sd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ws(4194308,4,Cd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ws(4194308,4,e,t)},useInsertionEffect:function(e,t){Ws(4,2,e,t)},useMemo:function(e,t){var n=et();t=t===void 0?null:t;var l=e();if(sl){dn(!0);try{e()}finally{dn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=et();if(n!==void 0){var i=n(t);if(sl){dn(!0);try{n(t)}finally{dn(!1)}}}else i=t;return l.memoizedState=l.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},l.queue=e,e=e.dispatch=sp.bind(null,ee,e),[l.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:function(e){e=er(e);var t=e.queue,n=qd.bind(null,ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:lr,useDeferredValue:function(e,t){var n=et();return ar(n,e,t)},useTransition:function(){var e=er(!1);return e=kd.bind(null,ee,e.queue,!0,!1),et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ee,i=et();if(oe){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ze===null)throw Error(u(349));(ce&127)!==0||rd(l,t,n)}i.memoizedState=n;var c={value:n,getSnapshot:t};return i.queue=c,Sd(ud.bind(null,l,c,e),[e]),l.flags|=2048,Gl(9,{destroy:void 0},od.bind(null,l,c,n,t),null),n},useId:function(){var e=et(),t=ze.identifierPrefix;if(oe){var n=Lt,l=Ut;n=(l&~(1<<32-dt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Zs++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ih++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ir,useFormState:vd,useActionState:vd,useOptimistic:function(e){var t=et();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cr.bind(null,ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:Wc,useCacheRefresh:function(){return et().memoizedState=ap.bind(null,ee)},useEffectEvent:function(e){var t=et(),n={impl:e};return t.memoizedState=n,function(){if((xe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},rr={readContext:Fe,use:$s,useCallback:Dd,useContext:Fe,useEffect:nr,useImperativeHandle:Rd,useInsertionEffect:Ed,useLayoutEffect:Td,useMemo:Md,useReducer:Fs,useRef:zd,useState:function(){return Fs(Ft)},useDebugValue:lr,useDeferredValue:function(e,t){var n=Oe();return Ad(n,ye.memoizedState,e,t)},useTransition:function(){var e=Fs(Ft)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:Aa(e),t]},useSyncExternalStore:cd,useId:Ud,useHostTransitionStatus:ir,useFormState:yd,useActionState:yd,useOptimistic:function(e,t){var n=Oe();return md(n,ye,e,t)},useMemoCache:Wc,useCacheRefresh:Ld};rr.useEffectEvent=wd;var Qd={readContext:Fe,use:$s,useCallback:Dd,useContext:Fe,useEffect:nr,useImperativeHandle:Rd,useInsertionEffect:Ed,useLayoutEffect:Td,useMemo:Md,useReducer:Pc,useRef:zd,useState:function(){return Pc(Ft)},useDebugValue:lr,useDeferredValue:function(e,t){var n=Oe();return ye===null?ar(n,e,t):Ad(n,ye.memoizedState,e,t)},useTransition:function(){var e=Pc(Ft)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:Aa(e),t]},useSyncExternalStore:cd,useId:Ud,useHostTransitionStatus:ir,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var n=Oe();return ye!==null?md(n,ye,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Wc,useCacheRefresh:Ld};Qd.useEffectEvent=wd;function or(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:g({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ur={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=bt(),i=vn(l);i.payload=t,n!=null&&(i.callback=n),t=yn(e,i,l),t!==null&&(rt(t,e,l),Ca(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=bt(),i=vn(l);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=yn(e,i,l),t!==null&&(rt(t,e,l),Ca(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bt(),l=vn(n);l.tag=2,t!=null&&(l.callback=t),t=yn(e,l,n),t!==null&&(rt(t,e,n),Ca(t,e,n))}};function Yd(e,t,n,l,i,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,c,d):t.prototype&&t.prototype.isPureReactComponent?!ya(n,l)||!ya(i,c):!0}function Xd(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&ur.enqueueReplaceState(t,t.state,null)}function il(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=g({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Kd(e){Ms(e)}function Vd(e){console.error(e)}function Zd(e){Ms(e)}function ei(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Jd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function dr(e,t,n){return n=vn(n),n.tag=3,n.payload={element:null},n.callback=function(){ei(e,t)},n}function $d(e){return e=vn(e),e.tag=3,e}function Fd(e,t,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var c=l.value;e.payload=function(){return i(c)},e.callback=function(){Jd(t,n,l)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Jd(t,n,l),typeof i!="function"&&(En===null?En=new Set([this]):En.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function ip(e,t,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&kl(t,n,i,!0),n=xt.current,n!==null){switch(n.tag){case 31:case 13:return Tt===null?fi():n.alternate===null&&Me===0&&(Me=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===Gs?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Ur(e,l,i)),!1;case 22:return n.flags|=65536,l===Gs?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Ur(e,l,i)),!1}throw Error(u(435,n.tag))}return Ur(e,l,i),fi(),!1}if(oe)return t=xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,l!==Dc&&(e=Error(u(422),{cause:l}),za(zt(e,n)))):(l!==Dc&&(t=Error(u(423),{cause:l}),za(zt(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,l=zt(l,n),i=dr(e.stateNode,l,i),Gc(e,i),Me!==4&&(Me=2)),!1;var c=Error(u(520),{cause:l});if(c=zt(c,n),Qa===null?Qa=[c]:Qa.push(c),Me!==4&&(Me=2),t===null)return!0;l=zt(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=dr(n.stateNode,l,e),Gc(n,e),!1;case 1:if(t=n.type,c=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(En===null||!En.has(c))))return n.flags|=65536,i&=-i,n.lanes|=i,i=$d(i),Fd(i,e,n,l),Gc(n,i),!1}n=n.return}while(n!==null);return!1}var fr=Error(u(461)),He=!1;function We(e,t,n,l){t.child=e===null?ed(t,null,n,l):al(t,e.child,n,l)}function Wd(e,t,n,l,i){n=n.render;var c=t.ref;if("ref"in l){var d={};for(var h in l)h!=="ref"&&(d[h]=l[h])}else d=l;return el(t),l=Zc(e,t,n,d,c,i),h=Jc(),e!==null&&!He?($c(e,t,i),Wt(e,t,i)):(oe&&h&&Cc(t),t.flags|=1,We(e,t,l,i),t.child)}function Id(e,t,n,l,i){if(e===null){var c=n.type;return typeof c=="function"&&!wc(c)&&c.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=c,Pd(e,t,c,l,i)):(e=_s(n.type,null,l,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!yr(e,i)){var d=c.memoizedProps;if(n=n.compare,n=n!==null?n:ya,n(d,l)&&e.ref===t.ref)return Wt(e,t,i)}return t.flags|=1,e=Kt(c,l),e.ref=t.ref,e.return=t,t.child=e}function Pd(e,t,n,l,i){if(e!==null){var c=e.memoizedProps;if(ya(c,l)&&e.ref===t.ref)if(He=!1,t.pendingProps=l=c,yr(e,i))(e.flags&131072)!==0&&(He=!0);else return t.lanes=e.lanes,Wt(e,t,i)}return mr(e,t,n,l,i)}function ef(e,t,n,l){var i=l.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|n:n,e!==null){for(l=t.child=e.child,i=0;l!==null;)i=i|l.lanes|l.childLanes,l=l.sibling;l=i&~c}else l=0,t.child=null;return tf(e,t,c,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hs(t,c!==null?c.cachePool:null),c!==null?ld(t,c):Yc(),ad(t);else return l=t.lanes=536870912,tf(e,t,c!==null?c.baseLanes|n:n,n,l)}else c!==null?(Hs(t,c.cachePool),ld(t,c),Nn(),t.memoizedState=null):(e!==null&&Hs(t,null),Yc(),Nn());return We(e,t,i,n),t.child}function _a(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tf(e,t,n,l,i){var c=Lc();return c=c===null?null:{parent:Le._currentValue,pool:c},t.memoizedState={baseLanes:n,cachePool:c},e!==null&&Hs(t,null),Yc(),ad(t),e!==null&&kl(e,t,l,!0),t.childLanes=i,null}function ti(e,t){return t=li({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function nf(e,t,n){return al(t,e.child,null,n),e=ti(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function cp(e,t,n){var l=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(oe){if(l.mode==="hidden")return e=ti(t,l),t.lanes=536870912,_a(null,e);if(Kc(t),(e=we)?(e=h0(e,Et),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xn!==null?{id:Ut,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=Hu(e),n.return=t,t.child=n,$e=t,we=null)):e=null,e===null)throw pn(t);return t.lanes=536870912,null}return ti(t,l)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(Kc(t),i)if(t.flags&256)t.flags&=-257,t=nf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(He||kl(e,t,n,!1),i=(n&e.childLanes)!==0,He||i){if(l=ze,l!==null&&(d=Vo(l,n),d!==0&&d!==c.retryLane))throw c.retryLane=d,Fn(e,d),rt(l,e,d),fr;fi(),t=nf(e,t,n)}else e=c.treeContext,we=Ct(d.nextSibling),$e=t,oe=!0,hn=null,Et=!1,e!==null&&Qu(t,e),t=ti(t,l),t.flags|=4096;return t}return e=Kt(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ni(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function mr(e,t,n,l,i){return el(t),n=Zc(e,t,n,l,void 0,i),l=Jc(),e!==null&&!He?($c(e,t,i),Wt(e,t,i)):(oe&&l&&Cc(t),t.flags|=1,We(e,t,n,i),t.child)}function lf(e,t,n,l,i,c){return el(t),t.updateQueue=null,n=id(t,l,n,i),sd(e),l=Jc(),e!==null&&!He?($c(e,t,c),Wt(e,t,c)):(oe&&l&&Cc(t),t.flags|=1,We(e,t,n,c),t.child)}function af(e,t,n,l,i){if(el(t),t.stateNode===null){var c=Rl,d=n.contextType;typeof d=="object"&&d!==null&&(c=Fe(d)),c=new n(l,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=ur,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=l,c.state=t.memoizedState,c.refs={},Hc(t),d=n.contextType,c.context=typeof d=="object"&&d!==null?Fe(d):Rl,c.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(or(t,n,d,l),c.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(d=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),d!==c.state&&ur.enqueueReplaceState(c,c.state,null),Da(t,l,c,i),Ra(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){c=t.stateNode;var h=t.memoizedProps,v=il(n,h);c.props=v;var E=c.context,M=n.contextType;d=Rl,typeof M=="object"&&M!==null&&(d=Fe(M));var H=n.getDerivedStateFromProps;M=typeof H=="function"||typeof c.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,M||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(h||E!==d)&&Xd(t,c,l,d),bn=!1;var T=t.memoizedState;c.state=T,Da(t,l,c,i),Ra(),E=t.memoizedState,h||T!==E||bn?(typeof H=="function"&&(or(t,n,H,l),E=t.memoizedState),(v=bn||Yd(t,n,v,l,T,E,d))?(M||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=E),c.props=l,c.state=E,c.context=d,l=v):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{c=t.stateNode,Bc(e,t),d=t.memoizedProps,M=il(n,d),c.props=M,H=t.pendingProps,T=c.context,E=n.contextType,v=Rl,typeof E=="object"&&E!==null&&(v=Fe(E)),h=n.getDerivedStateFromProps,(E=typeof h=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==H||T!==v)&&Xd(t,c,l,v),bn=!1,T=t.memoizedState,c.state=T,Da(t,l,c,i),Ra();var R=t.memoizedState;d!==H||T!==R||bn||e!==null&&e.dependencies!==null&&Ls(e.dependencies)?(typeof h=="function"&&(or(t,n,h,l),R=t.memoizedState),(M=bn||Yd(t,n,M,l,T,R,v)||e!==null&&e.dependencies!==null&&Ls(e.dependencies))?(E||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(l,R,v),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(l,R,v)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=R),c.props=l,c.state=R,c.context=v,l=M):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return c=l,ni(e,t),l=(t.flags&128)!==0,c||l?(c=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&l?(t.child=al(t,e.child,null,i),t.child=al(t,null,n,i)):We(e,t,n,i),t.memoizedState=c.state,e=t.child):e=Wt(e,t,i),e}function sf(e,t,n,l){return In(),t.flags|=256,We(e,t,n,l),t.child}var xr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hr(e){return{baseLanes:e,cachePool:Ju()}}function pr(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=gt),e}function cf(e,t,n){var l=t.pendingProps,i=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(ke.current&2)!==0),d&&(i=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(oe){if(i?jn(t):Nn(),(e=we)?(e=h0(e,Et),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xn!==null?{id:Ut,overflow:Lt}:null,retryLane:536870912,hydrationErrors:null},n=Hu(e),n.return=t,t.child=n,$e=t,we=null)):e=null,e===null)throw pn(t);return Ir(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,i?(Nn(),i=t.mode,h=li({mode:"hidden",children:h},i),l=Wn(l,i,n,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=hr(n),l.childLanes=pr(e,d,n),t.memoizedState=xr,_a(null,l)):(jn(t),gr(t,h))}var v=e.memoizedState;if(v!==null&&(h=v.dehydrated,h!==null)){if(c)t.flags&256?(jn(t),t.flags&=-257,t=br(e,t,n)):t.memoizedState!==null?(Nn(),t.child=e.child,t.flags|=128,t=null):(Nn(),h=l.fallback,i=t.mode,l=li({mode:"visible",children:l.children},i),h=Wn(h,i,n,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,al(t,e.child,null,n),l=t.child,l.memoizedState=hr(n),l.childLanes=pr(e,d,n),t.memoizedState=xr,t=_a(null,l));else if(jn(t),Ir(h)){if(d=h.nextSibling&&h.nextSibling.dataset,d)var E=d.dgst;d=E,l=Error(u(419)),l.stack="",l.digest=d,za({value:l,source:null,stack:null}),t=br(e,t,n)}else if(He||kl(e,t,n,!1),d=(n&e.childLanes)!==0,He||d){if(d=ze,d!==null&&(l=Vo(d,n),l!==0&&l!==v.retryLane))throw v.retryLane=l,Fn(e,l),rt(d,e,l),fr;Wr(h)||fi(),t=br(e,t,n)}else Wr(h)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,we=Ct(h.nextSibling),$e=t,oe=!0,hn=null,Et=!1,e!==null&&Qu(t,e),t=gr(t,l.children),t.flags|=4096);return t}return i?(Nn(),h=l.fallback,i=t.mode,v=e.child,E=v.sibling,l=Kt(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&65011712,E!==null?h=Kt(E,h):(h=Wn(h,i,n,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,_a(null,l),l=t.child,h=e.child.memoizedState,h===null?h=hr(n):(i=h.cachePool,i!==null?(v=Le._currentValue,i=i.parent!==v?{parent:v,pool:v}:i):i=Ju(),h={baseLanes:h.baseLanes|n,cachePool:i}),l.memoizedState=h,l.childLanes=pr(e,d,n),t.memoizedState=xr,_a(e.child,l)):(jn(t),n=e.child,e=n.sibling,n=Kt(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function gr(e,t){return t=li({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function li(e,t){return e=mt(22,e,null,t),e.lanes=0,e}function br(e,t,n){return al(t,e.child,null,n),e=gr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rf(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),kc(e.return,t,n)}function vr(e,t,n,l,i,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=l,d.tail=n,d.tailMode=i,d.treeForkCount=c)}function of(e,t,n){var l=t.pendingProps,i=l.revealOrder,c=l.tail;l=l.children;var d=ke.current,h=(d&2)!==0;if(h?(d=d&1|2,t.flags|=128):d&=1,he(ke,d),We(e,t,l,n),l=oe?Na:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rf(e,n,t);else if(e.tag===19)rf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Ks(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vr(t,!1,i,n,c,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ks(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vr(t,!0,n,null,c,l);break;case"together":vr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Wt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(kl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Kt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ls(e)))}function rp(e,t,n){switch(t.tag){case 3:xs(t,t.stateNode.containerInfo),gn(t,Le,e.memoizedState.cache),In();break;case 27:case 5:Xi(t);break;case 4:xs(t,t.stateNode.containerInfo);break;case 10:gn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Kc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(jn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?cf(e,t,n):(jn(t),e=Wt(e,t,n),e!==null?e.sibling:null);jn(t);break;case 19:var i=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(kl(e,t,n,!1),l=(n&t.childLanes)!==0),i){if(l)return of(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(ke,ke.current),l)break;return null;case 22:return t.lanes=0,ef(e,t,n,t.pendingProps);case 24:gn(t,Le,e.memoizedState.cache)}return Wt(e,t,n)}function uf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)He=!0;else{if(!yr(e,n)&&(t.flags&128)===0)return He=!1,rp(e,t,n);He=(e.flags&131072)!==0}else He=!1,oe&&(t.flags&1048576)!==0&&Gu(t,Na,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=nl(t.elementType),t.type=e,typeof e=="function")wc(e)?(l=il(e,l),t.tag=1,t=af(null,t,e,l,n)):(t.tag=0,t=mr(null,t,e,l,n));else{if(e!=null){var i=e.$$typeof;if(i===G){t.tag=11,t=Wd(null,t,e,l,n);break e}else if(i===te){t.tag=14,t=Id(null,t,e,l,n);break e}}throw t=Ue(e)||e,Error(u(306,t,""))}}return t;case 0:return mr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,i=il(l,t.pendingProps),af(e,t,l,i,n);case 3:e:{if(xs(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var c=t.memoizedState;i=c.element,Bc(e,t),Da(t,l,null,n);var d=t.memoizedState;if(l=d.cache,gn(t,Le,l),l!==c.cache&&Oc(t,[Le],n,!0),Ra(),l=d.element,c.isDehydrated)if(c={element:l,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=sf(e,t,l,n);break e}else if(l!==i){i=zt(Error(u(424)),t),za(i),t=sf(e,t,l,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(we=Ct(e.firstChild),$e=t,oe=!0,hn=null,Et=!0,n=ed(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(In(),l===i){t=Wt(e,t,n);break e}We(e,t,l,n)}t=t.child}return t;case 26:return ni(e,t),e===null?(n=j0(t.type,null,t.pendingProps,null))?t.memoizedState=n:oe||(n=t.type,e=t.pendingProps,l=vi(un.current).createElement(n),l[Je]=t,l[nt]=e,Ie(l,n,e),Ke(l),t.stateNode=l):t.memoizedState=j0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xi(t),e===null&&oe&&(l=t.stateNode=b0(t.type,t.pendingProps,un.current),$e=t,Et=!0,i=we,Dn(t.type)?(Pr=i,we=Ct(l.firstChild)):we=i),We(e,t,t.pendingProps.children,n),ni(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&oe&&((i=l=we)&&(l=qp(l,t.type,t.pendingProps,Et),l!==null?(t.stateNode=l,$e=t,we=Ct(l.firstChild),Et=!1,i=!0):i=!1),i||pn(t)),Xi(t),i=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,l=c.children,Jr(i,c)?l=null:d!==null&&Jr(i,d)&&(t.flags|=32),t.memoizedState!==null&&(i=Zc(e,t,Ph,null,null,n),Fa._currentValue=i),ni(e,t),We(e,t,l,n),t.child;case 6:return e===null&&oe&&((e=n=we)&&(n=Hp(n,t.pendingProps,Et),n!==null?(t.stateNode=n,$e=t,we=null,e=!0):e=!1),e||pn(t)),null;case 13:return cf(e,t,n);case 4:return xs(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=al(t,null,l,n):We(e,t,l,n),t.child;case 11:return Wd(e,t,t.type,t.pendingProps,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,gn(t,t.type,l.value),We(e,t,l.children,n),t.child;case 9:return i=t.type._context,l=t.pendingProps.children,el(t),i=Fe(i),l=l(i),t.flags|=1,We(e,t,l,n),t.child;case 14:return Id(e,t,t.type,t.pendingProps,n);case 15:return Pd(e,t,t.type,t.pendingProps,n);case 19:return of(e,t,n);case 31:return cp(e,t,n);case 22:return ef(e,t,n,t.pendingProps);case 24:return el(t),l=Fe(Le),e===null?(i=Lc(),i===null&&(i=ze,c=_c(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=n),i=c),t.memoizedState={parent:l,cache:i},Hc(t),gn(t,Le,i)):((e.lanes&n)!==0&&(Bc(e,t),Da(t,null,null,n),Ra()),i=e.memoizedState,c=t.memoizedState,i.parent!==l?(i={parent:l,cache:l},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),gn(t,Le,l)):(l=c.cache,gn(t,Le,l),l!==i.cache&&Oc(t,[Le],n,!0))),We(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function It(e){e.flags|=4}function jr(e,t,n,l,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Lf())e.flags|=8192;else throw ll=Gs,qc}else e.flags&=-16777217}function df(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t))if(Lf())e.flags|=8192;else throw ll=Gs,qc}function ai(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Yo():536870912,e.lanes|=t,Kl|=t)}function Ua(e,t){if(!oe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function op(e,t,n){var l=t.pendingProps;switch(Rc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(t),null;case 1:return Ee(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jt(Le),hl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Al(t)?It(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Mc())),Ee(t),null;case 26:var i=t.type,c=t.memoizedState;return e===null?(It(t),c!==null?(Ee(t),df(t,c)):(Ee(t),jr(t,i,null,l,n))):c?c!==e.memoizedState?(It(t),Ee(t),df(t,c)):(Ee(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&It(t),Ee(t),jr(t,i,e,l,n)),null;case 27:if(hs(t),n=un.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Ee(t),null}e=Xe.current,Al(t)?Yu(t):(e=b0(i,l,n),t.stateNode=e,It(t))}return Ee(t),null;case 5:if(hs(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Ee(t),null}if(c=Xe.current,Al(t))Yu(t);else{var d=vi(un.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?c.multiple=!0:l.size&&(c.size=l.size);break;default:c=typeof l.is=="string"?d.createElement(i,{is:l.is}):d.createElement(i)}}c[Je]=t,c[nt]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=c;e:switch(Ie(c,i,l),i){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&It(t)}}return Ee(t),jr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&It(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=un.current,Al(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,i=$e,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}e[Je]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||c0(e.nodeValue,n)),e||pn(t,!0)}else e=vi(e).createTextNode(l),e[Je]=t,t.stateNode=e}return Ee(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Al(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Je]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),e=!1}else n=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ee(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Al(t),l!==null&&l.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[Je]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ee(t),i=!1}else i=Mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool),c=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(c=l.memoizedState.cachePool.pool),c!==i&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ai(t,t.updateQueue),Ee(t),null);case 4:return hl(),e===null&&Yr(t.stateNode.containerInfo),Ee(t),null;case 10:return Jt(t.type),Ee(t),null;case 19:if(Re(ke),l=t.memoizedState,l===null)return Ee(t),null;if(i=(t.flags&128)!==0,c=l.rendering,c===null)if(i)Ua(l,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Ks(e),c!==null){for(t.flags|=128,Ua(l,!1),e=c.updateQueue,t.updateQueue=e,ai(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qu(n,e),n=n.sibling;return he(ke,ke.current&1|2),oe&&Vt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ot()>oi&&(t.flags|=128,i=!0,Ua(l,!1),t.lanes=4194304)}else{if(!i)if(e=Ks(c),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,ai(t,e),Ua(l,!0),l.tail===null&&l.tailMode==="hidden"&&!c.alternate&&!oe)return Ee(t),null}else 2*ot()-l.renderingStartTime>oi&&n!==536870912&&(t.flags|=128,i=!0,Ua(l,!1),t.lanes=4194304);l.isBackwards?(c.sibling=t.child,t.child=c):(e=l.last,e!==null?e.sibling=c:t.child=c,l.last=c)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ot(),e.sibling=null,n=ke.current,he(ke,i?n&1|2:n&1),oe&&Vt(t,l.treeForkCount),e):(Ee(t),null);case 22:case 23:return ht(t),Xc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),n=t.updateQueue,n!==null&&ai(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&Re(tl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jt(Le),Ee(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function up(e,t){switch(Rc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Le),hl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return hs(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Re(ke),null;case 4:return hl(),null;case 10:return Jt(t.type),null;case 22:case 23:return ht(t),Xc(),e!==null&&Re(tl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Le),null;case 25:return null;default:return null}}function ff(e,t){switch(Rc(t),t.tag){case 3:Jt(Le),hl();break;case 26:case 27:case 5:hs(t);break;case 4:hl();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:Re(ke);break;case 10:Jt(t.type);break;case 22:case 23:ht(t),Xc(),e!==null&&Re(tl);break;case 24:Jt(Le)}}function La(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&e)===e){l=void 0;var c=n.create,d=n.inst;l=c(),d.destroy=l}n=n.next}while(n!==i)}}catch(h){ge(t,t.return,h)}}function zn(e,t,n){try{var l=t.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var c=i.next;l=c;do{if((l.tag&e)===e){var d=l.inst,h=d.destroy;if(h!==void 0){d.destroy=void 0,i=t;var v=n,E=h;try{E()}catch(M){ge(i,v,M)}}}l=l.next}while(l!==c)}}catch(M){ge(t,t.return,M)}}function mf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nd(t,n)}catch(l){ge(e,e.return,l)}}}function xf(e,t,n){n.props=il(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){ge(e,t,l)}}function qa(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(i){ge(e,t,i)}}function qt(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){ge(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){ge(e,t,i)}else n.current=null}function hf(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){ge(e,e.return,i)}}function Nr(e,t,n){try{var l=e.stateNode;Ap(l,e.type,n,t),l[nt]=t}catch(i){ge(e,e.return,i)}}function pf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Dn(e.type)||e.tag===4}function zr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Dn(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sr(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Yt));else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Sr(e,t,n),e=e.sibling;e!==null;)Sr(e,t,n),e=e.sibling}function si(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Dn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(si(e,t,n),e=e.sibling;e!==null;)si(e,t,n),e=e.sibling}function gf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ie(t,l,n),t[Je]=e,t[nt]=n}catch(c){ge(e,e.return,c)}}var Pt=!1,Be=!1,wr=!1,bf=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function dp(e,t){if(e=e.containerInfo,Vr=Ei,e=Ru(e),bc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,c=l.focusNode;l=l.focusOffset;try{n.nodeType,c.nodeType}catch{n=null;break e}var d=0,h=-1,v=-1,E=0,M=0,H=e,T=null;t:for(;;){for(var R;H!==n||i!==0&&H.nodeType!==3||(h=d+i),H!==c||l!==0&&H.nodeType!==3||(v=d+l),H.nodeType===3&&(d+=H.nodeValue.length),(R=H.firstChild)!==null;)T=H,H=R;for(;;){if(H===e)break t;if(T===n&&++E===i&&(h=d),T===c&&++M===l&&(v=d),(R=H.nextSibling)!==null)break;H=T,T=H.parentNode}H=R}n=h===-1||v===-1?null:{start:h,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(Zr={focusedElem:e,selectionRange:n},Ei=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,n=t,i=c.memoizedProps,c=c.memoizedState,l=n.stateNode;try{var Z=il(n.type,i);e=l.getSnapshotBeforeUpdate(Z,c),l.__reactInternalSnapshotBeforeUpdate=e}catch(W){ge(n,n.return,W)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Fr(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function vf(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:tn(e,n),l&4&&La(5,n);break;case 1:if(tn(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){ge(n,n.return,d)}else{var i=il(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){ge(n,n.return,d)}}l&64&&mf(n),l&512&&qa(n,n.return);break;case 3:if(tn(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{nd(e,t)}catch(d){ge(n,n.return,d)}}break;case 27:t===null&&l&4&&gf(n);case 26:case 5:tn(e,n),t===null&&l&4&&hf(n),l&512&&qa(n,n.return);break;case 12:tn(e,n);break;case 31:tn(e,n),l&4&&Nf(e,n);break;case 13:tn(e,n),l&4&&zf(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=yp.bind(null,n),Bp(e,n))));break;case 22:if(l=n.memoizedState!==null||Pt,!l){t=t!==null&&t.memoizedState!==null||Be,i=Pt;var c=Be;Pt=l,(Be=t)&&!c?nn(e,n,(n.subtreeFlags&8772)!==0):tn(e,n),Pt=i,Be=c}break;case 30:break;default:tn(e,n)}}function yf(e){var t=e.alternate;t!==null&&(e.alternate=null,yf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&tc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ce=null,at=!1;function en(e,t,n){for(n=n.child;n!==null;)jf(e,t,n),n=n.sibling}function jf(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(ra,n)}catch{}switch(n.tag){case 26:Be||qt(n,t),en(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Be||qt(n,t);var l=Ce,i=at;Dn(n.type)&&(Ce=n.stateNode,at=!1),en(e,t,n),Za(n.stateNode),Ce=l,at=i;break;case 5:Be||qt(n,t);case 6:if(l=Ce,i=at,Ce=null,en(e,t,n),Ce=l,at=i,Ce!==null)if(at)try{(Ce.nodeType===9?Ce.body:Ce.nodeName==="HTML"?Ce.ownerDocument.body:Ce).removeChild(n.stateNode)}catch(c){ge(n,t,c)}else try{Ce.removeChild(n.stateNode)}catch(c){ge(n,t,c)}break;case 18:Ce!==null&&(at?(e=Ce,m0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Pl(e)):m0(Ce,n.stateNode));break;case 4:l=Ce,i=at,Ce=n.stateNode.containerInfo,at=!0,en(e,t,n),Ce=l,at=i;break;case 0:case 11:case 14:case 15:zn(2,n,t),Be||zn(4,n,t),en(e,t,n);break;case 1:Be||(qt(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&xf(n,t,l)),en(e,t,n);break;case 21:en(e,t,n);break;case 22:Be=(l=Be)||n.memoizedState!==null,en(e,t,n),Be=l;break;default:en(e,t,n)}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pl(e)}catch(n){ge(t,t.return,n)}}}function zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pl(e)}catch(n){ge(t,t.return,n)}}function fp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new bf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new bf),t;default:throw Error(u(435,e.tag))}}function ii(e,t){var n=fp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var i=jp.bind(null,e,l);l.then(i,i)}})}function st(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],c=e,d=t,h=d;e:for(;h!==null;){switch(h.tag){case 27:if(Dn(h.type)){Ce=h.stateNode,at=!1;break e}break;case 5:Ce=h.stateNode,at=!1;break e;case 3:case 4:Ce=h.stateNode.containerInfo,at=!0;break e}h=h.return}if(Ce===null)throw Error(u(160));jf(c,d,i),Ce=null,at=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sf(t,e),t=t.sibling}var At=null;function Sf(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:st(t,e),it(e),l&4&&(zn(3,e,e.return),La(3,e),zn(5,e,e.return));break;case 1:st(t,e),it(e),l&512&&(Be||n===null||qt(n,n.return)),l&64&&Pt&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=At;if(st(t,e),it(e),l&512&&(Be||n===null||qt(n,n.return)),l&4){var c=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(l){case"title":c=i.getElementsByTagName("title")[0],(!c||c[da]||c[Je]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(l),i.head.insertBefore(c,i.querySelector("head > title"))),Ie(c,l,n),c[Je]=e,Ke(c),l=c;break e;case"link":var d=S0("link","href",i).get(l+(n.href||""));if(d){for(var h=0;h<d.length;h++)if(c=d[h],c.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&c.getAttribute("rel")===(n.rel==null?null:n.rel)&&c.getAttribute("title")===(n.title==null?null:n.title)&&c.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(h,1);break t}}c=i.createElement(l),Ie(c,l,n),i.head.appendChild(c);break;case"meta":if(d=S0("meta","content",i).get(l+(n.content||""))){for(h=0;h<d.length;h++)if(c=d[h],c.getAttribute("content")===(n.content==null?null:""+n.content)&&c.getAttribute("name")===(n.name==null?null:n.name)&&c.getAttribute("property")===(n.property==null?null:n.property)&&c.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&c.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(h,1);break t}}c=i.createElement(l),Ie(c,l,n),i.head.appendChild(c);break;default:throw Error(u(468,l))}c[Je]=e,Ke(c),l=c}e.stateNode=l}else w0(i,e.type,e.stateNode);else e.stateNode=z0(i,l,e.memoizedProps);else c!==l?(c===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):c.count--,l===null?w0(i,e.type,e.stateNode):z0(i,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Nr(e,e.memoizedProps,n.memoizedProps)}break;case 27:st(t,e),it(e),l&512&&(Be||n===null||qt(n,n.return)),n!==null&&l&4&&Nr(e,e.memoizedProps,n.memoizedProps);break;case 5:if(st(t,e),it(e),l&512&&(Be||n===null||qt(n,n.return)),e.flags&32){i=e.stateNode;try{Nl(i,"")}catch(Z){ge(e,e.return,Z)}}l&4&&e.stateNode!=null&&(i=e.memoizedProps,Nr(e,i,n!==null?n.memoizedProps:i)),l&1024&&(wr=!0);break;case 6:if(st(t,e),it(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(Z){ge(e,e.return,Z)}}break;case 3:if(Ni=null,i=At,At=yi(t.containerInfo),st(t,e),At=i,it(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Pl(t.containerInfo)}catch(Z){ge(e,e.return,Z)}wr&&(wr=!1,wf(e));break;case 4:l=At,At=yi(e.stateNode.containerInfo),st(t,e),it(e),At=l;break;case 12:st(t,e),it(e);break;case 31:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ii(e,l)));break;case 13:st(t,e),it(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ri=ot()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ii(e,l)));break;case 22:i=e.memoizedState!==null;var v=n!==null&&n.memoizedState!==null,E=Pt,M=Be;if(Pt=E||i,Be=M||v,st(t,e),Be=M,Pt=E,it(e),l&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||v||Pt||Be||cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){v=n=t;try{if(c=v.stateNode,i)d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{h=v.stateNode;var H=v.memoizedProps.style,T=H!=null&&H.hasOwnProperty("display")?H.display:null;h.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(Z){ge(v,v.return,Z)}}}else if(t.tag===6){if(n===null){v=t;try{v.stateNode.nodeValue=i?"":v.memoizedProps}catch(Z){ge(v,v.return,Z)}}}else if(t.tag===18){if(n===null){v=t;try{var R=v.stateNode;i?x0(R,!0):x0(v.stateNode,!1)}catch(Z){ge(v,v.return,Z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,ii(e,n))));break;case 19:st(t,e),it(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ii(e,l)));break;case 30:break;case 21:break;default:st(t,e),it(e)}}function it(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(pf(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var i=n.stateNode,c=zr(e);si(e,c,i);break;case 5:var d=n.stateNode;n.flags&32&&(Nl(d,""),n.flags&=-33);var h=zr(e);si(e,h,d);break;case 3:case 4:var v=n.stateNode.containerInfo,E=zr(e);Sr(e,E,v);break;default:throw Error(u(161))}}catch(M){ge(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)vf(e,t.alternate,t),t=t.sibling}function cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:zn(4,t,t.return),cl(t);break;case 1:qt(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&xf(t,t.return,n),cl(t);break;case 27:Za(t.stateNode);case 26:case 5:qt(t,t.return),cl(t);break;case 22:t.memoizedState===null&&cl(t);break;case 30:cl(t);break;default:cl(t)}e=e.sibling}}function nn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,i=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:nn(i,c,n),La(4,c);break;case 1:if(nn(i,c,n),l=c,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(E){ge(l,l.return,E)}if(l=c,i=l.updateQueue,i!==null){var h=l.stateNode;try{var v=i.shared.hiddenCallbacks;if(v!==null)for(i.shared.hiddenCallbacks=null,i=0;i<v.length;i++)td(v[i],h)}catch(E){ge(l,l.return,E)}}n&&d&64&&mf(c),qa(c,c.return);break;case 27:gf(c);case 26:case 5:nn(i,c,n),n&&l===null&&d&4&&hf(c),qa(c,c.return);break;case 12:nn(i,c,n);break;case 31:nn(i,c,n),n&&d&4&&Nf(i,c);break;case 13:nn(i,c,n),n&&d&4&&zf(i,c);break;case 22:c.memoizedState===null&&nn(i,c,n),qa(c,c.return);break;case 30:break;default:nn(i,c,n)}t=t.sibling}}function Er(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Sa(n))}function Tr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Sa(e))}function kt(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ef(e,t,n,l),t=t.sibling}function Ef(e,t,n,l){var i=t.flags;switch(t.tag){case 0:case 11:case 15:kt(e,t,n,l),i&2048&&La(9,t);break;case 1:kt(e,t,n,l);break;case 3:kt(e,t,n,l),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Sa(e)));break;case 12:if(i&2048){kt(e,t,n,l),e=t.stateNode;try{var c=t.memoizedProps,d=c.id,h=c.onPostCommit;typeof h=="function"&&h(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){ge(t,t.return,v)}}else kt(e,t,n,l);break;case 31:kt(e,t,n,l);break;case 13:kt(e,t,n,l);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?kt(e,t,n,l):Ha(e,t):c._visibility&2?kt(e,t,n,l):(c._visibility|=2,Ql(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Er(d,t);break;case 24:kt(e,t,n,l),i&2048&&Tr(t.alternate,t);break;default:kt(e,t,n,l)}}function Ql(e,t,n,l,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,h=n,v=l,E=d.flags;switch(d.tag){case 0:case 11:case 15:Ql(c,d,h,v,i),La(8,d);break;case 23:break;case 22:var M=d.stateNode;d.memoizedState!==null?M._visibility&2?Ql(c,d,h,v,i):Ha(c,d):(M._visibility|=2,Ql(c,d,h,v,i)),i&&E&2048&&Er(d.alternate,d);break;case 24:Ql(c,d,h,v,i),i&&E&2048&&Tr(d.alternate,d);break;default:Ql(c,d,h,v,i)}t=t.sibling}}function Ha(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,i=l.flags;switch(l.tag){case 22:Ha(n,l),i&2048&&Er(l.alternate,l);break;case 24:Ha(n,l),i&2048&&Tr(l.alternate,l);break;default:Ha(n,l)}t=t.sibling}}var Ba=8192;function Yl(e,t,n){if(e.subtreeFlags&Ba)for(e=e.child;e!==null;)Tf(e,t,n),e=e.sibling}function Tf(e,t,n){switch(e.tag){case 26:Yl(e,t,n),e.flags&Ba&&e.memoizedState!==null&&Ip(n,At,e.memoizedState,e.memoizedProps);break;case 5:Yl(e,t,n);break;case 3:case 4:var l=At;At=yi(e.stateNode.containerInfo),Yl(e,t,n),At=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ba,Ba=16777216,Yl(e,t,n),Ba=l):Yl(e,t,n));break;default:Yl(e,t,n)}}function Cf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ga(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,Df(l,e)}Cf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rf(e),e=e.sibling}function Rf(e){switch(e.tag){case 0:case 11:case 15:Ga(e),e.flags&2048&&zn(9,e,e.return);break;case 3:Ga(e);break;case 12:Ga(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ci(e)):Ga(e);break;default:Ga(e)}}function ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Ve=l,Df(l,e)}Cf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:zn(8,t,t.return),ci(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ci(t));break;default:ci(t)}e=e.sibling}}function Df(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:zn(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Sa(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Ve=l;else e:for(n=e;Ve!==null;){l=Ve;var i=l.sibling,c=l.return;if(yf(l),l===n){Ve=null;break e}if(i!==null){i.return=c,Ve=i;break e}Ve=c}}}var mp={getCacheForType:function(e){var t=Fe(Le),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Fe(Le).controller.signal}},xp=typeof WeakMap=="function"?WeakMap:Map,xe=0,ze=null,se=null,ce=0,pe=0,pt=null,Sn=!1,Xl=!1,Cr=!1,ln=0,Me=0,wn=0,rl=0,Rr=0,gt=0,Kl=0,Qa=null,ct=null,Dr=!1,ri=0,Mf=0,oi=1/0,ui=null,En=null,Ge=0,Tn=null,Vl=null,an=0,Mr=0,Ar=null,Af=null,Ya=0,kr=null;function bt(){return(xe&2)!==0&&ce!==0?ce&-ce:O.T!==null?Hr():Zo()}function kf(){if(gt===0)if((ce&536870912)===0||oe){var e=bs;bs<<=1,(bs&3932160)===0&&(bs=262144),gt=e}else gt=536870912;return e=xt.current,e!==null&&(e.flags|=32),gt}function rt(e,t,n){(e===ze&&(pe===2||pe===9)||e.cancelPendingCommit!==null)&&(Zl(e,0),Cn(e,ce,gt,!1)),ua(e,n),((xe&2)===0||e!==ze)&&(e===ze&&((xe&2)===0&&(rl|=n),Me===4&&Cn(e,ce,gt,!1)),Ht(e))}function Of(e,t,n){if((xe&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||oa(e,t),i=l?gp(e,t):_r(e,t,!0),c=l;do{if(i===0){Xl&&!l&&Cn(e,t,0,!1);break}else{if(n=e.current.alternate,c&&!hp(n)){i=_r(e,t,!1),c=!1;continue}if(i===2){if(c=t,e.errorRecoveryDisabledLanes&c)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var h=e;i=Qa;var v=h.current.memoizedState.isDehydrated;if(v&&(Zl(h,d).flags|=256),d=_r(h,d,!1),d!==2){if(Cr&&!v){h.errorRecoveryDisabledLanes|=c,rl|=c,i=4;break e}c=ct,ct=i,c!==null&&(ct===null?ct=c:ct.push.apply(ct,c))}i=d}if(c=!1,i!==2)continue}}if(i===1){Zl(e,0),Cn(e,t,0,!0);break}e:{switch(l=e,c=i,c){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Cn(l,t,gt,!Sn);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=ri+300-ot(),10<i)){if(Cn(l,t,gt,!Sn),ys(l,0,!0)!==0)break e;an=t,l.timeoutHandle=d0(_f.bind(null,l,n,ct,ui,Dr,t,gt,rl,Kl,Sn,c,"Throttled",-0,0),i);break e}_f(l,n,ct,ui,Dr,t,gt,rl,Kl,Sn,c,null,-0,0)}}break}while(!0);Ht(e)}function _f(e,t,n,l,i,c,d,h,v,E,M,H,T,R){if(e.timeoutHandle=-1,H=t.subtreeFlags,H&8192||(H&16785408)===16785408){H={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yt},Tf(t,c,H);var Z=(c&62914560)===c?ri-ot():(c&4194048)===c?Mf-ot():0;if(Z=Pp(H,Z),Z!==null){an=c,e.cancelPendingCommit=Z(Yf.bind(null,e,t,c,n,l,i,d,h,v,M,H,null,T,R)),Cn(e,c,d,!E);return}}Yf(e,t,c,n,l,i,d,h,v)}function hp(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],c=i.getSnapshot;i=i.value;try{if(!ft(c(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Cn(e,t,n,l){t&=~Rr,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var i=t;0<i;){var c=31-dt(i),d=1<<c;l[c]=-1,i&=~d}n!==0&&Xo(e,n,t)}function di(){return(xe&6)===0?(Xa(0),!1):!0}function Or(){if(se!==null){if(pe===0)var e=se.return;else e=se,Zt=Pn=null,Fc(e),Ll=null,Ea=0,e=se;for(;e!==null;)ff(e.alternate,e),e=e.return;se=null}}function Zl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_p(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),an=0,Or(),ze=e,se=n=Kt(e.current,null),ce=t,pe=0,pt=null,Sn=!1,Xl=oa(e,t),Cr=!1,Kl=gt=Rr=rl=wn=Me=0,ct=Qa=null,Dr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var i=31-dt(l),c=1<<i;t|=e[i],l&=~c}return ln=t,As(),n}function Uf(e,t){ee=null,O.H=Oa,t===Ul||t===Bs?(t=Wu(),pe=3):t===qc?(t=Wu(),pe=4):pe=t===fr?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pt=t,se===null&&(Me=1,ei(e,zt(t,e.current)))}function Lf(){var e=xt.current;return e===null?!0:(ce&4194048)===ce?Tt===null:(ce&62914560)===ce||(ce&536870912)!==0?e===Tt:!1}function qf(){var e=O.H;return O.H=Oa,e===null?Oa:e}function Hf(){var e=O.A;return O.A=mp,e}function fi(){Me=4,Sn||(ce&4194048)!==ce&&xt.current!==null||(Xl=!0),(wn&134217727)===0&&(rl&134217727)===0||ze===null||Cn(ze,ce,gt,!1)}function _r(e,t,n){var l=xe;xe|=2;var i=qf(),c=Hf();(ze!==e||ce!==t)&&(ui=null,Zl(e,t)),t=!1;var d=Me;e:do try{if(pe!==0&&se!==null){var h=se,v=pt;switch(pe){case 8:Or(),d=6;break e;case 3:case 2:case 9:case 6:xt.current===null&&(t=!0);var E=pe;if(pe=0,pt=null,Jl(e,h,v,E),n&&Xl){d=0;break e}break;default:E=pe,pe=0,pt=null,Jl(e,h,v,E)}}pp(),d=Me;break}catch(M){Uf(e,M)}while(!0);return t&&e.shellSuspendCounter++,Zt=Pn=null,xe=l,O.H=i,O.A=c,se===null&&(ze=null,ce=0,As()),d}function pp(){for(;se!==null;)Bf(se)}function gp(e,t){var n=xe;xe|=2;var l=qf(),i=Hf();ze!==e||ce!==t?(ui=null,oi=ot()+500,Zl(e,t)):Xl=oa(e,t);e:do try{if(pe!==0&&se!==null){t=se;var c=pt;t:switch(pe){case 1:pe=0,pt=null,Jl(e,t,c,1);break;case 2:case 9:if($u(c)){pe=0,pt=null,Gf(t);break}t=function(){pe!==2&&pe!==9||ze!==e||(pe=7),Ht(e)},c.then(t,t);break e;case 3:pe=7;break e;case 4:pe=5;break e;case 7:$u(c)?(pe=0,pt=null,Gf(t)):(pe=0,pt=null,Jl(e,t,c,7));break;case 5:var d=null;switch(se.tag){case 26:d=se.memoizedState;case 5:case 27:var h=se;if(d?E0(d):h.stateNode.complete){pe=0,pt=null;var v=h.sibling;if(v!==null)se=v;else{var E=h.return;E!==null?(se=E,mi(E)):se=null}break t}}pe=0,pt=null,Jl(e,t,c,5);break;case 6:pe=0,pt=null,Jl(e,t,c,6);break;case 8:Or(),Me=6;break e;default:throw Error(u(462))}}bp();break}catch(M){Uf(e,M)}while(!0);return Zt=Pn=null,O.H=l,O.A=i,xe=n,se!==null?0:(ze=null,ce=0,As(),Me)}function bp(){for(;se!==null&&!Gx();)Bf(se)}function Bf(e){var t=uf(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?mi(e):se=t}function Gf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=lf(n,t,t.pendingProps,t.type,void 0,ce);break;case 11:t=lf(n,t,t.pendingProps,t.type.render,t.ref,ce);break;case 5:Fc(t);default:ff(n,t),t=se=qu(t,ln),t=uf(n,t,ln)}e.memoizedProps=e.pendingProps,t===null?mi(e):se=t}function Jl(e,t,n,l){Zt=Pn=null,Fc(t),Ll=null,Ea=0;var i=t.return;try{if(ip(e,i,t,n,ce)){Me=1,ei(e,zt(n,e.current)),se=null;return}}catch(c){if(i!==null)throw se=i,c;Me=1,ei(e,zt(n,e.current)),se=null;return}t.flags&32768?(oe||l===1?e=!0:Xl||(ce&536870912)!==0?e=!1:(Sn=e=!0,(l===2||l===9||l===3||l===6)&&(l=xt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Qf(t,e)):mi(t)}function mi(e){var t=e;do{if((t.flags&32768)!==0){Qf(t,Sn);return}e=t.return;var n=op(t.alternate,t,ln);if(n!==null){se=n;return}if(t=t.sibling,t!==null){se=t;return}se=t=e}while(t!==null);Me===0&&(Me=5)}function Qf(e,t){do{var n=up(e.alternate,e);if(n!==null){n.flags&=32767,se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){se=e;return}se=e=n}while(e!==null);Me=6,se=null}function Yf(e,t,n,l,i,c,d,h,v){e.cancelPendingCommit=null;do xi();while(Ge!==0);if((xe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(c=t.lanes|t.childLanes,c|=zc,Wx(e,n,c,d,h,v),e===ze&&(se=ze=null,ce=0),Vl=t,Tn=e,an=n,Mr=c,Ar=i,Af=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Np(ps,function(){return Jf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null,i=V.p,V.p=2,d=xe,xe|=4;try{dp(e,t,n)}finally{xe=d,V.p=i,O.T=l}}Ge=1,Xf(),Kf(),Vf()}}function Xf(){if(Ge===1){Ge=0;var e=Tn,t=Vl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=O.T,O.T=null;var l=V.p;V.p=2;var i=xe;xe|=4;try{Sf(t,e);var c=Zr,d=Ru(e.containerInfo),h=c.focusedElem,v=c.selectionRange;if(d!==h&&h&&h.ownerDocument&&Cu(h.ownerDocument.documentElement,h)){if(v!==null&&bc(h)){var E=v.start,M=v.end;if(M===void 0&&(M=E),"selectionStart"in h)h.selectionStart=E,h.selectionEnd=Math.min(M,h.value.length);else{var H=h.ownerDocument||document,T=H&&H.defaultView||window;if(T.getSelection){var R=T.getSelection(),Z=h.textContent.length,W=Math.min(v.start,Z),Ne=v.end===void 0?W:Math.min(v.end,Z);!R.extend&&W>Ne&&(d=Ne,Ne=W,W=d);var N=Tu(h,W),j=Tu(h,Ne);if(N&&j&&(R.rangeCount!==1||R.anchorNode!==N.node||R.anchorOffset!==N.offset||R.focusNode!==j.node||R.focusOffset!==j.offset)){var w=H.createRange();w.setStart(N.node,N.offset),R.removeAllRanges(),W>Ne?(R.addRange(w),R.extend(j.node,j.offset)):(w.setEnd(j.node,j.offset),R.addRange(w))}}}}for(H=[],R=h;R=R.parentNode;)R.nodeType===1&&H.push({element:R,left:R.scrollLeft,top:R.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<H.length;h++){var _=H[h];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Ei=!!Vr,Zr=Vr=null}finally{xe=i,V.p=l,O.T=n}}e.current=t,Ge=2}}function Kf(){if(Ge===2){Ge=0;var e=Tn,t=Vl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=O.T,O.T=null;var l=V.p;V.p=2;var i=xe;xe|=4;try{vf(e,t.alternate,t)}finally{xe=i,V.p=l,O.T=n}}Ge=3}}function Vf(){if(Ge===4||Ge===3){Ge=0,Qx();var e=Tn,t=Vl,n=an,l=Af;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ge=5:(Ge=0,Vl=Tn=null,Zf(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(En=null),Pi(n),t=t.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(ra,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=O.T,i=V.p,V.p=2,O.T=null;try{for(var c=e.onRecoverableError,d=0;d<l.length;d++){var h=l[d];c(h.value,{componentStack:h.stack})}}finally{O.T=t,V.p=i}}(an&3)!==0&&xi(),Ht(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===kr?Ya++:(Ya=0,kr=e):Ya=0,Xa(0)}}function Zf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Sa(t)))}function xi(){return Xf(),Kf(),Vf(),Jf()}function Jf(){if(Ge!==5)return!1;var e=Tn,t=Mr;Mr=0;var n=Pi(an),l=O.T,i=V.p;try{V.p=32>n?32:n,O.T=null,n=Ar,Ar=null;var c=Tn,d=an;if(Ge=0,Vl=Tn=null,an=0,(xe&6)!==0)throw Error(u(331));var h=xe;if(xe|=4,Rf(c.current),Ef(c,c.current,d,n),xe=h,Xa(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(ra,c)}catch{}return!0}finally{V.p=i,O.T=l,Zf(e,t)}}function $f(e,t,n){t=zt(n,t),t=dr(e.stateNode,t,2),e=yn(e,t,2),e!==null&&(ua(e,2),Ht(e))}function ge(e,t,n){if(e.tag===3)$f(e,e,n);else for(;t!==null;){if(t.tag===3){$f(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(En===null||!En.has(l))){e=zt(n,e),n=$d(2),l=yn(t,n,2),l!==null&&(Fd(n,l,t,e),ua(l,2),Ht(l));break}}t=t.return}}function Ur(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new xp;var i=new Set;l.set(t,i)}else i=l.get(t),i===void 0&&(i=new Set,l.set(t,i));i.has(n)||(Cr=!0,i.add(n),e=vp.bind(null,e,t,n),t.then(e,e))}function vp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ze===e&&(ce&n)===n&&(Me===4||Me===3&&(ce&62914560)===ce&&300>ot()-ri?(xe&2)===0&&Zl(e,0):Rr|=n,Kl===ce&&(Kl=0)),Ht(e)}function Ff(e,t){t===0&&(t=Yo()),e=Fn(e,t),e!==null&&(ua(e,t),Ht(e))}function yp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ff(e,n)}function jp(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Ff(e,n)}function Np(e,t){return $i(e,t)}var hi=null,$l=null,Lr=!1,pi=!1,qr=!1,Rn=0;function Ht(e){e!==$l&&e.next===null&&($l===null?hi=$l=e:$l=$l.next=e),pi=!0,Lr||(Lr=!0,Sp())}function Xa(e,t){if(!qr&&pi){qr=!0;do for(var n=!1,l=hi;l!==null;){if(e!==0){var i=l.pendingLanes;if(i===0)var c=0;else{var d=l.suspendedLanes,h=l.pingedLanes;c=(1<<31-dt(42|e)+1)-1,c&=i&~(d&~h),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(n=!0,e0(l,c))}else c=ce,c=ys(l,l===ze?c:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(c&3)===0||oa(l,c)||(n=!0,e0(l,c));l=l.next}while(n);qr=!1}}function zp(){Wf()}function Wf(){pi=Lr=!1;var e=0;Rn!==0&&Op()&&(e=Rn);for(var t=ot(),n=null,l=hi;l!==null;){var i=l.next,c=If(l,t);c===0?(l.next=null,n===null?hi=i:n.next=i,i===null&&($l=n)):(n=l,(e!==0||(c&3)!==0)&&(pi=!0)),l=i}Ge!==0&&Ge!==5||Xa(e),Rn!==0&&(Rn=0)}function If(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-dt(c),h=1<<d,v=i[d];v===-1?((h&n)===0||(h&l)!==0)&&(i[d]=Fx(h,t)):v<=t&&(e.expiredLanes|=h),c&=~h}if(t=ze,n=ce,n=ys(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(pe===2||pe===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Fi(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||oa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Fi(l),Pi(n)){case 2:case 8:n=Go;break;case 32:n=ps;break;case 268435456:n=Qo;break;default:n=ps}return l=Pf.bind(null,e),n=$i(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Fi(l),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(Ge!==0&&Ge!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(xi()&&e.callbackNode!==n)return null;var l=ce;return l=ys(e,e===ze?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Of(e,l,t),If(e,ot()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function e0(e,t){if(xi())return null;Of(e,t,!0)}function Sp(){Up(function(){(xe&6)!==0?$i(Bo,zp):Wf()})}function Hr(){if(Rn===0){var e=Ol;e===0&&(e=gs,gs<<=1,(gs&261888)===0&&(gs=256)),Rn=e}return Rn}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ss(""+e)}function n0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function wp(e,t,n,l,i){if(t==="submit"&&n&&n.stateNode===i){var c=t0((i[nt]||null).action),d=l.submitter;d&&(t=(t=d[nt]||null)?t0(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var h=new Cs("action","action",null,l,i);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Rn!==0){var v=d?n0(i,d):new FormData(i);sr(n,{pending:!0,data:v,method:i.method,action:c},null,v)}}else typeof c=="function"&&(h.preventDefault(),v=d?n0(i,d):new FormData(i),sr(n,{pending:!0,data:v,method:i.method,action:c},c,v))},currentTarget:i}]})}}for(var Br=0;Br<Nc.length;Br++){var Gr=Nc[Br],Ep=Gr.toLowerCase(),Tp=Gr[0].toUpperCase()+Gr.slice(1);Mt(Ep,"on"+Tp)}Mt(Au,"onAnimationEnd"),Mt(ku,"onAnimationIteration"),Mt(Ou,"onAnimationStart"),Mt("dblclick","onDoubleClick"),Mt("focusin","onFocus"),Mt("focusout","onBlur"),Mt(Yh,"onTransitionRun"),Mt(Xh,"onTransitionStart"),Mt(Kh,"onTransitionCancel"),Mt(_u,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ka="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cp=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ka));function l0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],i=l.event;l=l.listeners;e:{var c=void 0;if(t)for(var d=l.length-1;0<=d;d--){var h=l[d],v=h.instance,E=h.currentTarget;if(h=h.listener,v!==c&&i.isPropagationStopped())break e;c=h,i.currentTarget=E;try{c(i)}catch(M){Ms(M)}i.currentTarget=null,c=v}else for(d=0;d<l.length;d++){if(h=l[d],v=h.instance,E=h.currentTarget,h=h.listener,v!==c&&i.isPropagationStopped())break e;c=h,i.currentTarget=E;try{c(i)}catch(M){Ms(M)}i.currentTarget=null,c=v}}}}function ie(e,t){var n=t[ec];n===void 0&&(n=t[ec]=new Set);var l=e+"__bubble";n.has(l)||(a0(t,e,2,!1),n.add(l))}function Qr(e,t,n){var l=0;t&&(l|=4),a0(n,e,l,t)}var gi="_reactListening"+Math.random().toString(36).slice(2);function Yr(e){if(!e[gi]){e[gi]=!0,Fo.forEach(function(n){n!=="selectionchange"&&(Cp.has(n)||Qr(n,!1,e),Qr(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[gi]||(t[gi]=!0,Qr("selectionchange",!1,t))}}function a0(e,t,n,l){switch(k0(t)){case 2:var i=ng;break;case 8:i=lg;break;default:i=ao}n=i.bind(null,t,n,e),i=void 0,!oc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),l?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Xr(e,t,n,l,i){var c=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var d=l.tag;if(d===3||d===4){var h=l.stateNode.containerInfo;if(h===i)break;if(d===4)for(d=l.return;d!==null;){var v=d.tag;if((v===3||v===4)&&d.stateNode.containerInfo===i)return;d=d.return}for(;h!==null;){if(d=gl(h),d===null)return;if(v=d.tag,v===5||v===6||v===26||v===27){l=c=d;continue e}h=h.parentNode}}l=l.return}ru(function(){var E=c,M=cc(n),H=[];e:{var T=Uu.get(e);if(T!==void 0){var R=Cs,Z=e;switch(e){case"keypress":if(Es(n)===0)break e;case"keydown":case"keyup":R=jh;break;case"focusin":Z="focus",R=mc;break;case"focusout":Z="blur",R=mc;break;case"beforeblur":case"afterblur":R=mc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":R=du;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":R=oh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":R=Sh;break;case Au:case ku:case Ou:R=fh;break;case _u:R=Eh;break;case"scroll":case"scrollend":R=ch;break;case"wheel":R=Ch;break;case"copy":case"cut":case"paste":R=xh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":R=mu;break;case"toggle":case"beforetoggle":R=Dh}var W=(t&4)!==0,Ne=!W&&(e==="scroll"||e==="scrollend"),N=W?T!==null?T+"Capture":null:T;W=[];for(var j=E,w;j!==null;){var _=j;if(w=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||w===null||N===null||(_=ma(j,N),_!=null&&W.push(Va(j,_,w))),Ne)break;j=j.return}0<W.length&&(T=new R(T,Z,null,n,M),H.push({event:T,listeners:W}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",R=e==="mouseout"||e==="pointerout",T&&n!==ic&&(Z=n.relatedTarget||n.fromElement)&&(gl(Z)||Z[pl]))break e;if((R||T)&&(T=M.window===M?M:(T=M.ownerDocument)?T.defaultView||T.parentWindow:window,R?(Z=n.relatedTarget||n.toElement,R=E,Z=Z?gl(Z):null,Z!==null&&(Ne=m(Z),W=Z.tag,Z!==Ne||W!==5&&W!==27&&W!==6)&&(Z=null)):(R=null,Z=E),R!==Z)){if(W=du,_="onMouseLeave",N="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(W=mu,_="onPointerLeave",N="onPointerEnter",j="pointer"),Ne=R==null?T:fa(R),w=Z==null?T:fa(Z),T=new W(_,j+"leave",R,n,M),T.target=Ne,T.relatedTarget=w,_=null,gl(M)===E&&(W=new W(N,j+"enter",Z,n,M),W.target=w,W.relatedTarget=Ne,_=W),Ne=_,R&&Z)t:{for(W=Rp,N=R,j=Z,w=0,_=N;_;_=W(_))w++;_=0;for(var F=j;F;F=W(F))_++;for(;0<w-_;)N=W(N),w--;for(;0<_-w;)j=W(j),_--;for(;w--;){if(N===j||j!==null&&N===j.alternate){W=N;break t}N=W(N),j=W(j)}W=null}else W=null;R!==null&&s0(H,T,R,W,!1),Z!==null&&Ne!==null&&s0(H,Ne,Z,W,!0)}}e:{if(T=E?fa(E):window,R=T.nodeName&&T.nodeName.toLowerCase(),R==="select"||R==="input"&&T.type==="file")var ue=ju;else if(vu(T))if(Nu)ue=Bh;else{ue=qh;var $=Lh}else R=T.nodeName,!R||R.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?E&&sc(E.elementType)&&(ue=ju):ue=Hh;if(ue&&(ue=ue(e,E))){yu(H,ue,n,M);break e}$&&$(e,T,E),e==="focusout"&&E&&T.type==="number"&&E.memoizedProps.value!=null&&ac(T,"number",T.value)}switch($=E?fa(E):window,e){case"focusin":(vu($)||$.contentEditable==="true")&&(El=$,vc=E,ja=null);break;case"focusout":ja=vc=El=null;break;case"mousedown":yc=!0;break;case"contextmenu":case"mouseup":case"dragend":yc=!1,Du(H,n,M);break;case"selectionchange":if(Qh)break;case"keydown":case"keyup":Du(H,n,M)}var ne;if(hc)e:{switch(e){case"compositionstart":var re="onCompositionStart";break e;case"compositionend":re="onCompositionEnd";break e;case"compositionupdate":re="onCompositionUpdate";break e}re=void 0}else wl?gu(e,n)&&(re="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(re="onCompositionStart");re&&(xu&&n.locale!=="ko"&&(wl||re!=="onCompositionStart"?re==="onCompositionEnd"&&wl&&(ne=ou()):(mn=M,uc="value"in mn?mn.value:mn.textContent,wl=!0)),$=bi(E,re),0<$.length&&(re=new fu(re,e,null,n,M),H.push({event:re,listeners:$}),ne?re.data=ne:(ne=bu(n),ne!==null&&(re.data=ne)))),(ne=Ah?kh(e,n):Oh(e,n))&&(re=bi(E,"onBeforeInput"),0<re.length&&($=new fu("onBeforeInput","beforeinput",null,n,M),H.push({event:$,listeners:re}),$.data=ne)),wp(H,e,E,n,M)}l0(H,t)})}function Va(e,t,n){return{instance:e,listener:t,currentTarget:n}}function bi(e,t){for(var n=t+"Capture",l=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=ma(e,n),i!=null&&l.unshift(Va(e,i,c)),i=ma(e,t),i!=null&&l.push(Va(e,i,c))),e.tag===3)return l;e=e.return}return[]}function Rp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,n,l,i){for(var c=t._reactName,d=[];n!==null&&n!==l;){var h=n,v=h.alternate,E=h.stateNode;if(h=h.tag,v!==null&&v===l)break;h!==5&&h!==26&&h!==27||E===null||(v=E,i?(E=ma(n,c),E!=null&&d.unshift(Va(n,E,v))):i||(E=ma(n,c),E!=null&&d.push(Va(n,E,v)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Dp=/\r\n?/g,Mp=/\u0000|\uFFFD/g;function i0(e){return(typeof e=="string"?e:""+e).replace(Dp,`
|
|
25
|
+
`).replace(Mp,"")}function c0(e,t){return t=i0(t),i0(e)===t}function je(e,t,n,l,i,c){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Nl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Nl(e,""+l);break;case"className":Ns(e,"class",l);break;case"tabIndex":Ns(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(e,n,l);break;case"style":iu(e,l,c);break;case"data":if(t!=="object"){Ns(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ss(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(n==="formAction"?(t!=="input"&&je(e,t,"name",i.name,i,null),je(e,t,"formEncType",i.formEncType,i,null),je(e,t,"formMethod",i.formMethod,i,null),je(e,t,"formTarget",i.formTarget,i,null)):(je(e,t,"encType",i.encType,i,null),je(e,t,"method",i.method,i,null),je(e,t,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Ss(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Yt);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=Ss(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":ie("beforetoggle",e),ie("toggle",e),js(e,"popover",l);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":js(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=sh.get(n)||n,js(e,n,l))}}function Kr(e,t,n,l,i,c){switch(n){case"style":iu(e,l,c);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Nl(e,l):(typeof l=="number"||typeof l=="bigint")&&Nl(e,""+l);break;case"onScroll":l!=null&&ie("scroll",e);break;case"onScrollEnd":l!=null&&ie("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Yt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Wo.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),c=e[nt]||null,c=c!=null?c[n]:null,typeof c=="function"&&e.removeEventListener(t,c,i),typeof l=="function")){typeof c!="function"&&c!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,i);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):js(e,n,l)}}}function Ie(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ie("error",e),ie("load",e);var l=!1,i=!1,c;for(c in n)if(n.hasOwnProperty(c)){var d=n[c];if(d!=null)switch(c){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:je(e,t,c,d,n,null)}}i&&je(e,t,"srcSet",n.srcSet,n,null),l&&je(e,t,"src",n.src,n,null);return;case"input":ie("invalid",e);var h=c=d=i=null,v=null,E=null;for(l in n)if(n.hasOwnProperty(l)){var M=n[l];if(M!=null)switch(l){case"name":i=M;break;case"type":d=M;break;case"checked":v=M;break;case"defaultChecked":E=M;break;case"value":c=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:je(e,t,l,M,n,null)}}nu(e,c,h,v,E,d,i,!1);return;case"select":ie("invalid",e),l=d=c=null;for(i in n)if(n.hasOwnProperty(i)&&(h=n[i],h!=null))switch(i){case"value":c=h;break;case"defaultValue":d=h;break;case"multiple":l=h;default:je(e,t,i,h,n,null)}t=c,n=d,e.multiple=!!l,t!=null?jl(e,!!l,t,!1):n!=null&&jl(e,!!l,n,!0);return;case"textarea":ie("invalid",e),c=i=l=null;for(d in n)if(n.hasOwnProperty(d)&&(h=n[d],h!=null))switch(d){case"value":l=h;break;case"defaultValue":i=h;break;case"children":c=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:je(e,t,d,h,n,null)}au(e,l,i,c);return;case"option":for(v in n)if(n.hasOwnProperty(v)&&(l=n[v],l!=null))switch(v){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:je(e,t,v,l,n,null)}return;case"dialog":ie("beforetoggle",e),ie("toggle",e),ie("cancel",e),ie("close",e);break;case"iframe":case"object":ie("load",e);break;case"video":case"audio":for(l=0;l<Ka.length;l++)ie(Ka[l],e);break;case"image":ie("error",e),ie("load",e);break;case"details":ie("toggle",e);break;case"embed":case"source":case"link":ie("error",e),ie("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(E in n)if(n.hasOwnProperty(E)&&(l=n[E],l!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:je(e,t,E,l,n,null)}return;default:if(sc(t)){for(M in n)n.hasOwnProperty(M)&&(l=n[M],l!==void 0&&Kr(e,t,M,l,n,void 0));return}}for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!=null&&je(e,t,h,l,n,null))}function Ap(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,d=null,h=null,v=null,E=null,M=null;for(R in n){var H=n[R];if(n.hasOwnProperty(R)&&H!=null)switch(R){case"checked":break;case"value":break;case"defaultValue":v=H;default:l.hasOwnProperty(R)||je(e,t,R,null,l,H)}}for(var T in l){var R=l[T];if(H=n[T],l.hasOwnProperty(T)&&(R!=null||H!=null))switch(T){case"type":c=R;break;case"name":i=R;break;case"checked":E=R;break;case"defaultChecked":M=R;break;case"value":d=R;break;case"defaultValue":h=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(u(137,t));break;default:R!==H&&je(e,t,T,R,l,H)}}lc(e,d,h,v,E,M,c,i);return;case"select":R=d=h=T=null;for(c in n)if(v=n[c],n.hasOwnProperty(c)&&v!=null)switch(c){case"value":break;case"multiple":R=v;default:l.hasOwnProperty(c)||je(e,t,c,null,l,v)}for(i in l)if(c=l[i],v=n[i],l.hasOwnProperty(i)&&(c!=null||v!=null))switch(i){case"value":T=c;break;case"defaultValue":h=c;break;case"multiple":d=c;default:c!==v&&je(e,t,i,c,l,v)}t=h,n=d,l=R,T!=null?jl(e,!!n,T,!1):!!l!=!!n&&(t!=null?jl(e,!!n,t,!0):jl(e,!!n,n?[]:"",!1));return;case"textarea":R=T=null;for(h in n)if(i=n[h],n.hasOwnProperty(h)&&i!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:je(e,t,h,null,l,i)}for(d in l)if(i=l[d],c=n[d],l.hasOwnProperty(d)&&(i!=null||c!=null))switch(d){case"value":T=i;break;case"defaultValue":R=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==c&&je(e,t,d,i,l,c)}lu(e,T,R);return;case"option":for(var Z in n)if(T=n[Z],n.hasOwnProperty(Z)&&T!=null&&!l.hasOwnProperty(Z))switch(Z){case"selected":e.selected=!1;break;default:je(e,t,Z,null,l,T)}for(v in l)if(T=l[v],R=n[v],l.hasOwnProperty(v)&&T!==R&&(T!=null||R!=null))switch(v){case"selected":e.selected=T&&typeof T!="function"&&typeof T!="symbol";break;default:je(e,t,v,T,l,R)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var W in n)T=n[W],n.hasOwnProperty(W)&&T!=null&&!l.hasOwnProperty(W)&&je(e,t,W,null,l,T);for(E in l)if(T=l[E],R=n[E],l.hasOwnProperty(E)&&T!==R&&(T!=null||R!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:je(e,t,E,T,l,R)}return;default:if(sc(t)){for(var Ne in n)T=n[Ne],n.hasOwnProperty(Ne)&&T!==void 0&&!l.hasOwnProperty(Ne)&&Kr(e,t,Ne,void 0,l,T);for(M in l)T=l[M],R=n[M],!l.hasOwnProperty(M)||T===R||T===void 0&&R===void 0||Kr(e,t,M,T,l,R);return}}for(var N in n)T=n[N],n.hasOwnProperty(N)&&T!=null&&!l.hasOwnProperty(N)&&je(e,t,N,null,l,T);for(H in l)T=l[H],R=n[H],!l.hasOwnProperty(H)||T===R||T==null&&R==null||je(e,t,H,T,l,R)}function r0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var i=n[l],c=i.transferSize,d=i.initiatorType,h=i.duration;if(c&&h&&r0(d)){for(d=0,h=i.responseEnd,l+=1;l<n.length;l++){var v=n[l],E=v.startTime;if(E>h)break;var M=v.transferSize,H=v.initiatorType;M&&r0(H)&&(v=v.responseEnd,d+=M*(v<h?1:(h-E)/(v-E)))}if(--l,t+=8*(c+d)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Vr=null,Zr=null;function vi(e){return e.nodeType===9?e:e.ownerDocument}function o0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function u0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Jr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $r=null;function Op(){var e=window.event;return e&&e.type==="popstate"?e===$r?!1:($r=e,!0):($r=null,!1)}var d0=typeof setTimeout=="function"?setTimeout:void 0,_p=typeof clearTimeout=="function"?clearTimeout:void 0,f0=typeof Promise=="function"?Promise:void 0,Up=typeof queueMicrotask=="function"?queueMicrotask:typeof f0<"u"?function(e){return f0.resolve(null).then(e).catch(Lp)}:d0;function Lp(e){setTimeout(function(){throw e})}function Dn(e){return e==="head"}function m0(e,t){var n=t,l=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(i),Pl(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Za(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Za(n);for(var c=n.firstChild;c;){var d=c.nextSibling,h=c.nodeName;c[da]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&c.rel.toLowerCase()==="stylesheet"||n.removeChild(c),c=d}}else n==="body"&&Za(e.ownerDocument.body);n=i}while(n);Pl(t)}function x0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Fr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Fr(n),tc(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function qp(e,t,n,l){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Ct(e.nextSibling),e===null)break}return null}function Hp(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ct(e.nextSibling),e===null))return null;return e}function h0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ct(e.nextSibling),e===null))return null;return e}function Wr(e){return e.data==="$?"||e.data==="$~"}function Ir(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Bp(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Ct(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Pr=null;function p0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ct(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function g0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function b0(e,t,n){switch(t=vi(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Za(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);tc(e)}var Rt=new Map,v0=new Set;function yi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sn=V.d;V.d={f:Gp,r:Qp,D:Yp,C:Xp,L:Kp,m:Vp,X:Jp,S:Zp,M:$p};function Gp(){var e=sn.f(),t=di();return e||t}function Qp(e){var t=bl(e);t!==null&&t.tag===5&&t.type==="form"?_d(t):sn.r(e)}var Fl=typeof document>"u"?null:document;function y0(e,t,n){var l=Fl;if(l&&typeof t=="string"&&t){var i=jt(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),v0.has(i)||(v0.add(i),e={rel:e,crossOrigin:n,href:t},l.querySelector(i)===null&&(t=l.createElement("link"),Ie(t,"link",e),Ke(t),l.head.appendChild(t)))}}function Yp(e){sn.D(e),y0("dns-prefetch",e,null)}function Xp(e,t){sn.C(e,t),y0("preconnect",e,t)}function Kp(e,t,n){sn.L(e,t,n);var l=Fl;if(l&&e&&t){var i='link[rel="preload"][as="'+jt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+jt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+jt(n.imageSizes)+'"]')):i+='[href="'+jt(e)+'"]';var c=i;switch(t){case"style":c=Wl(e);break;case"script":c=Il(e)}Rt.has(c)||(e=g({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rt.set(c,e),l.querySelector(i)!==null||t==="style"&&l.querySelector(Ja(c))||t==="script"&&l.querySelector($a(c))||(t=l.createElement("link"),Ie(t,"link",e),Ke(t),l.head.appendChild(t)))}}function Vp(e,t){sn.m(e,t);var n=Fl;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+jt(l)+'"][href="'+jt(e)+'"]',c=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Il(e)}if(!Rt.has(c)&&(e=g({rel:"modulepreload",href:e},t),Rt.set(c,e),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector($a(c)))return}l=n.createElement("link"),Ie(l,"link",e),Ke(l),n.head.appendChild(l)}}}function Zp(e,t,n){sn.S(e,t,n);var l=Fl;if(l&&e){var i=vl(l).hoistableStyles,c=Wl(e);t=t||"default";var d=i.get(c);if(!d){var h={loading:0,preload:null};if(d=l.querySelector(Ja(c)))h.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rt.get(c))&&eo(e,n);var v=d=l.createElement("link");Ke(v),Ie(v,"link",e),v._p=new Promise(function(E,M){v.onload=E,v.onerror=M}),v.addEventListener("load",function(){h.loading|=1}),v.addEventListener("error",function(){h.loading|=2}),h.loading|=4,ji(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:h},i.set(c,d)}}}function Jp(e,t){sn.X(e,t);var n=Fl;if(n&&e){var l=vl(n).hoistableScripts,i=Il(e),c=l.get(i);c||(c=n.querySelector($a(i)),c||(e=g({src:e,async:!0},t),(t=Rt.get(i))&&to(e,t),c=n.createElement("script"),Ke(c),Ie(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function $p(e,t){sn.M(e,t);var n=Fl;if(n&&e){var l=vl(n).hoistableScripts,i=Il(e),c=l.get(i);c||(c=n.querySelector($a(i)),c||(e=g({src:e,async:!0,type:"module"},t),(t=Rt.get(i))&&to(e,t),c=n.createElement("script"),Ke(c),Ie(c,"link",e),n.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},l.set(i,c))}}function j0(e,t,n,l){var i=(i=un.current)?yi(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Wl(n.href),n=vl(i).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Wl(n.href);var c=vl(i).hoistableStyles,d=c.get(e);if(d||(i=i.ownerDocument||i,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=i.querySelector(Ja(e)))&&!c._p&&(d.instance=c,d.state.loading=5),Rt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rt.set(e,n),c||Fp(i,e,n,d.state))),t&&l===null)throw Error(u(528,""));return d}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Il(n),n=vl(i).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Wl(e){return'href="'+jt(e)+'"'}function Ja(e){return'link[rel="stylesheet"]['+e+"]"}function N0(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Fp(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ie(t,"link",n),Ke(t),e.head.appendChild(t))}function Il(e){return'[src="'+jt(e)+'"]'}function $a(e){return"script[async]"+e}function z0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+jt(n.href)+'"]');if(l)return t.instance=l,Ke(l),l;var i=g({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ke(l),Ie(l,"style",i),ji(l,n.precedence,e),t.instance=l;case"stylesheet":i=Wl(n.href);var c=e.querySelector(Ja(i));if(c)return t.state.loading|=4,t.instance=c,Ke(c),c;l=N0(n),(i=Rt.get(i))&&eo(l,i),c=(e.ownerDocument||e).createElement("link"),Ke(c);var d=c;return d._p=new Promise(function(h,v){d.onload=h,d.onerror=v}),Ie(c,"link",l),t.state.loading|=4,ji(c,n.precedence,e),t.instance=c;case"script":return c=Il(n.src),(i=e.querySelector($a(c)))?(t.instance=i,Ke(i),i):(l=n,(i=Rt.get(c))&&(l=g({},n),to(l,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ke(i),Ie(i,"link",l),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,ji(l,n.precedence,e));return t.instance}function ji(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,c=i,d=0;d<l.length;d++){var h=l[d];if(h.dataset.precedence===t)c=h;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function to(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ni=null;function S0(e,t,n){if(Ni===null){var l=new Map,i=Ni=new Map;i.set(n,l)}else i=Ni,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var c=n[i];if(!(c[da]||c[Je]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var h=l.get(d);h?h.push(c):l.set(d,[c])}}return l}function w0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Wp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function E0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ip(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Wl(l.href),c=t.querySelector(Ja(i));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zi.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=c,Ke(c);return}c=t.ownerDocument||t,l=N0(l),(i=Rt.get(i))&&eo(l,i),c=c.createElement("link"),Ke(c);var d=c;d._p=new Promise(function(h,v){d.onload=h,d.onerror=v}),Ie(c,"link",l),n.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=zi.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var no=0;function Pp(e,t){return e.stylesheets&&e.count===0&&wi(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&no===0&&(no=62500*kp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&wi(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>no?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(i)}}:null}function zi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wi(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Si=null;function wi(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Si=new Map,t.forEach(eg,e),Si=null,zi.call(e))}function eg(e,t){if(!(t.state.loading&4)){var n=Si.get(e);if(n)var l=n.get(null);else{n=new Map,Si.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var d=i[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),l=d)}l&&n.set(null,l)}i=t.instance,d=i.getAttribute("data-precedence"),c=n.get(d)||l,c===l&&n.set(null,i),n.set(d,i),this.count++,l=zi.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Fa={$$typeof:Y,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function tg(e,t,n,l,i,c,d,h,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Wi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wi(0),this.hiddenUpdates=Wi(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function T0(e,t,n,l,i,c,d,h,v,E,M,H){return e=new tg(e,t,n,d,v,E,M,H,h),t=1,c===!0&&(t|=24),c=mt(3,null,null,t),e.current=c,c.stateNode=e,t=_c(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:l,isDehydrated:n,cache:t},Hc(c),e}function C0(e){return e?(e=Rl,e):Rl}function R0(e,t,n,l,i,c){i=C0(i),l.context===null?l.context=i:l.pendingContext=i,l=vn(t),l.payload={element:n},c=c===void 0?null:c,c!==null&&(l.callback=c),n=yn(e,l,t),n!==null&&(rt(n,e,t),Ca(n,e,t))}function D0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lo(e,t){D0(e,t),(e=e.alternate)&&D0(e,t)}function M0(e){if(e.tag===13||e.tag===31){var t=Fn(e,67108864);t!==null&&rt(t,e,67108864),lo(e,67108864)}}function A0(e){if(e.tag===13||e.tag===31){var t=bt();t=Ii(t);var n=Fn(e,t);n!==null&&rt(n,e,t),lo(e,t)}}var Ei=!0;function ng(e,t,n,l){var i=O.T;O.T=null;var c=V.p;try{V.p=2,ao(e,t,n,l)}finally{V.p=c,O.T=i}}function lg(e,t,n,l){var i=O.T;O.T=null;var c=V.p;try{V.p=8,ao(e,t,n,l)}finally{V.p=c,O.T=i}}function ao(e,t,n,l){if(Ei){var i=so(l);if(i===null)Xr(e,t,l,Ti,n),O0(e,l);else if(sg(i,e,t,n,l))l.stopPropagation();else if(O0(e,l),t&4&&-1<ag.indexOf(e)){for(;i!==null;){var c=bl(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=Kn(c.pendingLanes);if(d!==0){var h=c;for(h.pendingLanes|=2,h.entangledLanes|=2;d;){var v=1<<31-dt(d);h.entanglements[1]|=v,d&=~v}Ht(c),(xe&6)===0&&(oi=ot()+500,Xa(0))}}break;case 31:case 13:h=Fn(c,2),h!==null&&rt(h,c,2),di(),lo(c,2)}if(c=so(l),c===null&&Xr(e,t,l,Ti,n),c===i)break;i=c}i!==null&&l.stopPropagation()}else Xr(e,t,l,null,n)}}function so(e){return e=cc(e),io(e)}var Ti=null;function io(e){if(Ti=null,e=gl(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=x(t),e!==null)return e;e=null}else if(n===31){if(e=p(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ti=e,null}function k0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yx()){case Bo:return 2;case Go:return 8;case ps:case Xx:return 32;case Qo:return 268435456;default:return 32}default:return 32}}var co=!1,Mn=null,An=null,kn=null,Wa=new Map,Ia=new Map,On=[],ag="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function O0(e,t){switch(e){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":An=null;break;case"mouseover":case"mouseout":kn=null;break;case"pointerover":case"pointerout":Wa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ia.delete(t.pointerId)}}function Pa(e,t,n,l,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:c,targetContainers:[i]},t!==null&&(t=bl(t),t!==null&&M0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function sg(e,t,n,l,i){switch(t){case"focusin":return Mn=Pa(Mn,e,t,n,l,i),!0;case"dragenter":return An=Pa(An,e,t,n,l,i),!0;case"mouseover":return kn=Pa(kn,e,t,n,l,i),!0;case"pointerover":var c=i.pointerId;return Wa.set(c,Pa(Wa.get(c)||null,e,t,n,l,i)),!0;case"gotpointercapture":return c=i.pointerId,Ia.set(c,Pa(Ia.get(c)||null,e,t,n,l,i)),!0}return!1}function _0(e){var t=gl(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=x(n),t!==null){e.blockedOn=t,Jo(e.priority,function(){A0(n)});return}}else if(t===31){if(t=p(n),t!==null){e.blockedOn=t,Jo(e.priority,function(){A0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=so(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);ic=l,n.target.dispatchEvent(l),ic=null}else return t=bl(n),t!==null&&M0(t),e.blockedOn=n,!1;t.shift()}return!0}function U0(e,t,n){Ci(e)&&n.delete(t)}function ig(){co=!1,Mn!==null&&Ci(Mn)&&(Mn=null),An!==null&&Ci(An)&&(An=null),kn!==null&&Ci(kn)&&(kn=null),Wa.forEach(U0),Ia.forEach(U0)}function Ri(e,t){e.blockedOn===t&&(e.blockedOn=null,co||(co=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,ig)))}var Di=null;function L0(e){Di!==e&&(Di=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Di===e&&(Di=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],i=e[t+2];if(typeof l!="function"){if(io(l||n)===null)continue;break}var c=bl(n);c!==null&&(e.splice(t,3),t-=3,sr(c,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Pl(e){function t(v){return Ri(v,e)}Mn!==null&&Ri(Mn,e),An!==null&&Ri(An,e),kn!==null&&Ri(kn,e),Wa.forEach(t),Ia.forEach(t);for(var n=0;n<On.length;n++){var l=On[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<On.length&&(n=On[0],n.blockedOn===null);)_0(n),n.blockedOn===null&&On.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],c=n[l+1],d=i[nt]||null;if(typeof c=="function")d||L0(n);else if(d){var h=null;if(c&&c.hasAttribute("formAction")){if(i=c,d=c[nt]||null)h=d.formAction;else if(io(i)!==null)continue}else h=d.action;typeof h=="function"?n[l+1]=h:(n.splice(l,3),l-=3),L0(n)}}}function q0(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return i=d})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function ro(e){this._internalRoot=e}Mi.prototype.render=ro.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=bt();R0(n,l,e,t,null,null)},Mi.prototype.unmount=ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;R0(e.current,2,null,e,null,null),di(),t[pl]=null}};function Mi(e){this._internalRoot=e}Mi.prototype.unstable_scheduleHydration=function(e){if(e){var t=Zo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<On.length&&t!==0&&t<On[n].priority;n++);On.splice(n,0,e),n===0&&_0(e)}};var H0=o.version;if(H0!=="19.2.4")throw Error(u(527,H0,"19.2.4"));V.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=z(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var cg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ai=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ai.isDisabled&&Ai.supportsFiber)try{ra=Ai.inject(cg),ut=Ai}catch{}}return es.createRoot=function(e,t){if(!f(e))throw Error(u(299));var n=!1,l="",i=Kd,c=Vd,d=Zd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=T0(e,1,!1,null,null,n,l,null,i,c,d,q0),e[pl]=t.current,Yr(e),new ro(t)},es.hydrateRoot=function(e,t,n){if(!f(e))throw Error(u(299));var l=!1,i="",c=Kd,d=Vd,h=Zd,v=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(h=n.onRecoverableError),n.formState!==void 0&&(v=n.formState)),t=T0(e,1,!0,t,n??null,l,i,v,c,d,h,q0),t.context=C0(null),n=t.current,l=bt(),l=Ii(l),i=vn(l),i.callback=null,yn(n,i,l),n=l,t.current.lanes=n,ua(t,n),Ht(t),e[pl]=t.current,Yr(e),new Mi(t)},es.version="19.2.4",es}var F0;function rb(){if(F0)return fo.exports;F0=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(o){console.error(o)}}return s(),fo.exports=cb(),fo.exports}var ob=rb();function ub({className:s,title:o="Blok"}){return a.jsxs("svg",{viewBox:"0 0 40 32",xmlns:"http://www.w3.org/2000/svg",fill:"none",className:s,role:"img","aria-label":o,children:[a.jsx("path",{d:"M4.58288 11.1045C4.86346 10.823 5.31836 10.823 5.59894 11.1045L9.97138 15.4904C10.252 15.7718 10.252 16.2282 9.97139 16.5096L5.59894 20.8955C5.31836 21.177 4.86346 21.177 4.58288 20.8955L0.210434 16.5096C-0.0701446 16.2282 -0.0701449 15.7718 0.210434 15.4904L4.58288 11.1045Z",fill:"#2BCD71"}),a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.7107 11.1972C20.2692 10.9492 19.7308 10.9492 19.2893 11.1972L15.9966 13.0468C15.5373 13.3048 15.2528 13.7917 15.2528 14.3198V17.6802C15.2528 18.2083 15.5373 18.6952 15.9966 18.9532L19.2893 20.8028C19.7308 21.0508 20.2692 21.0508 20.7107 20.8028L24.0034 18.9532C24.4627 18.6952 24.7472 18.2083 24.7472 17.6802V14.3198C24.7472 13.7917 24.4627 13.3048 24.0034 13.0468L20.7107 11.1972ZM29.0909 11.7486C29.0909 11.2205 28.8064 10.7336 28.3471 10.4756L20.7107 6.18602C20.2692 5.93799 19.7308 5.93799 19.2893 6.18602L11.6529 10.4756C11.1936 10.7336 10.9091 11.2205 10.9091 11.7486V20.2514C10.9091 20.7795 11.1936 21.2664 11.6529 21.5244L19.2893 25.814C19.7308 26.062 20.2692 26.062 20.7107 25.814L28.3471 21.5244C28.8064 21.2664 29.0909 20.7795 29.0909 20.2514V11.7486Z",fill:"#2BCD71"}),a.jsx("path",{d:"M34.4011 11.1045C34.6816 10.823 35.1365 10.823 35.4171 11.1045L39.7896 15.4904C40.0701 15.7718 40.0701 16.2282 39.7896 16.5096L35.4171 20.8955C35.1365 21.177 34.6816 21.177 34.4011 20.8955L30.0286 16.5096C29.748 16.2282 29.748 15.7718 30.0286 15.4904L34.4011 11.1045Z",fill:"#2BCD71"})]})}const ko="-",db=s=>{const o=mb(s),{conflictingClassGroups:r,conflictingClassGroupModifiers:u}=s;return{getClassGroupId:x=>{const p=x.split(ko);return p[0]===""&&p.length!==1&&p.shift(),Om(p,o)||fb(x)},getConflictingClassGroupIds:(x,p)=>{const b=r[x]||[];return p&&u[x]?[...b,...u[x]]:b}}},Om=(s,o)=>{var x;if(s.length===0)return o.classGroupId;const r=s[0],u=o.nextPart.get(r),f=u?Om(s.slice(1),u):void 0;if(f)return f;if(o.validators.length===0)return;const m=s.join(ko);return(x=o.validators.find(({validator:p})=>p(m)))==null?void 0:x.classGroupId},W0=/^\[(.+)\]$/,fb=s=>{if(W0.test(s)){const o=W0.exec(s)[1],r=o==null?void 0:o.substring(0,o.indexOf(":"));if(r)return"arbitrary.."+r}},mb=s=>{const{theme:o,prefix:r}=s,u={nextPart:new Map,validators:[]};return hb(Object.entries(s.classGroups),r).forEach(([m,x])=>{jo(x,u,m,o)}),u},jo=(s,o,r,u)=>{s.forEach(f=>{if(typeof f=="string"){const m=f===""?o:I0(o,f);m.classGroupId=r;return}if(typeof f=="function"){if(xb(f)){jo(f(u),o,r,u);return}o.validators.push({validator:f,classGroupId:r});return}Object.entries(f).forEach(([m,x])=>{jo(x,I0(o,m),r,u)})})},I0=(s,o)=>{let r=s;return o.split(ko).forEach(u=>{r.nextPart.has(u)||r.nextPart.set(u,{nextPart:new Map,validators:[]}),r=r.nextPart.get(u)}),r},xb=s=>s.isThemeGetter,hb=(s,o)=>o?s.map(([r,u])=>{const f=u.map(m=>typeof m=="string"?o+m:typeof m=="object"?Object.fromEntries(Object.entries(m).map(([x,p])=>[o+x,p])):m);return[r,f]}):s,pb=s=>{if(s<1)return{get:()=>{},set:()=>{}};let o=0,r=new Map,u=new Map;const f=(m,x)=>{r.set(m,x),o++,o>s&&(o=0,u=r,r=new Map)};return{get(m){let x=r.get(m);if(x!==void 0)return x;if((x=u.get(m))!==void 0)return f(m,x),x},set(m,x){r.has(m)?r.set(m,x):f(m,x)}}},_m="!",gb=s=>{const{separator:o,experimentalParseClassName:r}=s,u=o.length===1,f=o[0],m=o.length,x=p=>{const b=[];let z=0,y=0,g;for(let U=0;U<p.length;U++){let Q=p[U];if(z===0){if(Q===f&&(u||p.slice(U,U+m)===o)){b.push(p.slice(y,U)),y=U+m;continue}if(Q==="/"){g=U;continue}}Q==="["?z++:Q==="]"&&z--}const C=b.length===0?p:p.substring(y),S=C.startsWith(_m),A=S?C.substring(1):C,q=g&&g>y?g-y:void 0;return{modifiers:b,hasImportantModifier:S,baseClassName:A,maybePostfixModifierPosition:q}};return r?p=>r({className:p,parseClassName:x}):x},bb=s=>{if(s.length<=1)return s;const o=[];let r=[];return s.forEach(u=>{u[0]==="["?(o.push(...r.sort(),u),r=[]):r.push(u)}),o.push(...r.sort()),o},vb=s=>({cache:pb(s.cacheSize),parseClassName:gb(s),...db(s)}),yb=/\s+/,jb=(s,o)=>{const{parseClassName:r,getClassGroupId:u,getConflictingClassGroupIds:f}=o,m=[],x=s.trim().split(yb);let p="";for(let b=x.length-1;b>=0;b-=1){const z=x[b],{modifiers:y,hasImportantModifier:g,baseClassName:C,maybePostfixModifierPosition:S}=r(z);let A=!!S,q=u(A?C.substring(0,S):C);if(!q){if(!A){p=z+(p.length>0?" "+p:p);continue}if(q=u(C),!q){p=z+(p.length>0?" "+p:p);continue}A=!1}const U=bb(y).join(":"),Q=g?U+_m:U,k=Q+q;if(m.includes(k))continue;m.push(k);const Y=f(q,A);for(let G=0;G<Y.length;++G){const K=Y[G];m.push(Q+K)}p=z+(p.length>0?" "+p:p)}return p};function Nb(){let s=0,o,r,u="";for(;s<arguments.length;)(o=arguments[s++])&&(r=Um(o))&&(u&&(u+=" "),u+=r);return u}const Um=s=>{if(typeof s=="string")return s;let o,r="";for(let u=0;u<s.length;u++)s[u]&&(o=Um(s[u]))&&(r&&(r+=" "),r+=o);return r};function zb(s,...o){let r,u,f,m=x;function x(b){const z=o.reduce((y,g)=>g(y),s());return r=vb(z),u=r.cache.get,f=r.cache.set,m=p,p(b)}function p(b){const z=u(b);if(z)return z;const y=jb(b,r);return f(b,y),y}return function(){return m(Nb.apply(null,arguments))}}const Te=s=>{const o=r=>r[s]||[];return o.isThemeGetter=!0,o},Lm=/^\[(?:([a-z-]+):)?(.+)\]$/i,Sb=/^\d+\/\d+$/,wb=new Set(["px","full","screen"]),Eb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Cb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Rb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Db=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cn=s=>aa(s)||wb.has(s)||Sb.test(s),Un=s=>ca(s,"length",qb),aa=s=>!!s&&!Number.isNaN(Number(s)),ho=s=>ca(s,"number",aa),ts=s=>!!s&&Number.isInteger(Number(s)),Mb=s=>s.endsWith("%")&&aa(s.slice(0,-1)),le=s=>Lm.test(s),Ln=s=>Eb.test(s),Ab=new Set(["length","size","percentage"]),kb=s=>ca(s,Ab,qm),Ob=s=>ca(s,"position",qm),_b=new Set(["image","url"]),Ub=s=>ca(s,_b,Bb),Lb=s=>ca(s,"",Hb),ns=()=>!0,ca=(s,o,r)=>{const u=Lm.exec(s);return u?u[1]?typeof o=="string"?u[1]===o:o.has(u[1]):r(u[2]):!1},qb=s=>Tb.test(s)&&!Cb.test(s),qm=()=>!1,Hb=s=>Rb.test(s),Bb=s=>Db.test(s),Gb=()=>{const s=Te("colors"),o=Te("spacing"),r=Te("blur"),u=Te("brightness"),f=Te("borderColor"),m=Te("borderRadius"),x=Te("borderSpacing"),p=Te("borderWidth"),b=Te("contrast"),z=Te("grayscale"),y=Te("hueRotate"),g=Te("invert"),C=Te("gap"),S=Te("gradientColorStops"),A=Te("gradientColorStopPositions"),q=Te("inset"),U=Te("margin"),Q=Te("opacity"),k=Te("padding"),Y=Te("saturate"),G=Te("scale"),K=Te("sepia"),L=Te("skew"),te=Te("space"),J=Te("translate"),ae=()=>["auto","contain","none"],Ae=()=>["auto","hidden","clip","visible","scroll"],_e=()=>["auto",le,o],X=()=>[le,o],P=()=>["",cn,Un],Ue=()=>["auto",aa,le],tt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],me=()=>["","0",le],ve=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Se=()=>[aa,le];return{cacheSize:500,separator:":",theme:{colors:[ns],spacing:[cn,Un],blur:["none","",Ln,le],brightness:Se(),borderColor:[s],borderRadius:["none","","full",Ln,le],borderSpacing:X(),borderWidth:P(),contrast:Se(),grayscale:me(),hueRotate:Se(),invert:me(),gap:X(),gradientColorStops:[s],gradientColorStopPositions:[Mb,Un],inset:_e(),margin:_e(),opacity:Se(),padding:X(),saturate:Se(),scale:Se(),sepia:me(),skew:Se(),space:X(),translate:X()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Ln]}],"break-after":[{"break-after":ve()}],"break-before":[{"break-before":ve()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...tt(),le]}],overflow:[{overflow:Ae()}],"overflow-x":[{"overflow-x":Ae()}],"overflow-y":[{"overflow-y":Ae()}],overscroll:[{overscroll:ae()}],"overscroll-x":[{"overscroll-x":ae()}],"overscroll-y":[{"overscroll-y":ae()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[q]}],"inset-x":[{"inset-x":[q]}],"inset-y":[{"inset-y":[q]}],start:[{start:[q]}],end:[{end:[q]}],top:[{top:[q]}],right:[{right:[q]}],bottom:[{bottom:[q]}],left:[{left:[q]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ts,le]}],basis:[{basis:_e()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:me()}],shrink:[{shrink:me()}],order:[{order:["first","last","none",ts,le]}],"grid-cols":[{"grid-cols":[ns]}],"col-start-end":[{col:["auto",{span:["full",ts,le]},le]}],"col-start":[{"col-start":Ue()}],"col-end":[{"col-end":Ue()}],"grid-rows":[{"grid-rows":[ns]}],"row-start-end":[{row:["auto",{span:[ts,le]},le]}],"row-start":[{"row-start":Ue()}],"row-end":[{"row-end":Ue()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[U]}],mx:[{mx:[U]}],my:[{my:[U]}],ms:[{ms:[U]}],me:[{me:[U]}],mt:[{mt:[U]}],mr:[{mr:[U]}],mb:[{mb:[U]}],ml:[{ml:[U]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[te]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,o]}],"min-w":[{"min-w":[le,o,"min","max","fit"]}],"max-w":[{"max-w":[le,o,"none","full","min","max","fit","prose",{screen:[Ln]},Ln]}],h:[{h:[le,o,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,o,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,o,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,o,"auto","min","max","fit"]}],"font-size":[{text:["base",Ln,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ho]}],"font-family":[{font:[ns]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",le]}],"line-clamp":[{"line-clamp":["none",aa,ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",cn,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[s]}],"placeholder-opacity":[{"placeholder-opacity":[Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[s]}],"text-opacity":[{"text-opacity":[Q]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",cn,Un]}],"underline-offset":[{"underline-offset":["auto",cn,le]}],"text-decoration-color":[{decoration:[s]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:X()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Q]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...tt(),Ob]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ub]}],"bg-color":[{bg:[s]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[m]}],"rounded-s":[{"rounded-s":[m]}],"rounded-e":[{"rounded-e":[m]}],"rounded-t":[{"rounded-t":[m]}],"rounded-r":[{"rounded-r":[m]}],"rounded-b":[{"rounded-b":[m]}],"rounded-l":[{"rounded-l":[m]}],"rounded-ss":[{"rounded-ss":[m]}],"rounded-se":[{"rounded-se":[m]}],"rounded-ee":[{"rounded-ee":[m]}],"rounded-es":[{"rounded-es":[m]}],"rounded-tl":[{"rounded-tl":[m]}],"rounded-tr":[{"rounded-tr":[m]}],"rounded-br":[{"rounded-br":[m]}],"rounded-bl":[{"rounded-bl":[m]}],"border-w":[{border:[p]}],"border-w-x":[{"border-x":[p]}],"border-w-y":[{"border-y":[p]}],"border-w-s":[{"border-s":[p]}],"border-w-e":[{"border-e":[p]}],"border-w-t":[{"border-t":[p]}],"border-w-r":[{"border-r":[p]}],"border-w-b":[{"border-b":[p]}],"border-w-l":[{"border-l":[p]}],"border-opacity":[{"border-opacity":[Q]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[p]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[p]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Q]}],"divide-style":[{divide:O()}],"border-color":[{border:[f]}],"border-color-x":[{"border-x":[f]}],"border-color-y":[{"border-y":[f]}],"border-color-s":[{"border-s":[f]}],"border-color-e":[{"border-e":[f]}],"border-color-t":[{"border-t":[f]}],"border-color-r":[{"border-r":[f]}],"border-color-b":[{"border-b":[f]}],"border-color-l":[{"border-l":[f]}],"divide-color":[{divide:[f]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[cn,le]}],"outline-w":[{outline:[cn,Un]}],"outline-color":[{outline:[s]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[s]}],"ring-opacity":[{"ring-opacity":[Q]}],"ring-offset-w":[{"ring-offset":[cn,Un]}],"ring-offset-color":[{"ring-offset":[s]}],shadow:[{shadow:["","inner","none",Ln,Lb]}],"shadow-color":[{shadow:[ns]}],opacity:[{opacity:[Q]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[u]}],contrast:[{contrast:[b]}],"drop-shadow":[{"drop-shadow":["","none",Ln,le]}],grayscale:[{grayscale:[z]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[g]}],saturate:[{saturate:[Y]}],sepia:[{sepia:[K]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[u]}],"backdrop-contrast":[{"backdrop-contrast":[b]}],"backdrop-grayscale":[{"backdrop-grayscale":[z]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[Q]}],"backdrop-saturate":[{"backdrop-saturate":[Y]}],"backdrop-sepia":[{"backdrop-sepia":[K]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[x]}],"border-spacing-x":[{"border-spacing-x":[x]}],"border-spacing-y":[{"border-spacing-y":[x]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:Se()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:Se()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[ts,le]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",s]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[s]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":X()}],"scroll-mx":[{"scroll-mx":X()}],"scroll-my":[{"scroll-my":X()}],"scroll-ms":[{"scroll-ms":X()}],"scroll-me":[{"scroll-me":X()}],"scroll-mt":[{"scroll-mt":X()}],"scroll-mr":[{"scroll-mr":X()}],"scroll-mb":[{"scroll-mb":X()}],"scroll-ml":[{"scroll-ml":X()}],"scroll-p":[{"scroll-p":X()}],"scroll-px":[{"scroll-px":X()}],"scroll-py":[{"scroll-py":X()}],"scroll-ps":[{"scroll-ps":X()}],"scroll-pe":[{"scroll-pe":X()}],"scroll-pt":[{"scroll-pt":X()}],"scroll-pr":[{"scroll-pr":X()}],"scroll-pb":[{"scroll-pb":X()}],"scroll-pl":[{"scroll-pl":X()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le]}],fill:[{fill:[s,"none"]}],"stroke-w":[{stroke:[cn,Un,ho]}],stroke:[{stroke:[s,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Qb=zb(Gb);function B(...s){return Qb(Ng(s))}const P0=s=>{let o;const r=new Set,u=(z,y)=>{const g=typeof z=="function"?z(o):z;if(!Object.is(g,o)){const C=o;o=y??(typeof g!="object"||g===null)?g:Object.assign({},o,g),r.forEach(S=>S(o,C))}},f=()=>o,p={setState:u,getState:f,getInitialState:()=>b,subscribe:z=>(r.add(z),()=>r.delete(z))},b=o=s(u,f,p);return p},Yb=(s=>s?P0(s):P0),Xb=s=>s;function Kb(s,o=Xb){const r=ki.useSyncExternalStore(s.subscribe,ki.useCallback(()=>o(s.getState()),[s,o]),ki.useCallback(()=>o(s.getInitialState()),[s,o]));return ki.useDebugValue(r),r}const em=s=>{const o=Yb(s),r=u=>Kb(o,u);return Object.assign(r,o),r},Qi=(s=>s?em(s):em);function Vb(s,o){let r;try{r=s()}catch{return}return{getItem:f=>{var m;const x=b=>b===null?null:JSON.parse(b,void 0),p=(m=r.getItem(f))!=null?m:null;return p instanceof Promise?p.then(x):x(p)},setItem:(f,m)=>r.setItem(f,JSON.stringify(m,void 0)),removeItem:f=>r.removeItem(f)}}const No=s=>o=>{try{const r=s(o);return r instanceof Promise?r:{then(u){return No(u)(r)},catch(u){return this}}}catch(r){return{then(u){return this},catch(u){return No(u)(r)}}}},Zb=(s,o)=>(r,u,f)=>{let m={storage:Vb(()=>localStorage),partialize:U=>U,version:0,merge:(U,Q)=>({...Q,...U}),...o},x=!1,p=0;const b=new Set,z=new Set;let y=m.storage;if(!y)return s((...U)=>{console.warn(`[zustand persist middleware] Unable to update item '${m.name}', the given storage is currently unavailable.`),r(...U)},u,f);const g=()=>{const U=m.partialize({...u()});return y.setItem(m.name,{state:U,version:m.version})},C=f.setState;f.setState=(U,Q)=>(C(U,Q),g());const S=s((...U)=>(r(...U),g()),u,f);f.getInitialState=()=>S;let A;const q=()=>{var U,Q;if(!y)return;const k=++p;x=!1,b.forEach(G=>{var K;return G((K=u())!=null?K:S)});const Y=((Q=m.onRehydrateStorage)==null?void 0:Q.call(m,(U=u())!=null?U:S))||void 0;return No(y.getItem.bind(y))(m.name).then(G=>{if(G)if(typeof G.version=="number"&&G.version!==m.version){if(m.migrate){const K=m.migrate(G.state,G.version);return K instanceof Promise?K.then(L=>[!0,L]):[!0,K]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,G.state];return[!1,void 0]}).then(G=>{var K;if(k!==p)return;const[L,te]=G;if(A=m.merge(te,(K=u())!=null?K:S),r(A,!0),L)return g()}).then(()=>{k===p&&(Y==null||Y(A,void 0),A=u(),x=!0,z.forEach(G=>G(A)))}).catch(G=>{k===p&&(Y==null||Y(void 0,G))})};return f.persist={setOptions:U=>{m={...m,...U},U.storage&&(y=U.storage)},clearStorage:()=>{y==null||y.removeItem(m.name)},getOptions:()=>m,rehydrate:()=>q(),hasHydrated:()=>x,onHydrate:U=>(b.add(U),()=>{b.delete(U)}),onFinishHydration:U=>(z.add(U),()=>{z.delete(U)})},m.skipHydration||q(),A||S},Jb=Zb,$b=[{id:"production",name:"production",description:"live deployments"},{id:"staging",name:"staging",description:"pre-prod"},{id:"development",name:"development",description:"local + branch deploys"}],on=Qi()(Jb(s=>({current:"production",available:$b,setCurrent:o=>s({current:o})}),{name:"blok-studio:env-scope"}));function Fb(){const s=on(p=>p.current),o=on(p=>p.available),r=on(p=>p.setCurrent),u=o.find(p=>p.id===s)??o[0],[f,m]=D.useState(!1),x=D.useRef(null);return D.useEffect(()=>{if(!f)return;const p=z=>{var y;(y=x.current)!=null&&y.contains(z.target)||m(!1)},b=z=>{z.key==="Escape"&&m(!1)};return window.addEventListener("mousedown",p),window.addEventListener("keydown",b),()=>{window.removeEventListener("mousedown",p),window.removeEventListener("keydown",b)}},[f]),u?a.jsxs("div",{ref:x,className:"relative",children:[a.jsxs("button",{type:"button",onClick:()=>m(p=>!p),className:B("flex items-center gap-1.5 rounded-md border border-zinc-800 bg-raised px-2 py-1 text-xs text-zinc-100 hover:bg-hover transition-colors",f&&"bg-hover"),"aria-haspopup":"listbox","aria-expanded":f,"aria-label":`Environment: ${u.name}`,children:[a.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-blok-green-500",style:{boxShadow:"0 0 0 2px rgba(43, 205, 113, 0.18)"}}),a.jsx("span",{className:"font-medium",children:u.name}),a.jsx(is,{className:B("w-3 h-3 text-zinc-500 transition-transform",f&&"rotate-180")})]}),f&&a.jsxs("div",{role:"menu","aria-label":"Environment",className:"absolute left-0 top-full mt-1.5 z-50 w-56 rounded-md border border-zinc-800 bg-overlay shadow-xl py-1",children:[a.jsx("div",{className:"px-3 pt-1.5 pb-1 text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold",children:"Environment"}),o.map(p=>{const b=p.id===s;return a.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":b,onClick:()=>{r(p.id),m(!1)},className:B("w-full flex items-center gap-2 px-3 py-1.5 text-xs transition-colors",b?"bg-blok-green-500/10 text-zinc-100":"text-zinc-300 hover:bg-hover hover:text-zinc-100"),children:[a.jsx("span",{className:B("h-1.5 w-1.5 rounded-full shrink-0",b?"bg-blok-green-500":"bg-zinc-700"),style:b?{boxShadow:"0 0 0 2px rgba(43, 205, 113, 0.18)"}:void 0}),a.jsx("span",{className:"font-medium",children:p.name}),p.description&&a.jsxs("span",{className:"text-[11px] text-zinc-500 truncate",children:["· ",p.description]}),b&&a.jsx(sa,{className:"ml-auto w-3.5 h-3.5 text-blok-green-500 shrink-0"})]},p.id)}),a.jsxs("div",{className:"mt-1 px-3 py-1.5 text-[10.5px] font-mono text-zinc-600 border-t border-zinc-800",children:["Set ",a.jsx("span",{className:"text-zinc-400",children:"BLOK_ENV"})," on the trigger to scope new runs."]})]})]}):null}const Hm="/__blok";async function fe(s,o){const r=await fetch(`${Hm}${s}`,{...o,headers:{Accept:"application/json",...o==null?void 0:o.headers}});if(!r.ok){const u=await r.json().catch(()=>({}));throw new Bm(r.status,u.error||r.statusText)}return r.json()}class Bm extends Error{constructor(o,r){super(r),this.status=o,this.name="ApiError"}}function Gm(){return fe("/health")}function Qm(){return fe("/config")}function Ym(){return fe("/workflows")}function Xm(s){return fe(`/workflows/${encodeURIComponent(s)}`)}function Km(s,o){const r=new URLSearchParams;o!=null&&o.status&&r.set("status",o.status),o!=null&&o.limit&&r.set("limit",String(o.limit)),o!=null&&o.offset&&r.set("offset",String(o.offset)),o!=null&&o.sort&&r.set("sort",o.sort),o!=null&&o.env&&r.set("env",o.env);const u=r.toString();return fe(`/workflows/${encodeURIComponent(s)}/runs${u?`?${u}`:""}`)}function Vm(s){const o=new URLSearchParams;if(s!=null&&s.workflow&&o.set("workflow",s.workflow),s!=null&&s.status&&o.set("status",s.status),s!=null&&s.limit&&o.set("limit",String(s.limit)),s!=null&&s.offset&&o.set("offset",String(s.offset)),s!=null&&s.sort&&o.set("sort",s.sort),s!=null&&s.env&&o.set("env",s.env),s!=null&&s.tags&&s.tags.length>0&&o.set("tags",s.tags.join(",")),s!=null&&s.metadata)for(const[u,f]of Object.entries(s.metadata))o.set(`metadata.${u}`,f);const r=o.toString();return fe(`/runs${r?`?${r}`:""}`)}function Zm(s){return fe(`/runs/${encodeURIComponent(s)}`)}function Jm(s,o){const r=o?`?since=${o}`:"";return fe(`/runs/${encodeURIComponent(s)}/events${r}`)}function Wb(s){return fe(`/runs/${encodeURIComponent(s)}/subruns`)}function $m(s){const o=s!=null&&s.env?`?env=${encodeURIComponent(s.env)}`:"";return fe(`/queues${o}`)}function Fm(s){const o=new URLSearchParams;s!=null&&s.env&&o.set("env",s.env),s!=null&&s.limit&&o.set("limit",String(s.limit));const r=o.toString();return fe(`/deployments${r?`?${r}`:""}`)}function Wm(s){const o=new URLSearchParams;s!=null&&s.workflow&&o.set("workflow",s.workflow),s!=null&&s.level&&o.set("level",s.level),s!=null&&s.q&&o.set("q",s.q),(s==null?void 0:s.since)!==void 0&&o.set("since",String(s.since)),(s==null?void 0:s.limit)!==void 0&&o.set("limit",String(s.limit)),s!=null&&s.env&&o.set("env",s.env);const r=o.toString();return fe(`/logs${r?`?${r}`:""}`)}function Im(){return fe("/runs",{method:"DELETE"})}function Oo(s,o){return fe(`/runs/${encodeURIComponent(s)}/replay`,{method:"POST",headers:{"Content-Type":"application/json"},body:o?JSON.stringify(o):void 0})}function Pm(s){return fe(`/search?q=${encodeURIComponent(s)}`)}function ex(s,o){return fe(`/runs/diff?a=${encodeURIComponent(s)}&b=${encodeURIComponent(o)}`)}function Ib(){return fe("/tags")}function tx(s,o){return fe(`/runs/${encodeURIComponent(s)}/tags`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:o})})}function nx(s,o){return fe(`/runs/${encodeURIComponent(s)}/tags/${encodeURIComponent(o)}`,{method:"DELETE"})}function lx(s){const o=s?`?workflow=${encodeURIComponent(s)}`:"";return fe(`/metrics${o}`)}async function ax(s){const o=await fetch(s.path,{method:s.method,headers:{"Content-Type":"application/json",...s.headers},body:s.method!=="GET"&&s.method!=="HEAD"?s.body:void 0}),r={};o.headers.forEach((f,m)=>{r[m]=f});const u=await o.text();return{status:o.status,headers:r,body:u}}function us(s,o){const r=document.createElement("a");r.href=`${Hm}${s}`,r.download=o,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)}function _o(s){us(`/runs/${encodeURIComponent(s)}/export?format=json`,`blok-run-${s}.json`)}function Uo(s){us(`/runs/${encodeURIComponent(s)}/export?format=csv`,`blok-run-${s}.csv`)}function sx(s){const o=new URLSearchParams;o.set("format","json"),s!=null&&s.workflow&&o.set("workflow",s.workflow),s!=null&&s.status&&o.set("status",s.status),us(`/runs/export?${o.toString()}`,`blok-runs-${Date.now()}.json`)}function ix(s){const o=new URLSearchParams;o.set("format","csv"),s!=null&&s.workflow&&o.set("workflow",s.workflow),s!=null&&s.status&&o.set("status",s.status),us(`/runs/export?${o.toString()}`,`blok-runs-${Date.now()}.csv`)}function cx(){return fe("/webhooks")}function rx(s){return fe("/webhooks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}function ox(s){return fe(`/webhooks/${encodeURIComponent(s)}`,{method:"DELETE"})}function ux(){return fe("/dashboards")}function Pb(s){return fe(`/dashboards/${encodeURIComponent(s)}`)}function dx(s){return fe("/dashboards",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}function fx(s,o){return fe(`/dashboards/${encodeURIComponent(s)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})}function mx(s){return fe(`/dashboards/${encodeURIComponent(s)}`,{method:"DELETE"})}function xx(s){return fe(`/dashboards/${encodeURIComponent(s)}/duplicate`,{method:"POST"})}function hx(s,o){return fe(`/runs/${encodeURIComponent(s)}/explain`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o?{nodeId:o}:{})})}function px(){return fe("/concurrency/health")}function gx(){return fe("/concurrency/state")}const ev=Object.freeze(Object.defineProperty({__proto__:null,ApiError:Bm,addRunTags:tx,clearRuns:Im,createDashboard:dx,createWebhook:rx,deleteDashboard:mx,deleteWebhook:ox,downloadExport:us,duplicateDashboard:xx,explainRunError:hx,exportRunCsv:Uo,exportRunJson:_o,exportRunsCsv:ix,exportRunsJson:sx,fetchConcurrencyHealth:px,fetchConcurrencyState:gx,fetchConfig:Qm,fetchDashboard:Pb,fetchDashboards:ux,fetchDeployments:Fm,fetchHealth:Gm,fetchLogs:Wm,fetchMetrics:lx,fetchQueues:$m,fetchRunDetail:Zm,fetchRunDiff:ex,fetchRunEvents:Jm,fetchRuns:Vm,fetchSubRuns:Wb,fetchTags:Ib,fetchWebhooks:cx,fetchWorkflowDetail:Xm,fetchWorkflowRuns:Km,fetchWorkflows:Ym,removeRunTag:nx,replayRun:Oo,searchTraces:Pm,sendWorkflowRequest:ax,updateDashboard:fx},Symbol.toStringTag,{value:"Module"}));function Lo(){return Ze({queryKey:["workflows"],queryFn:Ym,refetchInterval:5e3})}function tv(s){return Ze({queryKey:["workflow",s],queryFn:()=>Xm(s),enabled:!!s})}const nv={pending:"text-zinc-400 bg-zinc-400/10",running:"text-blue-400 bg-blue-400/10",completed:"text-green-400 bg-green-400/10",failed:"text-red-400 bg-red-400/10",cancelled:"text-purple-400 bg-purple-400/10",skipped:"text-zinc-500 bg-zinc-500/10",throttled:"text-amber-300 bg-amber-300/10",delayed:"text-yellow-400 bg-yellow-400/10",expired:"text-zinc-500 bg-zinc-500/10",debounced:"text-cyan-400 bg-cyan-400/10",queued:"text-lime-300 bg-lime-300/10",crashed:"text-red-500 bg-red-500/10",timedOut:"text-orange-400 bg-orange-400/10"},ds={pending:"bg-zinc-400",running:"bg-blue-400",completed:"bg-green-400",failed:"bg-red-400",cancelled:"bg-purple-400",skipped:"bg-zinc-500",throttled:"bg-amber-300",delayed:"bg-yellow-400",expired:"bg-zinc-500",debounced:"bg-cyan-400",queued:"bg-lime-300",crashed:"bg-red-500",timedOut:"bg-orange-400"},lv={pending:"Pending",running:"Running",completed:"Completed",failed:"Failed",cancelled:"Cancelled",skipped:"Skipped",throttled:"Throttled",delayed:"Delayed",expired:"Expired",debounced:"Debounced",queued:"Queued",crashed:"Crashed",timedOut:"Timed Out"},bx={RUN_STARTED:"Run Started",RUN_COMPLETED:"Run Completed",RUN_FAILED:"Run Failed",NODE_STARTED:"Node Started",NODE_COMPLETED:"Node Completed",NODE_FAILED:"Node Failed",NODE_SKIPPED:"Node Skipped",VARS_UPDATED:"Vars Updated",LOG_ENTRY:"Log Entry",NODE_PROGRESS:"Node Progress",NODE_PARTIAL_RESULT:"Node Partial Result",NODE_CACHED:"Node Cached",NODE_ATTEMPT_FAILED:"Attempt Failed",RUN_THROTTLED:"Run Throttled",RUN_DELAYED:"Run Delayed",RUN_EXPIRED:"Run Expired",RUN_DEBOUNCED:"Run Debounced",RUN_QUEUED:"Run Queued",RUN_CANCELLED:"Run Cancelled",RUN_CRASHED:"Run Crashed",RUN_TIMED_OUT:"Run Timed Out"},vx={RUN_STARTED:"text-blue-400 bg-blue-400/10",RUN_COMPLETED:"text-green-400 bg-green-400/10",RUN_FAILED:"text-red-400 bg-red-400/10",NODE_STARTED:"text-blue-300 bg-blue-300/10",NODE_COMPLETED:"text-green-300 bg-green-300/10",NODE_FAILED:"text-red-300 bg-red-300/10",NODE_SKIPPED:"text-zinc-400 bg-zinc-400/10",VARS_UPDATED:"text-yellow-400 bg-yellow-400/10",LOG_ENTRY:"text-zinc-300 bg-zinc-300/10",NODE_PROGRESS:"text-cyan-400 bg-cyan-400/10",NODE_PARTIAL_RESULT:"text-cyan-300 bg-cyan-300/10",NODE_CACHED:"text-emerald-400 bg-emerald-400/10",NODE_ATTEMPT_FAILED:"text-amber-400 bg-amber-400/10",RUN_THROTTLED:"text-amber-300 bg-amber-300/10",RUN_DELAYED:"text-yellow-400 bg-yellow-400/10",RUN_EXPIRED:"text-zinc-500 bg-zinc-500/10",RUN_DEBOUNCED:"text-cyan-400 bg-cyan-400/10",RUN_QUEUED:"text-lime-300 bg-lime-300/10",RUN_CANCELLED:"text-purple-400 bg-purple-400/10",RUN_CRASHED:"text-red-500 bg-red-500/10",RUN_TIMED_OUT:"text-orange-400 bg-orange-400/10"},av={debug:"text-zinc-400",info:"text-blue-400",warn:"text-amber-400",error:"text-red-400"};function sv(){const s=pg(),{data:o}=Lo(),r=[{to:"/",label:"Overview",icon:Sg},{to:"/dashboards",label:"Dashboards",icon:Cm},{to:"/runs",label:"All Runs",icon:Gn},{to:"/logs",label:"Logs",icon:wg},{to:"/queues",label:"Queues",icon:Eg},{to:"/deployments",label:"Deployments",icon:cs},{to:"/metrics",label:"Metrics",icon:So},{to:"/webhooks",label:"Webhooks",icon:rs}];return a.jsxs("aside",{className:"w-56 border-r border-zinc-800 bg-canvas flex flex-col h-full",children:[a.jsxs("div",{className:"px-3 pt-3 pb-2 border-b border-zinc-800 space-y-2",children:[a.jsxs(Qe,{to:"/",className:"flex items-center gap-2 px-1.5 py-1 rounded",children:[a.jsx(ub,{className:"h-4 w-auto shrink-0"}),a.jsx("span",{className:"text-zinc-100 font-semibold text-sm tracking-tight",children:"blok"})]}),a.jsx(Fb,{})]}),a.jsxs("nav",{className:"flex-1 overflow-y-auto py-2 px-2",children:[a.jsx("div",{className:"space-y-0.5",children:r.map(({to:u,label:f,icon:m})=>{const x=s({to:u,fuzzy:u!=="/"})||u==="/"&&location.pathname==="/";return a.jsxs(Qe,{to:u,className:B("relative flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm transition-colors",x?"bg-blok-green-500/10 text-zinc-100 before:content-[''] before:absolute before:left-0 before:top-2 before:bottom-2 before:w-0.5 before:bg-blok-green-500 before:rounded-r":"text-zinc-400 hover:text-zinc-200 hover:bg-hover"),children:[a.jsx(m,{className:B("w-4 h-4",x?"text-zinc-100":"text-zinc-500")}),f]},u)})}),o&&o.length>0&&a.jsxs("div",{className:"mt-6",children:[a.jsx("h3",{className:"px-2.5 mb-1 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Workflows"}),a.jsx("div",{className:"space-y-0.5",children:o.map(u=>{const f=!!s({to:"/workflows/$name",params:{name:u.name},fuzzy:!0});return a.jsxs(Qe,{to:"/workflows/$name",params:{name:u.name},className:B("relative flex items-center justify-between rounded-md px-2.5 py-1.5 text-sm transition-colors",f?"bg-blok-green-500/10 text-zinc-100 before:content-[''] before:absolute before:left-0 before:top-2 before:bottom-2 before:w-0.5 before:bg-blok-green-500 before:rounded-r":"text-zinc-400 hover:text-zinc-200 hover:bg-hover"),children:[a.jsx("span",{className:"truncate",children:u.name}),u.lastRunStatus&&a.jsx("span",{className:B("w-2 h-2 rounded-full shrink-0",ds[u.lastRunStatus],u.lastRunStatus==="running"&&"animate-pulse-dot")})]},u.name)})})]})]}),a.jsxs("div",{className:"border-t border-zinc-800 p-2 space-y-0.5",children:[a.jsxs("button",{type:"button",onClick:()=>window.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0})),className:"w-full flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm text-zinc-500 hover:text-zinc-300 hover:bg-hover transition-colors",children:[a.jsx(wo,{className:"w-4 h-4"}),a.jsx("span",{className:"flex-1 text-left",children:"Search"}),a.jsxs("kbd",{className:"text-[10px] px-1 py-0.5 rounded bg-raised border border-zinc-800 text-zinc-500",children:["⌘","K"]})]}),a.jsxs(Qe,{to:"/settings",className:"flex items-center gap-2 rounded-md px-2.5 py-1.5 text-sm text-zinc-500 hover:text-zinc-300 hover:bg-hover transition-colors [&.active]:bg-blok-green-500/10 [&.active]:text-zinc-100",activeProps:{className:"active"},children:[a.jsx(Tg,{className:"w-4 h-4"}),"Settings"]})]})]})}function be(s){if(s==null)return"—";if(s<1)return"<1ms";if(s<1e3)return`${Math.round(s)}ms`;if(s<6e4)return`${(s/1e3).toFixed(1)}s`;const o=Math.floor(s/6e4),r=Math.round(s%6e4/1e3);return`${o}m ${r}s`}function Yn(s){const o=Date.now()-s;return o<1e3?"just now":o<6e4?`${Math.floor(o/1e3)}s ago`:o<36e5?`${Math.floor(o/6e4)}m ago`:o<864e5?`${Math.floor(o/36e5)}h ago`:`${Math.floor(o/864e5)}d ago`}function Yi(s){return new Date(s).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Qn(s){return s===0?"0%":s<.01?"<1%":`${(s*100).toFixed(1)}%`}let iv=0;const ss=Qi((s,o)=>({notifications:[],enabled:!0,desktopEnabled:!1,addNotification:r=>{const u={...r,id:`notif_${++iv}`,timestamp:Date.now(),read:!1};if(s(f=>({notifications:[u,...f.notifications].slice(0,100)})),o().desktopEnabled&&document.hidden)try{new window.Notification(u.title,{body:u.message,icon:"/favicon.svg",tag:u.runId||u.id})}catch{}},markRead:r=>s(u=>({notifications:u.notifications.map(f=>f.id===r?{...f,read:!0}:f)})),markAllRead:()=>s(r=>({notifications:r.notifications.map(u=>({...u,read:!0}))})),clearAll:()=>s({notifications:[]}),setEnabled:r=>s({enabled:r}),setDesktopEnabled:r=>s({desktopEnabled:r})}));async function cv(){return"Notification"in window?Notification.permission==="granted"?!0:Notification.permission==="denied"?!1:await Notification.requestPermission()==="granted":!1}function rv(){const{notifications:s}=ss(),[o,r]=D.useState([]);D.useEffect(()=>{const f=s[0];if(!f||f.read||Date.now()-f.timestamp>5e3)return;r(x=>x.some(p=>p.id===f.id)?x:[f,...x].slice(0,3));const m=setTimeout(()=>{r(x=>x.filter(p=>p.id!==f.id))},5e3);return()=>clearTimeout(m)},[s]);const u=f=>{r(m=>m.filter(x=>x.id!==f))};return o.length===0?null:a.jsx("div",{className:"fixed bottom-8 right-4 z-50 flex flex-col gap-2 w-80",children:o.map(f=>a.jsx(ov,{toast:f,onDismiss:u},f.id))})}function ov({toast:s,onDismiss:o}){const r=xl(),u={success:a.jsx(Eo,{className:"w-4 h-4 text-green-400 shrink-0"}),error:a.jsx(Rm,{className:"w-4 h-4 text-red-400 shrink-0"}),info:a.jsx(Rg,{className:"w-4 h-4 text-blue-400 shrink-0"})};return a.jsx("div",{className:B("bg-overlay border border-zinc-800 rounded-lg shadow-lg p-3","animate-slide-in cursor-pointer hover:bg-hover/80 transition-colors"),role:"presentation",onClick:()=>{s.runId&&r({to:"/runs/$runId",params:{runId:s.runId}}),o(s.id)},children:a.jsxs("div",{className:"flex items-start gap-2",children:[u[s.type],a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:s.title}),s.message&&a.jsx("p",{className:"text-xs text-zinc-400 mt-0.5 truncate",children:s.message})]}),a.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),o(s.id)},className:"p-0.5 text-zinc-500 hover:text-zinc-300 transition-colors","aria-label":"Dismiss",children:a.jsx(Bt,{className:"w-3 h-3"})})]})})}function uv(){const{notifications:s,enabled:o,desktopEnabled:r,setEnabled:u,setDesktopEnabled:f,markAllRead:m,clearAll:x}=ss(),[p,b]=D.useState(!1),z=xl(),y=s.filter(C=>!C.read).length,g=async()=>{if(r)f(!1);else{const C=await cv();f(C)}};return a.jsxs("div",{className:"relative",children:[a.jsxs("button",{type:"button",onClick:()=>b(!p),className:"relative flex items-center gap-1 text-zinc-500 hover:text-zinc-300 transition-colors","aria-label":"Notifications",children:[a.jsx(G0,{className:"w-3 h-3"}),y>0&&a.jsx("span",{className:"absolute -top-1 -right-1 w-3 h-3 bg-blue-500 rounded-full text-[8px] text-white flex items-center justify-center",children:y>9?"9+":y})]}),p&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-40",role:"presentation",onClick:()=>b(!1)}),a.jsxs("div",{className:"absolute bottom-6 right-0 z-50 w-72 bg-overlay border border-zinc-800 rounded-lg shadow-xl",children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-zinc-800",children:[a.jsx("span",{className:"text-xs font-medium text-zinc-300",children:"Notifications"}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",onClick:()=>u(!o),className:"text-xs text-zinc-500 hover:text-zinc-300",title:o?"Mute notifications":"Enable notifications",children:o?a.jsx(G0,{className:"w-3 h-3"}):a.jsx(Cg,{className:"w-3 h-3"})}),a.jsxs("button",{type:"button",onClick:g,className:B("text-[10px] px-1.5 py-0.5 rounded",r?"bg-blue-500/20 text-blue-400":"bg-zinc-800 text-zinc-500 hover:text-zinc-300"),children:["Desktop ",r?"ON":"OFF"]})]})]}),a.jsx("div",{className:"max-h-64 overflow-y-auto",children:s.length===0?a.jsx("div",{className:"px-3 py-6 text-center text-xs text-zinc-600",children:"No notifications"}):s.slice(0,20).map(C=>a.jsxs("button",{type:"button",onClick:()=>{C.runId&&(z({to:"/runs/$runId",params:{runId:C.runId}}),b(!1))},className:B("w-full text-left px-3 py-2 hover:bg-zinc-800/50 transition-colors border-b border-zinc-800/50",!C.read&&"bg-zinc-800/30"),children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[!C.read&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blue-400 shrink-0"}),a.jsx("span",{className:"text-xs text-zinc-300 truncate",children:C.title}),a.jsx("span",{className:"text-[10px] text-zinc-600 ml-auto shrink-0",children:Yn(C.timestamp)})]}),C.message&&a.jsx("p",{className:"text-[10px] text-zinc-500 mt-0.5 truncate",children:C.message})]},C.id))}),s.length>0&&a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-t border-zinc-800",children:[a.jsx("button",{type:"button",onClick:m,className:"text-[10px] text-zinc-500 hover:text-zinc-300",children:"Mark all read"}),a.jsx("button",{type:"button",onClick:x,className:"text-[10px] text-zinc-500 hover:text-zinc-300",children:"Clear all"})]})]})]})]})}const ml=Qi(s=>({status:"disconnected",activeStreams:0,setStatus:o=>s({status:o}),incrementStreams:()=>s(o=>({activeStreams:o.activeStreams+1})),decrementStreams:()=>s(o=>({activeStreams:Math.max(0,o.activeStreams-1)}))}));function dv(){const{status:s,activeStreams:o}=ml(),r={connected:{icon:Dg,label:"Connected",className:"text-blok-green-500"},connecting:{icon:Ye,label:"Connecting...",className:"text-yellow-400 animate-spin"},disconnected:{icon:Q0,label:"Disconnected",className:"text-zinc-500"},error:{icon:Q0,label:"Connection error",className:"text-red-400"}},{icon:u,label:f,className:m}=r[s];return a.jsxs("div",{className:"h-6 border-t border-zinc-800 bg-canvas flex items-center px-3 text-[11px]",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(u,{className:B("w-3 h-3",m)}),a.jsx("span",{className:"text-zinc-500",children:f})]}),o>0&&a.jsxs("span",{className:"ml-3 text-zinc-600",children:[o," active stream",o>1?"s":""]}),a.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[a.jsx(uv,{}),a.jsx("span",{className:"text-zinc-600",children:"Blok Studio v0.1.0"})]})]})}function fv(){const[s,o]=D.useState(!1),[r,u]=D.useState(""),[f,m]=D.useState({workflows:[],runs:[]}),[x,p]=D.useState(0),[b,z]=D.useState(!1),y=D.useRef(null),g=xl(),C=f.workflows.length+f.runs.length;D.useEffect(()=>{const q=U=>{(U.metaKey||U.ctrlKey)&&U.key==="k"&&(U.preventDefault(),o(Q=>!Q)),U.key==="Escape"&&s&&o(!1)};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[s]),D.useEffect(()=>{s&&(u(""),m({workflows:[],runs:[]}),p(0),requestAnimationFrame(()=>{var q;return(q=y.current)==null?void 0:q.focus()}))},[s]),D.useEffect(()=>{if(!r.trim()){m({workflows:[],runs:[]}),p(0);return}const q=setTimeout(async()=>{z(!0);try{const U=await Pm(r);m(U),p(0)}catch{m({workflows:[],runs:[]})}finally{z(!1)}},200);return()=>clearTimeout(q)},[r]);const S=D.useCallback(q=>{const U=f.workflows.length;if(q<U){const Q=f.workflows[q];Q&&g({to:"/workflows/$name",params:{name:Q.name}})}else{const Q=f.runs[q-U];Q&&g({to:"/runs/$runId",params:{runId:Q.id}})}o(!1)},[f,g]),A=q=>{switch(q.key){case"ArrowDown":q.preventDefault(),p(U=>(U+1)%Math.max(C,1));break;case"ArrowUp":q.preventDefault(),p(U=>(U-1+Math.max(C,1))%Math.max(C,1));break;case"Enter":q.preventDefault(),C>0&&S(x);break}};return s?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",role:"presentation",onClick:()=>o(!1)}),a.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center pt-[20vh] pointer-events-none",children:a.jsxs("dialog",{open:!0,className:"relative w-full max-w-lg bg-overlay border border-zinc-800 rounded-xl shadow-2xl overflow-hidden pointer-events-auto","aria-label":"Search",children:[a.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-zinc-800",children:[a.jsx(wo,{className:"w-4 h-4 text-zinc-500 shrink-0"}),a.jsx("input",{ref:y,value:r,onChange:q=>u(q.target.value),onKeyDown:A,placeholder:"Search workflows, runs, errors...",className:"flex-1 bg-transparent text-sm text-zinc-200 placeholder-zinc-500 outline-none"}),a.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 rounded bg-zinc-800 px-1.5 py-0.5 text-[10px] text-zinc-500 border border-zinc-700",children:"ESC"})]}),a.jsxs("div",{className:"max-h-80 overflow-y-auto",children:[b&&r&&a.jsx("div",{className:"px-4 py-6 text-center text-xs text-zinc-500",children:"Searching..."}),!b&&r&&C===0&&a.jsxs("div",{className:"px-4 py-6 text-center text-xs text-zinc-500",children:['No results for "',r,'"']}),!b&&!r&&a.jsx("div",{className:"px-4 py-6 text-center text-xs text-zinc-500",children:"Type to search workflows, runs, and errors"}),f.workflows.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600 bg-zinc-900/50",children:"Workflows"}),f.workflows.map((q,U)=>a.jsx(mv,{workflow:q,selected:x===U,onClick:()=>S(U)},q.name))]}),f.runs.length>0&&a.jsxs("div",{children:[a.jsx("div",{className:"px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600 bg-zinc-900/50",children:"Runs"}),f.runs.map((q,U)=>{const Q=f.workflows.length+U;return a.jsx(xv,{run:q,selected:x===Q,onClick:()=>S(Q)},q.id)})]})]}),a.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 border-t border-zinc-800 text-[10px] text-zinc-600",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("kbd",{className:"px-1 py-0.5 rounded bg-zinc-800 border border-zinc-700",children:"↑↓"})," Navigate"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("kbd",{className:"px-1 py-0.5 rounded bg-zinc-800 border border-zinc-700",children:"↵"})," Open"]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx("kbd",{className:"px-1 py-0.5 rounded bg-zinc-800 border border-zinc-700",children:"esc"})," Close"]})]})]})})]}):null}function mv({workflow:s,selected:o,onClick:r}){return a.jsxs("button",{type:"button",onClick:r,className:B("w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors",o?"bg-zinc-800":"hover:bg-zinc-800/50"),children:[a.jsx(la,{className:"w-4 h-4 text-zinc-500 shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-sm text-zinc-200",children:s.name}),a.jsxs("div",{className:"text-[11px] text-zinc-500",children:[s.triggerTypes.join(", ")," · ",s.totalRuns," runs · avg ",be(s.avgDurationMs)]})]}),o&&a.jsx(To,{className:"w-3 h-3 text-zinc-500 shrink-0"})]})}function xv({run:s,selected:o,onClick:r}){return a.jsxs("button",{type:"button",onClick:r,className:B("w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors",o?"bg-zinc-800":"hover:bg-zinc-800/50"),children:[a.jsx(Gn,{className:"w-4 h-4 text-zinc-500 shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm text-zinc-200",children:s.workflowName}),a.jsx("span",{className:"text-[11px] text-zinc-500 font-mono",children:s.id.slice(0,12)}),a.jsx("span",{className:B("w-2 h-2 rounded-full shrink-0",ds[s.status])})]}),a.jsxs("div",{className:"text-[11px] text-zinc-500",children:[s.triggerSummary," · ",be(s.durationMs)," · ",Yn(s.startedAt),s.error&&a.jsxs("span",{className:"text-red-400",children:[" · ",s.error.message.slice(0,60)]})]})]}),o&&a.jsx(To,{className:"w-3 h-3 text-zinc-500 shrink-0"})]})}class hv extends D.Component{constructor(r){super(r);B0(this,"handleRetry",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,u){console.error("[ErrorBoundary]",r,u)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:a.jsxs("div",{className:"flex flex-col items-center justify-center h-full min-h-[200px] gap-4 p-8",children:[a.jsxs("div",{className:"flex items-center gap-2 text-amber-400",children:[a.jsx(Co,{className:"w-6 h-6"}),a.jsx("h2",{className:"text-lg font-semibold",children:"Something went wrong"})]}),a.jsx("p",{className:"text-sm text-zinc-400 text-center max-w-md",children:((r=this.state.error)==null?void 0:r.message)||"An unexpected error occurred while rendering this component."}),a.jsxs("button",{type:"button",onClick:this.handleRetry,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium bg-zinc-800 text-zinc-200 hover:bg-zinc-700 transition-colors border border-zinc-700",children:[a.jsx(Dm,{className:"w-3.5 h-3.5"}),"Retry"]})]}):this.props.children}}const yx="/__blok";function pv(s,o){const r=`${yx}/runs/${encodeURIComponent(s)}/stream`;return jx(r,o)}function gv(s,o){let r=`${yx}/stream`;return jx(r,s)}const bv=["RUN_STARTED","RUN_COMPLETED","RUN_FAILED","NODE_STARTED","NODE_COMPLETED","NODE_FAILED","NODE_SKIPPED","VARS_UPDATED","LOG_ENTRY"],vv=10,yv=1e3,jv=3e4;function jx(s,o){let r=null,u=!1,f=0,m=null,x=null,p=!1;const b=o.timeout??1e4;function z(){if(p)return;r=new EventSource(s),u=!1,x=setTimeout(()=>{var A;!u&&!p&&(r==null||r.close(),(A=o.onError)==null||A.call(o,new Event("timeout")),y())},b);const C=()=>{var A;u||(u=!0,f=0,x&&(clearTimeout(x),x=null),(A=o.onOpen)==null||A.call(o))};r.onopen=C,r.addEventListener("connected",C),r.onerror=()=>{var A;p||(r==null||r.close(),x&&(clearTimeout(x),x=null),(A=o.onError)==null||A.call(o,new Event("error")),y())};const S=A=>{try{const q=JSON.parse(A.data);o.onEvent(q)}catch{}};for(const A of bv)r.addEventListener(A,S);r.addEventListener("stream-end",()=>{var A;(A=o.onEnd)==null||A.call(o),g()})}function y(){if(p||f>=vv)return;const C=Math.min(yv*2**f,jv);f++,m=setTimeout(z,C)}function g(){p=!0,r==null||r.close(),r=null,m&&(clearTimeout(m),m=null),x&&(clearTimeout(x),x=null)}return z(),g}const Nx=Qi(s=>({events:[],maxEvents:50,pushEvent:o=>s(r=>{const u=[o,...r.events];return{events:u.length>r.maxEvents?u.slice(0,r.maxEvents):u}})}));function Nv(s=!0){const o=Gt(),r=ml(z=>z.setStatus),u=ml(z=>z.incrementStreams),f=ml(z=>z.decrementStreams),m=ss(z=>z.addNotification),x=Nx(z=>z.pushEvent),p=D.useRef(ss.getState().enabled);D.useEffect(()=>ss.subscribe(z=>{p.current=z.enabled}),[]);const b=D.useRef(null);D.useEffect(()=>{if(!s)return;u(),r("connecting");const z=()=>{b.current||(b.current=setTimeout(()=>{b.current=null,o.invalidateQueries({queryKey:["workflows"]}),o.invalidateQueries({queryKey:["runs"]})},500))},y=gv({onEvent:g=>{var C;if(z(),x(g),p.current){if(g.type==="RUN_COMPLETED"){const S=g.payload,A=S==null?void 0:S.durationMs;m({type:"success",title:`${g.workflowName} completed`,message:A?`Finished in ${zv(A)}`:"Run completed successfully",runId:g.runId,workflowName:g.workflowName})}else if(g.type==="RUN_FAILED"){const S=g.payload,A=(C=S==null?void 0:S.error)==null?void 0:C.message;m({type:"error",title:`${g.workflowName} failed`,message:A||"Run failed with an error",runId:g.runId,workflowName:g.workflowName})}}},onOpen:()=>r("connected"),onError:()=>r("error")});return()=>{y(),f(),r("disconnected"),b.current&&(clearTimeout(b.current),b.current=null)}},[s,o,r,u,f,m,x])}function zv(s){return s<1e3?`${Math.round(s)}ms`:`${(s/1e3).toFixed(1)}s`}const vt=gg()({component:Sv});function Sv(){return Nv(),a.jsxs("div",{className:"h-screen flex flex-col bg-canvas",children:[a.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[a.jsx(sv,{}),a.jsx("main",{className:"flex-1 overflow-y-auto bg-raised",children:a.jsx(hv,{children:a.jsx(bg,{})})})]}),a.jsx(dv,{}),a.jsx(fv,{}),a.jsx(rv,{})]})}function Pe({icon:s,title:o,description:r,action:u,className:f,snippets:m,docLink:x,align:p="center"}){const b=B("flex flex-col py-12 px-4 max-w-2xl",p==="center"?"items-center text-center mx-auto":"items-start",f);return a.jsxs("div",{className:b,children:[a.jsx("div",{className:B("mb-4 text-zinc-600",p==="center"&&"opacity-60"),children:s}),a.jsx("h3",{className:"text-lg font-medium text-zinc-100 mb-1.5 font-display italic tracking-tight",children:o}),a.jsx("div",{className:"text-sm text-zinc-400 leading-relaxed mb-5",children:r}),m&&m.length>0&&a.jsx("div",{className:B("w-full space-y-2.5 mb-5",p==="center"&&"text-left"),children:m.map(z=>a.jsx(wv,{snippet:z},z.lang))}),(u||x)&&a.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[u,x&&a.jsxs("a",{href:x.href,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1.5 text-[12px] text-blok-green-500 hover:text-blok-green-600 hover:underline font-mono font-medium",children:["↗ ",x.label]})]})]})}function wv({snippet:s}){const[o,r]=D.useState(!1),u=async()=>{try{await navigator.clipboard.writeText(s.code),r(!0),setTimeout(()=>r(!1),1500)}catch{}};return a.jsxs("div",{className:"rounded-md border border-zinc-800 bg-overlay overflow-hidden text-left",children:[a.jsxs("div",{className:"px-3 py-1.5 bg-canvas/40 border-b border-zinc-800 flex items-center gap-2",children:[a.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.08em] text-zinc-500",children:s.lang}),a.jsx("button",{type:"button",onClick:u,className:B("ml-auto text-[10.5px] font-mono px-2 py-0.5 rounded border transition-colors",o?"bg-blok-green-500/15 text-blok-green-500 border-blok-green-500/30":"border-zinc-800 text-zinc-400 hover:bg-hover hover:text-zinc-100"),children:o?"copied":"copy"})]}),a.jsx("pre",{className:"px-4 py-3 font-mono text-[11.5px] leading-relaxed text-zinc-100 overflow-x-auto whitespace-pre",children:s.code})]})}const Ev=Dt("/webhooks")({component:Cv}),Tv=[{value:"run.started",label:"Run Started"},{value:"run.completed",label:"Run Completed"},{value:"run.failed",label:"Run Failed"}];function Cv(){const s=Gt(),[o,r]=D.useState(!1),[u,f]=D.useState(""),[m,x]=D.useState(""),[p,b]=D.useState(["run.completed","run.failed"]),[z,y]=D.useState(null),{data:g,isLoading:C}=Ze({queryKey:["webhooks"],queryFn:cx,refetchInterval:1e4}),S=Bn({mutationFn:rx,onSuccess:()=>{s.invalidateQueries({queryKey:["webhooks"]}),r(!1),f(""),x(""),b(["run.completed","run.failed"]),y(null)},onError:k=>{y(k instanceof Error?k.message:"Failed to create webhook")}}),A=Bn({mutationFn:ox,onSuccess:()=>{s.invalidateQueries({queryKey:["webhooks"]})}}),q=k=>{if(k.preventDefault(),y(null),!u.trim()){y("URL is required");return}try{new URL(u)}catch{y("Invalid URL format");return}if(p.length===0){y("Select at least one event");return}S.mutate({url:u.trim(),events:p,secret:m.trim()||void 0})},U=k=>{b(Y=>Y.includes(k)?Y.filter(G=>G!==k):[...Y,k])},Q=(g==null?void 0:g.webhooks)??[];return a.jsxs("div",{className:"p-6 max-w-4xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Webhooks"}),a.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Get notified when workflow runs complete or fail."})]}),a.jsxs("button",{type:"button",onClick:()=>r(!o),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors",children:[a.jsx(fl,{className:"w-4 h-4"}),"Add Webhook"]})]}),o&&a.jsxs("form",{onSubmit:q,className:"rounded-lg border border-zinc-800 bg-overlay p-4 space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"webhook-url",className:"block text-xs font-medium text-zinc-400 mb-1",children:"Endpoint URL"}),a.jsx("input",{id:"webhook-url",type:"url",value:u,onChange:k=>f(k.target.value),placeholder:"https://example.com/webhook",className:"w-full px-3 py-2 rounded-md bg-raised border border-zinc-800 text-sm text-zinc-100 placeholder-zinc-600 focus:outline-none focus:border-blok-green-500"})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"webhook-secret",className:"block text-xs font-medium text-zinc-400 mb-1",children:"Secret (optional)"}),a.jsx("input",{id:"webhook-secret",type:"text",value:m,onChange:k=>x(k.target.value),placeholder:"Used for HMAC-SHA256 signature verification",className:"w-full px-3 py-2 rounded-md bg-raised border border-zinc-800 text-sm text-zinc-100 placeholder-zinc-600 focus:outline-none focus:border-blok-green-500"}),a.jsx("p",{className:"text-[11px] text-zinc-600 mt-1",children:"If set, requests include an X-Blok-Signature header."})]}),a.jsxs("fieldset",{className:"border-0 p-0 m-0",children:[a.jsx("legend",{className:"block text-xs font-medium text-zinc-400 mb-2",children:"Events"}),a.jsx("div",{className:"flex gap-2",children:Tv.map(k=>a.jsx("button",{type:"button",onClick:()=>U(k.value),className:B("px-3 py-1.5 rounded-md text-xs font-medium border transition-colors",p.includes(k.value)?"border-blok-green-500 bg-blok-green-500/10 text-blok-green-500":"border-zinc-800 bg-raised text-zinc-400 hover:border-zinc-700"),children:k.label},k.value))})]}),z&&a.jsx("p",{className:"text-sm text-red-400",children:z}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("button",{type:"submit",disabled:S.isPending,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors disabled:opacity-50",children:[S.isPending&&a.jsx(Ye,{className:"w-3 h-3 animate-spin"}),"Create Webhook"]}),a.jsx("button",{type:"button",onClick:()=>{r(!1),y(null)},className:"px-3 py-1.5 rounded-md text-sm font-medium text-zinc-400 hover:text-zinc-200 transition-colors",children:"Cancel"})]})]}),C?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(Ye,{className:"w-5 h-5 text-zinc-500 animate-spin"})}):Q.length===0?a.jsx(Pe,{icon:a.jsx(rs,{className:"w-10 h-10"}),title:"No webhooks yet",description:a.jsxs(a.Fragment,{children:["Webhooks fire when a run completes, fails, or is cancelled. Each request is signed with HMAC-SHA256 if you set a secret — the receiver verifies via the",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:"X-Blok-Signature"}),"header."]}),action:a.jsxs("button",{type:"button",onClick:()=>r(!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors",children:[a.jsx(fl,{className:"w-3.5 h-3.5"}),"Add webhook"]}),docLink:{href:"https://docs.blok.io/studio/webhooks",label:"docs.blok.io/studio/webhooks"}}):a.jsx("div",{className:"space-y-2",children:Q.map(k=>a.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-zinc-800 bg-overlay px-4 py-3",children:[a.jsx("div",{className:B("w-2 h-2 rounded-full shrink-0",k.active?"bg-green-500":"bg-red-500")}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("div",{className:"text-sm text-zinc-200 font-mono truncate",children:k.url}),a.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[a.jsx("span",{className:"text-[11px] text-zinc-500",children:k.events.join(", ")}),k.lastTriggeredAt&&a.jsxs("span",{className:"text-[11px] text-zinc-600 flex items-center gap-1",children:[k.lastStatus&&k.lastStatus<400?a.jsx(Eo,{className:"w-3 h-3 text-green-500"}):a.jsx(Mm,{className:"w-3 h-3 text-red-500"}),"Last fired ",Yn(k.lastTriggeredAt),k.lastStatus&&a.jsxs("span",{children:["(HTTP ",k.lastStatus,")"]})]}),!k.active&&a.jsxs("span",{className:"text-[11px] text-red-400",children:["Disabled after ",k.failCount," failures"]})]})]}),a.jsx("button",{type:"button",onClick:()=>A.mutate(k.id),disabled:A.isPending,className:"p-1.5 rounded hover:bg-zinc-800 text-zinc-500 hover:text-red-400 transition-colors",title:"Delete webhook",children:a.jsx(Ro,{className:"w-4 h-4"})})]},k.id))})]})}const Rv=Dt("/settings")({component:Dv});function Dv(){const s=on(S=>S.current),o=xl(),r=Gt(),{data:u}=Ze({queryKey:["health"],queryFn:Gm,retry:1}),{data:f}=Ze({queryKey:["config"],queryFn:Qm,retry:1}),[m,x]=D.useState(""),[p,b]=D.useState(!1),[z,y]=D.useState(null),g=m.trim().toLowerCase()==="delete"&&!p;async function C(){if(g){b(!0),y(null);try{const S=await Im();y(S),x(""),r.invalidateQueries()}catch(S){y({error:S instanceof Error?S.message:String(S)})}finally{b(!1)}}}return a.jsxs("div",{className:"p-6 max-w-3xl mx-auto space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Settings"}),a.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Studio configuration, storage, and destructive actions."})]}),a.jsxs(tm,{icon:a.jsx(Mg,{className:"w-4 h-4 text-zinc-500"}),title:"Storage",subtitle:"Where Studio's run history is persisted.",children:[a.jsx(rn,{label:"Backend",value:Mv()}),a.jsx(rn,{label:"Inferred path",value:a.jsx("span",{className:"font-mono",children:Av()})}),a.jsx(rn,{label:"Trigger version",value:(u==null?void 0:u.version)??"—"}),a.jsx(rn,{label:"Trigger uptime",value:u?kv(u.uptime):"—"}),a.jsx(rn,{label:"Active runs",value:String((u==null?void 0:u.activeRuns)??0)}),a.jsx(rn,{label:"Workflows registered",value:String((f==null?void 0:f.workflows.length)??0)}),a.jsx(rn,{label:"Trigger types",value:((f==null?void 0:f.triggers)??[]).join(", ")||"—"})]}),a.jsxs(tm,{icon:a.jsx("span",{className:"block w-2 h-2 rounded-full bg-blok-green-500",style:{boxShadow:"0 0 0 3px rgba(43, 205, 113, 0.18)"}}),title:"Environment scope",subtitle:a.jsxs(a.Fragment,{children:["List views are scoped to ",a.jsx("code",{className:"font-mono",children:s}),". Switch via the env chip in the sidebar. To register additional environments, set",a.jsx("code",{className:"font-mono mx-1",children:"BLOK_ENV"}),"on the trigger before starting it."]}),children:[a.jsx(rn,{label:"Current scope",value:a.jsx("span",{className:"font-mono text-blok-green-500",children:s})}),a.jsx(rn,{label:"Backend filter",value:"?env=… (Phase 2.1)"})]}),a.jsxs("section",{className:"rounded-lg border border-status-failed/30 bg-status-failed/5 overflow-hidden",children:[a.jsxs("header",{className:"px-5 py-3 border-b border-status-failed/30 flex items-center gap-2",children:[a.jsx(Co,{className:"w-4 h-4 text-status-failed"}),a.jsx("h2",{className:"text-[12px] font-semibold uppercase tracking-[0.08em] text-status-failed",children:"Danger zone"})]}),a.jsxs("div",{className:"p-5 space-y-4",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-semibold text-zinc-100",children:"Clear all data"}),a.jsxs("p",{className:"text-[13px] text-zinc-400 mt-1 leading-relaxed",children:["Removes every run, node, log line, event, and tag from the persistence store backing this trigger. This is the equivalent of ",a.jsx("code",{className:"font-mono",children:"DELETE /__blok/runs"}),". ",a.jsx("b",{children:"Cannot be undone."})," If you're using SQLite, the underlying ",a.jsx("code",{className:"font-mono",children:".db"})," file stays — only its contents are wiped — so the file watcher on your trigger doesn't lose its handle."]})]}),a.jsxs("label",{className:"flex flex-col gap-1.5 max-w-md",children:[a.jsxs("span",{className:"text-[11px] uppercase tracking-[0.08em] text-zinc-500 font-semibold",children:["Type ",a.jsx("code",{className:"font-mono normal-case tracking-normal text-zinc-300",children:"delete"})," to enable the button"]}),a.jsx("input",{type:"text",value:m,onChange:S=>x(S.target.value),placeholder:"delete",className:B("px-3 py-2 rounded-md bg-raised border text-sm text-zinc-100 font-mono","focus:outline-none transition-colors",g?"border-status-failed":"border-zinc-800 focus:border-zinc-600"),spellCheck:!1,autoComplete:"off"})]}),a.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[a.jsxs("button",{type:"button",onClick:C,disabled:!g,className:B("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold transition-colors",g?"bg-status-failed text-white hover:opacity-90":"bg-raised border border-zinc-800 text-zinc-600 cursor-not-allowed"),children:[p?a.jsx(Ye,{className:"w-3.5 h-3.5 animate-spin"}):a.jsx(Ro,{className:"w-3.5 h-3.5"}),p?"Clearing…":"Clear all data"]}),z&&"deleted"in z&&a.jsxs("span",{className:"text-[12px] text-blok-green-500 font-mono",children:["✓ ",z.deleted.toLocaleString()," record",z.deleted===1?"":"s"," removed"]}),z&&"error"in z&&a.jsxs("span",{className:"text-[12px] text-status-failed font-mono break-all",children:["Failed: ",z.error]}),a.jsx("button",{type:"button",onClick:()=>o({to:"/"}),className:"text-[12px] text-zinc-500 hover:text-zinc-300 ml-auto",children:"Back to overview"})]})]})]}),a.jsxs("p",{className:"text-[11px] font-mono text-zinc-600 pt-2 border-t border-zinc-800",children:["Blok Studio · ships with ",a.jsx("code",{children:"blokctl studio"})," · persistence: SQLite by default in dev, configurable via"," ",a.jsx("code",{children:"BLOK_TRACE_STORE"}),"."]})]})}function tm({icon:s,title:o,subtitle:r,children:u}){return a.jsxs("section",{className:"rounded-lg border border-zinc-800 bg-overlay overflow-hidden",children:[a.jsxs("header",{className:"px-5 py-3 border-b border-zinc-800 flex items-start gap-2",children:[s&&a.jsx("span",{className:"mt-0.5 shrink-0",children:s}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-semibold text-zinc-100",children:o}),a.jsx("p",{className:"text-[12.5px] text-zinc-500 mt-0.5 leading-relaxed",children:r})]})]}),a.jsx("dl",{className:"px-5 py-3 space-y-2",children:u})]})}function rn({label:s,value:o}){return a.jsxs("div",{className:"grid grid-cols-[180px_1fr] gap-3 text-[12.5px]",children:[a.jsx("dt",{className:"text-zinc-500 font-mono",children:s}),a.jsx("dd",{className:"text-zinc-200 break-all",children:o})]})}function Mv(s){return a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-mono",children:"SQLite"}),a.jsx("span",{className:"text-zinc-500",children:" · default for "}),a.jsx("code",{className:"font-mono",children:"blokctl dev"}),a.jsx("span",{className:"text-zinc-500",children:" projects"})]})}function Av(){return".blok/trace.db"}function kv(s){if(s<60)return`${Math.round(s)}s`;if(s<3600)return`${Math.round(s/60)}m ${Math.round(s%60)}s`;const o=Math.floor(s/3600),r=Math.round(s%3600/60);return`${o}h ${r}m`}const Ov=Dt("/queues")({component:_v});function _v(){const s=on(m=>m.current),{data:o,isLoading:r,error:u}=Ze({queryKey:["queues",s],queryFn:()=>$m({env:s}),refetchInterval:5e3});if(r)return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})});if(u)return a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(Gn,{className:"w-10 h-10"}),title:"Couldn't load queues",description:a.jsxs(a.Fragment,{children:["The runner's ",a.jsx("code",{className:"font-mono",children:"/__blok/queues"})," endpoint didn't respond. Restart the trigger to pick up the new endpoint if you just rebuilt the runner."]})})});const f=(o==null?void 0:o.queues)??[];return f.length===0?a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(rs,{className:"w-10 h-10"}),title:"No queues yet",description:a.jsxs(a.Fragment,{children:["No workflows are registered to receive work in",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:s}),". Once a workflow's trigger config is loaded by the trigger server, it'll appear here."]}),docLink:{href:"https://docs.blok.io/triggers",label:"docs.blok.io/triggers"}})}):a.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-5",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Queues"}),a.jsxs("p",{className:"text-sm text-zinc-500 mt-1",children:["Triggers configured to receive work in ",s,". ",f.length," ",f.length===1?"queue":"queues"," ","loaded."]})]}),a.jsx("div",{className:"rounded-lg border border-zinc-800 bg-overlay overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-canvas/60",children:a.jsxs("tr",{children:[a.jsx(ol,{children:"Workflow"}),a.jsx(ol,{className:"w-[140px]",children:"Trigger"}),a.jsx(ol,{className:"w-[80px]",children:"Depth"}),a.jsx(ol,{className:"w-[110px] text-right",children:"Runs · 24h"}),a.jsx(ol,{className:"w-[120px] text-right",children:"Avg"}),a.jsx(ol,{className:"w-[100px] text-right",children:"Errors"}),a.jsx(ol,{className:"w-[140px] text-right",children:"Last run"})]})}),a.jsx("tbody",{children:f.map(m=>a.jsx(Uv,{queue:m},m.id))})]})}),a.jsx("p",{className:"text-[11px] font-mono text-zinc-600",children:`Stateless HTTP triggers don't have queue depth — depth is "—" until JetStream-backed worker queues land.`})]})}function Uv({queue:s}){const o=s.triggerType==="http"?Do:s.triggerType==="cron"?os:s.triggerType==="email"?Ag:rs;return a.jsxs("tr",{className:"border-t border-zinc-800 hover:bg-hover transition-colors",children:[a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Qe,{to:"/workflows/$name",params:{name:s.name},className:"text-zinc-100 hover:text-blok-green-500 hover:underline font-medium",children:s.name})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("span",{className:"inline-flex items-center gap-1.5 font-mono text-[11px] text-zinc-300",children:[a.jsx(o,{className:"w-3 h-3 text-zinc-500"}),s.triggerType]})}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[12px] text-zinc-500",children:s.depth??"—"}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[12px] text-zinc-100 text-right",children:s.runs24h}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[12px] text-zinc-300 text-right",children:be(s.avgDurationMs)}),a.jsx("td",{className:B("px-3 py-2.5 font-mono text-[12px] text-right",s.errorRate>0?"text-status-failed":"text-zinc-600"),children:s.errorRate>0?`${(s.errorRate*100).toFixed(1)}%`:"—"}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[11px] text-zinc-500 text-right",children:s.lastRunAt?Yn(s.lastRunAt):"—"})]})}function ol({children:s,className:o}){return a.jsx("th",{className:B("text-left text-[10px] uppercase tracking-[0.06em] text-zinc-500 font-semibold px-3 py-2",o),children:s})}function zx({data:s}){return s.some(r=>r.count>0)?a.jsx(Nm,{width:"100%",height:220,children:a.jsxs(zm,{data:s,margin:{top:0,right:0,left:-20,bottom:0},children:[a.jsx(Sm,{strokeDasharray:"3 3",stroke:"#27272a"}),a.jsx(wm,{dataKey:"range",tick:{fill:"#71717a",fontSize:10},tickLine:!1,axisLine:{stroke:"#3f3f46"}}),a.jsx(Em,{tick:{fill:"#71717a",fontSize:10},tickLine:!1,axisLine:{stroke:"#3f3f46"},allowDecimals:!1}),a.jsx(Tm,{contentStyle:{backgroundColor:"#18181b",border:"1px solid #3f3f46",borderRadius:"6px",fontSize:"12px"},labelStyle:{color:"#a1a1aa"},itemStyle:{color:"#d4d4d8"},formatter:r=>[`${r} runs`,"Count"]}),a.jsx(bo,{dataKey:"count",fill:"#3b82f6",opacity:.7,radius:[4,4,0,0]})]})}):a.jsx("div",{className:"flex items-center justify-center h-48 text-zinc-600 text-sm",children:"No duration data available"})}function Sx({data:s}){const o=s.map(u=>({...u,time:new Date(u.bucket).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}));return s.some(u=>u.total>0)?a.jsx(Nm,{width:"100%",height:220,children:a.jsxs(zm,{data:o,margin:{top:0,right:0,left:-20,bottom:0},children:[a.jsx(Sm,{strokeDasharray:"3 3",stroke:"#27272a"}),a.jsx(wm,{dataKey:"time",tick:{fill:"#71717a",fontSize:10},tickLine:!1,axisLine:{stroke:"#3f3f46"},interval:"preserveStartEnd"}),a.jsx(Em,{tick:{fill:"#71717a",fontSize:10},tickLine:!1,axisLine:{stroke:"#3f3f46"},allowDecimals:!1}),a.jsx(Tm,{contentStyle:{backgroundColor:"#18181b",border:"1px solid #3f3f46",borderRadius:"6px",fontSize:"12px"},labelStyle:{color:"#a1a1aa"},itemStyle:{color:"#d4d4d8"}}),a.jsx(zg,{wrapperStyle:{fontSize:"11px",color:"#71717a"}}),a.jsx(bo,{dataKey:"completed",name:"Completed",fill:"#22c55e",opacity:.7,radius:[2,2,0,0],stackId:"status"}),a.jsx(bo,{dataKey:"failed",name:"Failed",fill:"#ef4444",opacity:.7,radius:[2,2,0,0],stackId:"status"})]})}):a.jsx("div",{className:"flex items-center justify-center h-48 text-zinc-600 text-sm",children:"No executions in the last 24 hours"})}function wx({data:s}){const o=Math.max(...s.map(r=>r.avgDurationMs),1);return a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-zinc-800",children:[a.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Node"}),a.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Avg Duration"}),a.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Max"}),a.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Runs"}),a.jsx("th",{className:"text-left px-2 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:"Error Rate"})]})}),a.jsx("tbody",{children:s.sort((r,u)=>u.avgDurationMs-r.avgDurationMs).map(r=>a.jsxs("tr",{className:"border-b border-zinc-800/50 hover:bg-zinc-800/30",children:[a.jsxs("td",{className:"px-2 py-2",children:[a.jsx("div",{className:"flex items-center gap-2",children:a.jsx("span",{className:"text-xs font-medium text-zinc-300",children:r.nodeName})}),a.jsx("div",{className:"h-1 bg-zinc-800 rounded-full overflow-hidden mt-1 max-w-32",children:a.jsx("div",{className:"h-full bg-blue-500/60 rounded-full",style:{width:`${r.avgDurationMs/o*100}%`}})})]}),a.jsx("td",{className:"px-2 py-2",children:a.jsx("span",{className:"text-xs font-mono text-zinc-400",children:be(r.avgDurationMs)})}),a.jsx("td",{className:"px-2 py-2",children:a.jsx("span",{className:"text-xs font-mono text-zinc-500",children:be(r.maxDurationMs)})}),a.jsx("td",{className:"px-2 py-2",children:a.jsx("span",{className:"text-xs font-mono text-zinc-500",children:r.executionCount})}),a.jsx("td",{className:"px-2 py-2",children:a.jsx("span",{className:B("text-xs font-mono",r.errorRate>.1?"text-red-400":r.errorRate>0?"text-amber-400":"text-green-500"),children:Qn(r.errorRate)})})]},r.nodeName))})]})})}function Ex({data:s}){const o=Math.max(...s.map(r=>r.totalRuns),1);return a.jsx("div",{className:"space-y-2",children:s.sort((r,u)=>u.totalRuns-r.totalRuns).map(r=>a.jsxs(Qe,{to:"/workflows/$name",params:{name:r.name},className:"flex items-center gap-3 p-2 rounded-md hover:bg-zinc-800/50 transition-colors group",children:[a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx("span",{className:"text-xs font-medium text-zinc-300 truncate group-hover:text-zinc-100",children:r.name}),a.jsxs("span",{className:"text-[10px] font-mono text-zinc-500 shrink-0 ml-2",children:[r.totalRuns," runs"]})]}),a.jsx("div",{className:"h-2 bg-zinc-800 rounded-full overflow-hidden",children:a.jsx("div",{className:B("h-full rounded-full transition-all",r.errorRate>.1?"bg-red-500/60":r.errorRate>0?"bg-amber-500/60":"bg-green-500/60"),style:{width:`${r.totalRuns/o*100}%`}})})]}),a.jsxs("div",{className:"shrink-0 text-right",children:[a.jsx("div",{className:"text-[10px] font-mono text-zinc-500",children:be(r.avgDurationMs)}),a.jsxs("div",{className:B("text-[10px] font-mono",r.errorRate>.1?"text-red-400":r.errorRate>0?"text-amber-400":"text-green-400"),children:[Qn(r.errorRate)," err"]})]})]},r.name))})}function Tx(s){return Ze({queryKey:["metrics",s],queryFn:()=>lx(s),refetchInterval:1e4})}function Lv(s,o){return Ze({queryKey:["diff",s,o],queryFn:()=>ex(s,o),enabled:!!s&&!!o})}function qv(s){const o=Gt();return Bn({mutationFn:r=>tx(s,r),onSuccess:()=>{o.invalidateQueries({queryKey:["run",s]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["runs"]})}})}function Hv(s){const o=Gt();return Bn({mutationFn:r=>nx(s,r),onSuccess:()=>{o.invalidateQueries({queryKey:["run",s]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["runs"]})}})}const Bv=Dt("/metrics")({component:Gv});function Gv(){const{data:s}=Lo(),[o,r]=D.useState(void 0),{data:u,isLoading:f}=Tx(o);return f?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})}):!u||u.totalRuns===0?a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(So,{className:"w-10 h-10"}),title:"No metrics yet",description:"Once workflows run, this page aggregates duration histograms, p50/p95 latency, success rate per workflow, and node-level performance breakdowns.",snippets:[{lang:"curl · http",code:`curl -X POST http://localhost:4000/cross-runtime-chain \\
|
|
26
|
+
-H 'content-type: application/json' \\
|
|
27
|
+
-d '{}'`}],docLink:{href:"https://docs.blok.io/studio/metrics",label:"docs.blok.io/studio/metrics"}})}):a.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Metrics"}),a.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Execution analytics and performance insights."})]}),s&&s.length>1&&a.jsxs("select",{value:o||"",onChange:m=>r(m.target.value||void 0),className:"text-sm bg-raised border border-zinc-800 rounded-md px-3 py-1.5 text-zinc-300 outline-none focus:border-blok-green-500",children:[a.jsx("option",{value:"",children:"All Workflows"}),s.map(m=>a.jsx("option",{value:m.name,children:m.name},m.name))]})]}),a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 xl:grid-cols-7 gap-3",children:[a.jsx(ul,{label:"Total Runs",value:String(u.totalRuns)}),a.jsx(ul,{label:"Completed",value:String(u.completedRuns),color:"text-green-400"}),a.jsx(ul,{label:"Failed",value:String(u.failedRuns),color:u.failedRuns>0?"text-red-400":void 0}),a.jsx(ul,{label:"Error Rate",value:Qn(u.totalRuns>0?u.failedRuns/u.totalRuns:0),color:u.failedRuns>0?"text-red-400":void 0}),a.jsx(ul,{label:"Avg Duration",value:be(u.avgDurationMs)}),a.jsx(ul,{label:"P95 Duration",value:be(u.p95DurationMs)}),a.jsx(ul,{label:"P99 Duration",value:be(u.p99DurationMs)})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-300 mb-4",children:"Execution Timeline (24h)"}),a.jsx(Sx,{data:u.executionTimeline})]}),a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-300 mb-4",children:"Duration Distribution"}),a.jsx(zx,{data:u.durationDistribution})]})]}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[!o&&u.workflowBreakdown.length>0&&a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-300 mb-4",children:"Workflow Breakdown"}),a.jsx(Ex,{data:u.workflowBreakdown})]}),u.nodePerformance.length>0&&a.jsxs("div",{className:B("rounded-lg border border-zinc-800 bg-overlay p-4",o?"lg:col-span-2":""),children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-300 mb-4",children:"Node Performance"}),a.jsx(wx,{data:u.nodePerformance})]})]})]})}function ul({label:s,value:o,color:r}){return a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-3",children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:s}),a.jsx("div",{className:B("text-lg font-semibold font-mono",r||"text-zinc-100"),children:o})]})}const Qv=Dt("/logs")({component:Yv});function Yv(){const s=on(Y=>Y.current),[o,r]=D.useState(new Set),[u,f]=D.useState(),[m,x]=D.useState(""),[p,b]=D.useState(!0),z=D.useRef(null),y=o.size>0?[...o].join(","):void 0,{data:g,isLoading:C,error:S}=Ze({queryKey:["logs",s,y,u,m,p],queryFn:()=>Wm({workflow:u,level:y,q:m||void 0,env:s,limit:200}),refetchInterval:p?2e3:!1,placeholderData:Y=>Y}),A=D.useRef(new Set),[q,U]=D.useState(new Set);D.useEffect(()=>{if(!(g!=null&&g.logs))return;const Y=g.logs.filter(L=>!A.current.has(L.id));for(const L of Y)A.current.add(L.id);if(Y.length===0)return;const G=new Set(Y.map(L=>L.id));U(G);const K=setTimeout(()=>U(new Set),1200);return()=>clearTimeout(K)},[g]);const Q=D.useMemo(()=>{const Y={error:0,warn:0,info:0,debug:0},G=new Set;for(const K of(g==null?void 0:g.logs)??[])Y[K.level]=(Y[K.level]??0)+1,G.add(K.workflowName);return{counts:Y,workflowCount:G.size}},[g==null?void 0:g.logs]);D.useEffect(()=>{const Y=G=>{var K;if(G.target instanceof HTMLInputElement||G.target instanceof HTMLTextAreaElement){G.key==="Escape"&&(x(""),G.target.blur());return}G.metaKey||G.ctrlKey||(G.key==="/"?(G.preventDefault(),(K=z.current)==null||K.focus()):G.key.toLowerCase()==="l"&&b(L=>!L))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[]);const k=Y=>{r(G=>{const K=new Set(G);return K.has(Y)?K.delete(Y):K.add(Y),K})};return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsxs("header",{className:"px-6 pt-5 pb-3 border-b border-zinc-800 bg-canvas",children:[a.jsxs("div",{className:"flex items-baseline gap-3 mb-1",children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Logs"}),a.jsxs("span",{className:"text-[12px] font-mono text-zinc-500",children:[s," · ",u??"all workflows"]}),a.jsxs("button",{type:"button",onClick:()=>b(Y=>!Y),className:B("ml-auto inline-flex items-center gap-2 px-3 py-1 rounded-md border text-xs font-medium transition-colors",p?"bg-blok-green-500/10 text-blok-green-500 border-blok-green-500/30":"bg-raised text-zinc-400 border-zinc-800 hover:bg-hover"),"aria-pressed":p,children:[a.jsx("span",{className:B("w-1.5 h-1.5 rounded-full bg-current",p&&"animate-pulse-dot")}),"Live tail",a.jsx("kbd",{className:"font-mono text-[10px] px-1 py-px rounded bg-canvas border border-zinc-800 text-zinc-500",children:"L"})]})]}),a.jsxs("div",{className:"mt-3 flex items-center gap-2 bg-raised border border-zinc-800 rounded-lg px-3 py-1.5 focus-within:border-blok-green-500 focus-within:shadow-[0_0_0_3px_rgba(43,205,113,0.12)] transition-all",children:[a.jsx(wo,{className:"w-3.5 h-3.5 text-zinc-500 shrink-0"}),[...o].map(Y=>a.jsx(nm,{k:"level:",v:Y,onRemove:()=>k(Y)},Y)),u&&a.jsx(nm,{k:"workflow:",v:u,onRemove:()=>f(void 0)}),a.jsx("input",{ref:z,className:"flex-1 bg-transparent border-0 outline-none text-zinc-100 font-mono text-[12px] py-1 min-w-[120px]",placeholder:'message ~ "ConnectionRefused" · / to focus',value:m,onChange:Y=>x(Y.target.value)}),m&&a.jsx("button",{type:"button",onClick:()=>x(""),className:"text-zinc-500 hover:text-zinc-100 p-0.5","aria-label":"Clear search",children:a.jsx(Bt,{className:"w-3 h-3"})})]}),a.jsxs("div",{className:"flex items-center gap-4 mt-2.5 text-[11.5px] font-mono text-zinc-500",children:[a.jsxs("span",{children:[a.jsx("span",{className:"text-zinc-100 font-medium",children:(g==null?void 0:g.logs.length)??0})," matched",(g==null?void 0:g.truncated)&&a.jsx("span",{className:"text-amber-400 ml-1",children:"· truncated"})]}),a.jsx("span",{children:"·"}),a.jsx(Oi,{lvl:"error",active:o.has("error"),count:Q.counts.error,onClick:k}),a.jsx(Oi,{lvl:"warn",active:o.has("warn"),count:Q.counts.warn,onClick:k}),a.jsx(Oi,{lvl:"info",active:o.has("info"),count:Q.counts.info,onClick:k}),a.jsx(Oi,{lvl:"debug",active:o.has("debug"),count:Q.counts.debug,onClick:k}),a.jsxs("span",{className:"ml-auto",children:[a.jsx("span",{className:"text-zinc-100 font-medium",children:Q.workflowCount})," workflows"]})]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto bg-canvas",children:[C&&!g&&a.jsx("div",{className:"p-8 text-sm text-zinc-500",children:"Loading logs…"}),S&&a.jsxs("div",{className:"p-8 text-sm text-red-400",children:["Failed to load logs. Is the runner trace API at ",a.jsx("code",{className:"font-mono",children:"/__blok/logs"})," running?"]}),g&&g.logs.length===0&&a.jsxs("div",{className:"p-8 text-sm text-zinc-500",children:["No logs match these filters."," ",p&&"Live tail is on — new matches will flash brand-green when they land."]}),g&&g.logs.length>0&&a.jsxs("table",{className:"w-full font-mono text-[12px]",children:[a.jsx("thead",{className:"sticky top-0 bg-overlay z-10",children:a.jsxs("tr",{children:[a.jsx(ea,{className:"w-[130px]",children:"Time"}),a.jsx(ea,{className:"w-[72px]",children:"Level"}),a.jsx(ea,{className:"w-[200px]",children:"Workflow"}),a.jsx(ea,{className:"w-[150px]",children:"Step"}),a.jsx(ea,{children:"Message"}),a.jsx(ea,{className:"w-[116px]",children:"Run"})]})}),a.jsx("tbody",{children:g.logs.map(Y=>a.jsxs("tr",{className:B("border-b border-zinc-800 hover:bg-hover transition-colors",q.has(Y.id)&&"row-flash"),children:[a.jsx("td",{className:"px-3 py-1.5 text-zinc-500 whitespace-nowrap",children:new Date(Y.timestamp).toISOString().slice(11,23)}),a.jsx("td",{className:"px-3 py-1.5",children:a.jsx(Xv,{level:Y.level})}),a.jsx("td",{className:"px-3 py-1.5 text-zinc-300",children:a.jsx("button",{type:"button",onClick:()=>f(Y.workflowName===u?void 0:Y.workflowName),className:B("hover:text-zinc-100 hover:underline truncate max-w-full text-left",u===Y.workflowName&&"text-blok-green-500"),title:`Filter by ${Y.workflowName}`,children:Y.workflowName})}),a.jsx("td",{className:"px-3 py-1.5 text-zinc-400 truncate",children:Y.nodeName??"—"}),a.jsx("td",{className:"px-3 py-1.5 text-zinc-100 break-words",children:Y.message}),a.jsx("td",{className:"px-3 py-1.5 whitespace-nowrap",children:a.jsx(Qe,{to:"/runs/$runId",params:{runId:Y.runId},className:"text-blok-green-500 hover:text-blok-green-600 hover:underline",children:Y.runId.slice(0,12)})})]},Y.id))})]})]}),a.jsxs("footer",{className:"px-6 py-2 bg-overlay border-t border-zinc-800 flex items-center gap-4 text-[11px] font-mono text-zinc-500",children:[p?a.jsxs("span",{className:"inline-flex items-center gap-1.5 text-blok-green-500",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blok-green-500 animate-pulse-dot"}),"tailing"]}):a.jsx("span",{children:"paused"}),a.jsx("span",{children:"·"}),a.jsxs("span",{children:[a.jsx("span",{className:"text-zinc-100 font-medium",children:(g==null?void 0:g.logs.length)??0})," events shown"]}),(g==null?void 0:g.truncated)&&a.jsx("span",{className:"text-amber-400",children:"· capped at server limit (200)"}),a.jsx("span",{className:"ml-auto text-zinc-600",children:"/ to focus search · L toggle tail · Esc clear"})]}),a.jsx("style",{children:`@keyframes row-flash { 0% { background: rgba(43, 205, 113, 0.18); } 100% { background: transparent; } }
|
|
28
|
+
.row-flash { animation: row-flash 1.2s ease-out; }`})]})}function nm({k:s,v:o,onRemove:r}){return a.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-overlay border border-zinc-800 text-[11px] text-zinc-300",children:[a.jsx("span",{className:"text-zinc-500",children:s}),a.jsx("span",{children:o}),a.jsx("button",{type:"button",onClick:r,className:"text-zinc-500 hover:text-zinc-100 ml-0.5","aria-label":`Remove ${s}${o} filter`,children:a.jsx(Bt,{className:"w-2.5 h-2.5"})})]})}function Oi({lvl:s,active:o,count:r,onClick:u}){const f={error:"text-log-error",warn:"text-log-warn",info:"text-log-info",debug:"text-log-debug"}[s];return a.jsxs("button",{type:"button",onClick:()=>u(s),className:B("inline-flex items-center gap-1.5 px-1.5 py-0.5 rounded transition-colors",o?"bg-hover text-zinc-100":"hover:bg-hover hover:text-zinc-300"),children:[a.jsx("span",{className:"text-zinc-500",children:s}),a.jsx("span",{className:B("font-medium",r>0?f:"text-zinc-600"),children:r})]})}function Xv({level:s}){const o={error:"bg-red-500/15 text-log-error",warn:"bg-amber-500/15 text-log-warn",info:"bg-blue-500/15 text-log-info",debug:"bg-zinc-700/40 text-log-debug"};return a.jsx("span",{className:B("inline-block px-1.5 py-0.5 rounded text-[9.5px] font-semibold uppercase tracking-[0.04em] min-w-[50px] text-center",o[s]),children:s})}function ea({children:s,className:o}){return a.jsx("th",{className:B("text-left text-[10px] uppercase tracking-[0.06em] text-zinc-500 font-semibold px-3 py-2 border-b border-zinc-800",o),children:s})}const Kv=Dt("/deployments")({component:Vv});function Vv(){const s=on(m=>m.current),{data:o,isLoading:r,error:u}=Ze({queryKey:["deployments",s],queryFn:()=>Fm({env:s,limit:500}),refetchInterval:1e4});if(r)return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})});if(u)return a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(cs,{className:"w-10 h-10"}),title:"Couldn't load deployments",description:a.jsxs(a.Fragment,{children:["The runner's ",a.jsx("code",{className:"font-mono",children:"/__blok/deployments"})," endpoint didn't respond. Restart the trigger to pick up the new endpoint if you just rebuilt the runner."]})})});const f=(o==null?void 0:o.deployments)??[];return f.length===0?a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(cs,{className:"w-10 h-10"}),title:"No deployments seen",description:a.jsxs(a.Fragment,{children:["No runs in the last 500 carried a recognizable",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:"version"}),"field, or the env scope",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:s}),"hasn't seen any runs yet. Workflows declare their version in metadata via the trigger registry."]})})}):a.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-5",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Deployments"}),a.jsxs("p",{className:"text-sm text-zinc-500 mt-1",children:["Workflow versions seen in the last 500 runs. ",f.length," ",f.length===1?"version":"versions"," active in ",s,"."]})]}),a.jsx("div",{className:"rounded-lg border border-zinc-800 bg-overlay overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{className:"bg-canvas/60",children:a.jsxs("tr",{children:[a.jsx(dl,{children:"Workflow"}),a.jsx(dl,{className:"w-[110px]",children:"Version"}),a.jsx(dl,{className:"w-[110px]",children:"Environment"}),a.jsx(dl,{className:"w-[80px] text-right",children:"Runs"}),a.jsx(dl,{className:"w-[140px]",children:"Success rate"}),a.jsx(dl,{className:"w-[110px] text-right",children:"Avg duration"}),a.jsx(dl,{className:"w-[150px] text-right",children:"Last run"})]})}),a.jsx("tbody",{children:f.map(m=>a.jsx(Zv,{deployment:m},`${m.workflowName}-${m.version}-${m.environment}`))})]})})]})}function Zv({deployment:s}){const o=s.successRate*100;return a.jsxs("tr",{className:"border-t border-zinc-800 hover:bg-hover transition-colors",children:[a.jsx("td",{className:"px-3 py-2.5",children:a.jsx(Qe,{to:"/workflows/$name",params:{name:s.workflowName},className:"text-zinc-100 hover:text-blok-green-500 hover:underline font-medium",children:s.workflowName})}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsx("span",{className:B("inline-block font-mono text-[11px] px-1.5 py-0.5 rounded border",s.version==="unknown"?"bg-raised border-zinc-800 text-zinc-500":"bg-blok-green-500/10 border-blok-green-500/30 text-blok-green-500"),children:s.version})}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[11px] text-zinc-300",children:s.environment}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[12px] text-zinc-100 text-right",children:s.runs}),a.jsx("td",{className:"px-3 py-2.5",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-zinc-800 overflow-hidden",children:a.jsx("div",{className:B("h-full transition-all",o>=99?"bg-blok-green-500":o>=90?"bg-status-running":"bg-status-failed"),style:{width:`${o}%`}})}),a.jsxs("span",{className:B("font-mono text-[11px] tabular-nums shrink-0",o>=99?"text-blok-green-500":o>=90?"text-zinc-300":"text-status-failed"),children:[o.toFixed(1),"%"]})]})}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[12px] text-zinc-300 text-right",children:be(s.avgDurationMs)}),a.jsx("td",{className:"px-3 py-2.5 font-mono text-[11px] text-zinc-500 text-right",children:Yn(s.lastRunAt)})]})}function dl({children:s,className:o}){return a.jsx("th",{className:B("text-left text-[10px] uppercase tracking-[0.06em] text-zinc-500 font-semibold px-3 py-2",o),children:s})}const lm=[{type:"stat-card",title:"Stat Card",description:"A single key metric value",icon:a.jsx(kg,{className:"w-5 h-5"}),defaultConfig:{metric:"totalRuns"},defaultSize:{w:3,h:1}},{type:"timeline",title:"Execution Timeline",description:"Hourly execution bar chart (24h)",icon:a.jsx(So,{className:"w-5 h-5"}),defaultConfig:{timeRange:"24h"},defaultSize:{w:6,h:2}},{type:"error-rate",title:"Error Rate",description:"Overall error rate gauge",icon:a.jsx(Gn,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:3,h:2}},{type:"duration-distribution",title:"Duration Distribution",description:"Histogram of execution durations",icon:a.jsx(os,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:6,h:2}},{type:"workflow-breakdown",title:"Workflow Breakdown",description:"Runs per workflow with error rates",icon:a.jsx(Og,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:6,h:3}},{type:"node-performance",title:"Node Performance",description:"Average durations per node",icon:a.jsx(Am,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:6,h:3}},{type:"recent-runs",title:"Recent Runs",description:"Summary of recent run outcomes",icon:a.jsx(_g,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:4,h:2}},{type:"heatmap",title:"Activity Heatmap",description:"24-hour execution activity heatmap",icon:a.jsx(Ug,{className:"w-5 h-5"}),defaultConfig:{},defaultSize:{w:6,h:2}}],Jv=[{value:"totalRuns",label:"Total Runs"},{value:"completedRuns",label:"Completed Runs"},{value:"failedRuns",label:"Failed Runs"},{value:"errorRate",label:"Error Rate"},{value:"avgDurationMs",label:"Avg Duration"},{value:"p50DurationMs",label:"P50 Duration"},{value:"p95DurationMs",label:"P95 Duration"},{value:"p99DurationMs",label:"P99 Duration"}];function $v({open:s,onClose:o,onAdd:r}){const[u,f]=D.useState(null),[m,x]=D.useState(""),[p,b]=D.useState("totalRuns");if(!s)return null;const z=lm.find(g=>g.type===u),y=()=>{if(!z)return;const g={id:`w_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,6)}`,type:z.type,title:m||z.title,config:{...z.defaultConfig,...z.type==="stat-card"?{metric:p}:{}},position:{x:0,y:100,w:z.defaultSize.w,h:z.defaultSize.h}};r(g),f(null),x(""),b("totalRuns"),o()};return a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",children:a.jsxs("dialog",{open:!0,className:"w-full max-w-lg bg-zinc-900 rounded-lg border border-zinc-800 shadow-xl","aria-label":"Add Widget",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[a.jsx("h2",{className:"text-sm font-semibold text-zinc-100",children:"Add Widget"}),a.jsx("button",{type:"button",onClick:o,className:"p-1 text-zinc-500 hover:text-zinc-300 transition-colors",children:a.jsx(Bt,{className:"w-4 h-4"})})]}),a.jsx("div",{className:"p-4",children:u?a.jsxs("div",{className:"space-y-4",children:[a.jsx("button",{type:"button",onClick:()=>f(null),className:"text-xs text-blue-400 hover:text-blue-300",children:"← Back to widget types"}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"widget-title",className:"block text-xs font-medium text-zinc-400 mb-1",children:"Title"}),a.jsx("input",{id:"widget-title",type:"text",value:m,onChange:g=>x(g.target.value),className:"w-full px-3 py-1.5 text-sm bg-zinc-800 border border-zinc-700 rounded-md text-zinc-200 outline-none focus:border-blue-500",placeholder:z==null?void 0:z.title})]}),u==="stat-card"&&a.jsxs("div",{children:[a.jsx("label",{htmlFor:"widget-metric",className:"block text-xs font-medium text-zinc-400 mb-1",children:"Metric"}),a.jsx("select",{id:"widget-metric",value:p,onChange:g=>b(g.target.value),className:"w-full px-3 py-1.5 text-sm bg-zinc-800 border border-zinc-700 rounded-md text-zinc-200 outline-none focus:border-blue-500",children:Jv.map(g=>a.jsx("option",{value:g.value,children:g.label},g.value))})]})]}):a.jsx("div",{className:"grid grid-cols-2 gap-2",children:lm.map(g=>a.jsxs("button",{type:"button",onClick:()=>{f(g.type),x(g.title)},className:"flex items-start gap-3 p-3 rounded-md border border-zinc-800 hover:border-blue-500/50 hover:bg-zinc-800/50 transition-colors text-left",children:[a.jsx("div",{className:"text-zinc-500 mt-0.5",children:g.icon}),a.jsxs("div",{children:[a.jsx("div",{className:"text-sm font-medium text-zinc-200",children:g.title}),a.jsx("div",{className:"text-xs text-zinc-500 mt-0.5",children:g.description})]})]},g.type))})}),u&&a.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-zinc-800",children:[a.jsx("button",{type:"button",onClick:o,className:"px-3 py-1.5 text-xs font-medium text-zinc-400 hover:text-zinc-200 transition-colors",children:"Cancel"}),a.jsxs("button",{type:"button",onClick:y,className:B("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium transition-colors","bg-blue-600 text-white hover:bg-blue-500"),children:[a.jsx(fl,{className:"w-3 h-3"}),"Add Widget"]})]})]})})}function Fv({widget:s,metrics:o}){if(!o)return a.jsx("div",{className:"flex items-center justify-center h-full text-zinc-600 text-xs",children:"Loading..."});switch(s.type){case"stat-card":return a.jsx(Wv,{widget:s,metrics:o});case"timeline":return a.jsx(Sx,{data:o.executionTimeline});case"error-rate":return a.jsx(Iv,{metrics:o});case"duration-distribution":return a.jsx(zx,{data:o.durationDistribution});case"workflow-breakdown":return a.jsx(Ex,{data:o.workflowBreakdown});case"node-performance":return a.jsx(wx,{data:o.nodePerformance});case"recent-runs":return a.jsx(Pv,{metrics:o});case"heatmap":return a.jsx(ey,{metrics:o});default:return a.jsx("div",{className:"flex items-center justify-center h-full text-zinc-600 text-xs",children:"Unknown widget type"})}}function Wv({widget:s,metrics:o}){const r=s.config.metric||"totalRuns",f={totalRuns:{value:String(o.totalRuns)},completedRuns:{value:String(o.completedRuns),color:"text-green-400"},failedRuns:{value:String(o.failedRuns),color:o.failedRuns>0?"text-red-400":void 0},errorRate:{value:Qn(o.totalRuns>0?o.failedRuns/o.totalRuns:0),color:o.failedRuns>0?"text-red-400":void 0},avgDurationMs:{value:be(o.avgDurationMs)},p50DurationMs:{value:be(o.p50DurationMs)},p95DurationMs:{value:be(o.p95DurationMs)},p99DurationMs:{value:be(o.p99DurationMs)}}[r]||{value:"N/A"};return a.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:a.jsx("div",{className:B("text-2xl font-bold font-mono",f.color||"text-zinc-100"),children:f.value})})}function Iv({metrics:s}){const o=s.totalRuns>0?s.failedRuns/s.totalRuns:0,r=(o*100).toFixed(1),u=o>.1;return a.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-2",children:[a.jsxs("div",{className:B("text-3xl font-bold font-mono",u?"text-red-400":"text-green-400"),children:[r,"%"]}),a.jsxs("div",{className:"text-xs text-zinc-500",children:[s.failedRuns," / ",s.totalRuns," runs failed"]})]})}function Pv({metrics:s}){const o=s.totalRuns,r=s.completedRuns,u=s.failedRuns,f=o-r-u;return a.jsxs("div",{className:"flex flex-col justify-center h-full gap-2",children:[a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zinc-500",children:"Completed"}),a.jsx("span",{className:"font-mono text-green-400",children:r})]}),a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zinc-500",children:"Failed"}),a.jsx("span",{className:"font-mono text-red-400",children:u})]}),f>0&&a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-zinc-500",children:"In Progress"}),a.jsx("span",{className:"font-mono text-blue-400",children:f})]}),a.jsxs("div",{className:"h-2 rounded-full bg-zinc-800 overflow-hidden flex mt-1",children:[r>0&&a.jsx("div",{className:"bg-green-500/70 h-full",style:{width:`${r/Math.max(o,1)*100}%`}}),u>0&&a.jsx("div",{className:"bg-red-500/70 h-full",style:{width:`${u/Math.max(o,1)*100}%`}})]})]})}function ey({metrics:s}){const o=s.executionTimeline,r=Math.max(...o.map(u=>u.total),1);return a.jsxs("div",{className:"flex flex-col justify-center h-full gap-1",children:[a.jsx("div",{className:"flex gap-0.5 flex-wrap",children:o.map(u=>{const f=u.total/r,m=u.failed>0;return a.jsx("div",{className:"w-4 h-4 rounded-sm",style:{backgroundColor:m?`rgba(239, 68, 68, ${Math.max(.15,f)})`:`rgba(34, 197, 94, ${Math.max(.08,f*.7)})`},title:`${new Date(u.bucket).toLocaleTimeString()}: ${u.total} runs (${u.failed} failed)`},u.bucket)})}),a.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-zinc-600 mt-1",children:[a.jsx("span",{children:"Less"}),a.jsx("div",{className:"flex gap-0.5",children:[.1,.3,.5,.7,1].map(u=>a.jsx("div",{className:"w-3 h-3 rounded-sm",style:{backgroundColor:`rgba(34, 197, 94, ${u*.7})`}},u))}),a.jsx("span",{children:"More"})]})]})}function ty({widgets:s,metrics:o,isEditing:r,onRemoveWidget:u,onConfigureWidget:f}){const m=D.useMemo(()=>[...s].sort((x,p)=>x.position.y-p.position.y||x.position.x-p.position.x),[s]);return s.length===0?a.jsx("div",{className:"flex items-center justify-center h-64 text-zinc-600 text-sm border border-dashed border-zinc-800 rounded-lg",children:'No widgets yet. Click "Add Widget" to get started.'}):a.jsx("div",{className:"grid grid-cols-12 gap-4 auto-rows-[120px]",children:m.map(x=>a.jsxs("div",{className:B("rounded-lg border bg-zinc-900/50 overflow-hidden flex flex-col",r?"border-blue-500/30":"border-zinc-800"),style:{gridColumn:`span ${x.position.w}`,gridRow:`span ${x.position.h}`},children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-zinc-800/50 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[r&&a.jsx(Lg,{className:"w-3 h-3 text-zinc-600 cursor-grab shrink-0"}),a.jsx("span",{className:"text-xs font-medium text-zinc-400 truncate",children:x.title})]}),r&&a.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[a.jsx("button",{type:"button",onClick:()=>f(x.id),className:"p-0.5 text-zinc-600 hover:text-zinc-300 transition-colors","aria-label":"Configure widget",children:a.jsx(qg,{className:"w-3 h-3"})}),a.jsx("button",{type:"button",onClick:()=>u(x.id),className:"p-0.5 text-zinc-600 hover:text-red-400 transition-colors","aria-label":"Remove widget",children:a.jsx(Bt,{className:"w-3 h-3"})})]})]}),a.jsx("div",{className:"flex-1 p-3 overflow-hidden",children:a.jsx(Fv,{widget:x,metrics:o})})]},x.id))})}function ny(){return Ze({queryKey:["dashboards"],queryFn:()=>ux().then(s=>s.dashboards)})}function ly(){const s=Gt();return Bn({mutationFn:o=>dx(o),onSuccess:()=>{s.invalidateQueries({queryKey:["dashboards"]})}})}function ay(){const s=Gt();return Bn({mutationFn:({id:o,data:r})=>fx(o,r),onSuccess:(o,r)=>{s.invalidateQueries({queryKey:["dashboards"]}),s.invalidateQueries({queryKey:["dashboard",r.id]})}})}function sy(){const s=Gt();return Bn({mutationFn:o=>mx(o),onSuccess:()=>{s.invalidateQueries({queryKey:["dashboards"]})}})}function iy(){const s=Gt();return Bn({mutationFn:o=>xx(o),onSuccess:()=>{s.invalidateQueries({queryKey:["dashboards"]})}})}const cy=Dt("/dashboards")({component:oy}),ry=[{id:"w_default_1",type:"stat-card",title:"Total Runs",config:{metric:"totalRuns"},position:{x:0,y:0,w:3,h:1}},{id:"w_default_2",type:"stat-card",title:"Completed",config:{metric:"completedRuns"},position:{x:3,y:0,w:3,h:1}},{id:"w_default_3",type:"stat-card",title:"Failed",config:{metric:"failedRuns"},position:{x:6,y:0,w:3,h:1}},{id:"w_default_4",type:"stat-card",title:"Error Rate",config:{metric:"errorRate"},position:{x:9,y:0,w:3,h:1}},{id:"w_default_5",type:"timeline",title:"Execution Timeline (24h)",config:{timeRange:"24h"},position:{x:0,y:1,w:6,h:2}},{id:"w_default_6",type:"error-rate",title:"Error Rate",config:{},position:{x:6,y:1,w:3,h:2}},{id:"w_default_7",type:"recent-runs",title:"Run Summary",config:{},position:{x:9,y:1,w:3,h:2}},{id:"w_default_8",type:"duration-distribution",title:"Duration Distribution",config:{},position:{x:0,y:3,w:6,h:2}},{id:"w_default_9",type:"heatmap",title:"Activity Heatmap",config:{},position:{x:6,y:3,w:6,h:2}}];function oy(){const{data:s,isLoading:o}=ny(),{data:r,isLoading:u}=Tx(),f=ly(),m=ay(),x=sy(),p=iy(),[b,z]=D.useState(null),[y,g]=D.useState(!1),[C,S]=D.useState(!1),[A,q]=D.useState(null),[U,Q]=D.useState(null),[k,Y]=D.useState(""),G=(s==null?void 0:s.find(X=>X.id===b))||(s==null?void 0:s.find(X=>X.isDefault))||(s==null?void 0:s[0])||null;D.useEffect(()=>{if(s&&s.length>0&&!b){const X=s.find(P=>P.isDefault)??s[0];X&&z(X.id)}},[s,b]);const K=D.useCallback(()=>{f.mutate({name:"New Dashboard",widgets:ry},{onSuccess:X=>{z(X.id)}})},[f]),L=D.useCallback(X=>{if(!G)return;const P=[...G.widgets,X];m.mutate({id:G.id,data:{widgets:P}})},[G,m]),te=D.useCallback(X=>{if(!G)return;const P=G.widgets.filter(Ue=>Ue.id!==X);m.mutate({id:G.id,data:{widgets:P}})},[G,m]),J=D.useCallback(X=>{},[]),ae=D.useCallback(X=>{x.mutate(X,{onSuccess:()=>{b===X&&z(null),q(null)}})},[x,b]),Ae=D.useCallback(X=>{p.mutate(X,{onSuccess:P=>{z(P.id),q(null)}})},[p]),_e=D.useCallback(X=>{k.trim()&&m.mutate({id:X,data:{name:k.trim()}},{onSuccess:()=>Q(null)})},[m,k]);return o||u?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})}):!s||s.length===0?a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(Cm,{className:"w-10 h-10"}),title:"No dashboards yet",description:"Custom dashboards compose chart widgets — duration histograms, p95 latency, error rate, queue depth — into a single named view. Pin one per environment, share the URL with on-call.",action:a.jsxs("button",{type:"button",onClick:K,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors",children:[a.jsx(fl,{className:"w-3.5 h-3.5"}),"Create dashboard"]}),docLink:{href:"https://docs.blok.io/studio/dashboards",label:"docs.blok.io/studio/dashboards"}})}):a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"shrink-0 border-b border-zinc-800 bg-canvas/60 px-4 py-3",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h1",{className:"text-sm font-semibold text-zinc-100",children:"Dashboards"}),a.jsxs("div",{className:"flex items-center gap-1 ml-4",children:[s.map(X=>a.jsxs("div",{className:"relative flex items-center",children:[U===X.id?a.jsx("form",{onSubmit:P=>{P.preventDefault(),_e(X.id)},className:"flex items-center gap-1",children:a.jsx("input",{type:"text",value:k,onChange:P=>Y(P.target.value),className:"px-2 py-0.5 text-xs bg-raised border border-blok-green-500 rounded text-zinc-200 outline-none w-32",onBlur:()=>Q(null)})}):a.jsx("button",{type:"button",onClick:()=>z(X.id),className:B("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",X.id===(G==null?void 0:G.id)?"bg-zinc-800 text-zinc-100":"text-zinc-500 hover:text-zinc-300 hover:bg-zinc-800/50"),children:X.name}),X.id===(G==null?void 0:G.id)&&a.jsxs("div",{className:"relative",children:[a.jsx("button",{type:"button",onClick:()=>q(A===X.id?null:X.id),className:"p-0.5 text-zinc-600 hover:text-zinc-300 ml-0.5",children:a.jsx(Hg,{className:"w-3.5 h-3.5"})}),A===X.id&&a.jsxs("div",{className:"absolute top-full left-0 mt-1 w-40 bg-overlay border border-zinc-800 rounded-md shadow-lg z-50 py-1",children:[a.jsxs("button",{type:"button",onClick:()=>{Q(X.id),Y(X.name),q(null)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-300 hover:bg-zinc-800",children:[a.jsx(Y0,{className:"w-3 h-3"})," Rename"]}),a.jsxs("button",{type:"button",onClick:()=>Ae(X.id),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-300 hover:bg-zinc-800",children:[a.jsx(Mo,{className:"w-3 h-3"})," Duplicate"]}),a.jsxs("button",{type:"button",onClick:()=>ae(X.id),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-zinc-800",children:[a.jsx(Ro,{className:"w-3 h-3"})," Delete"]})]})]})]},X.id)),a.jsx("button",{type:"button",onClick:K,className:"p-1 text-zinc-600 hover:text-zinc-300 transition-colors",title:"Create new dashboard",children:a.jsx(fl,{className:"w-3.5 h-3.5"})})]}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[y&&a.jsxs("button",{type:"button",onClick:()=>S(!0),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium bg-zinc-800 text-zinc-300 hover:bg-zinc-700 transition-colors",children:[a.jsx(fl,{className:"w-3 h-3"}),"Add Widget"]}),a.jsx("button",{type:"button",onClick:()=>g(!y),className:B("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-colors",y?"bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600":"bg-zinc-800 text-zinc-300 hover:bg-zinc-700"),children:y?a.jsxs(a.Fragment,{children:[a.jsx(sa,{className:"w-3 h-3"})," Done"]}):a.jsxs(a.Fragment,{children:[a.jsx(Y0,{className:"w-3 h-3"})," Edit"]})})]})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:G&&a.jsx(ty,{widgets:G.widgets,metrics:r,isEditing:y,onRemoveWidget:te,onConfigureWidget:J})}),a.jsx($v,{open:C,onClose:()=>S(!1),onAdd:L})]})}function uy(){const s=Nx(r=>r.events),o=D.useRef(null);return s.length===0?a.jsx("div",{className:"text-center py-8 text-zinc-600 text-xs",children:"Waiting for events..."}):a.jsxs("div",{className:"space-y-0.5 max-h-64 overflow-y-auto",children:[s.map(r=>a.jsxs(Qe,{to:"/runs/$runId",params:{runId:r.runId},className:"flex items-center gap-2 rounded px-2 py-1 hover:bg-zinc-800/50 transition-colors group",children:[a.jsx("span",{className:B("w-1.5 h-1.5 rounded-full shrink-0",r.type.includes("FAIL")||r.type.includes("ERROR")?"bg-red-400":r.type.includes("COMPLETE")?"bg-green-400":r.type.includes("START")?"bg-blue-400":"bg-zinc-500",r.type.includes("RUNNING")&&"animate-pulse-dot")}),a.jsx("div",{className:"flex-1 min-w-0",children:a.jsx("span",{className:"text-[11px] text-zinc-300 truncate block",children:r.nodeName||r.workflowName})}),a.jsx("span",{className:B("text-[10px] px-1.5 py-0.5 rounded font-medium shrink-0",vx[r.type]),children:bx[r.type]}),a.jsx("span",{className:"text-[10px] text-zinc-600 shrink-0",children:Yn(r.timestamp)})]},r.id)),a.jsx("div",{ref:o})]})}function dy({workflows:s}){const o=s.reduce((x,p)=>x+p.totalRuns,0),r=s.reduce((x,p)=>x+p.recentRuns,0),u=o>0?s.reduce((x,p)=>x+p.errorRate*p.totalRuns,0)/o:0,f=o>0?s.reduce((x,p)=>x+p.avgDurationMs*p.totalRuns,0)/o:0,m=[{label:"Total Runs",value:o.toLocaleString(),icon:Gn,color:"text-blue-400",bgColor:"bg-blue-400/10"},{label:"Recent (24h)",value:r.toLocaleString(),icon:Bg,color:"text-green-400",bgColor:"bg-green-400/10"},{label:"Error Rate",value:Qn(u),icon:Co,color:u>.05?"text-red-400":"text-zinc-400",bgColor:u>.05?"bg-red-400/10":"bg-zinc-400/10"},{label:"Avg Duration",value:be(f),icon:Gg,color:"text-purple-400",bgColor:"bg-purple-400/10"}];return a.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:m.map(x=>a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("div",{className:B("p-1.5 rounded-md",x.bgColor),children:a.jsx(x.icon,{className:B("w-3.5 h-3.5",x.color)})}),a.jsx("span",{className:"text-xs text-zinc-500",children:x.label})]}),a.jsx("div",{className:"text-xl font-semibold text-zinc-100 font-mono",children:x.value})]},x.label))})}function fs({status:s,className:o}){return a.jsxs("span",{className:B("inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-xs font-medium",nv[s],o),children:[a.jsx("span",{className:B("w-1.5 h-1.5 rounded-full",ds[s],s==="running"&&"animate-pulse-dot"),"aria-hidden":"true"}),lv[s]]})}const fy={http:Do,cron:os,queue:Qg,worker:Am,websocket:X0,sse:X0,webhook:rs};function my({workflow:s}){const o=fy[s.triggerTypes[0]||"http"]||Do;return a.jsxs(Qe,{to:"/workflows/$name",params:{name:s.name},className:"group block rounded-lg border border-zinc-800 bg-zinc-900/50 p-4 hover:border-zinc-700 hover:bg-zinc-900 transition-all",children:[a.jsxs("div",{className:"flex items-start justify-between mb-3",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("div",{className:"p-1.5 rounded-md bg-zinc-800 text-zinc-400 group-hover:bg-zinc-700 transition-colors",children:a.jsx(o,{className:"w-4 h-4"})}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-100 group-hover:text-white transition-colors",children:s.name}),a.jsx("span",{className:"text-[11px] text-zinc-500 uppercase tracking-wide",children:s.triggerTypes.join(", ")})]})]}),a.jsx(ia,{className:"w-4 h-4 text-zinc-600 group-hover:text-zinc-400 transition-colors"})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-3 text-xs",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-zinc-500 mb-0.5",children:"Runs"}),a.jsx("div",{className:"font-mono text-zinc-300",children:s.totalRuns})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-zinc-500 mb-0.5",children:"Avg"}),a.jsx("div",{className:"font-mono text-zinc-300",children:be(s.avgDurationMs)})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-zinc-500 mb-0.5",children:"Errors"}),a.jsx("div",{className:B("font-mono",s.errorRate>.05?"text-red-400":"text-zinc-300"),children:Qn(s.errorRate)})]})]}),s.lastRunStatus&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-zinc-800 flex items-center justify-between",children:[a.jsx(fs,{status:s.lastRunStatus}),s.lastRunAt&&a.jsx("span",{className:"text-[11px] text-zinc-500",children:Yn(s.lastRunAt)})]})]})}const xy=Dt("/")({component:hy});function hy(){const{data:s,isLoading:o,error:r}=Lo();return o?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})}):r?a.jsx("div",{className:"p-6",children:a.jsx(Pe,{icon:a.jsx(la,{className:"w-12 h-12"}),title:"Connection Error",description:"Could not connect to Blok backend. Make sure your server is running and the trace API is enabled."})}):!s||s.length===0?a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(la,{className:"w-10 h-10"}),title:"No workflows yet · production",description:a.jsxs(a.Fragment,{children:["Trigger your first run to see it stream in real time here. Once a workflow runs in",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:"production"}),"this page shows live success rate, p50 / p95 latency, and the last 50 events as they happen."]}),snippets:[{lang:"curl · http",code:`curl -X POST http://localhost:4000/cross-runtime-chain \\
|
|
29
|
+
-H 'content-type: application/json' \\
|
|
30
|
+
-d '{}'`},{lang:"typescript · sdk",code:`// triggers/http/src/workflows/cross-runtime-chain.ts
|
|
31
|
+
await blok.run("cross-runtime-chain", {
|
|
32
|
+
input: { },
|
|
33
|
+
});`}],docLink:{href:"https://docs.blok.io/quickstart",label:"docs.blok.io/quickstart"}})}):a.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-6",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"Overview"}),a.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Live trace of every workflow execution."})]}),a.jsx(dy,{workflows:s}),a.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[a.jsxs("div",{className:"lg:col-span-2 space-y-3",children:[a.jsx("h2",{className:"text-sm font-medium text-zinc-400",children:"Workflows"}),a.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:s.map(u=>a.jsx(my,{workflow:u},u.name))})]}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-sm font-medium text-zinc-400 mb-3",children:"Live Feed"}),a.jsx("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-3",children:a.jsx(uy,{})})]})]})]})}function py({className:s}){const{data:o}=Ze({queryKey:["concurrency","state"],queryFn:gx,refetchInterval:5e3,retry:!1}),{data:r}=Ze({queryKey:["concurrency","health"],queryFn:px,refetchInterval:3e4,retry:!1});if(!o||o.totalLeases===0)return null;const u=[...o.buckets].sort((f,m)=>m.inFlight-f.inFlight);return a.jsxs("div",{className:B("rounded-md border border-zinc-800 bg-canvas px-3 py-2 text-xs","flex flex-col gap-2 min-w-[260px]",s),children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold",children:"In-flight slots"}),a.jsxs("span",{className:"text-[10px] text-zinc-500",children:[o.totalLeases," across ",o.totalBuckets," keys",r&&r.backend!=="in-process"?a.jsx("span",{className:"ml-2 px-1.5 py-0.5 rounded bg-emerald-400/10 text-emerald-400",children:r.backend}):null]})]}),a.jsx("ul",{className:"flex flex-col gap-1 max-h-40 overflow-y-auto",children:u.slice(0,10).map(f=>a.jsxs("li",{className:"flex items-center justify-between gap-2 text-zinc-300",children:[a.jsxs("span",{className:"truncate font-mono text-[11px]",title:`${f.workflowName} / ${f.concurrencyKey}`,children:[a.jsx("span",{className:"text-zinc-500",children:f.workflowName}),a.jsx("span",{className:"text-zinc-600",children:" / "}),a.jsx("span",{children:f.concurrencyKey})]}),a.jsx("span",{className:"font-semibold text-amber-300 shrink-0",children:f.inFlight})]},`${f.workflowName}__${f.concurrencyKey}`))}),u.length>10&&a.jsxs("span",{className:"text-[10px] text-zinc-500",children:["…and ",u.length-10," more"]})]})}const Cx="blok.studio.savedFilters";function _i(s){return typeof s=="string"}function gy(s){if(!s||typeof s!="object")return!1;const o=s;return _i(o.name)&&_i(o.status)&&_i(o.tagsInput)&&_i(o.metadataInput)}function Gi(){try{const s=localStorage.getItem(Cx);if(!s)return[];const o=JSON.parse(s);return Array.isArray(o)?o.filter(gy):[]}catch{return[]}}function Rx(s){try{localStorage.setItem(Cx,JSON.stringify(s))}catch{}}function by(s){const r=Gi().filter(u=>u.name!==s.name).concat(s);return Rx(r),r}function vy(s){const r=Gi().filter(u=>u.name!==s);return Rx(r),r}const yy=[{value:"",label:"All"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"cancelled",label:"Cancelled"},{value:"throttled",label:"Throttled"},{value:"delayed",label:"Delayed"},{value:"expired",label:"Expired"},{value:"debounced",label:"Debounced"},{value:"crashed",label:"Crashed"},{value:"timedOut",label:"Timed Out"}];function Dx({status:s,onStatusChange:o,tagsInput:r,onTagsChange:u,metadataInput:f,onMetadataChange:m,className:x}){const[p,b]=D.useState(""),[z,y]=D.useState(""),g=r??p,C=f??z,S=u??b,A=m??y,[q,U]=D.useState(()=>Gi()),[Q,k]=D.useState("");D.useEffect(()=>{U(Gi())},[]);const Y=L=>{if(k(L),!L)return;const te=q.find(J=>J.name===L);te&&(o(te.status),S(te.tagsInput),A(te.metadataInput))},G=()=>{var ae;const L=(ae=typeof window<"u"?window.prompt("Name this filter:","My filter"):null)==null?void 0:ae.trim();if(!L)return;const J=by({name:L,status:s,tagsInput:g,metadataInput:C});U(J),k(L)},K=()=>{if(!Q||typeof window<"u"&&!window.confirm(`Delete saved filter "${Q}"?`))return;const L=vy(Q);U(L),k("")};return a.jsxs("div",{className:B("flex flex-wrap items-center gap-3",x),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mr-1",children:"Status"}),a.jsx("select",{value:s,onChange:L=>o(L.target.value),className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-100 focus:outline-none focus:ring-1 focus:ring-blok-green-500"),children:yy.map(L=>a.jsx("option",{value:L.value,children:L.label},L.value))})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mr-1",children:"Tags"}),a.jsx("input",{type:"text",value:g,onChange:L=>S(L.target.value),placeholder:"user-123, premium",className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-100 placeholder:text-zinc-600 w-40","focus:outline-none focus:ring-1 focus:ring-blok-green-500")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mr-1",children:"Metadata"}),a.jsx("input",{type:"text",value:C,onChange:L=>A(L.target.value),placeholder:"tier=premium, plan=pro",className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-100 placeholder:text-zinc-600 w-48","focus:outline-none focus:ring-1 focus:ring-blok-green-500")})]}),a.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[a.jsx("span",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mr-1",children:"Saved"}),a.jsxs("select",{value:Q,onChange:L=>Y(L.target.value),className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-100 focus:outline-none focus:ring-1 focus:ring-blok-green-500"),"aria-label":"Apply saved filter",children:[a.jsx("option",{value:"",children:"— Select —"}),q.map(L=>a.jsx("option",{value:L.name,children:L.name},L.name))]}),a.jsx("button",{type:"button",onClick:G,className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-100 hover:bg-zinc-800 focus:outline-none focus:ring-1 focus:ring-blok-green-500"),title:"Save current filter as a preset",children:"Save"}),Q&&a.jsx("button",{type:"button",onClick:K,className:B("px-2 py-1 text-xs font-medium rounded-md border border-zinc-800 bg-canvas","text-zinc-400 hover:bg-zinc-800 hover:text-red-400 focus:outline-none focus:ring-1 focus:ring-red-500"),title:`Delete "${Q}"`,"aria-label":`Delete saved filter ${Q}`,children:"✕"})]})]})}function jy({selectedIds:s,runs:o,onClear:r}){const u=xl(),[f,m]=D.useState("idle"),[x,p]=D.useState(null),[b,z]=D.useState(null);if(s.size===0)return null;const g=o.filter(Q=>s.has(Q.id)).filter(Q=>Q.triggerType==="http"),C=g.length>0&&f==="idle",S=s.size===2;async function A(){if(!C)return;m("running"),z(null),p({done:0,total:g.length});const Q=[];for(const G of g){try{const K=await Oo(G.id);Q.push({ok:!0,newRunId:K.newRunId})}catch(K){Q.push({ok:!1,err:K instanceof Error?K.message:String(K)})}p({done:Q.length,total:g.length})}const k=Q.find(G=>G.ok&&G.newRunId),Y=Q.filter(G=>!G.ok).length;m("idle"),p(null),Y>0&&z(`${Y} of ${g.length} replays failed.`),k!=null&&k.newRunId&&(r(),u({to:"/runs/$runId",params:{runId:k.newRunId}}))}function q(){if(!S)return;const[Q,k]=[...s];Q&&k&&u({to:"/runs/diff",search:{a:Q,b:k}})}function U(Q){const k=[...s].slice(0,20);for(const Y of k)Q==="json"?_o(Y):Uo(Y)}return a.jsxs("div",{className:"rounded-lg border border-blok-green-500/30 bg-blok-green-500/10 px-3 py-2 flex items-center gap-3 mb-4",children:[a.jsxs("span",{className:"font-mono text-[11px] text-blok-green-500 font-semibold",children:[s.size," selected"]}),g.length<s.size&&a.jsxs("span",{className:"font-mono text-[10.5px] text-zinc-500",children:["· ",s.size-g.length," non-HTTP, replay-skip"]}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[x&&a.jsxs("span",{className:"font-mono text-[11px] text-zinc-400",children:[x.done," / ",x.total," replayed"]}),b&&a.jsx("span",{className:"font-mono text-[11px] text-status-failed",children:b}),a.jsxs(Ui,{onClick:A,disabled:!C,title:C?`Replay ${g.length} HTTP-triggered runs`:f==="running"?"Replay in progress…":"No HTTP-triggered runs in selection",children:[f==="running"?a.jsx(Ye,{className:"w-3 h-3 animate-spin"}):a.jsx(vo,{className:"w-3 h-3"}),"Replay ",g.length>0&&g.length]}),S&&a.jsxs(Ui,{onClick:q,title:"Compare the two selected runs side-by-side",children:[a.jsx(as,{className:"w-3 h-3"}),"Compare"]}),a.jsxs(Ui,{onClick:()=>U("json"),title:"Download a JSON file per selected run (up to 20)",children:[a.jsx(yo,{className:"w-3 h-3"}),"JSON"]}),a.jsxs(Ui,{onClick:()=>U("csv"),title:"Download a CSV file per selected run (up to 20)",children:[a.jsx(yo,{className:"w-3 h-3"}),"CSV"]}),a.jsx("button",{type:"button",onClick:r,className:"p-1 rounded text-zinc-500 hover:text-zinc-100 hover:bg-hover transition-colors",title:"Clear selection · Esc","aria-label":"Clear selection",children:a.jsx(Bt,{className:"w-3.5 h-3.5"})})]})]})}function Ui({children:s,onClick:o,disabled:r,title:u}){return a.jsx("button",{type:"button",onClick:o,disabled:r,title:u,className:B("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11.5px] font-medium border transition-colors",r?"bg-raised border-zinc-800 text-zinc-600 cursor-not-allowed":"bg-raised border-zinc-800 text-zinc-200 hover:bg-hover hover:text-zinc-100"),children:s})}function Mx({runs:s,total:o,page:r,limit:u,onPageChange:f,showWorkflow:m=!1,enableCompare:x=!1,enableBulk:p=!1}){const b=xl(),[z,y]=D.useState([]),[g,C]=D.useState([]),[S,A]=D.useState(()=>new Set);D.useEffect(()=>{if(!p)return;const K=L=>{L.target instanceof HTMLInputElement||L.target instanceof HTMLTextAreaElement||L.key==="Escape"&&S.size>0&&A(new Set)};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[p,S.size]);const q=K=>{A(L=>{const te=new Set(L);return te.has(K)?te.delete(K):te.add(K),te})},U=()=>{A(K=>K.size===s.length?new Set:new Set(s.map(L=>L.id)))},Q=()=>{g.length===2&&b({to:"/runs/diff",search:{a:g[0],b:g[1]}})},k=D.useMemo(()=>{const K=[];return p&&K.push({id:"bulk",header:()=>a.jsxs("button",{type:"button",onClick:L=>{L.preventDefault(),L.stopPropagation(),U()},className:B("w-4 h-4 rounded-sm border flex items-center justify-center transition-colors shrink-0",S.size===s.length&&s.length>0?"bg-blok-green-500 border-blok-green-500":S.size>0?"bg-blok-green-500/40 border-blok-green-500/60":"border-zinc-700 hover:border-zinc-500"),title:S.size===s.length?"Deselect all":"Select all",children:[S.size===s.length&&s.length>0&&a.jsx(sa,{className:"w-3 h-3 text-[#00231b]",strokeWidth:3}),S.size>0&&S.size<s.length&&a.jsx("span",{className:"w-1.5 h-0.5 bg-zinc-100 rounded-full"})]}),cell:({row:L})=>{const te=S.has(L.original.id);return a.jsx("button",{type:"button",onClick:J=>{J.preventDefault(),J.stopPropagation(),q(L.original.id)},className:B("w-4 h-4 rounded-sm border flex items-center justify-center transition-colors shrink-0",te?"bg-blok-green-500 border-blok-green-500":"border-zinc-700 hover:border-zinc-500"),title:"Select",children:te&&a.jsx(sa,{className:"w-3 h-3 text-[#00231b]",strokeWidth:3})})},size:36}),x&&!p&&K.push({id:"compare",header:"",cell:({row:L})=>{const te=g.includes(L.original.id);return a.jsx("button",{type:"button",onClick:J=>{J.preventDefault(),J.stopPropagation(),C(ae=>ae.includes(L.original.id)?ae.filter(Ae=>Ae!==L.original.id):ae.length>=2?[ae[1]??ae[0],L.original.id].filter(Boolean):[...ae,L.original.id])},className:B("w-4 h-4 rounded border transition-colors shrink-0",te?"bg-blue-500 border-blue-500":"border-zinc-600 hover:border-zinc-400"),title:"Select for comparison"})},size:40}),m&&K.push({accessorKey:"workflowName",header:"Workflow",cell:({row:L})=>a.jsx(Qe,{to:"/workflows/$name",params:{name:L.original.workflowName},className:"text-zinc-200 hover:text-white font-medium",onClick:te=>te.stopPropagation(),children:L.original.workflowName})}),K.push({accessorKey:"status",header:"Status",cell:({row:L})=>a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(fs,{status:L.original.status}),L.original.tags&&L.original.tags.length>0&&a.jsxs("div",{className:"flex gap-1",children:[L.original.tags.slice(0,2).map(te=>a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-zinc-700/50 text-zinc-400",children:te},te)),L.original.tags.length>2&&a.jsxs("span",{className:"text-[10px] text-zinc-600",children:["+",L.original.tags.length-2]})]})]}),size:160},{accessorKey:"triggerSummary",header:"Trigger",cell:({row:L})=>a.jsx("span",{className:"text-xs text-zinc-400 font-mono",children:L.original.triggerSummary})},{accessorKey:"durationMs",header:"Duration",cell:({row:L})=>a.jsx("span",{className:"text-xs font-mono text-zinc-300",children:L.original.status==="running"?a.jsx("span",{className:"text-blue-400",children:"running..."}):be(L.original.durationMs)}),size:100},{accessorKey:"startedAt",header:"Started",cell:({row:L})=>a.jsx("span",{className:"text-xs text-zinc-500",children:Yn(L.original.startedAt)}),size:100},{id:"progress",header:"Nodes",cell:({row:L})=>a.jsxs("span",{className:"text-xs font-mono text-zinc-400",children:[L.original.completedNodes,"/",L.original.nodeCount]}),size:80}),K},[m,x,p,g,S,s.length]),Y=Wg({data:s,columns:k,state:{sorting:z},onSortingChange:y,getCoreRowModel:Pg(),getSortedRowModel:Ig()}),G=Math.ceil(o/u);return a.jsxs("div",{children:[p&&a.jsx(jy,{selectedIds:S,runs:s,onClear:()=>A(new Set)}),x&&!p&&g.length>0&&a.jsxs("div",{className:"mb-3 flex items-center gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 px-3 py-2",children:[a.jsx(as,{className:"w-4 h-4 text-zinc-500"}),a.jsxs("span",{className:"text-xs text-zinc-400",children:[g.length,"/2 runs selected"]}),g.length===2&&a.jsx("button",{type:"button",onClick:Q,className:"ml-auto text-xs font-medium px-2.5 py-1 rounded-md bg-blue-600 text-white hover:bg-blue-500 transition-colors",children:"Compare"}),a.jsx("button",{type:"button",onClick:()=>C([]),className:B("text-xs text-zinc-500 hover:text-zinc-300 transition-colors",g.length===2?"":"ml-auto"),children:"Clear"})]}),a.jsx("div",{className:"rounded-lg border border-zinc-800 overflow-hidden",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:Y.getHeaderGroups().map(K=>a.jsx("tr",{className:"border-b border-zinc-800 bg-zinc-900/50",children:K.headers.map(L=>a.jsx("th",{className:"text-left px-3 py-2 text-xs font-medium text-zinc-500 uppercase tracking-wider",style:{width:L.getSize()!==150?L.getSize():void 0},children:L.isPlaceholder?null:a.jsxs("button",{type:"button",className:"flex items-center gap-1 hover:text-zinc-300 transition-colors",onClick:L.column.getToggleSortingHandler(),children:[uo(L.column.columnDef.header,L.getContext()),a.jsx(Yg,{className:"w-3 h-3"})]})},L.id))},K.id))}),a.jsx("tbody",{children:Y.getRowModel().rows.map(K=>a.jsx("tr",{className:B("border-b border-zinc-800/50 hover:bg-zinc-800/30 transition-colors cursor-pointer",g.includes(K.original.id)&&"bg-blue-500/5",S.has(K.original.id)&&"bg-blok-green-500/5"),children:K.getVisibleCells().map(L=>a.jsx("td",{className:"px-3 py-2.5",children:L.column.id==="compare"||L.column.id==="bulk"?uo(L.column.columnDef.cell,L.getContext()):a.jsx(Qe,{to:"/runs/$runId",params:{runId:K.original.id},className:"block",children:uo(L.column.columnDef.cell,L.getContext())})},L.id))},K.id))})]})}),G>1&&a.jsxs("div",{className:"flex items-center justify-between mt-3 text-sm",children:[a.jsxs("span",{className:"text-zinc-500 text-xs",children:[o," total run",o!==1?"s":""]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",onClick:()=>f(r-1),disabled:r<=1,className:B("p-1 rounded hover:bg-zinc-800 transition-colors",r<=1?"text-zinc-700 cursor-not-allowed":"text-zinc-400"),children:a.jsx(Xg,{className:"w-4 h-4"})}),a.jsxs("span",{className:"text-xs text-zinc-400",children:["Page ",r," of ",G]}),a.jsx("button",{type:"button",onClick:()=>f(r+1),disabled:r>=G,className:B("p-1 rounded hover:bg-zinc-800 transition-colors",r>=G?"text-zinc-700 cursor-not-allowed":"text-zinc-400"),children:a.jsx(ia,{className:"w-4 h-4"})})]})]})]})}function Ny(s){const o=on(r=>r.current);return Ze({queryKey:["runs",o,s],queryFn:()=>Vm({...s,env:o}),refetchInterval:3e3})}function zy(s,o){const r=on(u=>u.current);return Ze({queryKey:["workflow-runs",r,s,o],queryFn:()=>Km(s,{...o,env:r}),enabled:!!s,refetchInterval:3e3})}const Sy=Dt("/runs/")({component:wy});function wy(){const[s,o]=D.useState(""),[r,u]=D.useState(1),f=50,{data:m,isLoading:x}=Ny({status:s||void 0,limit:f,offset:(r-1)*f});return a.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-5",children:[a.jsxs("div",{className:"flex items-start justify-between gap-4",children:[a.jsxs("div",{children:[a.jsx("h1",{className:"text-2xl font-medium font-display italic tracking-tight text-zinc-100",children:"All Runs"}),a.jsx("p",{className:"text-sm text-zinc-500 mt-1",children:"Every workflow execution across every trigger."})]}),a.jsx(py,{})]}),a.jsx(Dx,{status:s,onStatusChange:o}),x?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(Ye,{className:"w-5 h-5 text-zinc-500 animate-spin"})}):m&&m.runs.length>0?a.jsx(Mx,{runs:m.runs,total:m.total,page:r,limit:f,onPageChange:u,showWorkflow:!0,enableBulk:!0}):s?a.jsx(Pe,{icon:a.jsx(Gn,{className:"w-10 h-10"}),title:`No ${s} runs match`,description:`Across the latest 50 runs, none have status "${s}". Either workflows have been quiet or the filter is too tight.`,action:a.jsx("button",{type:"button",onClick:()=>o(""),className:"px-3 py-1.5 rounded-md text-xs font-semibold bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors",children:"Clear filter"})}):a.jsx(Pe,{icon:a.jsx(Gn,{className:"w-10 h-10"}),title:"No runs yet",description:a.jsx(a.Fragment,{children:"Trigger your first workflow to see it stream in real time. The chain test below exercises every SDK at once — useful for proving end-to-end connectivity before opening custom workflows."}),snippets:[{lang:"curl · http",code:`curl -X POST http://localhost:4000/cross-runtime-chain \\
|
|
34
|
+
-H 'content-type: application/json' \\
|
|
35
|
+
-d '{}'`}],docLink:{href:"https://docs.blok.io/quickstart",label:"docs.blok.io/quickstart"}})]})}function Ax({onExportJson:s,onExportCsv:o,label:r="Export",size:u="sm"}){const[f,m]=D.useState(!1),x=D.useRef(null);return D.useEffect(()=>{const p=b=>{x.current&&!x.current.contains(b.target)&&m(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]),a.jsxs("div",{ref:x,className:"relative",children:[a.jsxs("button",{type:"button",onClick:()=>m(!f),className:B("flex items-center gap-1.5 rounded-md font-medium transition-colors bg-zinc-800 text-zinc-300 hover:bg-zinc-700 hover:text-zinc-100",u==="sm"?"px-2.5 py-1 text-xs":"px-3 py-1.5 text-sm"),children:[a.jsx(yo,{className:u==="sm"?"w-3 h-3":"w-4 h-4"}),r,a.jsx(is,{className:B("transition-transform",u==="sm"?"w-3 h-3":"w-3.5 h-3.5",f&&"rotate-180")})]}),f&&a.jsxs("div",{className:"absolute right-0 top-full mt-1 z-50 w-44 rounded-lg border border-zinc-800 bg-overlay shadow-xl overflow-hidden",children:[a.jsxs("button",{type:"button",onClick:()=>{s(),m(!1)},className:"flex items-center gap-2 w-full px-3 py-2 text-sm text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100 transition-colors",children:[a.jsx(Kg,{className:"w-4 h-4 text-blue-400"}),"Export as JSON"]}),a.jsxs("button",{type:"button",onClick:()=>{o(),m(!1)},className:"flex items-center gap-2 w-full px-3 py-2 text-sm text-zinc-300 hover:bg-zinc-800 hover:text-zinc-100 transition-colors",children:[a.jsx(Vg,{className:"w-4 h-4 text-green-400"}),"Export as CSV"]})]})]})}function Ot({data:s,defaultExpanded:o=!0,maxDepth:r=5,className:u}){const f=D.useMemo(()=>s,[s]);return s==null?a.jsx("span",{className:"text-zinc-500 italic text-sm",children:"null"}):a.jsxs("div",{className:B("font-mono text-xs",u),children:[a.jsx("div",{className:"flex items-center justify-end mb-1",children:a.jsx(Ey,{text:JSON.stringify(s,null,2)})}),a.jsx(zo,{value:f,depth:0,expanded:o,maxDepth:r})]})}function Ey({text:s}){const[o,r]=D.useState(!1),u=()=>{navigator.clipboard.writeText(s),r(!0),setTimeout(()=>r(!1),2e3)};return a.jsx("button",{type:"button",onClick:u,className:"p-1 rounded hover:bg-zinc-800 text-zinc-500 hover:text-zinc-300 transition-colors",title:"Copy to clipboard","aria-label":"Copy to clipboard",children:o?a.jsx(sa,{className:"w-3.5 h-3.5 text-green-400"}):a.jsx(Mo,{className:"w-3.5 h-3.5"})})}function zo({value:s,depth:o,expanded:r,maxDepth:u,keyName:f}){const[m,x]=D.useState(r&&o<u);if(s===null)return a.jsx(qn,{keyName:f,value:"null",className:"text-zinc-500"});if(s===void 0)return a.jsx(qn,{keyName:f,value:"undefined",className:"text-zinc-500"});if(typeof s=="string"){const p=s.length>200?`${s.slice(0,200)}…`:s;return a.jsx(qn,{keyName:f,value:`"${p}"`,className:"text-green-400"})}if(typeof s=="number")return a.jsx(qn,{keyName:f,value:String(s),className:"text-blue-400"});if(typeof s=="boolean")return a.jsx(qn,{keyName:f,value:String(s),className:"text-amber-400"});if(Array.isArray(s))return s.length===0?a.jsx(qn,{keyName:f,value:"[]",className:"text-zinc-400"}):a.jsx(am,{keyName:f,expanded:m,onToggle:()=>x(!m),bracket:["[","]"],count:s.length,children:s.map((p,b)=>a.jsxs("div",{className:"ml-4",children:[a.jsx(zo,{value:p,depth:o+1,expanded:r,maxDepth:u}),b<s.length-1&&a.jsx("span",{className:"text-zinc-600",children:","})]},`idx-${b}`))});if(typeof s=="object"){const p=Object.entries(s);return p.length===0?a.jsx(qn,{keyName:f,value:"{}",className:"text-zinc-400"}):a.jsx(am,{keyName:f,expanded:m,onToggle:()=>x(!m),bracket:["{","}"],count:p.length,children:p.map(([b,z],y)=>a.jsxs("div",{className:"ml-4",children:[a.jsx(zo,{value:z,depth:o+1,expanded:r,maxDepth:u,keyName:b}),y<p.length-1&&a.jsx("span",{className:"text-zinc-600",children:","})]},b))})}return a.jsx(qn,{keyName:f,value:String(s),className:"text-zinc-400"})}function qn({keyName:s,value:o,className:r}){return a.jsxs("span",{children:[s!==void 0&&a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"text-purple-400",children:['"',s,'"']}),a.jsx("span",{className:"text-zinc-500",children:": "})]}),a.jsx("span",{className:r,children:o})]})}function am({keyName:s,expanded:o,onToggle:r,bracket:u,count:f,children:m}){return a.jsxs("span",{children:[s!==void 0&&a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"text-purple-400",children:['"',s,'"']}),a.jsx("span",{className:"text-zinc-500",children:": "})]}),a.jsxs("button",{type:"button",onClick:r,className:"inline-flex items-center hover:text-zinc-300 text-zinc-500","aria-expanded":o,children:[o?a.jsx(is,{className:"w-3 h-3"}):a.jsx(ia,{className:"w-3 h-3"}),a.jsx("span",{className:"text-zinc-400",children:u[0]})]}),o?a.jsxs(a.Fragment,{children:[a.jsx("div",{children:m}),a.jsx("span",{className:"text-zinc-400",children:u[1]})]}):a.jsxs("span",{className:"text-zinc-600 text-xs",children:[" ",f," items ",u[1]]})]})}const kx=Dt("/workflows/$name")({component:Ty});function Ty(){const{name:s}=kx.useParams(),[o,r]=D.useState(""),[u,f]=D.useState(1),[m,x]=D.useState("runs"),p=25,{data:b,isLoading:z}=tv(s),{data:y,isLoading:g}=zy(s,{status:o||void 0,limit:p,offset:(u-1)*p});if(z)return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})});if(!b)return a.jsx("div",{className:"p-8",children:a.jsx(Pe,{icon:a.jsx(la,{className:"w-10 h-10"}),title:"Workflow not found",description:a.jsxs(a.Fragment,{children:["No workflow named",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:s}),"is registered. Workflows live in",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:"triggers/http/src/workflows/"}),"and are discovered on trigger startup. Did you commit the file but forget to restart the dev orchestrator?"]})})});const C=[{key:"runs",label:"Runs"},{key:"definition",label:"Definition"},{key:"metrics",label:"Metrics"}];return a.jsxs("div",{className:"p-6 max-w-7xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Qe,{to:"/",className:"p-1 rounded hover:bg-zinc-800 text-zinc-500 hover:text-zinc-300 transition-colors",children:a.jsx(Ao,{className:"w-4 h-4"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-semibold text-zinc-100",children:s}),a.jsxs("p",{className:"text-sm text-zinc-500",children:[b.triggerTypes.join(", ")," · ",b.totalRuns," runs · avg"," ",be(b.avgDurationMs)," · ",Qn(b.errorRate)," errors"]})]})]}),a.jsx("div",{className:"flex gap-0 border-b border-zinc-800",children:C.map(S=>a.jsx("button",{type:"button",onClick:()=>x(S.key),className:B("px-4 py-2 text-sm font-medium transition-colors border-b-2 -mb-px",m===S.key?"border-blok-green-500 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"),children:S.label},S.key))}),m==="runs"&&a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex-1",children:a.jsx(Dx,{status:o,onStatusChange:r})}),a.jsx(Ax,{onExportJson:()=>sx({workflow:s,status:o||void 0}),onExportCsv:()=>ix({workflow:s,status:o||void 0}),label:"Export All"})]}),g?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(Ye,{className:"w-5 h-5 text-zinc-500 animate-spin"})}):y&&y.runs.length>0?a.jsx(Mx,{runs:y.runs,total:y.total,page:u,limit:p,onPageChange:f,enableCompare:!0}):o?a.jsx(Pe,{icon:a.jsx(la,{className:"w-10 h-10"}),title:`No ${o} runs match`,description:`Across the loaded window, none of ${b.name}'s runs have status "${o}". Either it's been quiet or the filter is too tight.`,action:a.jsx("button",{type:"button",onClick:()=>r(""),className:"px-3 py-1.5 rounded-md text-xs font-semibold bg-blok-green-500 text-[#00231b] hover:bg-blok-green-600 transition-colors",children:"Clear filter"})}):a.jsx(Pe,{icon:a.jsx(la,{className:"w-10 h-10"}),title:"No runs yet",description:a.jsxs(a.Fragment,{children:["This workflow exists but hasn't been triggered. Try the curl below — it'll exercise the",a.jsx("code",{className:"font-mono text-[12px] bg-raised border border-zinc-800 rounded px-1.5 py-0.5 mx-1 text-zinc-100",children:b.name}),"path end-to-end."]}),snippets:[{lang:"curl · http",code:`curl -X POST http://localhost:4000/${b.name} \\
|
|
36
|
+
-H 'content-type: application/json' \\
|
|
37
|
+
-d '{}'`}]})]}),m==="definition"&&a.jsx("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-4",children:a.jsx(Ot,{data:b.definition||{nodeNames:b.nodeNames,runtimes:b.runtimes}})}),m==="metrics"&&a.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:[a.jsx(Hn,{label:"Total Runs",value:String(b.totalRuns)}),a.jsx(Hn,{label:"Recent (24h)",value:String(b.recentRuns)}),a.jsx(Hn,{label:"Avg Duration",value:be(b.avgDurationMs)}),a.jsx(Hn,{label:"P95 Duration",value:be(b.p95DurationMs)}),a.jsx(Hn,{label:"Error Rate",value:Qn(b.errorRate)}),a.jsx(Hn,{label:"Runtimes",value:b.runtimes.join(", ")||"—"}),a.jsx(Hn,{label:"Nodes",value:String(b.nodeNames.length)}),a.jsx(Hn,{label:"Triggers",value:b.triggerTypes.join(", ")})]})]})}function Hn({label:s,value:o}){return a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-overlay p-4",children:[a.jsx("div",{className:"text-xs text-zinc-500 mb-1",children:s}),a.jsx("div",{className:"text-lg font-semibold text-zinc-100 font-mono",children:o})]})}function Ox({ms:s,running:o,className:r}){return a.jsxs("span",{className:B("inline-flex items-center gap-1 text-xs font-mono",o?"text-blue-400":"text-zinc-400",r),children:[a.jsx(os,{className:"w-3 h-3"}),o?a.jsx(Cy,{startedAt:s||Date.now()}):be(s)]})}function Cy({startedAt:s}){const[o,r]=D.useState(Date.now()-s);return D.useEffect(()=>{const u=setInterval(()=>r(Date.now()-s),100);return()=>clearInterval(u)},[s]),a.jsx(a.Fragment,{children:be(o)})}function Ry({runA:s,runB:o}){const[r,u]=D.useState("overview"),[f,m]=D.useState(null),x=[{key:"overview",label:"Overview"},{key:"nodes",label:"Node Comparison"},{key:"outputs",label:"Output Diff"}],p=D.useMemo(()=>{const b=new Map,z=new Map;for(const g of s.nodes)b.set(g.nodeName,g);for(const g of o.nodes)z.set(g.nodeName,g);const y=new Set([...b.keys(),...z.keys()]);return Array.from(y).map(g=>({name:g,nodeA:b.get(g),nodeB:z.get(g)}))},[s.nodes,o.nodes]);return a.jsxs("div",{className:"p-4 space-y-4",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(sm,{run:s,label:"Run A"}),a.jsx(sm,{run:o,label:"Run B"})]}),a.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[a.jsx(Li,{label:"Duration",valueA:be(s.run.durationMs),valueB:be(o.run.durationMs),comparison:ky(s.run.durationMs,o.run.durationMs)}),a.jsx(Li,{label:"Status",valueA:s.run.status,valueB:o.run.status,comparison:s.run.status===o.run.status?"same":"different"}),a.jsx(Li,{label:"Nodes",valueA:`${s.run.completedNodes}/${s.run.nodeCount}`,valueB:`${o.run.completedNodes}/${o.run.nodeCount}`,comparison:s.run.completedNodes===o.run.completedNodes?"same":"different"}),a.jsx(Li,{label:"Errors",valueA:s.run.error?"Yes":"No",valueB:o.run.error?"Yes":"No",comparison:!s.run.error&&!o.run.error||s.run.error&&o.run.error?"same":"different"})]}),a.jsx("div",{className:"flex gap-0 border-b border-zinc-800",children:x.map(b=>a.jsx("button",{type:"button",onClick:()=>u(b.key),className:B("px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px",r===b.key?"border-blue-500 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"),children:b.label},b.key))}),r==="overview"&&a.jsx(Dy,{runA:s,runB:o,nodeComparison:p}),r==="nodes"&&a.jsx(My,{nodeComparison:p,selectedNode:f,onSelectNode:m,runA:s,runB:o}),r==="outputs"&&a.jsx(Ay,{nodeComparison:p})]})}function sm({run:s,label:o}){return a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:o}),a.jsx(fs,{status:s.run.status})]}),a.jsx(Qe,{to:"/runs/$runId",params:{runId:s.run.id},className:"text-sm font-mono text-blue-400 hover:text-blue-300",children:s.run.id.slice(0,16)}),a.jsxs("div",{className:"mt-2 space-y-1 text-xs text-zinc-500",children:[a.jsxs("div",{children:["Trigger: ",a.jsx("span",{className:"text-zinc-400 font-mono",children:s.run.triggerSummary})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(os,{className:"w-3 h-3"}),a.jsx("span",{className:"text-zinc-400",children:Yi(s.run.startedAt)})]}),a.jsxs("div",{children:["Duration: ",a.jsx(Ox,{ms:s.run.durationMs})]}),a.jsxs("div",{children:["Nodes:"," ",a.jsxs("span",{className:"text-zinc-400",children:[s.run.completedNodes,"/",s.run.nodeCount]})]})]})]})}function Li({label:s,valueA:o,valueB:r,comparison:u}){return a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:s}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-sm font-mono text-zinc-300",children:o}),a.jsx(To,{className:"w-3 h-3 text-zinc-600"}),a.jsx("span",{className:B("text-sm font-mono",u==="same"&&"text-zinc-300",u==="better"&&"text-green-400",u==="worse"&&"text-red-400",u==="different"&&"text-amber-400"),children:r})]})]})}function Dy({runA:s,runB:o,nodeComparison:r}){const u=Math.max(...[...s.nodes,...o.nodes].map(f=>f.durationMs||0).filter(f=>f>0),1);return a.jsxs("div",{className:"space-y-4",children:[a.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-zinc-600",children:"Timeline Comparison"}),a.jsx("div",{className:"space-y-2",children:r.map(({name:f,nodeA:m,nodeB:x})=>a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",children:[a.jsx("div",{className:"text-xs font-medium text-zinc-300 mb-2",children:f}),a.jsxs("div",{className:"space-y-1.5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] text-zinc-600 w-6",children:"A"}),m?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex-1 h-4 bg-zinc-800 rounded overflow-hidden",children:a.jsx("div",{className:B("h-full rounded transition-all",m.status==="completed"&&"bg-green-500/60",m.status==="failed"&&"bg-red-500/60",m.status==="running"&&"bg-blue-500/60",m.status==="skipped"&&"bg-zinc-600"),style:{width:`${Math.max((m.durationMs||0)/u*100,2)}%`}})}),a.jsx("span",{className:"text-[10px] font-mono text-zinc-500 w-16 text-right",children:be(m.durationMs)})]}):a.jsx("span",{className:"text-[10px] text-zinc-600 italic",children:"not present"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] text-zinc-600 w-6",children:"B"}),x?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex-1 h-4 bg-zinc-800 rounded overflow-hidden",children:a.jsx("div",{className:B("h-full rounded transition-all",x.status==="completed"&&"bg-blue-500/60",x.status==="failed"&&"bg-red-500/60",x.status==="running"&&"bg-blue-500/60",x.status==="skipped"&&"bg-zinc-600"),style:{width:`${Math.max((x.durationMs||0)/u*100,2)}%`}})}),a.jsx("span",{className:"text-[10px] font-mono text-zinc-500 w-16 text-right",children:be(x.durationMs)})]}):a.jsx("span",{className:"text-[10px] text-zinc-600 italic",children:"not present"})]})]})]},f))})]})}function My({nodeComparison:s,selectedNode:o,onSelectNode:r,runA:u,runB:f}){const m=s.find(x=>x.name===o);return a.jsxs("div",{className:"flex gap-4",children:[a.jsx("div",{className:"w-64 space-y-1",children:s.map(({name:x,nodeA:p,nodeB:b})=>{const z=(p==null?void 0:p.status)===(b==null?void 0:b.status),y=(p==null?void 0:p.durationMs)!==void 0&&(b==null?void 0:b.durationMs)!==void 0?b.durationMs-p.durationMs:null;return a.jsxs("button",{type:"button",onClick:()=>r(o===x?null:x),className:B("w-full text-left rounded-md px-3 py-2 text-sm transition-colors",o===x?"bg-zinc-800 text-zinc-100":"text-zinc-400 hover:bg-zinc-800/50 hover:text-zinc-200"),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[z?a.jsx(Eo,{className:"w-3 h-3 text-green-500 shrink-0"}):p&&b?a.jsx(Zg,{className:"w-3 h-3 text-amber-500 shrink-0"}):a.jsx(Rm,{className:"w-3 h-3 text-red-500 shrink-0"}),a.jsx("span",{className:"truncate",children:x})]}),y!==null&&a.jsx("div",{className:"text-[10px] mt-0.5 ml-5",children:a.jsxs("span",{className:B("font-mono",y>0?"text-red-400":y<0?"text-green-400":"text-zinc-600"),children:[y>0?"+":"",be(Math.abs(y))]})})]},x)})}),a.jsx("div",{className:"flex-1",children:m?a.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[a.jsx(im,{node:m.nodeA,label:"Run A",logs:u.logs.filter(x=>x.nodeName===m.name)}),a.jsx(im,{node:m.nodeB,label:"Run B",logs:f.logs.filter(x=>x.nodeName===m.name)})]}):a.jsx("div",{className:"flex items-center justify-center h-48 text-zinc-600 text-sm",children:"Select a node to compare details"})})]})}function im({node:s,label:o,logs:r}){return s?a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-4 space-y-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600",children:o}),a.jsx(fs,{status:s.status})]}),a.jsxs("div",{className:"space-y-1 text-xs text-zinc-500",children:[a.jsxs("div",{children:["Duration: ",a.jsx("span",{className:"text-zinc-300 font-mono",children:be(s.durationMs)})]}),a.jsxs("div",{children:["Type: ",a.jsx("span",{className:"text-zinc-400",children:s.nodeType})]}),s.runtimeKind&&a.jsxs("div",{children:["Runtime: ",a.jsx("span",{className:"text-zinc-400",children:s.runtimeKind})]})]}),s.error&&a.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded p-2 text-xs text-red-400",children:s.error.message}),s.inputs!==void 0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:"Input"}),a.jsx("div",{className:"max-h-32 overflow-y-auto",children:a.jsx(Ot,{data:s.inputs})})]}),s.outputs!==void 0&&a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:"Output"}),a.jsx("div",{className:"max-h-32 overflow-y-auto",children:a.jsx(Ot,{data:s.outputs})})]}),r.length>0&&a.jsxs("div",{children:[a.jsxs("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:["Logs (",r.length,")"]}),a.jsx("div",{className:"max-h-24 overflow-y-auto space-y-0.5",children:r.map(u=>a.jsxs("div",{className:"text-[10px] font-mono text-zinc-500 truncate",children:[a.jsxs("span",{className:B(u.level==="error"&&"text-red-400",u.level==="warn"&&"text-amber-400",u.level==="info"&&"text-blue-400"),children:["[",u.level,"]"]})," ",u.message]},u.id))})]})]}):a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-4 text-center text-zinc-600 text-sm",children:[o,": Not present in this run"]})}function Ay({nodeComparison:s}){const o=s.filter(({nodeA:r,nodeB:u})=>(r==null?void 0:r.outputs)!==void 0||(u==null?void 0:u.outputs)!==void 0);return o.length===0?a.jsx("div",{className:"flex items-center justify-center h-48 text-zinc-600 text-sm",children:"No node outputs to compare"}):a.jsx("div",{className:"space-y-4",children:o.map(({name:r,nodeA:u,nodeB:f})=>{const m=JSON.stringify(u==null?void 0:u.outputs)===JSON.stringify(f==null?void 0:f.outputs);return a.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/50 p-4",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("span",{className:"text-sm font-medium text-zinc-300",children:r}),m?a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-green-500/10 text-green-400",children:"Identical"}):a.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-400",children:"Different"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:"Run A Output"}),a.jsx("div",{className:"max-h-48 overflow-y-auto rounded bg-zinc-950 p-2",children:(u==null?void 0:u.outputs)!==void 0?a.jsx(Ot,{data:u.outputs}):a.jsx("span",{className:"text-xs text-zinc-600",children:"No output"})})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-600 mb-1",children:"Run B Output"}),a.jsx("div",{className:"max-h-48 overflow-y-auto rounded bg-zinc-950 p-2",children:(f==null?void 0:f.outputs)!==void 0?a.jsx(Ot,{data:f.outputs}):a.jsx("span",{className:"text-xs text-zinc-600",children:"No output"})})]})]})]},r)})})}function ky(s,o){if(s===void 0||o===void 0)return"different";if(s===o)return"same";const r=Math.abs(o-s),u=Math.max(s,o)*.1;return r<u?"same":o<s?"better":"worse"}const _x=Dt("/runs/diff")({validateSearch:s=>({a:s.a,b:s.b}),component:Oy});function Oy(){const{a:s,b:o}=_x.useSearch(),{data:r,isLoading:u,error:f}=Lv(s||"",o||"");return!s||!o?a.jsx("div",{className:"p-6",children:a.jsx(Pe,{icon:a.jsx(as,{className:"w-12 h-12"}),title:"Select two runs to compare",description:"Use the compare button on the workflow runs table to select two runs for side-by-side comparison."})}):u?a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})}):f||!r?a.jsx("div",{className:"p-6",children:a.jsx(Pe,{icon:a.jsx(as,{className:"w-12 h-12"}),title:"Comparison failed",description:f instanceof Error?f.message:"Could not load the runs for comparison."})}):a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsx("div",{className:"shrink-0 border-b border-zinc-800 bg-canvas/60 px-4 py-3",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Qe,{to:"/runs",className:"p-1 rounded hover:bg-zinc-800 text-zinc-500 hover:text-zinc-300 transition-colors",children:a.jsx(Ao,{className:"w-4 h-4"})}),a.jsx(as,{className:"w-4 h-4 text-zinc-500"}),a.jsx("h1",{className:"text-sm font-medium text-zinc-200",children:"Run Comparison"}),a.jsx("span",{className:"text-xs text-zinc-600",children:r.runA.run.workflowName})]})}),a.jsx("div",{className:"flex-1 overflow-y-auto",children:a.jsx(Ry,{runA:r.runA,runB:r.runB})})]})}function _y({runId:s,tags:o}){const[r,u]=D.useState(!1),[f,m]=D.useState(""),x=qv(s),p=Hv(s),b=()=>{const y=f.trim();if(!y||o.includes(y)){m("");return}x.mutate([y],{onSuccess:()=>{m(""),u(!1)}})},z=y=>{y.key==="Enter"?(y.preventDefault(),b()):y.key==="Escape"&&(u(!1),m(""))};return a.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[a.jsx(Jg,{className:"w-3 h-3 text-zinc-600 shrink-0"}),o.map(y=>a.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded bg-zinc-700/50 text-zinc-400 group",children:[y,a.jsx("button",{type:"button",onClick:()=>p.mutate(y),className:"opacity-0 group-hover:opacity-100 transition-opacity hover:text-zinc-200",title:`Remove tag "${y}"`,children:a.jsx(Bt,{className:"w-2.5 h-2.5"})})]},y)),r?a.jsx("input",{type:"text",value:f,onChange:y=>m(y.target.value),onKeyDown:z,onBlur:()=>{f.trim()||u(!1)},placeholder:"tag name",className:"text-[10px] px-1.5 py-0.5 rounded bg-raised border border-zinc-800 text-zinc-300 outline-none focus:border-blok-green-500 w-20"}):a.jsxs("button",{type:"button",onClick:()=>u(!0),className:B("inline-flex items-center gap-0.5 text-[10px] px-1.5 py-0.5 rounded","text-zinc-600 hover:text-zinc-400 hover:bg-zinc-800 transition-colors"),title:"Add tag",children:[a.jsx(fl,{className:"w-2.5 h-2.5"}),"tag"]})]})}function Ux({runId:s,nodeId:o,compact:r}){const[u,f]=D.useState("idle"),[m,x]=D.useState(""),[p,b]=D.useState(""),[z,y]=D.useState(""),g=async()=>{f("loading"),y("");try{const S=await hx(s,o);x(S.explanation),b(S.model),f("done")}catch(S){y(S instanceof Error?S.message:"Failed to get explanation"),f("error")}},C=()=>{f("idle"),x(""),b(""),y("")};return u==="idle"?a.jsxs("button",{type:"button",onClick:g,className:B("flex items-center gap-1.5 rounded-md text-xs font-medium transition-colors",r?"px-2 py-1 bg-purple-600/20 text-purple-400 hover:bg-purple-600/30":"px-2.5 py-1 bg-zinc-800 text-purple-400 hover:bg-zinc-700 hover:text-purple-300"),title:"Explain this error using AI",children:[a.jsx(oo,{className:"w-3 h-3"}),"Explain Error"]}):u==="loading"?a.jsxs("div",{className:B("flex items-center gap-2 text-xs text-purple-400",r?"px-2 py-1":"px-2.5 py-1"),children:[a.jsx(Ye,{className:"w-3 h-3 animate-spin"}),a.jsx("span",{children:"Analyzing error..."})]}):u==="error"?a.jsxs("div",{className:B("space-y-2",r?"":"mt-2"),children:[a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-amber-900/50 bg-amber-950/30 px-3 py-2",children:[a.jsx(Mm,{className:"w-3.5 h-3.5 text-amber-400 shrink-0"}),a.jsx("span",{className:"text-xs text-amber-300",children:z}),a.jsx("button",{type:"button",onClick:C,className:"ml-auto p-0.5 text-amber-500 hover:text-amber-300",children:a.jsx(Bt,{className:"w-3 h-3"})})]}),a.jsxs("button",{type:"button",onClick:g,className:"flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium bg-purple-600/20 text-purple-400 hover:bg-purple-600/30 transition-colors",children:[a.jsx(oo,{className:"w-3 h-3"}),"Try Again"]})]}):a.jsxs("div",{className:B("rounded-md border border-purple-900/50 bg-purple-950/20",r?"mt-2":"mt-3"),children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-purple-900/30",children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx(oo,{className:"w-3 h-3 text-purple-400"}),a.jsx("span",{className:"text-xs font-medium text-purple-300",children:"AI Explanation"}),a.jsxs("span",{className:"text-[10px] text-purple-500",children:["(",p,")"]})]}),a.jsx("button",{type:"button",onClick:C,className:"p-0.5 text-purple-500 hover:text-purple-300 transition-colors",children:a.jsx(Bt,{className:"w-3 h-3"})})]}),a.jsx("div",{className:"p-3 text-xs text-zinc-300 leading-relaxed prose-invert max-h-80 overflow-y-auto",children:a.jsx(Uy,{content:m})})]})}function Uy({content:s}){var u;const o=s.split(`
|
|
38
|
+
`),r=[];for(let f=0;f<o.length;f++){const m=o[f]??"";if(m.startsWith("### "))r.push(a.jsx("h4",{className:"text-sm font-semibold text-zinc-200 mt-3 mb-1",children:m.slice(4)},f));else if(m.startsWith("## "))r.push(a.jsx("h3",{className:"text-sm font-bold text-zinc-100 mt-3 mb-1",children:m.slice(3)},f));else if(m.startsWith("# "))r.push(a.jsx("h2",{className:"text-base font-bold text-zinc-100 mt-3 mb-1",children:m.slice(2)},f));else if(m.startsWith("- ")||m.startsWith("* "))r.push(a.jsx("li",{className:"ml-4 list-disc text-zinc-300",children:a.jsx(po,{text:m.slice(2)})},f));else if(/^\d+\.\s/.test(m)){const x=m.replace(/^\d+\.\s/,"");r.push(a.jsx("li",{className:"ml-4 list-decimal text-zinc-300",children:a.jsx(po,{text:x})},f))}else if(m.startsWith("```")){const x=[];for(f++;f<o.length&&!((u=o[f])!=null&&u.startsWith("```"));)x.push(o[f]??""),f++;r.push(a.jsx("pre",{className:"bg-zinc-900 rounded p-2 my-1 text-[11px] font-mono text-zinc-300 overflow-x-auto",children:x.join(`
|
|
39
|
+
`)},f))}else m.trim()===""?r.push(a.jsx("br",{},f)):r.push(a.jsx("p",{className:"text-zinc-300 my-0.5",children:a.jsx(po,{text:m})},f))}return a.jsx(a.Fragment,{children:r})}function po({text:s}){const o=s.split(/(\*\*.*?\*\*|`[^`]+`)/g);return a.jsx(a.Fragment,{children:o.map((r,u)=>r.startsWith("**")&&r.endsWith("**")?a.jsx("strong",{className:"font-semibold text-zinc-200",children:r.slice(2,-2)},`strong-${u}`):r.startsWith("`")&&r.endsWith("`")?a.jsx("code",{className:"bg-zinc-800 rounded px-1 py-0.5 text-[11px] font-mono text-purple-300",children:r.slice(1,-1)},`code-${u}`):a.jsx("span",{children:r},`span-${u}`))})}function Ly({error:s,stepName:o,stepIndex:r,totalSteps:u,runtimeKind:f,transport:m,finishedAt:x,runId:p,nodeId:b}){const z=!!s.category||!!s.severity||typeof s.retryable=="boolean"||!!s.remediation||!!s.docUrl||s.causes&&s.causes.length>0;return a.jsxs("div",{className:"flex flex-col",children:[a.jsxs("section",{className:"bg-red-950/30 border-b border-red-900/50 px-8 py-6",children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-4 font-mono text-[11px]",children:[a.jsx(rm,{category:s.category}),a.jsx(Yy,{severity:s.severity}),typeof s.retryable=="boolean"&&s.retryable&&a.jsxs("span",{className:"inline-flex items-center gap-1 px-2.5 py-0.5 rounded-full font-semibold uppercase tracking-[0.06em] text-[10px] bg-blue-500/15 text-blue-400 border border-blue-500/30",children:[a.jsx(Dm,{className:"w-2.5 h-2.5"}),"retryable",typeof s.retryAfterMs=="number"&&s.retryAfterMs>0&&a.jsxs("span",{className:"opacity-70",children:["· ",Gy(s.retryAfterMs)]})]}),a.jsxs("span",{className:"ml-auto text-zinc-500 truncate",children:["step ",a.jsx("span",{className:"text-zinc-200 font-medium",children:o}),f&&a.jsxs("span",{className:"text-zinc-600",children:[" · ",f]}),m&&a.jsxs("span",{className:"text-zinc-600",children:[" · ",m]}),x&&a.jsxs("span",{className:"text-zinc-600",children:[" · ",new Date(x).toISOString().slice(11,19)]})]})]}),a.jsx("h2",{className:"font-mono text-lg leading-snug font-medium text-zinc-100 mb-3 break-words",children:a.jsx(qy,{code:s.code,message:s.message})}),(s.description||z)&&a.jsx("p",{className:"text-[13px] text-zinc-300 leading-relaxed font-mono whitespace-pre-wrap max-w-3xl",children:s.description??Hy(s)})]}),a.jsxs("section",{className:"px-8 py-6 space-y-6",children:[s.remediation&&a.jsxs("div",{children:[a.jsx(ls,{children:"Remediation"}),a.jsxs("div",{className:"rounded-r-md border-l-[3px] border-blok-green-500 bg-overlay px-4 py-3",children:[a.jsx("p",{className:"text-[13px] text-zinc-100 leading-relaxed whitespace-pre-wrap",children:s.remediation}),s.docUrl&&a.jsxs("a",{href:s.docUrl,target:"_blank",rel:"noreferrer noopener",className:"inline-flex items-center gap-1.5 mt-2.5 font-mono text-[12px] text-blok-green-500 hover:text-blok-green-600 hover:underline font-medium",children:[a.jsx($g,{className:"w-3.5 h-3.5"}),By(s.docUrl)]})]})]}),a.jsxs("div",{children:[a.jsx(ls,{children:"AI explain"}),a.jsx("div",{className:"rounded-md bg-overlay border border-zinc-800 px-4 py-3",children:a.jsx(Ux,{runId:p,nodeId:b,compact:!0})})]}),s.details!==void 0&&s.details!==null&&a.jsxs("div",{children:[a.jsx(ls,{children:"Details"}),a.jsx(cm,{snapshot:s.details})]}),s.causes&&s.causes.length>0&&a.jsxs("div",{children:[a.jsxs(ls,{children:["Causes"," ",a.jsxs("span",{className:"text-zinc-600 font-normal normal-case tracking-normal",children:["· ",s.causes.length]})]}),a.jsxs("div",{className:"rounded-md border border-zinc-800 bg-overlay overflow-hidden",children:[a.jsxs("div",{className:"grid grid-cols-[100px_1fr_auto] gap-3 px-4 py-2 text-[10px] uppercase tracking-[0.06em] text-zinc-500 border-b border-zinc-800 bg-canvas/40 font-semibold",children:[a.jsx("span",{children:"category"}),a.jsx("span",{children:"code · message"}),a.jsx("span",{children:"idx"})]}),s.causes.map((y,g)=>{const C=y.code??"uncoded",S=y.message??"",A=y.category,q=C==="uncoded"&&!S?`uncoded-${g}`:`${C}::${S.slice(0,32)}`;return a.jsxs("div",{className:"grid grid-cols-[100px_1fr_auto] gap-3 px-4 py-2.5 border-b border-zinc-800 last:border-b-0 font-mono text-[12px] items-baseline",children:[a.jsx("span",{className:"text-[10px]",children:a.jsx(rm,{category:A,compact:!0})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("div",{className:"text-zinc-100 truncate",children:C}),S&&a.jsx("div",{className:"text-zinc-400 text-[11.5px] mt-0.5 break-words",children:S})]}),a.jsxs("span",{className:"text-zinc-600 text-[11px]",children:["#",g+1]})]},q)})]})]}),s.contextSnapshot!==void 0&&s.contextSnapshot!==null&&a.jsxs("div",{children:[a.jsx(ls,{children:"Context snapshot"}),a.jsx(cm,{snapshot:s.contextSnapshot})]}),s.stack&&a.jsxs("details",{children:[a.jsx("summary",{className:"cursor-pointer text-[11px] uppercase tracking-[0.08em] text-zinc-500 font-semibold hover:text-zinc-300 select-none mb-2",children:"Stack trace"}),a.jsx("pre",{className:"rounded-md border border-zinc-800 bg-overlay px-4 py-3 font-mono text-[11px] leading-relaxed text-zinc-400 whitespace-pre-wrap break-all max-h-72 overflow-y-auto",children:s.stack})]}),!z&&a.jsx("p",{className:"text-[11px] text-zinc-500 italic",children:"Untyped error — adopt `BlokError` to surface category, remediation, and causes here."}),a.jsxs("p",{className:"text-[11px] font-mono text-zinc-600 pt-2 border-t border-zinc-800",children:["Failed at step ",a.jsx("span",{className:"text-zinc-300",children:r+1})," of ",u,"."," ",a.jsx("span",{className:"text-zinc-500",children:"Subsequent steps were skipped."})]})]})]})}function ls({children:s}){return a.jsx("h3",{className:"text-[11px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mb-2",children:s})}function qy({code:s,message:o}){const r=/\b(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+|localhost:\d+)\b/,u=o.match(r),f=u?o.slice(0,u.index):o,m=u?u[0]:"",x=u?o.slice((u.index??0)+m.length):"";return a.jsxs(a.Fragment,{children:[s&&a.jsx("span",{className:"text-amber-400/95",children:s}),s&&a.jsx("span",{className:"text-zinc-500",children:": "}),a.jsx("span",{className:"text-zinc-300",children:f}),m&&a.jsx("span",{className:"text-blok-green-500",children:m}),a.jsx("span",{className:"text-zinc-300",children:x})]})}function Hy(s){const o=s.category;return o==="DEPENDENCY"?"An upstream service the step depends on is unavailable. The runner will retry per the policy below; if retries exhaust the breaker opens for 30 s.":o==="TIMEOUT"?"The step exceeded its allowed runtime. This is usually a downstream slowness signal, not a bug in the node itself.":o==="VALIDATION"?"The step's input failed schema validation. Inputs are checked against the node's Zod schema before `execute()` is called.":o==="RATE_LIMIT"?"The step was rate-limited by a downstream service. Backoff is applied per the retry-after hint below.":"The step did not complete. Inspect the cause chain and context snapshot below for the operative state at the moment of failure."}function By(s){try{const o=new URL(s);return`${o.host}${o.pathname}`.replace(/\/+$/,"")}catch{return s}}function Gy(s){if(s<1e3)return`${s}ms`;const o=Math.round(s/1e3);return o<90?`${o}s`:`${Math.round(o/60)}m`}function cm({snapshot:s}){if(!s||typeof s!="object"||Array.isArray(s))return a.jsx("div",{className:"rounded-md border border-zinc-800 bg-overlay px-4 py-3",children:a.jsx(Ot,{data:s,defaultExpanded:!1})});const o=Object.entries(s),r=o.filter(([,f])=>f==null||typeof f!="object"),u=o.filter(([,f])=>f!=null&&typeof f=="object");return a.jsxs("div",{className:"rounded-md border border-zinc-800 bg-overlay overflow-hidden",children:[a.jsx("div",{className:"grid grid-cols-2",children:r.map(([f,m],x)=>a.jsxs("div",{className:B("px-4 py-2.5 font-mono text-[11.5px]","border-zinc-800",x%2===0?"border-r":"",x<r.length-2?"border-b":"",r.length%2===1&&x===r.length-1?"col-span-2":""),children:[a.jsx("div",{className:"text-[10px] uppercase tracking-[0.06em] text-zinc-500 mb-1",children:f}),a.jsx("div",{className:"text-zinc-100 break-all",children:Qy(m)})]},f))}),u.length>0&&a.jsxs("details",{className:"border-t border-zinc-800 px-4 py-2",children:[a.jsxs("summary",{className:"cursor-pointer text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold hover:text-zinc-300 select-none",children:["nested (",u.length,")"]}),a.jsx("div",{className:"mt-2",children:a.jsx(Ot,{data:Object.fromEntries(u),defaultExpanded:!1})})]})]})}function Qy(s){return s==null?"—":typeof s=="string"?s:typeof s=="number"?String(s):typeof s=="boolean"?s?"true":"false":JSON.stringify(s)}function rm({category:s,compact:o}){if(!s)return null;const r={VALIDATION:"bg-blue-500/15 text-blue-300 border-blue-500/30",CONFIGURATION:"bg-zinc-700/40 text-zinc-300 border-zinc-600/40",DEPENDENCY:"bg-orange-500/15 text-orange-300 border-orange-500/30",TIMEOUT:"bg-amber-500/15 text-amber-300 border-amber-500/30",PERMISSION:"bg-violet-500/15 text-violet-300 border-violet-500/30",RATE_LIMIT:"bg-rose-500/15 text-rose-300 border-rose-500/30",NOT_FOUND:"bg-sky-500/15 text-sky-300 border-sky-500/30",CONFLICT:"bg-purple-500/15 text-purple-300 border-purple-500/30",CANCELLED:"bg-zinc-700/40 text-zinc-400 border-zinc-600/40",INTERNAL:"bg-red-500/15 text-red-300 border-red-500/30",PROTOCOL:"bg-fuchsia-500/15 text-fuchsia-300 border-fuchsia-500/30",DATA:"bg-cyan-500/15 text-cyan-300 border-cyan-500/30"},u=r[s]??r.INTERNAL;return a.jsx("span",{className:B("font-mono uppercase tracking-[0.06em] font-semibold rounded-full border",o?"text-[10px] px-2 py-0.5":"text-[10px] px-2.5 py-0.5",u),children:s})}function Yy({severity:s}){if(!s)return null;const o={INFO:"bg-blue-500/15 text-blue-300 border-blue-500/30",WARN:"bg-amber-500/15 text-amber-300 border-amber-500/30",ERROR:"bg-red-500/15 text-red-300 border-red-500/30",FATAL:"bg-red-500/25 text-red-200 border-red-500/40 ring-1 ring-red-500/40"};return a.jsx("span",{className:B("font-mono text-[10px] uppercase tracking-[0.06em] font-semibold rounded-full border px-2.5 py-0.5",o[s]??o.ERROR),children:s})}function Xy({node:s,logs:o,totalSteps:r,transport:u}){var z;const[f,m]=D.useState({input:!0,output:!0,logs:!1,live:!0});D.useEffect(()=>{m({input:!0,output:!0,logs:!1,live:!0})},[s.id]);const x=o.filter(y=>y.nodeId===s.id||y.nodeName===s.nodeName),p=!!s.error,b=u??Vy(s);return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsxs("header",{className:"px-8 pt-5 pb-3 border-b border-zinc-800 bg-canvas",children:[a.jsxs("div",{className:"flex items-baseline gap-3 mb-2",children:[a.jsx(Ky,{status:s.status}),a.jsx("h2",{className:"font-mono text-[18px] font-medium text-zinc-100 tracking-tight truncate",children:s.nodeName}),a.jsxs("span",{className:"font-mono text-[11.5px] text-zinc-500 shrink-0",children:["step ",s.stepIndex+1," / ",r,s.depth>0&&a.jsxs("span",{className:"text-zinc-600",children:[" · depth ",s.depth]})]})]}),a.jsxs("div",{className:"flex items-center flex-wrap gap-1.5 ml-5",children:[a.jsx(Hi,{children:s.nodeType}),b&&a.jsx(Hi,{accent:!0,children:b}),s.runtimeKind&&a.jsx(Hi,{children:s.runtimeKind}),((z=s.metrics)==null?void 0:z.request_bytes)!=null&&a.jsxs(Hi,{children:[a.jsx("span",{className:"text-zinc-500",children:"req"})," ",Zy(s.metrics.request_bytes)]})]})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s.cached&&a.jsx("div",{className:"px-8 pt-5",children:a.jsxs("div",{className:"flex items-start gap-3 rounded-md border border-blok-green-500/30 bg-blok-green-500/5 px-4 py-3",children:[a.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-blok-green-500/15 text-blok-green-500 shrink-0 mt-0.5",children:"cached"}),a.jsxs("div",{className:"text-[12px] text-zinc-300 leading-relaxed",children:["This step short-circuited via the idempotency cache.",a.jsxs("div",{className:"mt-1 text-zinc-500 font-mono text-[11px]",children:["source run"," ",a.jsx("a",{href:`/runs/${s.cached.sourceRunId}`,className:"text-zinc-300 hover:text-blok-green-500 underline decoration-zinc-700 hover:decoration-blok-green-500",children:s.cached.sourceRunId})," ","· cached ",Math.max(0,Math.floor((Date.now()-s.cached.cachedAt)/1e3)),"s ago"]})]})]})}),s.attempts&&s.attempts.length>0&&a.jsx("div",{className:"px-8 pt-5",children:a.jsxs("details",{className:"rounded-md border border-status-warning/30 bg-status-warning/5 px-4 py-3",children:[a.jsxs("summary",{className:"cursor-pointer text-[12px] text-zinc-200 font-medium select-none",children:[a.jsx("span",{className:"font-mono text-[10px] uppercase tracking-wide px-1.5 py-0.5 rounded bg-status-warning/15 text-status-warning mr-2",children:"retry"}),s.attempts.length," failed attempt",s.attempts.length===1?"":"s"," before outcome"]}),a.jsx("ul",{className:"mt-3 space-y-2 text-[11.5px]",children:s.attempts.map(y=>a.jsxs("li",{className:"flex items-start gap-3 font-mono",children:[a.jsxs("span",{className:"text-zinc-500 shrink-0",children:["#",y.attempt]}),a.jsx("span",{className:"text-zinc-500 shrink-0",children:new Date(y.timestamp).toISOString().slice(11,23)}),a.jsx("span",{className:"text-status-failed wrap-break-word",children:y.error.message})]},y.timestamp))})]})}),s.progress&&a.jsx("div",{className:"px-8 pt-5",children:a.jsx(Jy,{percent:s.progress.percent,phase:s.progress.phase})}),s.partialResult&&a.jsx("div",{className:"px-8 pt-5",children:a.jsx(qi,{title:"Partial result",subtitle:"live",open:f.live,onToggle:()=>m(y=>({...y,live:!y.live})),children:a.jsx(Ot,{data:s.partialResult.snapshot,defaultExpanded:!1})})}),p&&s.error&&a.jsx(Ly,{error:s.error,stepName:s.nodeName,stepIndex:s.stepIndex,totalSteps:r,runtimeKind:s.runtimeKind,transport:b,finishedAt:s.finishedAt,runId:s.runId,nodeId:s.id}),!p&&a.jsxs("div",{className:"px-8 py-5 space-y-5",children:[s.inputs!==void 0&&s.inputs!==null&&a.jsx(qi,{title:"Input",subtitle:om(s.inputs),open:f.input,onToggle:()=>m(y=>({...y,input:!y.input})),children:a.jsx(Ot,{data:s.inputs,defaultExpanded:!1})}),s.outputs!==void 0&&s.outputs!==null&&a.jsx(qi,{title:"Output",subtitle:om(s.outputs),open:f.output,onToggle:()=>m(y=>({...y,output:!y.output})),children:a.jsx(Ot,{data:s.outputs,defaultExpanded:!1})}),x.length>0&&a.jsx(qi,{title:"Logs",subtitle:`${x.length} ${x.length===1?"entry":"entries"}`,open:f.logs,onToggle:()=>m(y=>({...y,logs:!y.logs})),children:a.jsx("div",{className:"font-mono text-[11.5px] leading-relaxed max-h-72 overflow-y-auto",children:x.map(y=>a.jsxs("div",{className:"grid grid-cols-[88px_56px_1fr] gap-3 py-1 border-b border-zinc-800 last:border-b-0",children:[a.jsx("span",{className:"text-zinc-500",children:new Date(y.timestamp).toISOString().slice(11,23)}),a.jsx("span",{className:B("uppercase text-[10px] tracking-[0.05em] font-semibold",y.level==="info"&&"text-log-info",y.level==="warn"&&"text-log-warn",y.level==="error"&&"text-log-error",y.level==="debug"&&"text-log-debug"),children:y.level}),a.jsx("span",{className:"text-zinc-200 wrap-break-word",children:y.message})]},y.id))})}),(s.inputs==null||s.inputs===void 0)&&(s.outputs==null||s.outputs===void 0)&&x.length===0&&a.jsx("p",{className:"text-[12px] text-zinc-500 py-8 text-center",children:"This step ran cleanly with no captured inputs, outputs, or logs."})]})]})]})}function qi({title:s,subtitle:o,open:r,onToggle:u,children:f}){return a.jsxs("div",{children:[a.jsxs("button",{type:"button",onClick:u,className:"w-full flex items-center gap-2 py-1.5 text-[11px] uppercase tracking-[0.08em] text-zinc-500 hover:text-zinc-300 font-semibold transition-colors",children:[a.jsx(ia,{className:B("w-3 h-3 transition-transform shrink-0",r&&"rotate-90")}),a.jsx("span",{children:s}),o&&a.jsx("span",{className:"text-[11px] normal-case tracking-normal text-zinc-600 font-normal ml-auto",children:o})]}),r&&a.jsx("div",{className:"mt-1.5 rounded-md border border-zinc-800 bg-overlay px-4 py-3",children:f})]})}function Hi({children:s,accent:o}){return a.jsx("span",{className:B("font-mono text-[11px] px-2 py-0.5 rounded-full border",o?"bg-blok-green-500/10 text-blok-green-500 border-blok-green-500/25":"bg-raised text-zinc-400 border-zinc-800"),children:s})}function Ky({status:s}){const o={pending:"bg-status-pending",running:"bg-status-running animate-pulse-dot",completed:"bg-status-completed",failed:"bg-status-failed",skipped:"bg-status-skipped"};return a.jsx("span",{className:B("w-2 h-2 rounded-full shrink-0 translate-y-px",o[s])})}function Vy(s){var o;if(s.nodeType==="module"||s.nodeType==="local")return"module";if((o=s.nodeType)!=null&&o.startsWith("runtime."))return"grpc"}function om(s){if(s==null)return"null";if(typeof s!="object")return typeof s;if(Array.isArray(s))return`${s.length} ${s.length===1?"item":"items"}`;const o=Object.keys(s);return`${o.length} ${o.length===1?"key":"keys"}`}function Zy(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function Jy({percent:s,phase:o}){const r=Math.max(0,Math.min(100,s));return a.jsxs("div",{className:"rounded-md border border-blok-green-500/20 bg-blok-green-500/5 px-3 py-2 mb-1",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1.5 text-[10px]",children:[a.jsx("span",{className:"font-medium uppercase tracking-[0.08em] text-blok-green-500",children:"Progress"}),a.jsxs("span",{className:"font-mono text-zinc-300",children:[r,"%",o?` · ${o}`:""]})]}),a.jsx("div",{className:"h-1 rounded-full overflow-hidden bg-zinc-800",children:a.jsx("div",{className:"h-full bg-blok-green-500 transition-all duration-200",style:{width:`${r}%`}})})]})}function $y({runId:s}){const{data:o,isLoading:r}=Ze({queryKey:["run-events",s],queryFn:()=>Jm(s),refetchInterval:3e3});return r?a.jsx("div",{className:"flex justify-center py-8",children:a.jsx(Ye,{className:"w-5 h-5 text-zinc-500 animate-spin"})}):!o||o.length===0?a.jsx("div",{className:"text-center py-8 text-zinc-600 text-xs",children:"No events recorded"}):a.jsx("div",{className:"space-y-0.5 font-mono text-xs",children:o.map(u=>a.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 hover:bg-zinc-800/30 rounded",children:[a.jsx("span",{className:"text-[10px] text-zinc-600 shrink-0 w-20",children:Yi(u.timestamp).split(", ")[1]}),a.jsx("span",{className:B("text-[10px] px-1.5 py-0.5 rounded font-medium shrink-0",vx[u.type]),children:bx[u.type]}),u.nodeName&&a.jsx("span",{className:"text-zinc-400 shrink-0",children:u.nodeName}),a.jsx("span",{className:"text-zinc-600 truncate flex-1",children:u.workflowName}),a.jsx("span",{className:"text-[10px] text-zinc-700 shrink-0",children:u.id.slice(0,8)})]},u.id))})}function go(s){return s==null?"—":s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/1024/1024).toFixed(1)} MB`}function um(s){return s==null?"—":s<1?`${s.toFixed(2)} ms`:s<1e3?`${s.toFixed(1)} ms`:`${(s/1e3).toFixed(2)} s`}function Fy({node:s,logs:o}){if(!s)return a.jsxs("aside",{className:"h-full bg-overlay border-l border-zinc-800 p-5 flex flex-col",children:[a.jsx("h4",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mb-3",children:"Inspector"}),a.jsx("p",{className:"text-xs text-zinc-500 leading-relaxed",children:"Select a step from the rail to see its metrics, wire bytes, and live log tail."}),a.jsx(dm,{})]});const r=s.metrics??{},u=o.filter(f=>f.nodeId===s.id||f.nodeName===s.nodeName);return a.jsxs("aside",{className:"h-full bg-overlay border-l border-zinc-800 p-5 overflow-y-auto flex flex-col",children:[a.jsx("h4",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mb-2",children:"Metrics"}),a.jsxs("div",{className:"grid grid-cols-2 border border-zinc-800 rounded-lg overflow-hidden mb-5",children:[a.jsx(ta,{label:"Wall",value:um(s.durationMs)}),a.jsx(ta,{label:"Wire",value:r.request_bytes!=null||r.response_bytes!=null?`${go(r.request_bytes)} → ${go(r.response_bytes)}`:"—",dim:r.request_bytes==null&&r.response_bytes==null}),a.jsx(ta,{label:"CPU",value:um(r.cpu_ms),dim:!r.cpu_ms}),a.jsx(ta,{label:"Memory",value:go(r.memory_bytes),dim:!r.memory_bytes}),a.jsx(ta,{label:"Depth",value:String(s.depth)}),a.jsx(ta,{label:"Step",value:`${s.stepIndex+1}`})]}),a.jsx("h4",{className:"text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold mb-2",children:"Live tail · this step"}),a.jsxs("div",{className:"bg-canvas border border-zinc-800 rounded-lg flex-1 min-h-0 flex flex-col overflow-hidden",children:[a.jsxs("div",{className:"px-3 py-1.5 border-b border-zinc-800 text-[11px] text-zinc-400 flex items-center gap-2 font-mono",children:[a.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-blok-green-500 animate-pulse-dot"}),"tailing",a.jsx("span",{className:"ml-auto text-zinc-600",children:"SSE"})]}),a.jsx("div",{className:"overflow-y-auto flex-1 px-3 py-2 font-mono text-[11px] leading-snug",children:u.length===0?a.jsx("p",{className:"text-zinc-600 text-[11px]",children:"no logs from this step yet"}):u.slice(-30).map(f=>a.jsxs("div",{className:"text-zinc-300 py-0.5",children:[a.jsx("span",{className:"text-zinc-600 mr-2",children:new Date(f.timestamp).toISOString().slice(11,23)}),a.jsx("span",{className:B("inline-block w-9 mr-1 text-[9px] uppercase tracking-[0.04em] font-semibold",f.level==="info"&&"text-log-info",f.level==="warn"&&"text-log-warn",f.level==="error"&&"text-log-error",f.level==="debug"&&"text-log-debug"),children:f.level}),a.jsx("span",{className:"text-zinc-200",children:f.message})]},f.id))})]}),a.jsx(dm,{})]})}function ta({label:s,value:o,dim:r}){return a.jsxs("div",{className:"p-3 border-r border-b border-zinc-800 last-of-type:border-r-0 [&:nth-child(2n)]:border-r-0 [&:nth-last-child(-n+2)]:border-b-0",children:[a.jsx("div",{className:"text-[10px] uppercase tracking-[0.06em] text-zinc-500 mb-1",children:s}),a.jsx("div",{className:B("font-mono text-sm font-medium",r?"text-zinc-600":"text-zinc-100"),children:o})]})}function dm(){return a.jsxs("div",{className:"mt-5 pt-3 border-t border-zinc-800 flex flex-wrap gap-x-3 gap-y-1.5 text-[11px] text-zinc-600",children:[a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(Bi,{children:"j"}),a.jsx(Bi,{children:"k"})," step"]}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(Bi,{children:"1-5"})," mode"]}),a.jsxs("span",{className:"inline-flex items-center gap-1",children:[a.jsx(Bi,{children:"Esc"})," deselect"]})]})}function Bi({children:s}){return a.jsx("kbd",{className:"font-mono text-[9px] px-1 py-px rounded bg-raised border border-zinc-800 text-zinc-400",children:s})}function Wy({logs:s,nodeNames:o}){const[r,u]=D.useState(""),[f,m]=D.useState(""),[x,p]=D.useState(!0),b=D.useRef(null),z=D.useMemo(()=>s.filter(y=>!(r&&y.level!==r||f&&y.nodeName!==f)),[s,r,f]);return D.useEffect(()=>{x&&b.current&&(b.current.scrollTop=b.current.scrollHeight)},[z.length,x]),a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-zinc-800 shrink-0",children:[a.jsxs("select",{value:r,onChange:y=>u(y.target.value),className:"bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 outline-none focus:border-zinc-600",children:[a.jsx("option",{value:"",children:"All levels"}),a.jsx("option",{value:"debug",children:"Debug"}),a.jsx("option",{value:"info",children:"Info"}),a.jsx("option",{value:"warn",children:"Warn"}),a.jsx("option",{value:"error",children:"Error"})]}),o.length>0&&a.jsxs("select",{value:f,onChange:y=>m(y.target.value),className:"bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-300 outline-none focus:border-zinc-600",children:[a.jsx("option",{value:"",children:"All nodes"}),o.map(y=>a.jsx("option",{value:y,children:y},y))]}),a.jsx("div",{className:"ml-auto",children:a.jsxs("button",{type:"button",onClick:()=>p(!x),className:B("flex items-center gap-1 px-2 py-1 rounded text-xs transition-colors",x?"bg-blue-600/20 text-blue-400":"text-zinc-500 hover:text-zinc-300"),children:[a.jsx(Fg,{className:"w-3 h-3"}),"Auto-scroll"]})})]}),a.jsx("div",{ref:b,className:"flex-1 overflow-y-auto font-mono text-xs",children:z.length===0?a.jsx("div",{className:"text-center py-8 text-zinc-600 text-xs",children:"No log entries"}):z.map(y=>a.jsxs("div",{className:"flex items-start gap-2 px-3 py-1 hover:bg-zinc-800/30 border-b border-zinc-800/30",children:[a.jsx("span",{className:"text-[10px] text-zinc-600 shrink-0 pt-0.5 w-20",children:Yi(y.timestamp).split(", ")[1]}),a.jsx("span",{className:B("text-[10px] uppercase font-bold shrink-0 w-10 pt-0.5",av[y.level]),children:y.level}),y.nodeName&&a.jsx("span",{className:"text-[10px] text-zinc-600 shrink-0 truncate w-20 pt-0.5",children:y.nodeName}),a.jsx("span",{className:"text-zinc-300 break-all flex-1",children:y.message})]},y.id))})]})}const Iy=["GET","POST","PUT","PATCH","DELETE"],Py={GET:"text-green-400",POST:"text-blue-400",PUT:"text-amber-400",PATCH:"text-orange-400",DELETE:"text-red-400"};function e1({defaultMethod:s="GET",defaultPath:o="/",defaultBody:r="",defaultHeaders:u,onClose:f,onRequestSent:m}){const[x,p]=D.useState(s.toUpperCase()),[b,z]=D.useState(o),[y,g]=D.useState(r),[C,S]=D.useState(u?JSON.stringify(u,null,2):"{}"),[A,q]=D.useState(!1),[U,Q]=D.useState(null),[k,Y]=D.useState(null),[G,K]=D.useState(!1),[L,te]=D.useState(!1),[J,ae]=D.useState(!1),Ae=async()=>{q(!0),Y(null),Q(null);try{let P={};try{P=JSON.parse(C)}catch{}const Ue=await ax({method:x,path:b,headers:P,body:x!=="GET"&&x!=="HEAD"?y:void 0});Q(Ue),m==null||m()}catch(P){Y(P instanceof Error?P.message:"Request failed")}finally{q(!1)}},_e=()=>{U&&(navigator.clipboard.writeText(U.body),ae(!0),setTimeout(()=>ae(!1),2e3))},X=U&&U.status>=200&&U.status<300?"text-green-400":U&&U.status>=400?"text-red-400":"text-amber-400";return a.jsxs("div",{className:"flex flex-col h-full",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-zinc-800",children:[a.jsx("h3",{className:"text-sm font-medium text-zinc-200",children:"Request Builder"}),a.jsx("button",{type:"button",onClick:f,className:"p-1 text-zinc-500 hover:text-zinc-300 transition-colors","aria-label":"Close",children:a.jsx(Bt,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsx("select",{value:x,onChange:P=>p(P.target.value),className:B("bg-zinc-800 border border-zinc-700 rounded-md px-2 py-1.5 text-sm font-mono outline-none",Py[x]||"text-zinc-300"),children:Iy.map(P=>a.jsx("option",{value:P,children:P},P))}),a.jsx("input",{value:b,onChange:P=>z(P.target.value),placeholder:"/api/endpoint",className:"flex-1 bg-zinc-800 border border-zinc-700 rounded-md px-3 py-1.5 text-sm font-mono text-zinc-200 placeholder-zinc-500 outline-none focus:border-zinc-600"}),a.jsxs("button",{type:"button",onClick:Ae,disabled:A||!b,className:B("flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",A?"bg-zinc-700 text-zinc-400 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-500"),children:[A?a.jsx(Ye,{className:"w-3.5 h-3.5 animate-spin"}):a.jsx(km,{className:"w-3.5 h-3.5"}),"Send"]})]}),a.jsxs("div",{children:[a.jsxs("button",{type:"button",onClick:()=>K(!G),className:"flex items-center gap-1 text-xs text-zinc-400 hover:text-zinc-300 transition-colors","aria-expanded":G,children:[G?a.jsx(is,{className:"w-3 h-3"}):a.jsx(ia,{className:"w-3 h-3"}),"Headers (JSON)"]}),G&&a.jsx("textarea",{value:C,onChange:P=>S(P.target.value),rows:4,className:"mt-1 w-full bg-zinc-800 border border-zinc-700 rounded-md px-3 py-2 text-xs font-mono text-zinc-300 placeholder-zinc-500 outline-none focus:border-zinc-600 resize-y",placeholder:'{"Authorization": "Bearer ..."}'})]}),x!=="GET"&&x!=="HEAD"&&a.jsxs("div",{children:[a.jsx("label",{htmlFor:"request-body",className:"text-xs text-zinc-400 mb-1 block",children:"Body (JSON)"}),a.jsx("textarea",{id:"request-body",value:y,onChange:P=>g(P.target.value),rows:6,className:"w-full bg-zinc-800 border border-zinc-700 rounded-md px-3 py-2 text-xs font-mono text-zinc-300 placeholder-zinc-500 outline-none focus:border-zinc-600 resize-y",placeholder:'{"key": "value"}'})]}),k&&a.jsx("div",{className:"bg-red-500/10 border border-red-500/20 rounded-md px-3 py-2 text-xs text-red-400",children:k}),U&&a.jsxs("div",{className:"border border-zinc-700 rounded-md overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-800/50 border-b border-zinc-700",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-xs text-zinc-400",children:"Response"}),a.jsx("span",{className:B("text-sm font-mono font-medium",X),children:U.status})]}),a.jsx("button",{type:"button",onClick:_e,className:"p-1 text-zinc-500 hover:text-zinc-300 transition-colors",title:"Copy response body","aria-label":"Copy response body",children:J?a.jsx(sa,{className:"w-3 h-3 text-green-400"}):a.jsx(Mo,{className:"w-3 h-3"})})]}),a.jsxs("div",{className:"border-b border-zinc-800",children:[a.jsxs("button",{type:"button",onClick:()=>te(!L),className:"flex items-center gap-1 px-3 py-1.5 text-[10px] text-zinc-500 hover:text-zinc-400 w-full text-left","aria-expanded":L,children:[L?a.jsx(is,{className:"w-3 h-3"}):a.jsx(ia,{className:"w-3 h-3"}),"Headers (",Object.keys(U.headers).length,")"]}),L&&a.jsx("div",{className:"px-3 pb-2",children:Object.entries(U.headers).map(([P,Ue])=>a.jsxs("div",{className:"text-[10px] font-mono",children:[a.jsxs("span",{className:"text-zinc-500",children:[P,": "]}),a.jsx("span",{className:"text-zinc-400",children:Ue})]},P))})]}),a.jsx("div",{className:"p-3 max-h-64 overflow-y-auto",children:fm(U.body)?a.jsx(Ot,{data:fm(U.body),maxDepth:6}):a.jsx("pre",{className:"text-xs font-mono text-zinc-300 whitespace-pre-wrap break-all",children:U.body})})]})]})]})}function fm(s){try{return JSON.parse(s)}catch{return null}}function na(s,o,r){let u=r.initialDeps??[],f,m=!0;function x(){var p,b,z;let y;r.key&&((p=r.debug)!=null&&p.call(r))&&(y=Date.now());const g=s();if(!(g.length!==u.length||g.some((A,q)=>u[q]!==A)))return f;u=g;let S;if(r.key&&((b=r.debug)!=null&&b.call(r))&&(S=Date.now()),f=o(...g),r.key&&((z=r.debug)!=null&&z.call(r))){const A=Math.round((Date.now()-y)*100)/100,q=Math.round((Date.now()-S)*100)/100,U=q/16,Q=(k,Y)=>{for(k=String(k);k.length<Y;)k=" "+k;return k};console.info(`%c⏱ ${Q(q,5)} /${Q(A,5)} ms`,`
|
|
40
|
+
font-size: .6rem;
|
|
41
|
+
font-weight: bold;
|
|
42
|
+
color: hsl(${Math.max(0,Math.min(120-120*U,120))}deg 100% 31%);`,r==null?void 0:r.key)}return r!=null&&r.onChange&&!(m&&r.skipInitialOnChange)&&r.onChange(f),m=!1,f}return x.updateDeps=p=>{u=p},x}function mm(s,o){if(s===void 0)throw new Error("Unexpected undefined");return s}const t1=(s,o)=>Math.abs(s-o)<1.01,n1=(s,o,r)=>{let u;return function(...f){s.clearTimeout(u),u=s.setTimeout(()=>o.apply(this,f),r)}},xm=s=>{const{offsetWidth:o,offsetHeight:r}=s;return{width:o,height:r}},l1=s=>s,a1=s=>{const o=Math.max(s.startIndex-s.overscan,0),r=Math.min(s.endIndex+s.overscan,s.count-1),u=[];for(let f=o;f<=r;f++)u.push(f);return u},s1=(s,o)=>{const r=s.scrollElement;if(!r)return;const u=s.targetWindow;if(!u)return;const f=x=>{const{width:p,height:b}=x;o({width:Math.round(p),height:Math.round(b)})};if(f(xm(r)),!u.ResizeObserver)return()=>{};const m=new u.ResizeObserver(x=>{const p=()=>{const b=x[0];if(b!=null&&b.borderBoxSize){const z=b.borderBoxSize[0];if(z){f({width:z.inlineSize,height:z.blockSize});return}}f(xm(r))};s.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(p):p()});return m.observe(r,{box:"border-box"}),()=>{m.unobserve(r)}},hm={passive:!0},pm=typeof window>"u"?!0:"onscrollend"in window,i1=(s,o)=>{const r=s.scrollElement;if(!r)return;const u=s.targetWindow;if(!u)return;let f=0;const m=s.options.useScrollendEvent&&pm?()=>{}:n1(u,()=>{o(f,!1)},s.options.isScrollingResetDelay),x=y=>()=>{const{horizontal:g,isRtl:C}=s.options;f=g?r.scrollLeft*(C&&-1||1):r.scrollTop,m(),o(f,y)},p=x(!0),b=x(!1);r.addEventListener("scroll",p,hm);const z=s.options.useScrollendEvent&±return z&&r.addEventListener("scrollend",b,hm),()=>{r.removeEventListener("scroll",p),z&&r.removeEventListener("scrollend",b)}},c1=(s,o,r)=>{if(o!=null&&o.borderBoxSize){const u=o.borderBoxSize[0];if(u)return Math.round(u[r.options.horizontal?"inlineSize":"blockSize"])}return s[r.options.horizontal?"offsetWidth":"offsetHeight"]},r1=(s,{adjustments:o=0,behavior:r},u)=>{var f,m;const x=s+o;(m=(f=u.scrollElement)==null?void 0:f.scrollTo)==null||m.call(f,{[u.options.horizontal?"left":"top"]:x,behavior:r})};class o1{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.currentScrollToIndex=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let r=null;const u=()=>r||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:r=new this.targetWindow.ResizeObserver(f=>{f.forEach(m=>{const x=()=>{this._measureElement(m.target,m)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(x):x()})}));return{disconnect:()=>{var f;(f=u())==null||f.disconnect(),r=null},observe:f=>{var m;return(m=u())==null?void 0:m.observe(f,{box:"border-box"})},unobserve:f=>{var m;return(m=u())==null?void 0:m.unobserve(f)}}})(),this.range=null,this.setOptions=r=>{Object.entries(r).forEach(([u,f])=>{typeof f>"u"&&delete r[u]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:l1,rangeExtractor:a1,onChange:()=>{},measureElement:c1,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...r}},this.notify=r=>{var u,f;(f=(u=this.options).onChange)==null||f.call(u,this,r)},this.maybeNotify=na(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),r=>{this.notify(r)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(r=>r()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var r;const u=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==u){if(this.cleanup(),!u){this.maybeNotify();return}this.scrollElement=u,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((r=this.scrollElement)==null?void 0:r.window)??null,this.elementsCache.forEach(f=>{this.observer.observe(f)}),this.unsubs.push(this.options.observeElementRect(this,f=>{this.scrollRect=f,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(f,m)=>{this.scrollAdjustments=0,this.scrollDirection=m?this.getScrollOffset()<f?"forward":"backward":null,this.scrollOffset=f,this.isScrolling=m,this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(r,u)=>{const f=new Map,m=new Map;for(let x=u-1;x>=0;x--){const p=r[x];if(f.has(p.lane))continue;const b=m.get(p.lane);if(b==null||p.end>b.end?m.set(p.lane,p):p.end<b.end&&f.set(p.lane,!0),f.size===this.options.lanes)break}return m.size===this.options.lanes?Array.from(m.values()).sort((x,p)=>x.end===p.end?x.index-p.index:x.end-p.end)[0]:void 0},this.getMeasurementOptions=na(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(r,u,f,m,x,p)=>(this.prevLanes!==void 0&&this.prevLanes!==p&&(this.lanesChangedFlag=!0),this.prevLanes=p,this.pendingMeasuredCacheIndexes=[],{count:r,paddingStart:u,scrollMargin:f,getItemKey:m,enabled:x,lanes:p}),{key:!1}),this.getMeasurements=na(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:r,paddingStart:u,scrollMargin:f,getItemKey:m,enabled:x,lanes:p},b)=>{if(!x)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>r)for(const C of this.laneAssignments.keys())C>=r&&this.laneAssignments.delete(C);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(C=>{this.itemSizeCache.set(C.key,C.size)}));const z=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===r&&(this.lanesSettling=!1);const y=this.measurementsCache.slice(0,z),g=new Array(p).fill(void 0);for(let C=0;C<z;C++){const S=y[C];S&&(g[S.lane]=C)}for(let C=z;C<r;C++){const S=m(C),A=this.laneAssignments.get(C);let q,U;if(A!==void 0&&this.options.lanes>1){q=A;const G=g[q],K=G!==void 0?y[G]:void 0;U=K?K.end+this.options.gap:u+f}else{const G=this.options.lanes===1?y[C-1]:this.getFurthestMeasurement(y,C);U=G?G.end+this.options.gap:u+f,q=G?G.lane:C%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(C,q)}const Q=b.get(S),k=typeof Q=="number"?Q:this.options.estimateSize(C),Y=U+k;y[C]={index:C,start:U,size:k,end:Y,key:S,lane:q},g[q]=C}return this.measurementsCache=y,y},{key:!1,debug:()=>this.options.debug}),this.calculateRange=na(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(r,u,f,m)=>this.range=r.length>0&&u>0?u1({measurements:r,outerSize:u,scrollOffset:f,lanes:m}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=na(()=>{let r=null,u=null;const f=this.calculateRange();return f&&(r=f.startIndex,u=f.endIndex),this.maybeNotify.updateDeps([this.isScrolling,r,u]),[this.options.rangeExtractor,this.options.overscan,this.options.count,r,u]},(r,u,f,m,x)=>m===null||x===null?[]:r({startIndex:m,endIndex:x,overscan:u,count:f}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=r=>{const u=this.options.indexAttribute,f=r.getAttribute(u);return f?parseInt(f,10):(console.warn(`Missing attribute name '${u}={index}' on measured element.`),-1)},this._measureElement=(r,u)=>{const f=this.indexFromElement(r),m=this.measurementsCache[f];if(!m)return;const x=m.key,p=this.elementsCache.get(x);p!==r&&(p&&this.observer.unobserve(p),this.observer.observe(r),this.elementsCache.set(x,r)),r.isConnected&&this.resizeItem(f,this.options.measureElement(r,u,this))},this.resizeItem=(r,u)=>{const f=this.measurementsCache[r];if(!f)return;const m=this.itemSizeCache.get(f.key)??f.size,x=u-m;x!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(f,x,this):f.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=x,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(f.index),this.itemSizeCache=new Map(this.itemSizeCache.set(f.key,u)),this.notify(!1))},this.measureElement=r=>{if(!r){this.elementsCache.forEach((u,f)=>{u.isConnected||(this.observer.unobserve(u),this.elementsCache.delete(f))});return}this._measureElement(r,void 0)},this.getVirtualItems=na(()=>[this.getVirtualIndexes(),this.getMeasurements()],(r,u)=>{const f=[];for(let m=0,x=r.length;m<x;m++){const p=r[m],b=u[p];f.push(b)}return f},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=r=>{const u=this.getMeasurements();if(u.length!==0)return mm(u[Lx(0,u.length-1,f=>mm(u[f]).start,r)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const r=this.scrollElement.document.documentElement;return this.options.horizontal?r.scrollWidth-this.scrollElement.innerWidth:r.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(r,u,f=0)=>{if(!this.scrollElement)return 0;const m=this.getSize(),x=this.getScrollOffset();u==="auto"&&(u=r>=x+m?"end":"start"),u==="center"?r+=(f-m)/2:u==="end"&&(r-=m);const p=this.getMaxScrollOffset();return Math.max(Math.min(p,r),0)},this.getOffsetForIndex=(r,u="auto")=>{r=Math.max(0,Math.min(r,this.options.count-1));const f=this.measurementsCache[r];if(!f)return;const m=this.getSize(),x=this.getScrollOffset();if(u==="auto")if(f.end>=x+m-this.options.scrollPaddingEnd)u="end";else if(f.start<=x+this.options.scrollPaddingStart)u="start";else return[x,u];if(u==="end"&&r===this.options.count-1)return[this.getMaxScrollOffset(),u];const p=u==="end"?f.end+this.options.scrollPaddingEnd:f.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(p,u,f.size),u]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(r,{align:u="start",behavior:f}={})=>{f==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(r,u),{adjustments:void 0,behavior:f})},this.scrollToIndex=(r,{align:u="auto",behavior:f}={})=>{f==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),r=Math.max(0,Math.min(r,this.options.count-1)),this.currentScrollToIndex=r;let m=0;const x=10,p=z=>{if(!this.targetWindow)return;const y=this.getOffsetForIndex(r,z);if(!y){console.warn("Failed to get offset for index:",r);return}const[g,C]=y;this._scrollToOffset(g,{adjustments:void 0,behavior:f}),this.targetWindow.requestAnimationFrame(()=>{const S=()=>{if(this.currentScrollToIndex!==r)return;const A=this.getScrollOffset(),q=this.getOffsetForIndex(r,C);if(!q){console.warn("Failed to get offset for index:",r);return}t1(q[0],A)||b(C)};this.isDynamicMode()?this.targetWindow.requestAnimationFrame(S):S()})},b=z=>{this.targetWindow&&this.currentScrollToIndex===r&&(m++,m<x?this.targetWindow.requestAnimationFrame(()=>p(z)):console.warn(`Failed to scroll to index ${r} after ${x} attempts.`))};p(u)},this.scrollBy=(r,{behavior:u}={})=>{u==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+r,{adjustments:void 0,behavior:u})},this.getTotalSize=()=>{var r;const u=this.getMeasurements();let f;if(u.length===0)f=this.options.paddingStart;else if(this.options.lanes===1)f=((r=u[u.length-1])==null?void 0:r.end)??0;else{const m=Array(this.options.lanes).fill(null);let x=u.length-1;for(;x>=0&&m.some(p=>p===null);){const p=u[x];m[p.lane]===null&&(m[p.lane]=p.end),x--}f=Math.max(...m.filter(p=>p!==null))}return Math.max(f-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(r,{adjustments:u,behavior:f})=>{this.options.scrollToFn(r,{behavior:f,adjustments:u},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(o)}}const Lx=(s,o,r,u)=>{for(;s<=o;){const f=(s+o)/2|0,m=r(f);if(m<u)s=f+1;else if(m>u)o=f-1;else return f}return s>0?s-1:0};function u1({measurements:s,outerSize:o,scrollOffset:r,lanes:u}){const f=s.length-1,m=b=>s[b].start;if(s.length<=u)return{startIndex:0,endIndex:f};let x=Lx(0,f,m,r),p=x;if(u===1)for(;p<f&&s[p].end<r+o;)p++;else if(u>1){const b=Array(u).fill(0);for(;p<f&&b.some(y=>y<r+o);){const y=s[p];b[y.lane]=y.end,p++}const z=Array(u).fill(r+o);for(;x>=0&&z.some(y=>y>=r);){const y=s[x];z[y.lane]=y.start,x--}x=Math.max(0,x-x%u),p=Math.min(f,p+(u-1-p%u))}return{startIndex:x,endIndex:p}}const gm=typeof document<"u"?D.useLayoutEffect:D.useEffect;function d1({useFlushSync:s=!0,...o}){const r=D.useReducer(()=>({}),{})[1],u={...o,onChange:(m,x)=>{var p;s&&x?vg.flushSync(r):r(),(p=o.onChange)==null||p.call(o,m,x)}},[f]=D.useState(()=>new o1(u));return f.setOptions(u),gm(()=>f._didMount(),[]),gm(()=>f._willUpdate()),f}function f1(s){return d1({observeElementRect:s1,observeElementOffset:i1,scrollToFn:r1,...s})}const m1=50,x1=30;function h1({nodes:s,activeStepId:o,onSelect:r}){const u=D.useMemo(()=>s.slice().sort((g,C)=>g.stepIndex-C.stepIndex),[s]),f=s.filter(g=>g.status==="completed").length,m=s.filter(g=>g.status==="failed").length,x=s.filter(g=>g.status==="running").length,p=D.useRef(null),b=u.length>=m1,z=f1({count:b?u.length:0,getScrollElement:()=>p.current,estimateSize:()=>x1,overscan:8}),y=(g,C)=>a.jsxs("button",{type:"button",onClick:()=>r(g.id),style:g.depth>0?{paddingLeft:`${16+g.depth*12}px`}:void 0,className:B("relative w-full flex items-center gap-2.5 pl-4 pr-3 py-1.5 text-[12.5px] cursor-pointer transition-colors text-left",C?"bg-blok-green-500/10 text-zinc-100 before:content-[''] before:absolute before:left-0 before:top-1.5 before:bottom-1.5 before:w-0.5 before:bg-blok-green-500 before:rounded-r":"text-zinc-400 hover:bg-hover hover:text-zinc-200"),children:[a.jsx("span",{className:"font-mono text-[10px] text-zinc-600 w-3 shrink-0",children:g.stepIndex+1}),a.jsx("span",{className:B("w-1.5 h-1.5 rounded-full shrink-0 transition-status",ds[g.status],g.status==="running"&&"animate-pulse-dot")}),a.jsx("span",{className:"flex-1 truncate",children:g.nodeName}),g.nodeType==="subworkflow"&&a.jsxs("span",{className:B("font-mono text-[9px] uppercase tracking-wide px-1 py-px rounded shrink-0",g.wait===!1?"bg-orange-300/15 text-orange-300":"bg-zinc-700/40 text-zinc-300"),title:g.wait===!1?`Async sub-workflow (fire-and-forget) — child runs independently; parent does NOT block${g.subworkflowDepth&&g.subworkflowDepth>=2?` · nested at depth ${g.subworkflowDepth}`:""}`:`Sub-workflow invocation (synchronous) — see Sub-runs in the header${g.subworkflowDepth&&g.subworkflowDepth>=2?` · nested at depth ${g.subworkflowDepth}`:""}`,children:[g.wait===!1?"↳ async":"↳ sub",g.subworkflowDepth&&g.subworkflowDepth>=2?` (${g.subworkflowDepth})`:""]}),g.nodeType==="wait"&&a.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wide px-1 py-px rounded bg-cyan-300/15 text-cyan-300 shrink-0",title:"Wait step — workflow paused until the deadline fires",children:"↳ wait"}),g.cached&&a.jsx("span",{className:"font-mono text-[9px] uppercase tracking-wide px-1 py-px rounded bg-blok-green-500/15 text-blok-green-500 shrink-0",title:`Reused result from run ${g.cached.sourceRunId}`,children:"cached"}),g.attempts&&g.attempts.length>0&&a.jsxs("span",{className:"font-mono text-[9px] px-1 py-px rounded bg-status-warning/15 text-status-warning shrink-0",title:`${g.attempts.length} failed attempt${g.attempts.length===1?"":"s"} before outcome`,children:["↻",g.attempts.length]}),g.durationMs!=null&&a.jsx("span",{className:B("font-mono text-[10.5px] shrink-0",g.status==="failed"?"text-status-failed":C?"text-zinc-300":"text-zinc-600"),children:g.durationMs<1e3?`${g.durationMs} ms`:`${(g.durationMs/1e3).toFixed(2)} s`})]});return a.jsxs("aside",{ref:p,className:"h-full bg-canvas border-r border-zinc-800 overflow-y-auto py-2",children:[a.jsxs("div",{className:"px-4 pt-2 pb-2 flex items-center justify-between text-[10px] uppercase tracking-[0.08em] text-zinc-500 font-semibold",children:[a.jsx("span",{children:"Steps"}),a.jsxs("span",{className:B("font-mono normal-case tracking-normal",m>0?"text-status-failed":"text-zinc-400"),children:[m>0?`${m} failed`:`${f} / ${s.length}`,x>0&&a.jsxs("span",{className:"text-status-running",children:[" · ",x," running"]})]})]}),b?a.jsx("ul",{className:"relative mt-1 list-none p-0 m-0",style:{height:`${z.getTotalSize()}px`},"aria-label":`${u.length} steps`,children:z.getVirtualItems().map(g=>{const C=u[g.index];return C?a.jsx("li",{className:"absolute left-0 right-0",style:{top:0,transform:`translateY(${g.start}px)`,height:`${g.size}px`},children:y(C,C.id===o)},C.id):null})}):a.jsx("ul",{className:"mt-1",children:u.map(g=>a.jsx("li",{children:y(g,g.id===o)},g.id))})]})}var p1=eb();const bm=fg(p1),vm=180,ym=50;function g1({nodes:s,selectedNodeId:o,onSelectNode:r}){const{flowNodes:u,flowEdges:f}=D.useMemo(()=>{var C;const p=new bm.graphlib.Graph;p.setDefaultEdgeLabel(()=>({})),p.setGraph({rankdir:"TB",nodesep:30,ranksep:50});for(const S of s)p.setNode(S.id,{width:vm,height:ym});const b=[...s].sort((S,A)=>S.stepIndex-A.stepIndex);for(let S=1;S<b.length;S++){const A=b[S-1],q=b[S];if(!(!A||!q)){if(q.parentNodeId)p.setEdge(q.parentNodeId,q.id);else if(A.depth===q.depth)p.setEdge(A.id,q.id);else if(q.depth<A.depth)for(let U=S-1;U>=0;U--){const Q=b[U];if(Q&&Q.depth===q.depth){p.setEdge(Q.id,q.id);break}}}}bm.layout(p);const z=s.map(S=>{const A=p.node(S.id);return{id:S.id,type:"traceNode",position:{x:((A==null?void 0:A.x)||0)-vm/2,y:((A==null?void 0:A.y)||0)-ym/2},data:{node:S,selected:o===S.id}}}),y=[],g=p.edges();for(const S of g)y.push({id:`${S.v}-${S.w}`,source:S.v,target:S.w,animated:((C=s.find(A=>A.id===S.w))==null?void 0:C.status)==="running",style:{stroke:"#3f3f46",strokeWidth:1.5}});return{flowNodes:z,flowEdges:y}},[s,o]),m=D.useCallback((p,b)=>{r(b.id)},[r]),x=D.useMemo(()=>({traceNode:b1}),[]);return a.jsx("div",{className:"h-[500px] rounded-lg border border-zinc-800 overflow-hidden",children:a.jsxs(tb,{nodes:u,edges:f,nodeTypes:x,onNodeClick:m,fitView:!0,fitViewOptions:{padding:.2},proOptions:{hideAttribution:!0},minZoom:.3,maxZoom:2,children:[a.jsx(nb,{color:"#27272a",gap:16,size:1}),a.jsx(lb,{showInteractive:!1,className:"bg-zinc-900! border-zinc-700! rounded-md! [&>button]:bg-zinc-800! [&>button]:border-zinc-700! [&>button]:text-zinc-400! [&>button:hover]:bg-zinc-700!"}),a.jsx(ab,{nodeStrokeColor:"#3f3f46",nodeColor:p=>{const b=p.data.node.status;return b==="completed"?"#22c55e":b==="running"?"#3b82f6":b==="failed"?"#ef4444":"#52525b"},maskColor:"rgba(0,0,0,0.6)",className:"bg-zinc-900! border-zinc-700! rounded-md!"})]})})}function b1({data:s}){const{node:o,selected:r}=s;return a.jsxs(a.Fragment,{children:[a.jsx(K0,{type:"target",position:V0.Top,className:"bg-zinc-600! w-2! h-2! border-0!"}),a.jsxs("div",{className:B("rounded-md border px-3 py-2 min-w-[160px] transition-all",r?"border-blue-500 bg-zinc-800 ring-1 ring-blue-500/30":"border-zinc-700 bg-zinc-900 hover:border-zinc-600"),children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:B("w-2 h-2 rounded-full shrink-0",ds[o.status],o.status==="running"&&"animate-pulse-dot")}),a.jsx("span",{className:"text-xs font-medium text-zinc-200 truncate",children:o.nodeName})]}),a.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o.runtimeKind&&a.jsx("span",{className:"text-[10px] text-zinc-500",children:o.runtimeKind}),a.jsx("span",{className:"text-[10px] font-mono text-zinc-500 ml-auto",children:o.status==="running"?"...":be(o.durationMs)})]})]}),a.jsx(K0,{type:"source",position:V0.Bottom,className:"bg-zinc-600! w-2! h-2! border-0!"})]})}const v1="modulepreload",y1=function(s){return"/"+s},jm={},j1=function(o,r,u){let f=Promise.resolve();if(r&&r.length>0){let x=function(z){return Promise.all(z.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const p=document.querySelector("meta[property=csp-nonce]"),b=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));f=x(r.map(z=>{if(z=y1(z),z in jm)return;jm[z]=!0;const y=z.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${z}"]${g}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":v1,y||(C.as="script"),C.crossOrigin="",C.href=z,b&&C.setAttribute("nonce",b),document.head.appendChild(C),y)return new Promise((S,A)=>{C.addEventListener("load",S),C.addEventListener("error",()=>A(new Error(`Unable to preload CSS for ${z}`)))})}))}function m(x){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=x,window.dispatchEvent(p),!p.defaultPrevented)throw x}return f.then(x=>{for(const p of x||[])p.status==="rejected"&&m(p.reason);return o().catch(m)})};function N1(s){return Ze({queryKey:["run",s],queryFn:()=>Zm(s),enabled:!!s})}function z1(s){return Ze({queryKey:["run",s,"subruns"],queryFn:()=>j1(()=>Promise.resolve().then(()=>ev),void 0).then(o=>o.fetchSubRuns(s)),enabled:!!s})}function S1(s){const o=Gt(),r=ml(x=>x.incrementStreams),u=ml(x=>x.decrementStreams),f=ml(x=>x.setStatus),m=D.useCallback(x=>{o.setQueryData(["run",s],p=>{var z,y,g,C;if(!p)return p;const b={...p};switch(x.type){case"RUN_COMPLETED":case"RUN_FAILED":b.run={...b.run,status:x.type==="RUN_COMPLETED"?"completed":"failed",finishedAt:x.timestamp,durationMs:x.timestamp-b.run.startedAt,...x.type==="RUN_FAILED"&&x.payload?{error:x.payload}:{}};break;case"NODE_STARTED":{const S=x.nodeId||x.id;if(b.nodes.some(q=>q.id===S))break;const A={id:S,runId:s,nodeName:x.nodeName||"",nodeType:((z=x.payload)==null?void 0:z.nodeType)||"unknown",runtimeKind:(y=x.payload)==null?void 0:y.runtimeKind,status:"running",startedAt:x.timestamp,depth:((g=x.payload)==null?void 0:g.depth)||0,stepIndex:((C=x.payload)==null?void 0:C.stepIndex)||0};b.nodes=[...b.nodes,A],b.run={...b.run,status:"running"};break}case"NODE_COMPLETED":{b.nodes=b.nodes.map(S=>{var A,q;return S.id===x.nodeId||S.nodeName===x.nodeName?{...S,status:"completed",finishedAt:x.timestamp,durationMs:x.timestamp-S.startedAt,outputs:(A=x.payload)==null?void 0:A.outputs,metrics:(q=x.payload)==null?void 0:q.metrics}:S}),b.run={...b.run,completedNodes:b.run.completedNodes+1};break}case"NODE_FAILED":{b.nodes=b.nodes.map(S=>S.id===x.nodeId||S.nodeName===x.nodeName?{...S,status:"failed",finishedAt:x.timestamp,durationMs:x.timestamp-S.startedAt,error:x.payload}:S);break}case"NODE_SKIPPED":{b.nodes=b.nodes.map(S=>S.id===x.nodeId||S.nodeName===x.nodeName?{...S,status:"skipped"}:S);break}case"LOG_ENTRY":{const S=x.payload;if(S){if(b.logs.some(q=>q.id===x.id))break;const A={id:x.id,runId:s,nodeId:x.nodeId,nodeName:x.nodeName,level:S.level||"info",message:S.message||"",timestamp:x.timestamp,data:S.data};b.logs=[...b.logs,A]}break}case"NODE_PROGRESS":{const S=x.payload;if(!S)break;b.nodes=b.nodes.map(A=>A.id===x.nodeId||A.nodeName===x.nodeName?{...A,progress:{percent:Math.max(0,Math.min(100,Number(S.percent??0))),phase:S.phase||"",updatedAt:x.timestamp}}:A);break}case"NODE_PARTIAL_RESULT":{const S=x.payload;if(!S)break;b.nodes=b.nodes.map(A=>A.id===x.nodeId||A.nodeName===x.nodeName?{...A,partialResult:{snapshot:S.snapshot,updatedAt:x.timestamp}}:A);break}}return b})},[o,s]);D.useEffect(()=>{if(!s)return;r(),f("connecting");const x=pv(s,{onEvent:m,onOpen:()=>f("connected"),onEnd:()=>{f("connected"),u(),o.invalidateQueries({queryKey:["run",s]}),o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["workflows"]})},onError:()=>f("error")});return()=>{x(),u()}},[s,m,r,u,f,o])}const qx=Dt("/runs/$runId")({component:w1});function w1(){const{runId:s}=qx.useParams(),o=xl(),{data:r,isLoading:u,error:f}=N1(s),[m,x]=D.useState(null),[p,b]=D.useState("step"),[z,y]=D.useState(!1),[g,C]=D.useState(null);S1(s);const{data:S}=z1(s);D.useEffect(()=>{if(m||!r||r.nodes.length===0)return;const J=r.nodes.find(X=>X.status==="failed"),ae=r.nodes.find(X=>X.status==="running"),Ae=r.nodes.slice().sort((X,P)=>X.stepIndex-P.stepIndex)[0],_e=J??ae??Ae;_e&&x(_e.id)},[r,m]),D.useEffect(()=>{const J=ae=>{if(!(ae.target instanceof HTMLInputElement||ae.target instanceof HTMLSelectElement||ae.target instanceof HTMLTextAreaElement)&&!(ae.metaKey||ae.ctrlKey)){if((ae.key==="j"||ae.key==="k")&&r){ae.preventDefault();const Ae=r.nodes.slice().sort((Ue,tt)=>Ue.stepIndex-tt.stepIndex);if(Ae.length===0)return;const _e=Ae.findIndex(Ue=>Ue.id===m),X=ae.key==="j"?Math.min(_e+1,Ae.length-1):Math.max(_e-1,0),P=Ae[X];P&&x(P.id);return}switch(ae.key){case"1":b("step");break;case"2":b("graph");break;case"3":b("logs");break;case"4":b("events");break;case"5":b("request");break;case"Escape":b("step");break}}};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[r,m]);const A=D.useMemo(()=>!r||!m?null:r.nodes.find(J=>J.id===m)||null,[r,m]),q=D.useMemo(()=>r?[...new Set(r.nodes.map(J=>J.nodeName))]:[],[r]),U=D.useMemo(()=>{if(!r)return{method:"GET",path:"/"};const J=r.run.triggerSummary.split(" ");return{method:J[0]||"GET",path:J[1]||"/"}},[r]),Q=async()=>{if(!(!r||z)){y(!0),C(null);try{const J=await Oo(s);o({to:"/runs/$runId",params:{runId:J.newRunId}})}catch(J){C(J instanceof Error?J.message:"Replay failed")}finally{y(!1)}}};if(u)return a.jsx("div",{className:"flex items-center justify-center h-full",children:a.jsx(Ye,{className:"w-6 h-6 text-zinc-500 animate-spin"})});if(f||!r)return a.jsx("div",{className:"p-6",children:a.jsx(Pe,{icon:a.jsx(Gn,{className:"w-12 h-12"}),title:"Run not found",description:`No run with ID "${s}" was found.`})});const{run:k,nodes:Y,logs:G}=r,K=k.triggerType==="http",L=k.status==="completed"||k.status==="failed"||k.status==="cancelled",te=[{key:"step",label:"Active step",show:!0},{key:"graph",label:"Graph",show:!0},{key:"logs",label:"Logs",show:!0},{key:"events",label:"Events",show:!0},{key:"request",label:"Replay",show:K}];return a.jsxs("div",{className:"h-full flex flex-col",children:[a.jsxs("header",{className:"shrink-0 border-b border-zinc-800 bg-canvas/60 px-4 py-3",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[a.jsx(Qe,{to:"/workflows/$name",params:{name:k.workflowName},className:"p-1 rounded hover:bg-hover text-zinc-500 hover:text-zinc-300 transition-colors",children:a.jsx(Ao,{className:"w-4 h-4"})}),a.jsx("span",{className:"text-sm text-zinc-500",children:k.workflowName}),a.jsx("span",{className:"text-zinc-700",children:"/"}),a.jsx("span",{className:"text-sm font-mono text-zinc-400",children:k.id.slice(0,12)}),a.jsx(fs,{status:k.status}),a.jsx(Ox,{ms:k.status==="running"?k.startedAt:k.durationMs,running:k.status==="running"}),k.replayOf&&a.jsxs(Qe,{to:"/runs/$runId",params:{runId:k.replayOf},className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono uppercase tracking-wide bg-raised text-zinc-400 hover:text-zinc-100 hover:bg-hover transition-colors",title:`Replay of run ${k.replayOf}`,children:[a.jsx(vo,{className:"w-2.5 h-2.5"}),"replay of ",k.replayOf.slice(0,8)]}),k.parentRunId&&a.jsxs(Qe,{to:"/runs/$runId",params:{runId:k.parentRunId},className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono uppercase tracking-wide bg-raised text-zinc-400 hover:text-zinc-100 hover:bg-hover transition-colors",title:`Called from run ${k.parentRunId}`,children:[a.jsx(cs,{className:"w-2.5 h-2.5"}),"called from ",k.parentRunId.slice(0,8)]}),a.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[L&&K&&a.jsxs("button",{type:"button",onClick:Q,disabled:z,className:B("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-colors",z?"bg-raised text-zinc-500 cursor-not-allowed":"bg-raised text-zinc-300 hover:bg-hover hover:text-zinc-100"),title:"Replay this run with the same request",children:[z?a.jsx(Ye,{className:"w-3 h-3 animate-spin"}):a.jsx(vo,{className:"w-3 h-3"}),"Replay"]}),K&&a.jsxs("button",{type:"button",onClick:()=>b("request"),className:B("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-colors",p==="request"?"bg-blok-green-500/15 text-blok-green-500":"bg-raised text-zinc-300 hover:bg-hover hover:text-zinc-100"),title:"Open request builder",children:[a.jsx(km,{className:"w-3 h-3"}),"Request"]}),k.status==="failed"&&k.error&&a.jsx(Ux,{runId:s}),a.jsx(Ax,{onExportJson:()=>_o(s),onExportCsv:()=>Uo(s)})]})]}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-zinc-500 ml-9",children:[a.jsxs("span",{children:["Trigger: ",a.jsx("span",{className:"text-zinc-400 font-mono",children:k.triggerSummary})]}),a.jsxs("span",{children:["Started: ",a.jsx("span",{className:"text-zinc-400",children:Yi(k.startedAt)})]}),a.jsxs("span",{children:["Nodes:"," ",a.jsxs("span",{className:"text-zinc-400",children:[k.completedNodes,"/",k.nodeCount]})]}),g&&a.jsx("span",{className:"text-red-400",children:g})]}),a.jsx("div",{className:"ml-9 mt-1",children:a.jsx(_y,{runId:k.id,tags:k.tags||[]})}),S&&S.length>0&&a.jsxs("div",{className:"ml-9 mt-2 flex items-center gap-2 text-[11px] text-zinc-500 flex-wrap",children:[a.jsxs("span",{className:"flex items-center gap-1 uppercase tracking-wide font-semibold text-zinc-500",children:[a.jsx(cs,{className:"w-3 h-3"}),"sub-runs (",S.length,")"]}),S.map(J=>a.jsxs(Qe,{to:"/runs/$runId",params:{runId:J.id},className:"flex items-center gap-1.5 px-1.5 py-0.5 rounded font-mono bg-raised hover:bg-hover text-zinc-400 hover:text-zinc-100 transition-colors",title:`${J.workflowName} · ${J.status}`,children:[a.jsx("span",{className:B("w-1.5 h-1.5 rounded-full shrink-0",J.status==="completed"&&"bg-green-500",J.status==="failed"&&"bg-red-500",J.status==="running"&&"bg-blue-500 animate-pulse",J.status==="cancelled"&&"bg-zinc-500",J.status==="pending"&&"bg-zinc-600")}),J.workflowName,a.jsx("span",{className:"text-zinc-600",children:J.id.slice(0,8)})]},J.id))]})]}),a.jsxs("div",{className:"flex-1 grid grid-cols-[240px_minmax(0,1fr)_320px] overflow-hidden",children:[a.jsx(h1,{nodes:Y,activeStepId:m,onSelect:x}),a.jsxs("main",{className:"flex flex-col overflow-hidden bg-canvas",children:[a.jsx("nav",{className:"flex gap-0 border-b border-zinc-800 px-4 sticky top-0 bg-canvas z-10",children:te.filter(J=>J.show).map((J,ae)=>a.jsxs("button",{type:"button",onClick:()=>b(J.key),className:B("px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px flex items-center gap-1.5",p===J.key?"border-blok-green-500 text-zinc-100":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[J.label,a.jsx("kbd",{className:"font-mono text-[9.5px] px-1 py-px rounded bg-raised border border-zinc-800 text-zinc-500",children:ae+1})]},J.key))}),a.jsxs("div",{className:"flex-1 overflow-y-auto",children:[p==="step"&&(A?a.jsx(Xy,{node:A,logs:G,totalSteps:Y.length}):a.jsx("div",{className:"p-8 text-sm text-zinc-500",children:"No step selected."})),p==="graph"&&a.jsx("div",{className:"p-4 h-full",children:a.jsx(g1,{run:k,nodes:Y,selectedNodeId:m,onSelectNode:x})}),p==="logs"&&a.jsx("div",{className:"h-full",children:a.jsx(Wy,{logs:G,nodeNames:q})}),p==="events"&&a.jsx("div",{className:"p-4",children:a.jsx($y,{runId:s})}),p==="request"&&a.jsx(e1,{defaultMethod:U.method,defaultPath:U.path,onClose:()=>b("step")})]})]}),a.jsx(Fy,{node:A,logs:G})]})]})}const E1=Ev.update({id:"/webhooks",path:"/webhooks",getParentRoute:()=>vt}),T1=Rv.update({id:"/settings",path:"/settings",getParentRoute:()=>vt}),C1=Ov.update({id:"/queues",path:"/queues",getParentRoute:()=>vt}),R1=Bv.update({id:"/metrics",path:"/metrics",getParentRoute:()=>vt}),D1=Qv.update({id:"/logs",path:"/logs",getParentRoute:()=>vt}),M1=Kv.update({id:"/deployments",path:"/deployments",getParentRoute:()=>vt}),A1=cy.update({id:"/dashboards",path:"/dashboards",getParentRoute:()=>vt}),k1=xy.update({id:"/",path:"/",getParentRoute:()=>vt}),O1=Sy.update({id:"/runs/",path:"/runs/",getParentRoute:()=>vt}),_1=kx.update({id:"/workflows/$name",path:"/workflows/$name",getParentRoute:()=>vt}),U1=_x.update({id:"/runs/diff",path:"/runs/diff",getParentRoute:()=>vt}),L1=qx.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>vt}),q1={IndexRoute:k1,DashboardsRoute:A1,DeploymentsRoute:M1,LogsRoute:D1,MetricsRoute:R1,QueuesRoute:C1,SettingsRoute:T1,WebhooksRoute:E1,RunsRunIdRoute:L1,RunsDiffRoute:U1,WorkflowsNameRoute:_1,RunsIndexRoute:O1},H1=vt._addFileChildren(q1)._addFileTypes(),Hx=new mg({defaultOptions:{queries:{staleTime:2e3,retry:1,refetchOnWindowFocus:!0}}}),B1=yg({routeTree:H1,context:{queryClient:Hx},defaultPreload:"intent"}),G1=document.getElementById("root");ob.createRoot(G1).render(a.jsx(D.StrictMode,{children:a.jsx(xg,{client:Hx,children:a.jsx(jg,{router:B1})})}));
|