@netnodeag/kraftwerk 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Ir={exports:{}},oi={};var um;function yx(){if(um)return oi;um=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(r,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+f.key),"key"in f){h={};for(var g in f)g!=="key"&&(h[g]=f[g])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:h}}return oi.Fragment=i,oi.jsx=o,oi.jsxs=o,oi}var rm;function bx(){return rm||(rm=1,Ir.exports=yx()),Ir.exports}var a=bx(),Fr={exports:{}},me={};var om;function jx(){if(om)return me;om=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),w=Symbol.iterator;function M(N){return N===null||typeof N!="object"?null:(N=w&&N[w]||N["@@iterator"],typeof N=="function"?N:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},J=Object.assign,X={};function A(N,q,F){this.props=N,this.context=q,this.refs=X,this.updater=F||L}A.prototype.isReactComponent={},A.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,q,"setState")},A.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function oe(){}oe.prototype=A.prototype;function fe(N,q,F){this.props=N,this.context=q,this.refs=X,this.updater=F||L}var W=fe.prototype=new oe;W.constructor=fe,J(W,A.prototype),W.isPureReactComponent=!0;var I=Array.isArray;function Y(){}var V={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ne(N,q,F){var Z=F.ref;return{$$typeof:u,type:N,key:q,ref:Z!==void 0?Z:null,props:F}}function je(N,q){return ne(N.type,q,N.props)}function be(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function ee(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(F){return q[F]})}var ve=/\/+/g;function Je(N,q){return typeof N=="object"&&N!==null&&N.key!=null?ee(""+N.key):q.toString(36)}function nt(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(Y,Y):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,q,F,Z,he){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case u:case i:Ee=!0;break;case S:return Ee=N._init,D(Ee(N._payload),q,F,Z,he)}}if(Ee)return he=he(N),Ee=Z===""?"."+Je(N,0):Z,I(he)?(F="",Ee!=null&&(F=Ee.replace(ve,"$&/")+"/"),D(he,q,F,"",function(ze){return ze})):he!=null&&(be(he)&&(he=je(he,F+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(ve,"$&/")+"/")+Ee)),q.push(he)),1;Ee=0;var mt=Z===""?".":Z+":";if(I(N))for(var B=0;B<N.length;B++)Z=N[B],pe=mt+Je(Z,B),Ee+=D(Z,q,F,pe,he);else if(B=M(N),typeof B=="function")for(N=B.call(N),B=0;!(Z=N.next()).done;)Z=Z.value,pe=mt+Je(Z,B++),Ee+=D(Z,q,F,pe,he);else if(pe==="object"){if(typeof N.then=="function")return D(nt(N),q,F,Z,he);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(N,q,F){if(N==null)return N;var Z=[],he=0;return D(N,Z,"","",function(pe){return q.call(F,pe,he++)}),Z}function ce(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(F){(N._status===0||N._status===-1)&&(N._status=1,N._result=F)},function(F){(N._status===0||N._status===-1)&&(N._status=2,N._result=F)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var _e=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ye={map:K,forEach:function(N,q,F){K(N,function(){q.apply(this,arguments)},F)},count:function(N){var q=0;return K(N,function(){q++}),q},toArray:function(N){return K(N,function(q){return q})||[]},only:function(N){if(!be(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return me.Activity=E,me.Children=ye,me.Component=A,me.Fragment=o,me.Profiler=f,me.PureComponent=fe,me.StrictMode=r,me.Suspense=y,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,me.__COMPILER_RUNTIME={__proto__:null,c:function(N){return V.H.useMemoCache(N)}},me.cache=function(N){return function(){return N.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(N,q,F){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Z=J({},N.props),he=N.key;if(q!=null)for(pe in q.key!==void 0&&(he=""+q.key),q)!le.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(Z[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)Z.children=F;else if(1<pe){for(var Ee=Array(pe),mt=0;mt<pe;mt++)Ee[mt]=arguments[mt+2];Z.children=Ee}return ne(N.type,he,Z)},me.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},me.createElement=function(N,q,F){var Z,he={},pe=null;if(q!=null)for(Z in q.key!==void 0&&(pe=""+q.key),q)le.call(q,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(he[Z]=q[Z]);var Ee=arguments.length-2;if(Ee===1)he.children=F;else if(1<Ee){for(var mt=Array(Ee),B=0;B<Ee;B++)mt[B]=arguments[B+2];he.children=mt}if(N&&N.defaultProps)for(Z in Ee=N.defaultProps,Ee)he[Z]===void 0&&(he[Z]=Ee[Z]);return ne(N,pe,he)},me.createRef=function(){return{current:null}},me.forwardRef=function(N){return{$$typeof:g,render:N}},me.isValidElement=be,me.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ce}},me.memo=function(N,q){return{$$typeof:v,type:N,compare:q===void 0?null:q}},me.startTransition=function(N){var q=V.T,F={};V.T=F;try{var Z=N(),he=V.S;he!==null&&he(F,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(Y,_e)}catch(pe){_e(pe)}finally{q!==null&&F.types!==null&&(q.types=F.types),V.T=q}},me.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},me.use=function(N){return V.H.use(N)},me.useActionState=function(N,q,F){return V.H.useActionState(N,q,F)},me.useCallback=function(N,q){return V.H.useCallback(N,q)},me.useContext=function(N){return V.H.useContext(N)},me.useDebugValue=function(){},me.useDeferredValue=function(N,q){return V.H.useDeferredValue(N,q)},me.useEffect=function(N,q){return V.H.useEffect(N,q)},me.useEffectEvent=function(N){return V.H.useEffectEvent(N)},me.useId=function(){return V.H.useId()},me.useImperativeHandle=function(N,q,F){return V.H.useImperativeHandle(N,q,F)},me.useInsertionEffect=function(N,q){return V.H.useInsertionEffect(N,q)},me.useLayoutEffect=function(N,q){return V.H.useLayoutEffect(N,q)},me.useMemo=function(N,q){return V.H.useMemo(N,q)},me.useOptimistic=function(N,q){return V.H.useOptimistic(N,q)},me.useReducer=function(N,q,F){return V.H.useReducer(N,q,F)},me.useRef=function(N){return V.H.useRef(N)},me.useState=function(N){return V.H.useState(N)},me.useSyncExternalStore=function(N,q,F){return V.H.useSyncExternalStore(N,q,F)},me.useTransition=function(){return V.H.useTransition()},me.version="19.2.8",me}var fm;function xo(){return fm||(fm=1,Fr.exports=jx()),Fr.exports}var C=xo(),Wr={exports:{}},fi={},Pr={exports:{}},eo={};var dm;function Nx(){return dm||(dm=1,(function(u){function i(D,K){var ce=D.length;D.push(K);e:for(;0<ce;){var _e=ce-1>>>1,ye=D[_e];if(0<f(ye,K))D[_e]=K,D[ce]=ye,ce=_e;else break e}}function o(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var K=D[0],ce=D.pop();if(ce!==K){D[0]=ce;e:for(var _e=0,ye=D.length,N=ye>>>1;_e<N;){var q=2*(_e+1)-1,F=D[q],Z=q+1,he=D[Z];if(0>f(F,ce))Z<ye&&0>f(he,F)?(D[_e]=he,D[Z]=ce,_e=Z):(D[_e]=F,D[q]=ce,_e=q);else if(Z<ye&&0>f(he,ce))D[_e]=he,D[Z]=ce,_e=Z;else break e}}return K}function f(D,K){var ce=D.sortIndex-K.sortIndex;return ce!==0?ce:D.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var p=Date,g=p.now();u.unstable_now=function(){return p.now()-g}}var y=[],v=[],S=1,E=null,w=3,M=!1,L=!1,J=!1,X=!1,A=typeof setTimeout=="function"?setTimeout:null,oe=typeof clearTimeout=="function"?clearTimeout:null,fe=typeof setImmediate<"u"?setImmediate:null;function W(D){for(var K=o(v);K!==null;){if(K.callback===null)r(v);else if(K.startTime<=D)r(v),K.sortIndex=K.expirationTime,i(y,K);else break;K=o(v)}}function I(D){if(J=!1,W(D),!L)if(o(y)!==null)L=!0,Y||(Y=!0,ee());else{var K=o(v);K!==null&&nt(I,K.startTime-D)}}var Y=!1,V=-1,le=5,ne=-1;function je(){return X?!0:!(u.unstable_now()-ne<le)}function be(){if(X=!1,Y){var D=u.unstable_now();ne=D;var K=!0;try{e:{L=!1,J&&(J=!1,oe(V),V=-1),M=!0;var ce=w;try{t:{for(W(D),E=o(y);E!==null&&!(E.expirationTime>D&&je());){var _e=E.callback;if(typeof _e=="function"){E.callback=null,w=E.priorityLevel;var ye=_e(E.expirationTime<=D);if(D=u.unstable_now(),typeof ye=="function"){E.callback=ye,W(D),K=!0;break t}E===o(y)&&r(y),W(D)}else r(y);E=o(y)}if(E!==null)K=!0;else{var N=o(v);N!==null&&nt(I,N.startTime-D),K=!1}}break e}finally{E=null,w=ce,M=!1}K=void 0}}finally{K?ee():Y=!1}}}var ee;if(typeof fe=="function")ee=function(){fe(be)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Je=ve.port2;ve.port1.onmessage=be,ee=function(){Je.postMessage(null)}}else ee=function(){A(be,0)};function nt(D,K){V=A(function(){D(u.unstable_now())},K)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return w},u.unstable_next=function(D){switch(w){case 1:case 2:case 3:var K=3;break;default:K=w}var ce=w;w=K;try{return D()}finally{w=ce}},u.unstable_requestPaint=function(){X=!0},u.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=w;w=D;try{return K()}finally{w=ce}},u.unstable_scheduleCallback=function(D,K,ce){var _e=u.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?_e+ce:_e):ce=_e,D){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ce+ye,D={id:S++,callback:K,priorityLevel:D,startTime:ce,expirationTime:ye,sortIndex:-1},ce>_e?(D.sortIndex=ce,i(v,D),o(y)===null&&D===o(v)&&(J?(oe(V),V=-1):J=!0,nt(I,ce-_e))):(D.sortIndex=ye,i(y,D),L||M||(L=!0,Y||(Y=!0,ee()))),D},u.unstable_shouldYield=je,u.unstable_wrapCallback=function(D){var K=w;return function(){var ce=w;w=K;try{return D.apply(this,arguments)}finally{w=ce}}}})(eo)),eo}var hm;function Sx(){return hm||(hm=1,Pr.exports=Nx()),Pr.exports}var to={exports:{}},Rt={};var mm;function wx(){if(mm)return Rt;mm=1;var u=xo();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,v,S){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:E==null?null:""+E,children:y,containerInfo:v,implementation:S}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Rt.createPortal=function(y,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,S)},Rt.flushSync=function(y){var v=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=v,r.p=S,r.d.f()}},Rt.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},Rt.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},Rt.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var S=v.as,E=g(S,v.crossOrigin),w=typeof v.integrity=="string"?v.integrity:void 0,M=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:E,integrity:w,fetchPriority:M}):S==="script"&&r.d.X(y,{crossOrigin:E,integrity:w,fetchPriority:M,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Rt.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=g(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},Rt.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,E=g(S,v.crossOrigin);r.d.L(y,S,{crossOrigin:E,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},Rt.preloadModule=function(y,v){if(typeof y=="string")if(v){var S=g(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},Rt.requestFormReset=function(y){r.d.r(y)},Rt.unstable_batchedUpdates=function(y,v){return y(v)},Rt.useFormState=function(y,v,S){return p.H.useFormState(y,v,S)},Rt.useFormStatus=function(){return p.H.useHostTransitionStatus()},Rt.version="19.2.8",Rt}var pm;function kx(){if(pm)return to.exports;pm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),to.exports=wx(),to.exports}var gm;function Tx(){if(gm)return fi;gm=1;var u=Sx(),i=xo(),o=kx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(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 g(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 y(e){if(h(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,n=t;;){var s=l.return;if(s===null)break;var c=s.alternate;if(c===null){if(n=s.return,n!==null){l=n;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===l)return y(s),e;if(c===n)return y(s),t;c=c.sibling}throw Error(r(188))}if(l.return!==n.return)l=s,n=c;else{for(var d=!1,m=s.child;m;){if(m===l){d=!0,l=s,n=c;break}if(m===n){d=!0,n=s,l=c;break}m=m.sibling}if(!d){for(m=c.child;m;){if(m===l){d=!0,l=c,n=s;break}if(m===n){d=!0,n=c,l=s;break}m=m.sibling}if(!d)throw Error(r(189))}}if(l.alternate!==n)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var E=Object.assign,w=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),oe=Symbol.for("react.consumer"),fe=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function ee(e){return e===null||typeof e!="object"?null:(e=be&&e[be]||e["@@iterator"],typeof e=="function"?e:null)}var ve=Symbol.for("react.client.reference");function Je(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ve?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case J:return"Fragment";case A:return"Profiler";case X:return"StrictMode";case I:return"Suspense";case Y:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case fe:return e.displayName||"Context";case oe:return(e._context.displayName||"Context")+".Consumer";case W:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:Je(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return Je(e(t))}catch{}}return null}var nt=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},_e=[],ye=-1;function N(e){return{current:e}}function q(e){0>ye||(e.current=_e[ye],_e[ye]=null,ye--)}function F(e,t){ye++,_e[ye]=e.current,e.current=t}var Z=N(null),he=N(null),pe=N(null),Ee=N(null);function mt(e,t){switch(F(pe,t),F(he,e),F(Z,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Z),F(Z,e)}function B(){q(Z),q(he),q(pe)}function ze(e){e.memoizedState!==null&&F(Ee,e);var t=Z.current,l=Ch(t,e.type);t!==l&&(F(he,e),F(Z,l))}function Ye(e){he.current===e&&(q(Z),q(he)),Ee.current===e&&(q(Ee),ii._currentValue=ce)}var We,tl;function Oe(e){if(We===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",tl=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+We+e+tl}var Xn=!1;function Ge(e,t){if(!e||Xn)return"";Xn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(O){var R=O}Reflect.construct(e,[],$)}else{try{$.call()}catch(O){R=O}e.call($.prototype)}}else{try{throw Error()}catch(O){R=O}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=n.DetermineComponentFrameRoot(),d=c[0],m=c[1];if(d&&m){var b=d.split(`
|
|
4
|
+
`),z=m.split(`
|
|
5
|
+
`);for(s=n=0;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(n===b.length||s===z.length)for(n=b.length-1,s=z.length-1;1<=n&&0<=s&&b[n]!==z[s];)s--;for(;1<=n&&0<=s;n--,s--)if(b[n]!==z[s]){if(n!==1||s!==1)do if(n--,s--,0>s||b[n]!==z[s]){var U=`
|
|
6
|
+
`+b[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=s);break}}}finally{Xn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Oe(l):""}function os(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return e.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return Oe("Activity");default:return""}}function Gt(e){try{var t="",l=null;do t+=os(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var Bl=Object.prototype.hasOwnProperty,ba=u.unstable_scheduleCallback,ll=u.unstable_cancelCallback,ji=u.unstable_shouldYield,fs=u.unstable_requestPaint,_t=u.unstable_now,Ni=u.unstable_getCurrentPriorityLevel,xl=u.unstable_ImmediatePriority,_l=u.unstable_UserBlockingPriority,nl=u.unstable_NormalPriority,ds=u.unstable_LowPriority,Qn=u.unstable_IdlePriority,ja=u.log,hs=u.unstable_setDisableYieldValue,al=null,yt=null;function Xt(e){if(typeof ja=="function"&&hs(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(al,e)}catch{}}var zt=Math.clz32?Math.clz32:ms,Si=Math.log,wi=Math.LN2;function ms(e){return e>>>=0,e===0?32:31-(Si(e)/wi|0)|0}var rn=256,vl=262144,yl=4194304;function zl(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 Zn(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=n&134217727;return m!==0?(n=m&~c,n!==0?s=zl(n):(d&=m,d!==0?s=zl(d):l||(l=m&~e,l!==0&&(s=zl(l))))):(m=n&~c,m!==0?s=zl(m):d!==0?s=zl(d):l||(l=n&~e,l!==0&&(s=zl(l)))),s===0?0:t!==0&&t!==s&&(t&c)===0&&(c=s&-s,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:s}function on(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ki(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 ps(){var e=yl;return yl<<=1,(yl&62914560)===0&&(yl=4194304),e}function fn(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sl(e,t,l,n,s,c){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,z=e.hiddenUpdates;for(l=d&~l;0<l;){var U=31-zt(l),$=1<<U;m[U]=0,b[U]=-1;var R=z[U];if(R!==null)for(z[U]=null,U=0;U<R.length;U++){var O=R[U];O!==null&&(O.lane&=-536870913)}l&=~$}n!==0&&ql(e,n,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function ql(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-zt(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Na(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-zt(l),s=1<<n;s&t|e[n]&t&&(e[n]|=t),l&=~s}}function Sa(e,t){var l=t&-t;return l=(l&42)!==0?1:gs(l),(l&(e.suspendedLanes|t))!==0?0:l}function gs(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 wa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ka(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:tm(e.type))}function xs(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var il=Math.random().toString(36).slice(2),pt="__reactFiber$"+il,it="__reactProps$"+il,dn="__reactContainer$"+il,vs="__reactEvents$"+il,et="__reactListeners$"+il,hn="__reactHandles$"+il,Ti="__reactResources$"+il,mn="__reactMarker$"+il;function Vn(e){delete e[pt],delete e[it],delete e[vs],delete e[et],delete e[hn]}function $l(e){var t=e[pt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[dn]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Bh(e);e!==null;){if(l=e[pt])return l;e=Bh(e)}return t}e=l,l=e.parentNode}return null}function Yl(e){if(e=e[pt]||e[dn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function pn(e){var t=e[Ti];return t||(t=e[Ti]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[mn]=!0}var Ei=new Set,bl={};function Cl(e,t){jl(e,t),jl(e+"Capture",t)}function jl(e,t){for(bl[e]=t,e=0;e<t.length;e++)Ei.add(t[e])}var Gl=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]*$"),Ai={},Jn={};function _i(e){return Bl.call(Jn,e)?!0:Bl.call(Ai,e)?!1:Gl.test(e)?Jn[e]=!0:(Ai[e]=!0,!1)}function Ta(e,t,l){if(_i(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function In(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function cl(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function Nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ea(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Aa(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,c=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){l=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ol(e){if(!e._valueTracker){var t=Ea(e)?"checked":"value";e._valueTracker=Aa(e,t,""+e[t])}}function gn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Ea(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function Dt(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 Jc=/[\n"\\]/g;function St(e){return e.replace(Jc,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,l,n,s,c,d,m){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=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?_a(e,d,Nt(t)):l!=null?_a(e,d,Nt(l)):n!=null&&e.removeAttribute("value"),s==null&&c!=null&&(e.defaultChecked=!!c),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function bs(e,t,l,n,s,c,d,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Ol(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}n=n??s,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=m?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Ol(e)}function _a(e,t,l){t==="number"&&Dt(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Xl(e,t,l,n){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&n&&(e[l].defaultSelected=!0)}else{for(l=""+Nt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function js(e,t,l){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Nt(l):""}function zi(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(r(92));if(nt(n)){if(1<n.length)throw Error(r(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=Nt(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),Ol(e)}function Ql(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ic=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 Ri(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Ic.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ns(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var s in t)n=t[s],t.hasOwnProperty(s)&&l[s]!==n&&Ri(e,s,n)}else for(var c in t)t.hasOwnProperty(c)&&Ri(e,c,t[c])}function xn(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 Ss=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"]]),Q=/^[\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 x(e){return Q.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function k(){}var G=null;function te(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ae=null,re=null;function He(e){var t=Yl(e);if(t&&(e=t.stateNode)){var l=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var s=n[it]||null;if(!s)throw Error(r(90));ys(n,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&gn(n)}break e;case"textarea":js(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&Xl(e,!!l.multiple,t,!1)}}}var Ve=!1;function wt(e,t,l){if(Ve)return e(t,l);Ve=!0;try{var n=e(t);return n}finally{if(Ve=!1,(ae!==null||re!==null)&&(vc(),ae&&(t=ae,e=re,re=ae=null,He(t),e)))for(t=0;t<e.length;t++)He(e[t])}}function ut(e,t){var l=e.stateNode;if(l===null)return null;var n=l[it]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gt=!1;if(Qt)try{var ws={};Object.defineProperty(ws,"passive",{get:function(){gt=!0}}),window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{gt=!1}var vn=null,Fc=null,Ci=null;function Ro(){if(Ci)return Ci;var e,t=Fc,l=t.length,n,s="value"in vn?vn.value:vn.textContent,c=s.length;for(e=0;e<l&&t[e]===s[e];e++);var d=l-e;for(n=1;n<=d&&t[l-n]===s[c-n];n++);return Ci=s.slice(e,1<n?1-n:void 0)}function Oi(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 Di(){return!0}function Co(){return!1}function Ut(e){function t(l,n,s,c,d){this._reactName=l,this._targetInst=s,this.type=n,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(c):c[m]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Di:Co,this.isPropagationStopped=Co,this}return E(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Ut(Fn),ks=E({},Fn,{view:0,detail:0}),xp=Ut(ks),Wc,Pc,Ts,Ui=E({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,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!==Ts&&(Ts&&e.type==="mousemove"?(Wc=e.screenX-Ts.screenX,Pc=e.screenY-Ts.screenY):Pc=Wc=0,Ts=e),Wc)},movementY:function(e){return"movementY"in e?e.movementY:Pc}}),Oo=Ut(Ui),vp=E({},Ui,{dataTransfer:0}),yp=Ut(vp),bp=E({},ks,{relatedTarget:0}),eu=Ut(bp),jp=E({},Fn,{animationName:0,elapsedTime:0,pseudoElement:0}),Np=Ut(jp),Sp=E({},Fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wp=Ut(Sp),kp=E({},Fn,{data:0}),Do=Ut(kp),Tp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ep={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"},Ap={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _p(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ap[e])?!!t[e]:!1}function tu(){return _p}var zp=E({},ks,{key:function(e){if(e.key){var t=Tp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rp=Ut(zp),Cp=E({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mo=Ut(Cp),Op=E({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),Dp=Ut(Op),Mp=E({},Fn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Up=Ut(Mp),Lp=E({},Ui,{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}),Hp=Ut(Lp),Bp=E({},Fn,{newState:0,oldState:0}),qp=Ut(Bp),$p=[9,13,27,32],lu=Qt&&"CompositionEvent"in window,Es=null;Qt&&"documentMode"in document&&(Es=document.documentMode);var Yp=Qt&&"TextEvent"in window&&!Es,Uo=Qt&&(!lu||Es&&8<Es&&11>=Es),Lo=" ",Ho=!1;function Bo(e,t){switch(e){case"keyup":return $p.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var za=!1;function Gp(e,t){switch(e){case"compositionend":return qo(t);case"keypress":return t.which!==32?null:(Ho=!0,Lo);case"textInput":return e=t.data,e===Lo&&Ho?null:e;default:return null}}function Xp(e,t){if(za)return e==="compositionend"||!lu&&Bo(e,t)?(e=Ro(),Ci=Fc=vn=null,za=!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 Uo&&t.locale!=="ko"?null:t.data;default:return null}}var Qp={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 $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Qp[e.type]:t==="textarea"}function Yo(e,t,l,n){ae?re?re.push(n):re=[n]:ae=n,t=kc(t,"onChange"),0<t.length&&(l=new Mi("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var As=null,_s=null;function Zp(e){kh(e,0)}function Li(e){var t=Kn(e);if(gn(t))return e}function Go(e,t){if(e==="change")return t}var Xo=!1;if(Qt){var nu;if(Qt){var au="oninput"in document;if(!au){var Qo=document.createElement("div");Qo.setAttribute("oninput","return;"),au=typeof Qo.oninput=="function"}nu=au}else nu=!1;Xo=nu&&(!document.documentMode||9<document.documentMode)}function Zo(){As&&(As.detachEvent("onpropertychange",Vo),_s=As=null)}function Vo(e){if(e.propertyName==="value"&&Li(_s)){var t=[];Yo(t,_s,e,te(e)),wt(Zp,t)}}function Vp(e,t,l){e==="focusin"?(Zo(),As=t,_s=l,As.attachEvent("onpropertychange",Vo)):e==="focusout"&&Zo()}function Kp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(_s)}function Jp(e,t){if(e==="click")return Li(t)}function Ip(e,t){if(e==="input"||e==="change")return Li(t)}function Fp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Fp;function zs(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var s=l[n];if(!Bl.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function Ko(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jo(e,t){var l=Ko(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ko(l)}}function Io(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Io(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Dt(e.document)}return t}function su(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 Wp=Qt&&"documentMode"in document&&11>=document.documentMode,Ra=null,iu=null,Rs=null,cu=!1;function Wo(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cu||Ra==null||Ra!==Dt(n)||(n=Ra,"selectionStart"in n&&su(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Rs&&zs(Rs,n)||(Rs=n,n=kc(iu,"onSelect"),0<n.length&&(t=new Mi("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=Ra)))}function Wn(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Ca={animationend:Wn("Animation","AnimationEnd"),animationiteration:Wn("Animation","AnimationIteration"),animationstart:Wn("Animation","AnimationStart"),transitionrun:Wn("Transition","TransitionRun"),transitionstart:Wn("Transition","TransitionStart"),transitioncancel:Wn("Transition","TransitionCancel"),transitionend:Wn("Transition","TransitionEnd")},uu={},Po={};Qt&&(Po=document.createElement("div").style,"AnimationEvent"in window||(delete Ca.animationend.animation,delete Ca.animationiteration.animation,delete Ca.animationstart.animation),"TransitionEvent"in window||delete Ca.transitionend.transition);function Pn(e){if(uu[e])return uu[e];if(!Ca[e])return e;var t=Ca[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Po)return uu[e]=t[l];return e}var ef=Pn("animationend"),tf=Pn("animationiteration"),lf=Pn("animationstart"),Pp=Pn("transitionrun"),eg=Pn("transitionstart"),tg=Pn("transitioncancel"),nf=Pn("transitionend"),af=new Map,ru="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(" ");ru.push("scrollEnd");function Nl(e,t){af.set(e,t),Cl(t,[e])}var Hi=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)},ul=[],Oa=0,ou=0;function Bi(){for(var e=Oa,t=ou=Oa=0;t<e;){var l=ul[t];ul[t++]=null;var n=ul[t];ul[t++]=null;var s=ul[t];ul[t++]=null;var c=ul[t];if(ul[t++]=null,n!==null&&s!==null){var d=n.pending;d===null?s.next=s:(s.next=d.next,d.next=s),n.pending=s}c!==0&&sf(l,s,c)}}function qi(e,t,l,n){ul[Oa++]=e,ul[Oa++]=t,ul[Oa++]=l,ul[Oa++]=n,ou|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function fu(e,t,l,n){return qi(e,t,l,n),$i(e)}function ea(e,t){return qi(e,null,null,t),$i(e)}function sf(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var s=!1,c=e.return;c!==null;)c.childLanes|=l,n=c.alternate,n!==null&&(n.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(s=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,s&&t!==null&&(s=31-zt(l),e=c.hiddenUpdates,n=e[s],n===null?e[s]=[t]:n.push(t),t.lane=l|536870912),c):null}function $i(e){if(50<Ps)throw Ps=0,br=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Da={};function lg(e,t,l,n){this.tag=e,this.key=l,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,l,n){return new lg(e,t,l,n)}function du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zl(e,t){var l=e.alternate;return l===null?(l=Vt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function cf(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yi(e,t,l,n,s,c){var d=0;if(n=e,typeof e=="function")du(e)&&(d=1);else if(typeof e=="string")d=cx(e,l,Z.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Vt(31,l,t,s),e.elementType=ne,e.lanes=c,e;case J:return ta(l.children,s,c,t);case X:d=8,s|=24;break;case A:return e=Vt(12,l,t,s|2),e.elementType=A,e.lanes=c,e;case I:return e=Vt(13,l,t,s),e.elementType=I,e.lanes=c,e;case Y:return e=Vt(19,l,t,s),e.elementType=Y,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:d=10;break e;case oe:d=9;break e;case W:d=11;break e;case V:d=14;break e;case le:d=16,n=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),n=null}return t=Vt(d,l,t,s),t.elementType=e,t.type=n,t.lanes=c,t}function ta(e,t,l,n){return e=Vt(7,e,n,t),e.lanes=l,e}function hu(e,t,l){return e=Vt(6,e,null,t),e.lanes=l,e}function uf(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function mu(e,t,l){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rf=new WeakMap;function rl(e,t){if(typeof e=="object"&&e!==null){var l=rf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Gt(t)},rf.set(e,t),t)}return{value:e,source:t,stack:Gt(t)}}var Ma=[],Ua=0,Gi=null,Cs=0,ol=[],fl=0,yn=null,Dl=1,Ml="";function Vl(e,t){Ma[Ua++]=Cs,Ma[Ua++]=Gi,Gi=e,Cs=t}function of(e,t,l){ol[fl++]=Dl,ol[fl++]=Ml,ol[fl++]=yn,yn=e;var n=Dl;e=Ml;var s=32-zt(n)-1;n&=~(1<<s),l+=1;var c=32-zt(t)+s;if(30<c){var d=s-s%5;c=(n&(1<<d)-1).toString(32),n>>=d,s-=d,Dl=1<<32-zt(t)+s|l<<s|n,Ml=c+e}else Dl=1<<c|l<<s|n,Ml=e}function pu(e){e.return!==null&&(Vl(e,1),of(e,1,0))}function gu(e){for(;e===Gi;)Gi=Ma[--Ua],Ma[Ua]=null,Cs=Ma[--Ua],Ma[Ua]=null;for(;e===yn;)yn=ol[--fl],ol[fl]=null,Ml=ol[--fl],ol[fl]=null,Dl=ol[--fl],ol[fl]=null}function ff(e,t){ol[fl++]=Dl,ol[fl++]=Ml,ol[fl++]=yn,Dl=t.id,Ml=t.overflow,yn=e}var kt=null,Ie=null,Ae=!1,bn=null,dl=!1,xu=Error(r(519));function jn(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(rl(t,e)),xu}function df(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[pt]=e,t[it]=n,l){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(l=0;l<ti.length;l++)Se(ti[l],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),bs(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),zi(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||_h(t.textContent,l)?(n.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),n.onScroll!=null&&Se("scroll",t),n.onScrollEnd!=null&&Se("scrollend",t),n.onClick!=null&&(t.onclick=k),t=!0):t=!1,t||jn(e,!0)}function hf(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:dl=!1;return;case 27:case 3:dl=!0;return;default:kt=kt.return}}function La(e){if(e!==kt)return!1;if(!Ae)return hf(e),Ae=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Mr(e.type,e.memoizedProps)),l=!l),l&&Ie&&jn(e),hf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Hh(e)}else t===27?(t=Ie,Mn(e.type)?(e=qr,qr=null,Ie=e):Ie=t):Ie=kt?ml(e.stateNode.nextSibling):null;return!0}function la(){Ie=kt=null,Ae=!1}function vu(){var e=bn;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),bn=null),e}function Os(e){bn===null?bn=[e]:bn.push(e)}var yu=N(null),na=null,Kl=null;function Nn(e,t,l){F(yu,t._currentValue),t._currentValue=l}function Jl(e){e._currentValue=yu.current,q(yu)}function bu(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function ju(e,t,l,n){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){var d=s.child;c=c.firstContext;e:for(;c!==null;){var m=c;c=s;for(var b=0;b<t.length;b++)if(m.context===t[b]){c.lanes|=l,m=c.alternate,m!==null&&(m.lanes|=l),bu(c.return,l,e),n||(d=null);break e}c=m.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(r(341));d.lanes|=l,c=d.alternate,c!==null&&(c.lanes|=l),bu(d,l,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Ha(e,t,l,n){e=null;for(var s=t,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var m=s.type;Zt(s.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(s===Ee.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}s=s.return}e!==null&&ju(t,e,l,n),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!Zt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){na=e,Kl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return mf(na,e)}function Qi(e,t){return na===null&&aa(e),mf(e,t)}function mf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Kl===null){if(e===null)throw Error(r(308));Kl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kl=Kl.next=t;return l}var ng=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},ag=u.unstable_scheduleCallback,sg=u.unstable_NormalPriority,rt={$$typeof:fe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new ng,data:new Map,refCount:0}}function Ds(e){e.refCount--,e.refCount===0&&ag(sg,function(){e.controller.abort()})}var Ms=null,Su=0,Ba=0,qa=null;function ig(e,t){if(Ms===null){var l=Ms=[];Su=0,Ba=Tr(),qa={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Su++,t.then(pf,pf),t}function pf(){if(--Su===0&&Ms!==null){qa!==null&&(qa.status="fulfilled");var e=Ms;Ms=null,Ba=0,qa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cg(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(n.status="rejected",n.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),n}var gf=D.S;D.S=function(e,t){Pd=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ig(e,t),gf!==null&&gf(e,t)};var sa=N(null);function wu(){var e=sa.current;return e!==null?e:Ke.pooledCache}function Zi(e,t){t===null?F(sa,sa.current):F(sa,t.pool)}function xf(){var e=wu();return e===null?null:{parent:rt._currentValue,pool:e}}var $a=Error(r(460)),ku=Error(r(474)),Vi=Error(r(542)),Ki={then:function(){}};function vf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(k,k),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e;default:if(typeof t.status=="string")t.then(k,k);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=n}},function(n){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,jf(e),e}throw ca=t,$a}}function ia(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ca=l,$a):l}}var ca=null;function bf(){if(ca===null)throw Error(r(459));var e=ca;return ca=null,e}function jf(e){if(e===$a||e===Vi)throw Error(r(483))}var Ya=null,Us=0;function Ji(e){var t=Us;return Us+=1,Ya===null&&(Ya=[]),yf(Ya,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===w?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Nf(e){function t(T,j){if(e){var _=T.deletions;_===null?(T.deletions=[j],T.flags|=16):_.push(j)}}function l(T,j){if(!e)return null;for(;j!==null;)t(T,j),j=j.sibling;return null}function n(T){for(var j=new Map;T!==null;)T.key!==null?j.set(T.key,T):j.set(T.index,T),T=T.sibling;return j}function s(T,j){return T=Zl(T,j),T.index=0,T.sibling=null,T}function c(T,j,_){return T.index=_,e?(_=T.alternate,_!==null?(_=_.index,_<j?(T.flags|=67108866,j):_):(T.flags|=67108866,j)):(T.flags|=1048576,j)}function d(T){return e&&T.alternate===null&&(T.flags|=67108866),T}function m(T,j,_,H){return j===null||j.tag!==6?(j=hu(_,T.mode,H),j.return=T,j):(j=s(j,_),j.return=T,j)}function b(T,j,_,H){var ue=_.type;return ue===J?U(T,j,_.props.children,H,_.key):j!==null&&(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&ia(ue)===j.type)?(j=s(j,_.props),Ls(j,_),j.return=T,j):(j=Yi(_.type,_.key,_.props,null,T.mode,H),Ls(j,_),j.return=T,j)}function z(T,j,_,H){return j===null||j.tag!==4||j.stateNode.containerInfo!==_.containerInfo||j.stateNode.implementation!==_.implementation?(j=mu(_,T.mode,H),j.return=T,j):(j=s(j,_.children||[]),j.return=T,j)}function U(T,j,_,H,ue){return j===null||j.tag!==7?(j=ta(_,T.mode,H,ue),j.return=T,j):(j=s(j,_),j.return=T,j)}function $(T,j,_){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=hu(""+j,T.mode,_),j.return=T,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case M:return _=Yi(j.type,j.key,j.props,null,T.mode,_),Ls(_,j),_.return=T,_;case L:return j=mu(j,T.mode,_),j.return=T,j;case le:return j=ia(j),$(T,j,_)}if(nt(j)||ee(j))return j=ta(j,T.mode,_,null),j.return=T,j;if(typeof j.then=="function")return $(T,Ji(j),_);if(j.$$typeof===fe)return $(T,Qi(T,j),_);Ii(T,j)}return null}function R(T,j,_,H){var ue=j!==null?j.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ue!==null?null:m(T,j,""+_,H);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case M:return _.key===ue?b(T,j,_,H):null;case L:return _.key===ue?z(T,j,_,H):null;case le:return _=ia(_),R(T,j,_,H)}if(nt(_)||ee(_))return ue!==null?null:U(T,j,_,H,null);if(typeof _.then=="function")return R(T,j,Ji(_),H);if(_.$$typeof===fe)return R(T,j,Qi(T,_),H);Ii(T,_)}return null}function O(T,j,_,H,ue){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return T=T.get(_)||null,m(j,T,""+H,ue);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case M:return T=T.get(H.key===null?_:H.key)||null,b(j,T,H,ue);case L:return T=T.get(H.key===null?_:H.key)||null,z(j,T,H,ue);case le:return H=ia(H),O(T,j,_,H,ue)}if(nt(H)||ee(H))return T=T.get(_)||null,U(j,T,H,ue,null);if(typeof H.then=="function")return O(T,j,_,Ji(H),ue);if(H.$$typeof===fe)return O(T,j,_,Qi(j,H),ue);Ii(j,H)}return null}function se(T,j,_,H){for(var ue=null,Me=null,ie=j,xe=j=0,Te=null;ie!==null&&xe<_.length;xe++){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Ue=R(T,ie,_[xe],H);if(Ue===null){ie===null&&(ie=Te);break}e&&ie&&Ue.alternate===null&&t(T,ie),j=c(Ue,j,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue,ie=Te}if(xe===_.length)return l(T,ie),Ae&&Vl(T,xe),ue;if(ie===null){for(;xe<_.length;xe++)ie=$(T,_[xe],H),ie!==null&&(j=c(ie,j,xe),Me===null?ue=ie:Me.sibling=ie,Me=ie);return Ae&&Vl(T,xe),ue}for(ie=n(ie);xe<_.length;xe++)Te=O(ie,T,xe,_[xe],H),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),j=c(Te,j,xe),Me===null?ue=Te:Me.sibling=Te,Me=Te);return e&&ie.forEach(function(qn){return t(T,qn)}),Ae&&Vl(T,xe),ue}function de(T,j,_,H){if(_==null)throw Error(r(151));for(var ue=null,Me=null,ie=j,xe=j=0,Te=null,Ue=_.next();ie!==null&&!Ue.done;xe++,Ue=_.next()){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var qn=R(T,ie,Ue.value,H);if(qn===null){ie===null&&(ie=Te);break}e&&ie&&qn.alternate===null&&t(T,ie),j=c(qn,j,xe),Me===null?ue=qn:Me.sibling=qn,Me=qn,ie=Te}if(Ue.done)return l(T,ie),Ae&&Vl(T,xe),ue;if(ie===null){for(;!Ue.done;xe++,Ue=_.next())Ue=$(T,Ue.value,H),Ue!==null&&(j=c(Ue,j,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue);return Ae&&Vl(T,xe),ue}for(ie=n(ie);!Ue.done;xe++,Ue=_.next())Ue=O(ie,T,xe,Ue.value,H),Ue!==null&&(e&&Ue.alternate!==null&&ie.delete(Ue.key===null?xe:Ue.key),j=c(Ue,j,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue);return e&&ie.forEach(function(vx){return t(T,vx)}),Ae&&Vl(T,xe),ue}function Ze(T,j,_,H){if(typeof _=="object"&&_!==null&&_.type===J&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case M:e:{for(var ue=_.key;j!==null;){if(j.key===ue){if(ue=_.type,ue===J){if(j.tag===7){l(T,j.sibling),H=s(j,_.props.children),H.return=T,T=H;break e}}else if(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&ia(ue)===j.type){l(T,j.sibling),H=s(j,_.props),Ls(H,_),H.return=T,T=H;break e}l(T,j);break}else t(T,j);j=j.sibling}_.type===J?(H=ta(_.props.children,T.mode,H,_.key),H.return=T,T=H):(H=Yi(_.type,_.key,_.props,null,T.mode,H),Ls(H,_),H.return=T,T=H)}return d(T);case L:e:{for(ue=_.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===_.containerInfo&&j.stateNode.implementation===_.implementation){l(T,j.sibling),H=s(j,_.children||[]),H.return=T,T=H;break e}else{l(T,j);break}else t(T,j);j=j.sibling}H=mu(_,T.mode,H),H.return=T,T=H}return d(T);case le:return _=ia(_),Ze(T,j,_,H)}if(nt(_))return se(T,j,_,H);if(ee(_)){if(ue=ee(_),typeof ue!="function")throw Error(r(150));return _=ue.call(_),de(T,j,_,H)}if(typeof _.then=="function")return Ze(T,j,Ji(_),H);if(_.$$typeof===fe)return Ze(T,j,Qi(T,_),H);Ii(T,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,j!==null&&j.tag===6?(l(T,j.sibling),H=s(j,_),H.return=T,T=H):(l(T,j),H=hu(_,T.mode,H),H.return=T,T=H),d(T)):l(T,j)}return function(T,j,_,H){try{Us=0;var ue=Ze(T,j,_,H);return Ya=null,ue}catch(ie){if(ie===$a||ie===Vi)throw ie;var Me=Vt(29,ie,null,T.mode);return Me.lanes=H,Me.return=T,Me}}}var ua=Nf(!0),Sf=Nf(!1),Sn=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eu(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 wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function kn(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Le&2)!==0){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,t=$i(e),sf(e,null,l),t}return qi(e,n,t,l),$i(e)}function Hs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Na(e,l)}}function Au(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var s=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?s=c=d:c=c.next=d,l=l.next}while(l!==null);c===null?s=c=t:c=c.next=t}else s=c=t;l={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var _u=!1;function Bs(){if(_u){var e=qa;if(e!==null)throw e}}function qs(e,t,l,n){_u=!1;var s=e.updateQueue;Sn=!1;var c=s.firstBaseUpdate,d=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var b=m,z=b.next;b.next=null,d===null?c=z:d.next=z,d=b;var U=e.alternate;U!==null&&(U=U.updateQueue,m=U.lastBaseUpdate,m!==d&&(m===null?U.firstBaseUpdate=z:m.next=z,U.lastBaseUpdate=b))}if(c!==null){var $=s.baseState;d=0,U=z=b=null,m=c;do{var R=m.lane&-536870913,O=R!==m.lane;if(O?(ke&R)===R:(n&R)===R){R!==0&&R===Ba&&(_u=!0),U!==null&&(U=U.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,de=m;R=t;var Ze=l;switch(de.tag){case 1:if(se=de.payload,typeof se=="function"){$=se.call(Ze,$,R);break e}$=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=de.payload,R=typeof se=="function"?se.call(Ze,$,R):se,R==null)break e;$=E({},$,R);break e;case 2:Sn=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},U===null?(z=U=O,b=$):U=U.next=O,d|=R;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;O=m,m=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);U===null&&(b=$),s.baseState=b,s.firstBaseUpdate=z,s.lastBaseUpdate=U,c===null&&(s.shared.lanes=0),zn|=d,e.lanes=d,e.memoizedState=$}}function wf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function kf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)wf(l[e],t)}var Ga=N(null),Fi=N(0);function Tf(e,t){e=an,F(Fi,e),F(Ga,t),an=e|t.baseLanes}function zu(){F(Fi,an),F(Ga,Ga.current)}function Ru(){an=Fi.current,q(Ga),q(Fi)}var Kt=N(null),hl=null;function Tn(e){var t=e.alternate;F(at,at.current&1),F(Kt,e),hl===null&&(t===null||Ga.current!==null||t.memoizedState!==null)&&(hl=e)}function Cu(e){F(at,at.current),F(Kt,e),hl===null&&(hl=e)}function Ef(e){e.tag===22?(F(at,at.current),F(Kt,e),hl===null&&(hl=e)):En()}function En(){F(at,at.current),F(Kt,Kt.current)}function Jt(e){q(Kt),hl===e&&(hl=null),q(at)}var at=N(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Hr(l)||Br(l)))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 Il=0,ge=null,Xe=null,ot=null,Pi=!1,Xa=!1,ra=!1,ec=0,$s=0,Qa=null,ug=0;function tt(){throw Error(r(321))}function Ou(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Zt(e[l],t[l]))return!1;return!0}function Du(e,t,l,n,s,c){return Il=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?od:Ju,ra=!1,c=l(n,s),ra=!1,Xa&&(c=_f(t,l,n,s)),Af(e),c}function Af(e){D.H=Xs;var t=Xe!==null&&Xe.next!==null;if(Il=0,ot=Xe=ge=null,Pi=!1,$s=0,Qa=null,t)throw Error(r(300));e===null||ft||(e=e.dependencies,e!==null&&Xi(e)&&(ft=!0))}function _f(e,t,l,n){ge=e;var s=0;do{if(Xa&&(Qa=null),$s=0,Xa=!1,25<=s)throw Error(r(301));if(s+=1,ot=Xe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}D.H=fd,c=t(l,n)}while(Xa);return c}function rg(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ys(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Mu(){var e=ec!==0;return ec=0,e}function Uu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lu(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Il=0,ot=Xe=ge=null,Xa=!1,$s=ec=0,Qa=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?ge.memoizedState=ot=e:ot=ot.next=e,ot}function st(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?ge.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?ge.memoizedState=ot=e:ot=ot.next=e}return ot}function tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ys(e){var t=$s;return $s+=1,Qa===null&&(Qa=[]),e=yf(Qa,e,t),t=ge,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?od:Ju),e}function lc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ys(e);if(e.$$typeof===fe)return Tt(e)}throw Error(r(438,String(e)))}function Hu(e){var t=null,l=ge.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=ge.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=tc(),ge.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=je;return t.index++,l}function Fl(e,t){return typeof t=="function"?t(e):t}function nc(e){var t=st();return Bu(t,Xe,e)}function Bu(e,t,l){var n=e.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=l;var s=e.baseQueue,c=n.pending;if(c!==null){if(s!==null){var d=s.next;s.next=c.next,c.next=d}t.baseQueue=s=c,n.pending=null}if(c=e.baseState,s===null)e.memoizedState=c;else{t=s.next;var m=d=null,b=null,z=t,U=!1;do{var $=z.lane&-536870913;if($!==z.lane?(ke&$)===$:(Il&$)===$){var R=z.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),$===Ba&&(U=!0);else if((Il&R)===R){z=z.next,R===Ba&&(U=!0);continue}else $={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(m=b=$,d=c):b=b.next=$,ge.lanes|=R,zn|=R;$=z.action,ra&&l(c,$),c=z.hasEagerState?z.eagerState:l(c,$)}else R={lane:$,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(m=b=R,d=c):b=b.next=R,ge.lanes|=$,zn|=$;z=z.next}while(z!==null&&z!==t);if(b===null?d=c:b.next=m,!Zt(c,e.memoizedState)&&(ft=!0,U&&(l=qa,l!==null)))throw l;e.memoizedState=c,e.baseState=d,e.baseQueue=b,n.lastRenderedState=c}return s===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function qu(e){var t=st(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var n=l.dispatch,s=l.pending,c=t.memoizedState;if(s!==null){l.pending=null;var d=s=s.next;do c=e(c,d.action),d=d.next;while(d!==s);Zt(c,t.memoizedState)||(ft=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,n]}function zf(e,t,l){var n=ge,s=st(),c=Ae;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!Zt((Xe||s).memoizedState,l);if(d&&(s.memoizedState=l,ft=!0),s=s.queue,Gu(Of.bind(null,n,s,e),[e]),s.getSnapshot!==t||d||ot!==null&&ot.memoizedState.tag&1){if(n.flags|=2048,Za(9,{destroy:void 0},Cf.bind(null,n,s,l,t),null),Ke===null)throw Error(r(349));c||(Il&127)!==0||Rf(n,t,l)}return l}function Rf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ge.updateQueue,t===null?(t=tc(),ge.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Cf(e,t,l,n){t.value=l,t.getSnapshot=n,Df(t)&&Mf(e)}function Of(e,t,l){return l(function(){Df(t)&&Mf(e)})}function Df(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Zt(e,l)}catch{return!0}}function Mf(e){var t=ea(e,2);t!==null&&$t(t,e,2)}function $u(e){var t=Mt();if(typeof e=="function"){var l=e;if(e=l(),ra){Xt(!0);try{l()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:e},t}function Uf(e,t,l,n){return e.baseState=l,Bu(e,Xe,typeof n=="function"?n:Fl)}function og(e,t,l,n,s){if(ic(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};D.T!==null?l(!0):c.isTransition=!1,n(c),l=t.pending,l===null?(c.next=t.pending=c,Lf(t,c)):(c.next=l.next,t.pending=l.next=c)}}function Lf(e,t){var l=t.action,n=t.payload,s=e.state;if(t.isTransition){var c=D.T,d={};D.T=d;try{var m=l(s,n),b=D.S;b!==null&&b(d,m),Hf(e,t,m)}catch(z){Yu(e,t,z)}finally{c!==null&&d.types!==null&&(c.types=d.types),D.T=c}}else try{c=l(s,n),Hf(e,t,c)}catch(z){Yu(e,t,z)}}function Hf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Bf(e,t,n)},function(n){return Yu(e,t,n)}):Bf(e,t,l)}function Bf(e,t,l){t.status="fulfilled",t.value=l,qf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Lf(e,l)))}function Yu(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,qf(t),t=t.next;while(t!==n)}e.action=null}function qf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $f(e,t){return t}function Yf(e,t){if(Ae){var l=Ke.formState;if(l!==null){e:{var n=ge;if(Ae){if(Ie){t:{for(var s=Ie,c=dl;s.nodeType!==8;){if(!c){s=null;break t}if(s=ml(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Ie=ml(s.nextSibling),n=s.data==="F!";break e}}jn(n)}n=!1}n&&(t=l[0])}}return l=Mt(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$f,lastRenderedState:t},l.queue=n,l=cd.bind(null,ge,n),n.dispatch=l,n=$u(!1),c=Ku.bind(null,ge,!1,n.queue),n=Mt(),s={state:t,dispatch:null,action:e,pending:null},n.queue=s,l=og.bind(null,ge,s,c,l),s.dispatch=l,n.memoizedState=e,[t,l,!1]}function Gf(e){var t=st();return Xf(t,Xe,e)}function Xf(e,t,l){if(t=Bu(e,t,$f)[0],e=nc(Fl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Ys(t)}catch(d){throw d===$a?Vi:d}else n=t;t=st();var s=t.queue,c=s.dispatch;return l!==t.memoizedState&&(ge.flags|=2048,Za(9,{destroy:void 0},fg.bind(null,s,l),null)),[n,c,e]}function fg(e,t){e.action=t}function Qf(e){var t=st(),l=Xe;if(l!==null)return Xf(t,l,e);st(),t=t.memoizedState,l=st();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Za(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=ge.updateQueue,t===null&&(t=tc(),ge.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function Zf(){return st().memoizedState}function ac(e,t,l,n){var s=Mt();ge.flags|=e,s.memoizedState=Za(1|t,{destroy:void 0},l,n===void 0?null:n)}function sc(e,t,l,n){var s=st();n=n===void 0?null:n;var c=s.memoizedState.inst;Xe!==null&&n!==null&&Ou(n,Xe.memoizedState.deps)?s.memoizedState=Za(t,c,l,n):(ge.flags|=e,s.memoizedState=Za(1|t,c,l,n))}function Vf(e,t){ac(8390656,8,e,t)}function Gu(e,t){sc(2048,8,e,t)}function dg(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=tc(),ge.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Kf(e){var t=st().memoizedState;return dg({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Jf(e,t){return sc(4,2,e,t)}function If(e,t){return sc(4,4,e,t)}function Ff(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Wf(e,t,l){l=l!=null?l.concat([e]):null,sc(4,4,Ff.bind(null,t,e),l)}function Xu(){}function Pf(e,t){var l=st();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ou(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function ed(e,t){var l=st();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ou(t,n[1]))return n[0];if(n=e(),ra){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[n,t],n}function Qu(e,t,l){return l===void 0||(Il&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=th(),ge.lanes|=e,zn|=e,l)}function td(e,t,l,n){return Zt(l,t)?l:Ga.current!==null?(e=Qu(e,l,n),Zt(e,t)||(ft=!0),e):(Il&42)===0||(Il&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=l):(e=th(),ge.lanes|=e,zn|=e,t)}function ld(e,t,l,n,s){var c=K.p;K.p=c!==0&&8>c?c:8;var d=D.T,m={};D.T=m,Ku(e,!1,t,l);try{var b=s(),z=D.S;if(z!==null&&z(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var U=cg(b,n);Gs(e,t,U,Wt(e))}else Gs(e,t,n,Wt(e))}catch($){Gs(e,t,{then:function(){},status:"rejected",reason:$},Wt())}finally{K.p=c,d!==null&&m.types!==null&&(d.types=m.types),D.T=d}}function hg(){}function Zu(e,t,l,n){if(e.tag!==5)throw Error(r(476));var s=nd(e).queue;ld(e,s,t,ce,l===null?hg:function(){return ad(e),l(n)})}function nd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ad(e){var t=nd(e);t.next===null&&(t=e.alternate.memoizedState),Gs(e,t.next.queue,{},Wt())}function Vu(){return Tt(ii)}function sd(){return st().memoizedState}function id(){return st().memoizedState}function mg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=wn(l);var n=kn(t,e,l);n!==null&&($t(n,t,l),Hs(n,t,l)),t={cache:Nu()},e.payload=t;return}t=t.return}}function pg(e,t,l){var n=Wt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ic(e)?ud(t,l):(l=fu(e,t,l,n),l!==null&&($t(l,e,n),rd(l,t,n)))}function cd(e,t,l){var n=Wt();Gs(e,t,l,n)}function Gs(e,t,l,n){var s={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ud(t,s);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,m=c(d,l);if(s.hasEagerState=!0,s.eagerState=m,Zt(m,d))return qi(e,t,s,0),Ke===null&&Bi(),!1}catch{}if(l=fu(e,t,s,n),l!==null)return $t(l,e,n),rd(l,t,n),!0}return!1}function Ku(e,t,l,n){if(n={lane:2,revertLane:Tr(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(r(479))}else t=fu(e,l,n,2),t!==null&&$t(t,e,2)}function ic(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function ud(e,t){Xa=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function rd(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Na(e,l)}}var Xs={readContext:Tt,use:lc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Xs.useEffectEvent=tt;var od={readContext:Tt,use:lc,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Vf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,ac(4194308,4,Ff.bind(null,t,e),l)},useLayoutEffect:function(e,t){return ac(4194308,4,e,t)},useInsertionEffect:function(e,t){ac(4,2,e,t)},useMemo:function(e,t){var l=Mt();t=t===void 0?null:t;var n=e();if(ra){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=Mt();if(l!==void 0){var s=l(t);if(ra){Xt(!0);try{l(t)}finally{Xt(!1)}}}else s=t;return n.memoizedState=n.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},n.queue=e,e=e.dispatch=pg.bind(null,ge,e),[n.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=$u(e);var t=e.queue,l=cd.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Xu,useDeferredValue:function(e,t){var l=Mt();return Qu(l,e,t)},useTransition:function(){var e=$u(!1);return e=ld.bind(null,ge,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=ge,s=Mt();if(Ae){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ke===null)throw Error(r(349));(ke&127)!==0||Rf(n,t,l)}s.memoizedState=l;var c={value:l,getSnapshot:t};return s.queue=c,Vf(Of.bind(null,n,c,e),[e]),n.flags|=2048,Za(9,{destroy:void 0},Cf.bind(null,n,c,l,t),null),l},useId:function(){var e=Mt(),t=Ke.identifierPrefix;if(Ae){var l=Ml,n=Dl;l=(n&~(1<<32-zt(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ec++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=ug++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vu,useFormState:Yf,useActionState:Yf,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ku.bind(null,ge,!0,l),l.dispatch=t,[e,t]},useMemoCache:Hu,useCacheRefresh:function(){return Mt().memoizedState=mg.bind(null,ge)},useEffectEvent:function(e){var t=Mt(),l={impl:e};return t.memoizedState=l,function(){if((Le&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ju={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:Gu,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:nc,useRef:Zf,useState:function(){return nc(Fl)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=nc(Fl)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:zf,useId:sd,useHostTransitionStatus:Vu,useFormState:Gf,useActionState:Gf,useOptimistic:function(e,t){var l=st();return Uf(l,Xe,e,t)},useMemoCache:Hu,useCacheRefresh:id};Ju.useEffectEvent=Kf;var fd={readContext:Tt,use:lc,useCallback:Pf,useContext:Tt,useEffect:Gu,useImperativeHandle:Wf,useInsertionEffect:Jf,useLayoutEffect:If,useMemo:ed,useReducer:qu,useRef:Zf,useState:function(){return qu(Fl)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return Xe===null?Qu(l,e,t):td(l,Xe.memoizedState,e,t)},useTransition:function(){var e=qu(Fl)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:zf,useId:sd,useHostTransitionStatus:Vu,useFormState:Qf,useActionState:Qf,useOptimistic:function(e,t){var l=st();return Xe!==null?Uf(l,Xe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:id};fd.useEffectEvent=Kf;function Iu(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:E({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fu={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Wt(),s=wn(n);s.payload=t,l!=null&&(s.callback=l),t=kn(e,s,n),t!==null&&($t(t,e,n),Hs(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Wt(),s=wn(n);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=kn(e,s,n),t!==null&&($t(t,e,n),Hs(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),n=wn(l);n.tag=2,t!=null&&(n.callback=t),t=kn(e,n,l),t!==null&&($t(t,e,l),Hs(t,e,l))}};function dd(e,t,l,n,s,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,c,d):t.prototype&&t.prototype.isPureReactComponent?!zs(l,n)||!zs(s,c):!0}function hd(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)}function oa(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=E({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function md(e){Hi(e)}function pd(e){console.error(e)}function gd(e){Hi(e)}function cc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function xd(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Wu(e,t,l){return l=wn(l),l.tag=3,l.payload={element:null},l.callback=function(){cc(e,t)},l}function vd(e){return e=wn(e),e.tag=3,e}function yd(e,t,l,n){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;e.payload=function(){return s(c)},e.callback=function(){xd(t,l,n)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){xd(t,l,n),typeof s!="function"&&(Rn===null?Rn=new Set([this]):Rn.add(this));var m=n.stack;this.componentDidCatch(n.value,{componentStack:m!==null?m:""})})}function gg(e,t,l,n,s){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Ha(t,l,s,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return hl===null?yc():l.alternate===null&<===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=s,n===Ki?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),Sr(e,n,s)),!1;case 22:return l.flags|=65536,n===Ki?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),Sr(e,n,s)),!1}throw Error(r(435,l.tag))}return Sr(e,n,s),yc(),!1}if(Ae)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,n!==xu&&(e=Error(r(422),{cause:n}),Os(rl(e,l)))):(n!==xu&&(t=Error(r(423),{cause:n}),Os(rl(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,n=rl(n,l),s=Wu(e.stateNode,n,s),Au(e,s),lt!==4&&(lt=2)),!1;var c=Error(r(520),{cause:n});if(c=rl(c,l),Ws===null?Ws=[c]:Ws.push(c),lt!==4&&(lt=2),t===null)return!0;n=rl(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Wu(l.stateNode,n,e),Au(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Rn===null||!Rn.has(c))))return l.flags|=65536,s&=-s,l.lanes|=s,s=vd(s),yd(s,e,l,n),Au(l,s),!1}l=l.return}while(l!==null);return!1}var Pu=Error(r(461)),ft=!1;function Et(e,t,l,n){t.child=e===null?Sf(t,null,l,n):ua(t,e.child,l,n)}function bd(e,t,l,n,s){l=l.render;var c=t.ref;if("ref"in n){var d={};for(var m in n)m!=="ref"&&(d[m]=n[m])}else d=n;return aa(t),n=Du(e,t,l,d,c,s),m=Mu(),e!==null&&!ft?(Uu(e,t,s),Wl(e,t,s)):(Ae&&m&&pu(t),t.flags|=1,Et(e,t,n,s),t.child)}function jd(e,t,l,n,s){if(e===null){var c=l.type;return typeof c=="function"&&!du(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,Nd(e,t,c,n,s)):(e=Yi(l.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!cr(e,s)){var d=c.memoizedProps;if(l=l.compare,l=l!==null?l:zs,l(d,n)&&e.ref===t.ref)return Wl(e,t,s)}return t.flags|=1,e=Zl(c,n),e.ref=t.ref,e.return=t,t.child=e}function Nd(e,t,l,n,s){if(e!==null){var c=e.memoizedProps;if(zs(c,n)&&e.ref===t.ref)if(ft=!1,t.pendingProps=n=c,cr(e,s))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Wl(e,t,s)}return er(e,t,l,n,s)}function Sd(e,t,l,n){var s=n.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(n=t.child=e.child,s=0;n!==null;)s=s|n.lanes|n.childLanes,n=n.sibling;n=s&~c}else n=0,t.child=null;return wd(e,t,c,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zi(t,c!==null?c.cachePool:null),c!==null?Tf(t,c):zu(),Ef(t);else return n=t.lanes=536870912,wd(e,t,c!==null?c.baseLanes|l:l,l,n)}else c!==null?(Zi(t,c.cachePool),Tf(t,c),En(),t.memoizedState=null):(e!==null&&Zi(t,null),zu(),En());return Et(e,t,s,l),t.child}function Qs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wd(e,t,l,n,s){var c=wu();return c=c===null?null:{parent:rt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Zi(t,null),zu(),Ef(t),e!==null&&Ha(e,t,n,!0),t.childLanes=s,null}function uc(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function kd(e,t,l){return ua(t,e.child,null,l),e=uc(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function xg(e,t,l){var n=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(n.mode==="hidden")return e=uc(t,n),t.lanes=536870912,Qs(null,e);if(Cu(t),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Dl,overflow:Ml}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw jn(t);return t.lanes=536870912,null}return uc(t,n)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(Cu(t),s)if(t.flags&256)t.flags&=-257,t=kd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ft||Ha(e,t,l,!1),s=(l&e.childLanes)!==0,ft||s){if(n=Ke,n!==null&&(d=Sa(n,l),d!==0&&d!==c.retryLane))throw c.retryLane=d,ea(e,d),$t(n,e,d),Pu;yc(),t=kd(e,t,l)}else e=c.treeContext,Ie=ml(d.nextSibling),kt=t,Ae=!0,bn=null,dl=!1,e!==null&&ff(t,e),t=uc(t,n),t.flags|=4096;return t}return e=Zl(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function er(e,t,l,n,s){return aa(t),l=Du(e,t,l,n,void 0,s),n=Mu(),e!==null&&!ft?(Uu(e,t,s),Wl(e,t,s)):(Ae&&n&&pu(t),t.flags|=1,Et(e,t,l,s),t.child)}function Td(e,t,l,n,s,c){return aa(t),t.updateQueue=null,l=_f(t,n,l,s),Af(e),n=Mu(),e!==null&&!ft?(Uu(e,t,c),Wl(e,t,c)):(Ae&&n&&pu(t),t.flags|=1,Et(e,t,l,c),t.child)}function Ed(e,t,l,n,s){if(aa(t),t.stateNode===null){var c=Da,d=l.contextType;typeof d=="object"&&d!==null&&(c=Tt(d)),c=new l(n,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Fu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=n,c.state=t.memoizedState,c.refs={},Tu(t),d=l.contextType,c.context=typeof d=="object"&&d!==null?Tt(d):Da,c.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(Iu(t,l,d,n),c.state=t.memoizedState),typeof l.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&&Fu.enqueueReplaceState(c,c.state,null),qs(t,n,c,s),Bs(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){c=t.stateNode;var m=t.memoizedProps,b=oa(l,m);c.props=b;var z=c.context,U=l.contextType;d=Da,typeof U=="object"&&U!==null&&(d=Tt(U));var $=l.getDerivedStateFromProps;U=typeof $=="function"||typeof c.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,U||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m||z!==d)&&hd(t,c,n,d),Sn=!1;var R=t.memoizedState;c.state=R,qs(t,n,c,s),Bs(),z=t.memoizedState,m||R!==z||Sn?(typeof $=="function"&&(Iu(t,l,$,n),z=t.memoizedState),(b=Sn||dd(t,l,b,n,R,z,d))?(U||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=n,t.memoizedState=z),c.props=n,c.state=z,c.context=d,n=b):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{c=t.stateNode,Eu(e,t),d=t.memoizedProps,U=oa(l,d),c.props=U,$=t.pendingProps,R=c.context,z=l.contextType,b=Da,typeof z=="object"&&z!==null&&(b=Tt(z)),m=l.getDerivedStateFromProps,(z=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==$||R!==b)&&hd(t,c,n,b),Sn=!1,R=t.memoizedState,c.state=R,qs(t,n,c,s),Bs();var O=t.memoizedState;d!==$||R!==O||Sn||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof m=="function"&&(Iu(t,l,m,n),O=t.memoizedState),(U=Sn||dd(t,l,U,n,R,O,b)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(z||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(n,O,b),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(n,O,b)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=O),c.props=n,c.state=O,c.context=b,n=U):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),n=!1)}return c=n,rc(e,t),n=(t.flags&128)!==0,c||n?(c=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&n?(t.child=ua(t,e.child,null,s),t.child=ua(t,null,l,s)):Et(e,t,l,s),t.memoizedState=c.state,e=t.child):e=Wl(e,t,s),e}function Ad(e,t,l,n){return la(),t.flags|=256,Et(e,t,l,n),t.child}var tr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lr(e){return{baseLanes:e,cachePool:xf()}}function nr(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ft),e}function _d(e,t,l){var n=t.pendingProps,s=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(s?Tn(t):En(),(e=Ie)?(e=Lh(e,dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yn!==null?{id:Dl,overflow:Ml}:null,retryLane:536870912,hydrationErrors:null},l=uf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw jn(t);return Br(e)?t.lanes=32:t.lanes=536870912,null}var m=n.children;return n=n.fallback,s?(En(),s=t.mode,m=oc({mode:"hidden",children:m},s),n=ta(n,s,l,null),m.return=t,n.return=t,m.sibling=n,t.child=m,n=t.child,n.memoizedState=lr(l),n.childLanes=nr(e,d,l),t.memoizedState=tr,Qs(null,n)):(Tn(t),ar(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(c)t.flags&256?(Tn(t),t.flags&=-257,t=sr(e,t,l)):t.memoizedState!==null?(En(),t.child=e.child,t.flags|=128,t=null):(En(),m=n.fallback,s=t.mode,n=oc({mode:"visible",children:n.children},s),m=ta(m,s,l,null),m.flags|=2,n.return=t,m.return=t,n.sibling=m,t.child=n,ua(t,e.child,null,l),n=t.child,n.memoizedState=lr(l),n.childLanes=nr(e,d,l),t.memoizedState=tr,t=Qs(null,n));else if(Tn(t),Br(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var z=d.dgst;d=z,n=Error(r(419)),n.stack="",n.digest=d,Os({value:n,source:null,stack:null}),t=sr(e,t,l)}else if(ft||Ha(e,t,l,!1),d=(l&e.childLanes)!==0,ft||d){if(d=Ke,d!==null&&(n=Sa(d,l),n!==0&&n!==b.retryLane))throw b.retryLane=n,ea(e,n),$t(d,e,n),Pu;Hr(m)||yc(),t=sr(e,t,l)}else Hr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ie=ml(m.nextSibling),kt=t,Ae=!0,bn=null,dl=!1,e!==null&&ff(t,e),t=ar(t,n.children),t.flags|=4096);return t}return s?(En(),m=n.fallback,s=t.mode,b=e.child,z=b.sibling,n=Zl(b,{mode:"hidden",children:n.children}),n.subtreeFlags=b.subtreeFlags&65011712,z!==null?m=Zl(z,m):(m=ta(m,s,l,null),m.flags|=2),m.return=t,n.return=t,n.sibling=m,t.child=n,Qs(null,n),n=t.child,m=e.child.memoizedState,m===null?m=lr(l):(s=m.cachePool,s!==null?(b=rt._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=xf(),m={baseLanes:m.baseLanes|l,cachePool:s}),n.memoizedState=m,n.childLanes=nr(e,d,l),t.memoizedState=tr,Qs(e.child,n)):(Tn(t),l=e.child,e=l.sibling,l=Zl(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function ar(e,t){return t=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function sr(e,t,l){return ua(t,e.child,null,l),e=ar(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zd(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),bu(e.return,t,l)}function ir(e,t,l,n,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:s,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=l,d.tailMode=s,d.treeForkCount=c)}function Rd(e,t,l){var n=t.pendingProps,s=n.revealOrder,c=n.tail;n=n.children;var d=at.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,F(at,d),Et(e,t,n,l),n=Ae?Cs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zd(e,l,t);else if(e.tag===19)zd(e,l,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(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Wi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),ir(t,!1,s,l,c,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}ir(t,!0,l,null,c,n);break;case"together":ir(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function Wl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),zn|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ha(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Zl(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Zl(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function cr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xi(e)))}function vg(e,t,l){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),Nn(t,rt,e.memoizedState.cache),la();break;case 27:case 5:ze(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:Nn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cu(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Tn(t),t.flags|=128,null):(l&t.child.childLanes)!==0?_d(e,t,l):(Tn(t),e=Wl(e,t,l),e!==null?e.sibling:null);Tn(t);break;case 19:var s=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Ha(e,t,l,!1),n=(l&t.childLanes)!==0),s){if(n)return Rd(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),F(at,at.current),n)break;return null;case 22:return t.lanes=0,Sd(e,t,l,t.pendingProps);case 24:Nn(t,rt,e.memoizedState.cache)}return Wl(e,t,l)}function Cd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!cr(e,l)&&(t.flags&128)===0)return ft=!1,vg(e,t,l);ft=(e.flags&131072)!==0}else ft=!1,Ae&&(t.flags&1048576)!==0&&of(t,Cs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=ia(t.elementType),t.type=e,typeof e=="function")du(e)?(n=oa(e,n),t.tag=1,t=Ed(null,t,e,n,l)):(t.tag=0,t=er(null,t,e,n,l));else{if(e!=null){var s=e.$$typeof;if(s===W){t.tag=11,t=bd(null,t,e,n,l);break e}else if(s===V){t.tag=14,t=jd(null,t,e,n,l);break e}}throw t=Je(e)||e,Error(r(306,t,""))}}return t;case 0:return er(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,s=oa(n,t.pendingProps),Ed(e,t,n,s,l);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));n=t.pendingProps;var c=t.memoizedState;s=c.element,Eu(e,t),qs(t,n,null,l);var d=t.memoizedState;if(n=d.cache,Nn(t,rt,n),n!==c.cache&&ju(t,[rt],l,!0),Bs(),n=d.element,c.isDehydrated)if(c={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Ad(e,t,n,l);break e}else if(n!==s){s=rl(Error(r(424)),t),Os(s),t=Ad(e,t,n,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=ml(e.firstChild),kt=t,Ae=!0,bn=null,dl=!0,l=Sf(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(la(),n===s){t=Wl(e,t,l);break e}Et(e,t,n,l)}t=t.child}return t;case 26:return rc(e,t),e===null?(l=Gh(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ae||(l=t.type,e=t.pendingProps,n=Tc(pe.current).createElement(l),n[pt]=t,n[it]=e,At(n,l,e),ct(n),t.stateNode=n):t.memoizedState=Gh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ze(t),e===null&&Ae&&(n=t.stateNode=qh(t.type,t.pendingProps,pe.current),kt=t,dl=!0,s=Ie,Mn(t.type)?(qr=s,Ie=ml(n.firstChild)):Ie=s),Et(e,t,t.pendingProps.children,l),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((s=n=Ie)&&(n=Kg(n,t.type,t.pendingProps,dl),n!==null?(t.stateNode=n,kt=t,Ie=ml(n.firstChild),dl=!1,s=!0):s=!1),s||jn(t)),ze(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,n=c.children,Mr(s,c)?n=null:d!==null&&Mr(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Du(e,t,rg,null,null,l),ii._currentValue=s),rc(e,t),Et(e,t,n,l),t.child;case 6:return e===null&&Ae&&((e=l=Ie)&&(l=Jg(l,t.pendingProps,dl),l!==null?(t.stateNode=l,kt=t,Ie=null,e=!0):e=!1),e||jn(t)),null;case 13:return _d(e,t,l);case 4:return mt(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ua(t,null,n,l):Et(e,t,n,l),t.child;case 11:return bd(e,t,t.type,t.pendingProps,l);case 7:return Et(e,t,t.pendingProps,l),t.child;case 8:return Et(e,t,t.pendingProps.children,l),t.child;case 12:return Et(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,Nn(t,t.type,n.value),Et(e,t,n.children,l),t.child;case 9:return s=t.type._context,n=t.pendingProps.children,aa(t),s=Tt(s),n=n(s),t.flags|=1,Et(e,t,n,l),t.child;case 14:return jd(e,t,t.type,t.pendingProps,l);case 15:return Nd(e,t,t.type,t.pendingProps,l);case 19:return Rd(e,t,l);case 31:return xg(e,t,l);case 22:return Sd(e,t,l,t.pendingProps);case 24:return aa(t),n=Tt(rt),e===null?(s=wu(),s===null&&(s=Ke,c=Nu(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=l),s=c),t.memoizedState={parent:n,cache:s},Tu(t),Nn(t,rt,s)):((e.lanes&l)!==0&&(Eu(e,t),qs(t,null,null,l),Bs()),s=e.memoizedState,c=t.memoizedState,s.parent!==n?(s={parent:n,cache:n},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Nn(t,rt,n)):(n=c.cache,Nn(t,rt,n),n!==s.cache&&ju(t,[rt],l,!0))),Et(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Pl(e){e.flags|=4}function ur(e,t,l,n,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(sh())e.flags|=8192;else throw ca=Ki,ku}else e.flags&=-16777217}function Od(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Kh(t))if(sh())e.flags|=8192;else throw ca=Ki,ku}function fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ps():536870912,e.lanes|=t,Ia|=t)}function Zs(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,n|=s.subtreeFlags&65011712,n|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function yg(e,t,l){var n=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jl(rt),B(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(La(t)?Pl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vu())),Fe(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(Pl(t),c!==null?(Fe(t),Od(t,c)):(Fe(t),ur(t,s,null,n,l))):c?c!==e.memoizedState?(Pl(t),Fe(t),Od(t,c)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&Pl(t),Fe(t),ur(t,s,e,n,l)),null;case 27:if(Ye(t),l=pe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}e=Z.current,La(t)?df(t):(e=qh(s,n,l),t.stateNode=e,Pl(t))}return Fe(t),null;case 5:if(Ye(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(!n){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}if(c=Z.current,La(t))df(t);else{var d=Tc(pe.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?c.multiple=!0:n.size&&(c.size=n.size);break;default:c=typeof n.is=="string"?d.createElement(s,{is:n.is}):d.createElement(s)}}c[pt]=t,c[it]=n;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(At(c,s,n),s){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Pl(t)}}return Fe(t),ur(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Pl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,La(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,s=kt,s!==null)switch(s.tag){case 27:case 5:n=s.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||_h(e.nodeValue,l)),e||jn(t,!0)}else e=Tc(e).createTextNode(n),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=La(t),l!==null){if(e===null){if(!n)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[pt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else l=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Fe(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=La(t),n!==null&&n.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[pt]=t}else la(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,s=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(s=n.alternate.memoizedState.cachePool.pool),c=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(c=n.memoizedState.cachePool.pool),c!==s&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),fc(t,t.updateQueue),Fe(t),null);case 4:return B(),e===null&&zr(t.stateNode.containerInfo),Fe(t),null;case 10:return Jl(t.type),Fe(t),null;case 19:if(q(at),n=t.memoizedState,n===null)return Fe(t),null;if(s=(t.flags&128)!==0,c=n.rendering,c===null)if(s)Zs(n,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wi(e),c!==null){for(t.flags|=128,Zs(n,!1),e=c.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)cf(l,e),l=l.sibling;return F(at,at.current&1|2),Ae&&Vl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&_t()>gc&&(t.flags|=128,s=!0,Zs(n,!1),t.lanes=4194304)}else{if(!s)if(e=Wi(c),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,fc(t,e),Zs(n,!0),n.tail===null&&n.tailMode==="hidden"&&!c.alternate&&!Ae)return Fe(t),null}else 2*_t()-n.renderingStartTime>gc&&l!==536870912&&(t.flags|=128,s=!0,Zs(n,!1),t.lanes=4194304);n.isBackwards?(c.sibling=t.child,t.child=c):(e=n.last,e!==null?e.sibling=c:t.child=c,n.last=c)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=_t(),e.sibling=null,l=at.current,F(at,s?l&1|2:l&1),Ae&&Vl(t,n.treeForkCount),e):(Fe(t),null);case 22:case 23:return Jt(t),Ru(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),l=t.updateQueue,l!==null&&fc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&q(sa),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jl(rt),Fe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function bg(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jl(rt),B(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ye(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));la()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(at),null;case 4:return B(),null;case 10:return Jl(t.type),null;case 22:case 23:return Jt(t),Ru(),e!==null&&q(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jl(rt),null;case 25:return null;default:return null}}function Dd(e,t){switch(gu(t),t.tag){case 3:Jl(rt),B();break;case 26:case 27:case 5:Ye(t);break;case 4:B();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:q(at);break;case 10:Jl(t.type);break;case 22:case 23:Jt(t),Ru(),e!==null&&q(sa);break;case 24:Jl(rt)}}function Vs(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var s=n.next;l=s;do{if((l.tag&e)===e){n=void 0;var c=l.create,d=l.inst;n=c(),d.destroy=n}l=l.next}while(l!==s)}}catch(m){qe(t,t.return,m)}}function An(e,t,l){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var c=s.next;n=c;do{if((n.tag&e)===e){var d=n.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,s=t;var b=l,z=m;try{z()}catch(U){qe(s,b,U)}}}n=n.next}while(n!==c)}}catch(U){qe(t,t.return,U)}}function Md(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{kf(t,l)}catch(n){qe(e,e.return,n)}}}function Ud(e,t,l){l.props=oa(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){qe(e,t,n)}}function Ks(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(s){qe(e,t,s)}}function Ul(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(s){qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){qe(e,t,s)}else l.current=null}function Ld(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(s){qe(e,e.return,s)}}function rr(e,t,l){try{var n=e.stateNode;Yg(n,e.type,l,t),n[it]=t}catch(s){qe(e,e.return,s)}}function Hd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Mn(e.type)||e.tag===4}function or(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hd(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&&Mn(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 fr(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=k));else if(n!==4&&(n===27&&Mn(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(fr(e,t,l),e=e.sibling;e!==null;)fr(e,t,l),e=e.sibling}function dc(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&Mn(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(dc(e,t,l),e=e.sibling;e!==null;)dc(e,t,l),e=e.sibling}function Bd(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);At(t,n,l),t[pt]=e,t[it]=l}catch(c){qe(e,e.return,c)}}var en=!1,dt=!1,dr=!1,qd=typeof WeakSet=="function"?WeakSet:Set,bt=null;function jg(e,t){if(e=e.containerInfo,Or=Oc,e=Fo(e),su(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var s=n.anchorOffset,c=n.focusNode;n=n.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var d=0,m=-1,b=-1,z=0,U=0,$=e,R=null;t:for(;;){for(var O;$!==l||s!==0&&$.nodeType!==3||(m=d+s),$!==c||n!==0&&$.nodeType!==3||(b=d+n),$.nodeType===3&&(d+=$.nodeValue.length),(O=$.firstChild)!==null;)R=$,$=O;for(;;){if($===e)break t;if(R===l&&++z===s&&(m=d),R===c&&++U===n&&(b=d),(O=$.nextSibling)!==null)break;$=R,R=$.parentNode}$=O}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dr={focusedElem:e,selectionRange:l},Oc=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,l=t,s=c.memoizedProps,c=c.memoizedState,n=l.stateNode;try{var se=oa(l.type,s);e=n.getSnapshotBeforeUpdate(se,c),n.__reactInternalSnapshotBeforeUpdate=e}catch(de){qe(l,l.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Lr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lr(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(r(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function $d(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:ln(e,l),n&4&&Vs(5,l);break;case 1:if(ln(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){qe(l,l.return,d)}else{var s=oa(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){qe(l,l.return,d)}}n&64&&Md(l),n&512&&Ks(l,l.return);break;case 3:if(ln(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{kf(e,t)}catch(d){qe(l,l.return,d)}}break;case 27:t===null&&n&4&&Bd(l);case 26:case 5:ln(e,l),t===null&&n&4&&Ld(l),n&512&&Ks(l,l.return);break;case 12:ln(e,l);break;case 31:ln(e,l),n&4&&Xd(e,l);break;case 13:ln(e,l),n&4&&Qd(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=zg.bind(null,l),Ig(e,l))));break;case 22:if(n=l.memoizedState!==null||en,!n){t=t!==null&&t.memoizedState!==null||dt,s=en;var c=dt;en=n,(dt=t)&&!c?nn(e,l,(l.subtreeFlags&8772)!==0):ln(e,l),en=s,dt=c}break;case 30:break;default:ln(e,l)}}function Yd(e){var t=e.alternate;t!==null&&(e.alternate=null,Yd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vn(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 Pe=null,Lt=!1;function tn(e,t,l){for(l=l.child;l!==null;)Gd(e,t,l),l=l.sibling}function Gd(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(al,l)}catch{}switch(l.tag){case 26:dt||Ul(l,t),tn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||Ul(l,t);var n=Pe,s=Lt;Mn(l.type)&&(Pe=l.stateNode,Lt=!1),tn(e,t,l),ni(l.stateNode),Pe=n,Lt=s;break;case 5:dt||Ul(l,t);case 6:if(n=Pe,s=Lt,Pe=null,tn(e,t,l),Pe=n,Lt=s,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(c){qe(l,t,c)}else try{Pe.removeChild(l.stateNode)}catch(c){qe(l,t,c)}break;case 18:Pe!==null&&(Lt?(e=Pe,Mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),as(e)):Mh(Pe,l.stateNode));break;case 4:n=Pe,s=Lt,Pe=l.stateNode.containerInfo,Lt=!0,tn(e,t,l),Pe=n,Lt=s;break;case 0:case 11:case 14:case 15:An(2,l,t),dt||An(4,l,t),tn(e,t,l);break;case 1:dt||(Ul(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Ud(l,t,n)),tn(e,t,l);break;case 21:tn(e,t,l);break;case 22:dt=(n=dt)||l.memoizedState!==null,tn(e,t,l),dt=n;break;default:tn(e,t,l)}}function Xd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{as(e)}catch(l){qe(t,t.return,l)}}}function Qd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{as(e)}catch(l){qe(t,t.return,l)}}function Ng(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new qd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new qd),t;default:throw Error(r(435,e.tag))}}function hc(e,t){var l=Ng(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var s=Rg.bind(null,e,n);n.then(s,s)}})}function Ht(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var s=l[n],c=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Mn(m.type)){Pe=m.stateNode,Lt=!1;break e}break;case 5:Pe=m.stateNode,Lt=!1;break e;case 3:case 4:Pe=m.stateNode.containerInfo,Lt=!0;break e}m=m.return}if(Pe===null)throw Error(r(160));Gd(c,d,s),Pe=null,Lt=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Zd(t,e),t=t.sibling}var Sl=null;function Zd(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Bt(e),n&4&&(An(3,e,e.return),Vs(3,e),An(5,e,e.return));break;case 1:Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),n&64&&en&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var s=Sl;if(Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),n&4){var c=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(n){case"title":c=s.getElementsByTagName("title")[0],(!c||c[mn]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(n),s.head.insertBefore(c,s.querySelector("head > title"))),At(c,n,l),c[pt]=e,ct(c),n=c;break e;case"link":var d=Zh("link","href",s).get(n+(l.href||""));if(d){for(var m=0;m<d.length;m++)if(c=d[m],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(m,1);break t}}c=s.createElement(n),At(c,n,l),s.head.appendChild(c);break;case"meta":if(d=Zh("meta","content",s).get(n+(l.content||""))){for(m=0;m<d.length;m++)if(c=d[m],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(m,1);break t}}c=s.createElement(n),At(c,n,l),s.head.appendChild(c);break;default:throw Error(r(468,n))}c[pt]=e,ct(c),n=c}e.stateNode=n}else Vh(s,e.type,e.stateNode);else e.stateNode=Qh(s,n,e.memoizedProps);else c!==n?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,n===null?Vh(s,e.type,e.stateNode):Qh(s,n,e.memoizedProps)):n===null&&e.stateNode!==null&&rr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),l!==null&&n&4&&rr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ht(t,e),Bt(e),n&512&&(dt||l===null||Ul(l,l.return)),e.flags&32){s=e.stateNode;try{Ql(s,"")}catch(se){qe(e,e.return,se)}}n&4&&e.stateNode!=null&&(s=e.memoizedProps,rr(e,s,l!==null?l.memoizedProps:s)),n&1024&&(dr=!0);break;case 6:if(Ht(t,e),Bt(e),n&4){if(e.stateNode===null)throw Error(r(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(se){qe(e,e.return,se)}}break;case 3:if(_c=null,s=Sl,Sl=Ec(t.containerInfo),Ht(t,e),Sl=s,Bt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(se){qe(e,e.return,se)}dr&&(dr=!1,Vd(e));break;case 4:n=Sl,Sl=Ec(e.stateNode.containerInfo),Ht(t,e),Bt(e),Sl=n;break;case 12:Ht(t,e),Bt(e);break;case 31:Ht(t,e),Bt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 13:Ht(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(pc=_t()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,z=en,U=dt;if(en=z||s,dt=U||b,Ht(t,e),dt=U,en=z,Bt(e),n&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||en||dt||fa(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(c=b.stateNode,s)d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var $=b.memoizedProps.style,R=$!=null&&$.hasOwnProperty("display")?$.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(se){qe(b,b.return,se)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){qe(b,b.return,se)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?Uh(O,!0):Uh(b.stateNode,!1)}catch(se){qe(b,b.return,se)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,hc(e,l))));break;case 19:Ht(t,e),Bt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,hc(e,n)));break;case 30:break;case 21:break;default:Ht(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(Hd(n)){l=n;break}n=n.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,c=or(e);dc(e,c,s);break;case 5:var d=l.stateNode;l.flags&32&&(Ql(d,""),l.flags&=-33);var m=or(e);dc(e,m,d);break;case 3:case 4:var b=l.stateNode.containerInfo,z=or(e);fr(e,z,b);break;default:throw Error(r(161))}}catch(U){qe(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ln(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$d(e,t.alternate,t),t=t.sibling}function fa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),fa(t);break;case 1:Ul(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Ud(t,t.return,l),fa(t);break;case 27:ni(t.stateNode);case 26:case 5:Ul(t,t.return),fa(t);break;case 22:t.memoizedState===null&&fa(t);break;case 30:fa(t);break;default:fa(t)}e=e.sibling}}function nn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,s=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:nn(s,c,l),Vs(4,c);break;case 1:if(nn(s,c,l),n=c,s=n.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){qe(n,n.return,z)}if(n=c,s=n.updateQueue,s!==null){var m=n.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)wf(b[s],m)}catch(z){qe(n,n.return,z)}}l&&d&64&&Md(c),Ks(c,c.return);break;case 27:Bd(c);case 26:case 5:nn(s,c,l),l&&n===null&&d&4&&Ld(c),Ks(c,c.return);break;case 12:nn(s,c,l);break;case 31:nn(s,c,l),l&&d&4&&Xd(s,c);break;case 13:nn(s,c,l),l&&d&4&&Qd(s,c);break;case 22:c.memoizedState===null&&nn(s,c,l),Ks(c,c.return);break;case 30:break;default:nn(s,c,l)}t=t.sibling}}function hr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ds(l))}function mr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e))}function wl(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Kd(e,t,l,n),t=t.sibling}function Kd(e,t,l,n){var s=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,l,n),s&2048&&Vs(9,t);break;case 1:wl(e,t,l,n);break;case 3:wl(e,t,l,n),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e)));break;case 12:if(s&2048){wl(e,t,l,n),e=t.stateNode;try{var c=t.memoizedProps,d=c.id,m=c.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){qe(t,t.return,b)}}else wl(e,t,l,n);break;case 31:wl(e,t,l,n);break;case 13:wl(e,t,l,n);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?wl(e,t,l,n):Js(e,t):c._visibility&2?wl(e,t,l,n):(c._visibility|=2,Va(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),s&2048&&hr(d,t);break;case 24:wl(e,t,l,n),s&2048&&mr(t.alternate,t);break;default:wl(e,t,l,n)}}function Va(e,t,l,n,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,m=l,b=n,z=d.flags;switch(d.tag){case 0:case 11:case 15:Va(c,d,m,b,s),Vs(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?Va(c,d,m,b,s):Js(c,d):(U._visibility|=2,Va(c,d,m,b,s)),s&&z&2048&&hr(d.alternate,d);break;case 24:Va(c,d,m,b,s),s&&z&2048&&mr(d.alternate,d);break;default:Va(c,d,m,b,s)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,s=n.flags;switch(n.tag){case 22:Js(l,n),s&2048&&hr(n.alternate,n);break;case 24:Js(l,n),s&2048&&mr(n.alternate,n);break;default:Js(l,n)}t=t.sibling}}var Is=8192;function Ka(e,t,l){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Jd(e,t,l),e=e.sibling}function Jd(e,t,l){switch(e.tag){case 26:Ka(e,t,l),e.flags&Is&&e.memoizedState!==null&&ux(l,Sl,e.memoizedState,e.memoizedProps);break;case 5:Ka(e,t,l);break;case 3:case 4:var n=Sl;Sl=Ec(e.stateNode.containerInfo),Ka(e,t,l),Sl=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Is,Is=16777216,Ka(e,t,l),Is=n):Ka(e,t,l));break;default:Ka(e,t,l)}}function Id(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 Fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];bt=n,Wd(n,e)}Id(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fd(e),e=e.sibling}function Fd(e){switch(e.tag){case 0:case 11:case 15:Fs(e),e.flags&2048&&An(9,e,e.return);break;case 3:Fs(e);break;case 12:Fs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mc(e)):Fs(e);break;default:Fs(e)}}function mc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];bt=n,Wd(n,e)}Id(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),mc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mc(t));break;default:mc(t)}e=e.sibling}}function Wd(e,t){for(;bt!==null;){var l=bt;switch(l.tag){case 0:case 11:case 15:An(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ds(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,bt=n;else e:for(l=e;bt!==null;){n=bt;var s=n.sibling,c=n.return;if(Yd(n),n===l){bt=null;break e}if(s!==null){s.return=c,bt=s;break e}bt=c}}}var Sg={getCacheForType:function(e){var t=Tt(rt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Tt(rt).controller.signal}},wg=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ne=null,ke=0,Be=0,It=null,_n=!1,Ja=!1,pr=!1,an=0,lt=0,zn=0,da=0,gr=0,Ft=0,Ia=0,Ws=null,qt=null,xr=!1,pc=0,Pd=0,gc=1/0,xc=null,Rn=null,xt=0,Cn=null,Fa=null,sn=0,vr=0,yr=null,eh=null,Ps=0,br=null;function Wt(){return(Le&2)!==0&&ke!==0?ke&-ke:D.T!==null?Tr():ka()}function th(){if(Ft===0)if((ke&536870912)===0||Ae){var e=vl;vl<<=1,(vl&3932160)===0&&(vl=262144),Ft=e}else Ft=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Ft}function $t(e,t,l){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),On(e,ke,Ft,!1)),Rl(e,l),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(da|=l),lt===4&&On(e,ke,Ft,!1)),Ll(e))}function lh(e,t,l){if((Le&6)!==0)throw Error(r(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||on(e,t),s=n?Eg(e,t):Nr(e,t,!0),c=n;do{if(s===0){Ja&&!n&&On(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!kg(l)){s=Nr(e,t,!1),c=!1;continue}if(s===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 m=e;s=Ws;var b=m.current.memoizedState.isDehydrated;if(b&&(Wa(m,d).flags|=256),d=Nr(m,d,!1),d!==2){if(pr&&!b){m.errorRecoveryDisabledLanes|=c,da|=c,s=4;break e}c=qt,qt=s,c!==null&&(qt===null?qt=c:qt.push.apply(qt,c))}s=d}if(c=!1,s!==2)continue}}if(s===1){Wa(e,0),On(e,t,0,!0);break}e:{switch(n=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:On(n,t,Ft,!_n);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=pc+300-_t(),10<s)){if(On(n,t,Ft,!_n),Zn(n,0,!0)!==0)break e;sn=t,n.timeoutHandle=Oh(nh.bind(null,n,l,qt,xc,xr,t,Ft,da,Ia,_n,c,"Throttled",-0,0),s);break e}nh(n,l,qt,xc,xr,t,Ft,da,Ia,_n,c,null,-0,0)}}break}while(!0);Ll(e)}function nh(e,t,l,n,s,c,d,m,b,z,U,$,R,O){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:k},Jd(t,c,$);var se=(c&62914560)===c?pc-_t():(c&4194048)===c?Pd-_t():0;if(se=rx($,se),se!==null){sn=c,e.cancelPendingCommit=se(fh.bind(null,e,t,c,l,n,s,d,m,b,U,$,null,R,O)),On(e,c,d,!z);return}}fh(e,t,c,l,n,s,d,m,b)}function kg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var s=l[n],c=s.getSnapshot;s=s.value;try{if(!Zt(c(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 On(e,t,l,n){t&=~gr,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var s=t;0<s;){var c=31-zt(s),d=1<<c;n[c]=-1,s&=~d}l!==0&&ql(e,l,t)}function vc(){return(Le&6)===0?(ei(0),!1):!0}function jr(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,Kl=na=null,Lu(e),Ya=null,Us=0,e=Ne;for(;e!==null;)Dd(e.alternate,e),e=e.return;Ne=null}}function Wa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Qg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),sn=0,jr(),Ke=e,Ne=l=Zl(e.current,null),ke=t,Be=0,It=null,_n=!1,Ja=on(e,t),pr=!1,Ia=Ft=gr=da=zn=lt=0,qt=Ws=null,xr=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-zt(n),c=1<<s;t|=e[s],n&=~c}return an=t,Bi(),l}function ah(e,t){ge=null,D.H=Xs,t===$a||t===Vi?(t=bf(),Be=3):t===ku?(t=bf(),Be=4):Be=t===Pu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Ne===null&&(lt=1,cc(e,rl(t,e.current)))}function sh(){var e=Kt.current;return e===null?!0:(ke&4194048)===ke?hl===null:(ke&62914560)===ke||(ke&536870912)!==0?e===hl:!1}function ih(){var e=D.H;return D.H=Xs,e===null?Xs:e}function ch(){var e=D.A;return D.A=Sg,e}function yc(){lt=4,_n||(ke&4194048)!==ke&&Kt.current!==null||(Ja=!0),(zn&134217727)===0&&(da&134217727)===0||Ke===null||On(Ke,ke,Ft,!1)}function Nr(e,t,l){var n=Le;Le|=2;var s=ih(),c=ch();(Ke!==e||ke!==t)&&(xc=null,Wa(e,t)),t=!1;var d=lt;e:do try{if(Be!==0&&Ne!==null){var m=Ne,b=It;switch(Be){case 8:jr(),d=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var z=Be;if(Be=0,It=null,Pa(e,m,b,z),l&&Ja){d=0;break e}break;default:z=Be,Be=0,It=null,Pa(e,m,b,z)}}Tg(),d=lt;break}catch(U){ah(e,U)}while(!0);return t&&e.shellSuspendCounter++,Kl=na=null,Le=n,D.H=s,D.A=c,Ne===null&&(Ke=null,ke=0,Bi()),d}function Tg(){for(;Ne!==null;)uh(Ne)}function Eg(e,t){var l=Le;Le|=2;var n=ih(),s=ch();Ke!==e||ke!==t?(xc=null,gc=_t()+500,Wa(e,t)):Ja=on(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var c=It;t:switch(Be){case 1:Be=0,It=null,Pa(e,t,c,1);break;case 2:case 9:if(vf(c)){Be=0,It=null,rh(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),Ll(e)},c.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:vf(c)?(Be=0,It=null,rh(t)):(Be=0,It=null,Pa(e,t,c,7));break;case 5:var d=null;switch(Ne.tag){case 26:d=Ne.memoizedState;case 5:case 27:var m=Ne;if(d?Kh(d):m.stateNode.complete){Be=0,It=null;var b=m.sibling;if(b!==null)Ne=b;else{var z=m.return;z!==null?(Ne=z,bc(z)):Ne=null}break t}}Be=0,It=null,Pa(e,t,c,5);break;case 6:Be=0,It=null,Pa(e,t,c,6);break;case 8:jr(),lt=6;break e;default:throw Error(r(462))}}Ag();break}catch(U){ah(e,U)}while(!0);return Kl=na=null,D.H=n,D.A=s,Le=l,Ne!==null?0:(Ke=null,ke=0,Bi(),lt)}function Ag(){for(;Ne!==null&&!ji();)uh(Ne)}function uh(e){var t=Cd(e.alternate,e,an);e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function rh(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Td(l,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Td(l,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Lu(t);default:Dd(l,t),t=Ne=cf(t,an),t=Cd(l,t,an)}e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function Pa(e,t,l,n){Kl=na=null,Lu(t),Ya=null,Us=0;var s=t.return;try{if(gg(e,s,t,l,ke)){lt=1,cc(e,rl(l,e.current)),Ne=null;return}}catch(c){if(s!==null)throw Ne=s,c;lt=1,cc(e,rl(l,e.current)),Ne=null;return}t.flags&32768?(Ae||n===1?e=!0:Ja||(ke&536870912)!==0?e=!1:(_n=e=!0,(n===2||n===9||n===3||n===6)&&(n=Kt.current,n!==null&&n.tag===13&&(n.flags|=16384))),oh(t,e)):bc(t)}function bc(e){var t=e;do{if((t.flags&32768)!==0){oh(t,_n);return}e=t.return;var l=yg(t.alternate,t,an);if(l!==null){Ne=l;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);lt===0&&(lt=5)}function oh(e,t){do{var l=bg(e.alternate,e);if(l!==null){l.flags&=32767,Ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=l}while(e!==null);lt=6,Ne=null}function fh(e,t,l,n,s,c,d,m,b){e.cancelPendingCommit=null;do jc();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=ou,sl(e,l,c,d,m,b),e===Ke&&(Ne=Ke=null,ke=0),Fa=t,Cn=e,sn=l,vr=c,yr=s,eh=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Cg(nl,function(){return gh(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,s=K.p,K.p=2,d=Le,Le|=4;try{jg(e,t,l)}finally{Le=d,K.p=s,D.T=n}}xt=1,dh(),hh(),mh()}}function dh(){if(xt===1){xt=0;var e=Cn,t=Fa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var n=K.p;K.p=2;var s=Le;Le|=4;try{Zd(t,e);var c=Dr,d=Fo(e.containerInfo),m=c.focusedElem,b=c.selectionRange;if(d!==m&&m&&m.ownerDocument&&Io(m.ownerDocument.documentElement,m)){if(b!==null&&su(m)){var z=b.start,U=b.end;if(U===void 0&&(U=z),"selectionStart"in m)m.selectionStart=z,m.selectionEnd=Math.min(U,m.value.length);else{var $=m.ownerDocument||document,R=$&&$.defaultView||window;if(R.getSelection){var O=R.getSelection(),se=m.textContent.length,de=Math.min(b.start,se),Ze=b.end===void 0?de:Math.min(b.end,se);!O.extend&&de>Ze&&(d=Ze,Ze=de,de=d);var T=Jo(m,de),j=Jo(m,Ze);if(T&&j&&(O.rangeCount!==1||O.anchorNode!==T.node||O.anchorOffset!==T.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var _=$.createRange();_.setStart(T.node,T.offset),O.removeAllRanges(),de>Ze?(O.addRange(_),O.extend(j.node,j.offset)):(_.setEnd(j.node,j.offset),O.addRange(_))}}}}for($=[],O=m;O=O.parentNode;)O.nodeType===1&&$.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<$.length;m++){var H=$[m];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Oc=!!Or,Dr=Or=null}finally{Le=s,K.p=n,D.T=l}}e.current=t,xt=2}}function hh(){if(xt===2){xt=0;var e=Cn,t=Fa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var n=K.p;K.p=2;var s=Le;Le|=4;try{$d(e,t.alternate,t)}finally{Le=s,K.p=n,D.T=l}}xt=3}}function mh(){if(xt===4||xt===3){xt=0,fs();var e=Cn,t=Fa,l=sn,n=eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,Fa=Cn=null,ph(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Rn=null),wa(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(al,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=D.T,s=K.p,K.p=2,D.T=null;try{for(var c=e.onRecoverableError,d=0;d<n.length;d++){var m=n[d];c(m.value,{componentStack:m.stack})}}finally{D.T=t,K.p=s}}(sn&3)!==0&&jc(),Ll(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===br?Ps++:(Ps=0,br=e):Ps=0,ei(0)}}function ph(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ds(t)))}function jc(){return dh(),hh(),mh(),gh()}function gh(){if(xt!==5)return!1;var e=Cn,t=vr;vr=0;var l=wa(sn),n=D.T,s=K.p;try{K.p=32>l?32:l,D.T=null,l=yr,yr=null;var c=Cn,d=sn;if(xt=0,Fa=Cn=null,sn=0,(Le&6)!==0)throw Error(r(331));var m=Le;if(Le|=4,Fd(c.current),Kd(c,c.current,d,l),Le=m,ei(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(al,c)}catch{}return!0}finally{K.p=s,D.T=n,ph(e,t)}}function xh(e,t,l){t=rl(l,t),t=Wu(e.stateNode,t,2),e=kn(e,t,2),e!==null&&(Rl(e,2),Ll(e))}function qe(e,t,l){if(e.tag===3)xh(e,e,l);else for(;t!==null;){if(t.tag===3){xh(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rn===null||!Rn.has(n))){e=rl(l,e),l=vd(2),n=kn(t,l,2),n!==null&&(yd(l,n,t,e),Rl(n,2),Ll(n));break}}t=t.return}}function Sr(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new wg;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(l)||(pr=!0,s.add(l),e=_g.bind(null,e,t,l),t.then(e,e))}function _g(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ke===e&&(ke&l)===l&&(lt===4||lt===3&&(ke&62914560)===ke&&300>_t()-pc?(Le&2)===0&&Wa(e,0):gr|=l,Ia===ke&&(Ia=0)),Ll(e)}function vh(e,t){t===0&&(t=ps()),e=ea(e,t),e!==null&&(Rl(e,t),Ll(e))}function zg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),vh(e,l)}function Rg(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(t),vh(e,l)}function Cg(e,t){return ba(e,t)}var Nc=null,es=null,wr=!1,Sc=!1,kr=!1,Dn=0;function Ll(e){e!==es&&e.next===null&&(es===null?Nc=es=e:es=es.next=e),Sc=!0,wr||(wr=!0,Dg())}function ei(e,t){if(!kr&&Sc){kr=!0;do for(var l=!1,n=Nc;n!==null;){if(e!==0){var s=n.pendingLanes;if(s===0)var c=0;else{var d=n.suspendedLanes,m=n.pingedLanes;c=(1<<31-zt(42|e)+1)-1,c&=s&~(d&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,Nh(n,c))}else c=ke,c=Zn(n,n===Ke?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(c&3)===0||on(n,c)||(l=!0,Nh(n,c));n=n.next}while(l);kr=!1}}function Og(){yh()}function yh(){Sc=wr=!1;var e=0;Dn!==0&&Xg()&&(e=Dn);for(var t=_t(),l=null,n=Nc;n!==null;){var s=n.next,c=bh(n,t);c===0?(n.next=null,l===null?Nc=s:l.next=s,s===null&&(es=l)):(l=n,(e!==0||(c&3)!==0)&&(Sc=!0)),n=s}xt!==0&&xt!==5||ei(e),Dn!==0&&(Dn=0)}function bh(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-zt(c),m=1<<d,b=s[d];b===-1?((m&l)===0||(m&n)!==0)&&(s[d]=ki(m,t)):b<=t&&(e.expiredLanes|=m),c&=~m}if(t=Ke,l=ke,l=Zn(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&ll(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||on(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&ll(n),wa(l)){case 2:case 8:l=_l;break;case 32:l=nl;break;case 268435456:l=Qn;break;default:l=nl}return n=jh.bind(null,e),l=ba(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&ll(n),e.callbackPriority=2,e.callbackNode=null,2}function jh(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(jc()&&e.callbackNode!==l)return null;var n=ke;return n=Zn(e,e===Ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(lh(e,n,t),bh(e,_t()),e.callbackNode!=null&&e.callbackNode===l?jh.bind(null,e):null)}function Nh(e,t){if(jc())return null;lh(e,t,!0)}function Dg(){Zg(function(){(Le&6)!==0?ba(xl,Og):yh()})}function Tr(){if(Dn===0){var e=Ba;e===0&&(e=rn,rn<<=1,(rn&261888)===0&&(rn=256)),Dn=e}return Dn}function Sh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:x(""+e)}function wh(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function Mg(e,t,l,n,s){if(t==="submit"&&l&&l.stateNode===s){var c=Sh((s[it]||null).action),d=n.submitter;d&&(t=(t=d[it]||null)?Sh(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var m=new Mi("action","action",null,n,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dn!==0){var b=d?wh(s,d):new FormData(s);Zu(l,{pending:!0,data:b,method:s.method,action:c},null,b)}}else typeof c=="function"&&(m.preventDefault(),b=d?wh(s,d):new FormData(s),Zu(l,{pending:!0,data:b,method:s.method,action:c},c,b))},currentTarget:s}]})}}for(var Er=0;Er<ru.length;Er++){var Ar=ru[Er],Ug=Ar.toLowerCase(),Lg=Ar[0].toUpperCase()+Ar.slice(1);Nl(Ug,"on"+Lg)}Nl(ef,"onAnimationEnd"),Nl(tf,"onAnimationIteration"),Nl(lf,"onAnimationStart"),Nl("dblclick","onDoubleClick"),Nl("focusin","onFocus"),Nl("focusout","onBlur"),Nl(Pp,"onTransitionRun"),Nl(eg,"onTransitionStart"),Nl(tg,"onTransitionCancel"),Nl(nf,"onTransitionEnd"),jl("onMouseEnter",["mouseout","mouseover"]),jl("onMouseLeave",["mouseout","mouseover"]),jl("onPointerEnter",["pointerout","pointerover"]),jl("onPointerLeave",["pointerout","pointerover"]),Cl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Cl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Cl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Cl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Cl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ti="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(" "),Hg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function kh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],s=n.event;n=n.listeners;e:{var c=void 0;if(t)for(var d=n.length-1;0<=d;d--){var m=n[d],b=m.instance,z=m.currentTarget;if(m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=z;try{c(s)}catch(U){Hi(U)}s.currentTarget=null,c=b}else for(d=0;d<n.length;d++){if(m=n[d],b=m.instance,z=m.currentTarget,m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=z;try{c(s)}catch(U){Hi(U)}s.currentTarget=null,c=b}}}}function Se(e,t){var l=t[vs];l===void 0&&(l=t[vs]=new Set);var n=e+"__bubble";l.has(n)||(Th(t,e,2,!1),l.add(n))}function _r(e,t,l){var n=0;t&&(n|=4),Th(l,e,n,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[wc]){e[wc]=!0,Ei.forEach(function(l){l!=="selectionchange"&&(Hg.has(l)||_r(l,!1,e),_r(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,_r("selectionchange",!1,t))}}function Th(e,t,l,n){switch(tm(t)){case 2:var s=dx;break;case 8:s=hx;break;default:s=Qr}l=s.bind(null,t,l,e),s=void 0,!gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Rr(e,t,l,n,s){var c=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var m=n.stateNode.containerInfo;if(m===s)break;if(d===4)for(d=n.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;m!==null;){if(d=$l(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){n=c=d;continue e}m=m.parentNode}}n=n.return}wt(function(){var z=c,U=te(l),$=[];e:{var R=af.get(e);if(R!==void 0){var O=Mi,se=e;switch(e){case"keypress":if(Oi(l)===0)break e;case"keydown":case"keyup":O=Rp;break;case"focusin":se="focus",O=eu;break;case"focusout":se="blur",O=eu;break;case"beforeblur":case"afterblur":O=eu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Oo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=yp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Dp;break;case ef:case tf:case lf:O=Np;break;case nf:O=Up;break;case"scroll":case"scrollend":O=xp;break;case"wheel":O=Hp;break;case"copy":case"cut":case"paste":O=wp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Mo;break;case"toggle":case"beforetoggle":O=qp}var de=(t&4)!==0,Ze=!de&&(e==="scroll"||e==="scrollend"),T=de?R!==null?R+"Capture":null:R;de=[];for(var j=z,_;j!==null;){var H=j;if(_=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||_===null||T===null||(H=ut(j,T),H!=null&&de.push(li(j,H,_))),Ze)break;j=j.return}0<de.length&&(R=new O(R,se,null,l,U),$.push({event:R,listeners:de}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&l!==G&&(se=l.relatedTarget||l.fromElement)&&($l(se)||se[dn]))break e;if((O||R)&&(R=U.window===U?U:(R=U.ownerDocument)?R.defaultView||R.parentWindow:window,O?(se=l.relatedTarget||l.toElement,O=z,se=se?$l(se):null,se!==null&&(Ze=h(se),de=se.tag,se!==Ze||de!==5&&de!==27&&de!==6)&&(se=null)):(O=null,se=z),O!==se)){if(de=Oo,H="onMouseLeave",T="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(de=Mo,H="onPointerLeave",T="onPointerEnter",j="pointer"),Ze=O==null?R:Kn(O),_=se==null?R:Kn(se),R=new de(H,j+"leave",O,l,U),R.target=Ze,R.relatedTarget=_,H=null,$l(U)===z&&(de=new de(T,j+"enter",se,l,U),de.target=_,de.relatedTarget=Ze,H=de),Ze=H,O&&se)t:{for(de=Bg,T=O,j=se,_=0,H=T;H;H=de(H))_++;H=0;for(var ue=j;ue;ue=de(ue))H++;for(;0<_-H;)T=de(T),_--;for(;0<H-_;)j=de(j),H--;for(;_--;){if(T===j||j!==null&&T===j.alternate){de=T;break t}T=de(T),j=de(j)}de=null}else de=null;O!==null&&Eh($,R,O,de,!1),se!==null&&Ze!==null&&Eh($,Ze,se,de,!0)}}e:{if(R=z?Kn(z):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var Me=Go;else if($o(R))if(Xo)Me=Ip;else{Me=Kp;var ie=Vp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?z&&xn(z.elementType)&&(Me=Go):Me=Jp;if(Me&&(Me=Me(e,z))){Yo($,Me,l,U);break e}ie&&ie(e,R,z),e==="focusout"&&z&&R.type==="number"&&z.memoizedProps.value!=null&&_a(R,"number",R.value)}switch(ie=z?Kn(z):window,e){case"focusin":($o(ie)||ie.contentEditable==="true")&&(Ra=ie,iu=z,Rs=null);break;case"focusout":Rs=iu=Ra=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Wo($,l,U);break;case"selectionchange":if(Wp)break;case"keydown":case"keyup":Wo($,l,U)}var xe;if(lu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else za?Bo(e,l)&&(Te="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Te="onCompositionStart");Te&&(Uo&&l.locale!=="ko"&&(za||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&za&&(xe=Ro()):(vn=U,Fc="value"in vn?vn.value:vn.textContent,za=!0)),ie=kc(z,Te),0<ie.length&&(Te=new Do(Te,e,null,l,U),$.push({event:Te,listeners:ie}),xe?Te.data=xe:(xe=qo(l),xe!==null&&(Te.data=xe)))),(xe=Yp?Gp(e,l):Xp(e,l))&&(Te=kc(z,"onBeforeInput"),0<Te.length&&(ie=new Do("onBeforeInput","beforeinput",null,l,U),$.push({event:ie,listeners:Te}),ie.data=xe)),Mg($,e,z,l,U)}kh($,t)})}function li(e,t,l){return{instance:e,listener:t,currentTarget:l}}function kc(e,t){for(var l=t+"Capture",n=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=ut(e,l),s!=null&&n.unshift(li(e,s,c)),s=ut(e,t),s!=null&&n.push(li(e,s,c))),e.tag===3)return n;e=e.return}return[]}function Bg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Eh(e,t,l,n,s){for(var c=t._reactName,d=[];l!==null&&l!==n;){var m=l,b=m.alternate,z=m.stateNode;if(m=m.tag,b!==null&&b===n)break;m!==5&&m!==26&&m!==27||z===null||(b=z,s?(z=ut(l,c),z!=null&&d.unshift(li(l,z,b))):s||(z=ut(l,c),z!=null&&d.push(li(l,z,b)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var qg=/\r\n?/g,$g=/\u0000|\uFFFD/g;function Ah(e){return(typeof e=="string"?e:""+e).replace(qg,`
|
|
9
|
+
`).replace($g,"")}function _h(e,t){return t=Ah(t),Ah(e)===t}function Qe(e,t,l,n,s,c){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||Ql(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&Ql(e,""+n);break;case"className":In(e,"class",n);break;case"tabIndex":In(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":In(e,l,n);break;case"style":Ns(e,n,c);break;case"data":if(t!=="object"){In(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=x(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(t!=="input"&&Qe(e,t,"name",s.name,s,null),Qe(e,t,"formEncType",s.formEncType,s,null),Qe(e,t,"formMethod",s.formMethod,s,null),Qe(e,t,"formTarget",s.formTarget,s,null)):(Qe(e,t,"encType",s.encType,s,null),Qe(e,t,"method",s.method,s,null),Qe(e,t,"target",s.target,s,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=x(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=k);break;case"onScroll":n!=null&&Se("scroll",e);break;case"onScrollEnd":n!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=x(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);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":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":Se("beforetoggle",e),Se("toggle",e),Ta(e,"popover",n);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ta(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ss.get(l)||l,Ta(e,l,n))}}function Cr(e,t,l,n,s,c){switch(l){case"style":Ns(e,n,c);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof n=="string"?Ql(e,n):(typeof n=="number"||typeof n=="bigint")&&Ql(e,""+n);break;case"onScroll":n!=null&&Se("scroll",e);break;case"onScrollEnd":n!=null&&Se("scrollend",e);break;case"onClick":n!=null&&(e.onclick=k);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bl.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),c=e[it]||null,c=c!=null?c[l]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof n=="function")){typeof c!="function"&&c!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,s);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):Ta(e,l,n)}}}function At(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var n=!1,s=!1,c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c];if(d!=null)switch(c){case"src":n=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,c,d,l,null)}}s&&Qe(e,t,"srcSet",l.srcSet,l,null),n&&Qe(e,t,"src",l.src,l,null);return;case"input":Se("invalid",e);var m=c=d=s=null,b=null,z=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){case"name":s=U;break;case"type":d=U;break;case"checked":b=U;break;case"defaultChecked":z=U;break;case"value":c=U;break;case"defaultValue":m=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,t));break;default:Qe(e,t,n,U,l,null)}}bs(e,c,m,b,z,d,s,!1);return;case"select":Se("invalid",e),n=d=c=null;for(s in l)if(l.hasOwnProperty(s)&&(m=l[s],m!=null))switch(s){case"value":c=m;break;case"defaultValue":d=m;break;case"multiple":n=m;default:Qe(e,t,s,m,l,null)}t=c,l=d,e.multiple=!!n,t!=null?Xl(e,!!n,t,!1):l!=null&&Xl(e,!!n,l,!0);return;case"textarea":Se("invalid",e),c=s=n=null;for(d in l)if(l.hasOwnProperty(d)&&(m=l[d],m!=null))switch(d){case"value":n=m;break;case"defaultValue":s=m;break;case"children":c=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Qe(e,t,d,m,l,null)}zi(e,n,s,c);return;case"option":for(b in l)l.hasOwnProperty(b)&&(n=l[b],n!=null)&&(b==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":Qe(e,t,b,n,l,null));return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(n=0;n<ti.length;n++)Se(ti[n],e);break;case"image":Se("error",e),Se("load",e);break;case"details":Se("toggle",e);break;case"embed":case"source":case"link":Se("error",e),Se("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(z in l)if(l.hasOwnProperty(z)&&(n=l[z],n!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,z,n,l,null)}return;default:if(xn(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&Cr(e,t,U,n,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(n=l[m],n!=null&&Qe(e,t,m,n,l,null))}function Yg(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,d=null,m=null,b=null,z=null,U=null;for(O in l){var $=l[O];if(l.hasOwnProperty(O)&&$!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=$;default:n.hasOwnProperty(O)||Qe(e,t,O,null,n,$)}}for(var R in n){var O=n[R];if($=l[R],n.hasOwnProperty(R)&&(O!=null||$!=null))switch(R){case"type":c=O;break;case"name":s=O;break;case"checked":z=O;break;case"defaultChecked":U=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==$&&Qe(e,t,R,O,n,$)}}ys(e,d,m,b,z,U,c,s);return;case"select":O=d=m=R=null;for(c in l)if(b=l[c],l.hasOwnProperty(c)&&b!=null)switch(c){case"value":break;case"multiple":O=b;default:n.hasOwnProperty(c)||Qe(e,t,c,null,n,b)}for(s in n)if(c=n[s],b=l[s],n.hasOwnProperty(s)&&(c!=null||b!=null))switch(s){case"value":R=c;break;case"defaultValue":m=c;break;case"multiple":d=c;default:c!==b&&Qe(e,t,s,c,n,b)}t=m,l=d,n=O,R!=null?Xl(e,!!l,R,!1):!!n!=!!l&&(t!=null?Xl(e,!!l,t,!0):Xl(e,!!l,l?[]:"",!1));return;case"textarea":O=R=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!n.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Qe(e,t,m,null,n,s)}for(d in n)if(s=n[d],c=l[d],n.hasOwnProperty(d)&&(s!=null||c!=null))switch(d){case"value":R=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&Qe(e,t,d,s,n,c)}js(e,R,O);return;case"option":for(var se in l)R=l[se],l.hasOwnProperty(se)&&R!=null&&!n.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Qe(e,t,se,null,n,R));for(b in n)R=n[b],O=l[b],n.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Qe(e,t,b,R,n,O));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 de in l)R=l[de],l.hasOwnProperty(de)&&R!=null&&!n.hasOwnProperty(de)&&Qe(e,t,de,null,n,R);for(z in n)if(R=n[z],O=l[z],n.hasOwnProperty(z)&&R!==O&&(R!=null||O!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Qe(e,t,z,R,n,O)}return;default:if(xn(t)){for(var Ze in l)R=l[Ze],l.hasOwnProperty(Ze)&&R!==void 0&&!n.hasOwnProperty(Ze)&&Cr(e,t,Ze,void 0,n,R);for(U in n)R=n[U],O=l[U],!n.hasOwnProperty(U)||R===O||R===void 0&&O===void 0||Cr(e,t,U,R,n,O);return}}for(var T in l)R=l[T],l.hasOwnProperty(T)&&R!=null&&!n.hasOwnProperty(T)&&Qe(e,t,T,null,n,R);for($ in n)R=n[$],O=l[$],!n.hasOwnProperty($)||R===O||R==null&&O==null||Qe(e,t,$,R,n,O)}function zh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Gg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var s=l[n],c=s.transferSize,d=s.initiatorType,m=s.duration;if(c&&m&&zh(d)){for(d=0,m=s.responseEnd,n+=1;n<l.length;n++){var b=l[n],z=b.startTime;if(z>m)break;var U=b.transferSize,$=b.initiatorType;U&&zh($)&&(b=b.responseEnd,d+=U*(b<m?1:(m-z)/(b-z)))}if(--n,t+=8*(c+d)/(s.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 Or=null,Dr=null;function Tc(e){return e.nodeType===9?e:e.ownerDocument}function Rh(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 Ch(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 Mr(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 Ur=null;function Xg(){var e=window.event;return e&&e.type==="popstate"?e===Ur?!1:(Ur=e,!0):(Ur=null,!1)}var Oh=typeof setTimeout=="function"?setTimeout:void 0,Qg=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Zg=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Vg)}:Oh;function Vg(e){setTimeout(function(){throw e})}function Mn(e){return e==="head"}function Mh(e,t){var l=t,n=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(s),as(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")ni(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ni(l);for(var c=l.firstChild;c;){var d=c.nextSibling,m=c.nodeName;c[mn]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=d}}else l==="body"&&ni(e.ownerDocument.body);l=s}while(l);as(t)}function Uh(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Lr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Lr(l),Vn(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Kg(e,t,l,n){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[mn])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!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=ml(e.nextSibling),e===null)break}return null}function Jg(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ml(e.nextSibling),e===null))return null;return e}function Lh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ml(e.nextSibling),e===null))return null;return e}function Hr(e){return e.data==="$?"||e.data==="$~"}function Br(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ig(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function ml(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 qr=null;function Hh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ml(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Bh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function qh(e,t,l){switch(t=Tc(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ni(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vn(e)}var pl=new Map,$h=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var cn=K.d;K.d={f:Fg,r:Wg,D:Pg,C:ex,L:tx,m:lx,X:ax,S:nx,M:sx};function Fg(){var e=cn.f(),t=vc();return e||t}function Wg(e){var t=Yl(e);t!==null&&t.tag===5&&t.type==="form"?ad(t):cn.r(e)}var ts=typeof document>"u"?null:document;function Yh(e,t,l){var n=ts;if(n&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),$h.has(s)||($h.add(s),e={rel:e,crossOrigin:l,href:t},n.querySelector(s)===null&&(t=n.createElement("link"),At(t,"link",e),ct(t),n.head.appendChild(t)))}}function Pg(e){cn.D(e),Yh("dns-prefetch",e,null)}function ex(e,t){cn.C(e,t),Yh("preconnect",e,t)}function tx(e,t,l){cn.L(e,t,l);var n=ts;if(n&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+St(l.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var c=s;switch(t){case"style":c=ls(e);break;case"script":c=ns(e)}pl.has(c)||(e=E({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),pl.set(c,e),n.querySelector(s)!==null||t==="style"&&n.querySelector(ai(c))||t==="script"&&n.querySelector(si(c))||(t=n.createElement("link"),At(t,"link",e),ct(t),n.head.appendChild(t)))}}function lx(e,t){cn.m(e,t);var l=ts;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(n)+'"][href="'+St(e)+'"]',c=s;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ns(e)}if(!pl.has(c)&&(e=E({rel:"modulepreload",href:e},t),pl.set(c,e),l.querySelector(s)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(si(c)))return}n=l.createElement("link"),At(n,"link",e),ct(n),l.head.appendChild(n)}}}function nx(e,t,l){cn.S(e,t,l);var n=ts;if(n&&e){var s=pn(n).hoistableStyles,c=ls(e);t=t||"default";var d=s.get(c);if(!d){var m={loading:0,preload:null};if(d=n.querySelector(ai(c)))m.loading=5;else{e=E({rel:"stylesheet",href:e,"data-precedence":t},l),(l=pl.get(c))&&$r(e,l);var b=d=n.createElement("link");ct(b),At(b,"link",e),b._p=new Promise(function(z,U){b.onload=z,b.onerror=U}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ac(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:m},s.set(c,d)}}}function ax(e,t){cn.X(e,t);var l=ts;if(l&&e){var n=pn(l).hoistableScripts,s=ns(e),c=n.get(s);c||(c=l.querySelector(si(s)),c||(e=E({src:e,async:!0},t),(t=pl.get(s))&&Yr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function sx(e,t){cn.M(e,t);var l=ts;if(l&&e){var n=pn(l).hoistableScripts,s=ns(e),c=n.get(s);c||(c=l.querySelector(si(s)),c||(e=E({src:e,async:!0,type:"module"},t),(t=pl.get(s))&&Yr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},n.set(s,c))}}function Gh(e,t,l,n){var s=(s=pe.current)?Ec(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ls(l.href),l=pn(s).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ls(l.href);var c=pn(s).hoistableStyles,d=c.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=s.querySelector(ai(e)))&&!c._p&&(d.instance=c,d.state.loading=5),pl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pl.set(e,l),c||ix(s,e,l,d.state))),t&&n===null)throw Error(r(528,""));return d}if(t&&n!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ns(l),l=pn(s).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ls(e){return'href="'+St(e)+'"'}function ai(e){return'link[rel="stylesheet"]['+e+"]"}function Xh(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function ix(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),At(t,"link",l),ct(t),e.head.appendChild(t))}function ns(e){return'[src="'+St(e)+'"]'}function si(e){return"script[async]"+e}function Qh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(n)return t.instance=n,ct(n),n;var s=E({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ct(n),At(n,"style",s),Ac(n,l.precedence,e),t.instance=n;case"stylesheet":s=ls(l.href);var c=e.querySelector(ai(s));if(c)return t.state.loading|=4,t.instance=c,ct(c),c;n=Xh(l),(s=pl.get(s))&&$r(n,s),c=(e.ownerDocument||e).createElement("link"),ct(c);var d=c;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",n),t.state.loading|=4,Ac(c,l.precedence,e),t.instance=c;case"script":return c=ns(l.src),(s=e.querySelector(si(c)))?(t.instance=s,ct(s),s):(n=l,(s=pl.get(c))&&(n=E({},l),Yr(n,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),At(s,"link",n),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,Ac(n,l.precedence,e));return t.instance}function Ac(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=n.length?n[n.length-1]:null,c=s,d=0;d<n.length;d++){var m=n[d];if(m.dataset.precedence===t)c=m;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function $r(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _c=null;function Zh(e,t,l){if(_c===null){var n=new Map,s=_c=new Map;s.set(l,n)}else s=_c,n=s.get(l),n||(n=new Map,s.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var c=l[s];if(!(c[mn]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var m=n.get(d);m?m.push(c):n.set(d,[c])}}return n}function Vh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function cx(e,t,l){if(l===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;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!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 Kh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ux(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ls(n.href),c=t.querySelector(ai(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,ct(c);return}c=t.ownerDocument||t,n=Xh(n),(s=pl.get(s))&&$r(n,s),c=c.createElement("link"),ct(c);var d=c;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",n),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=zc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Gr=0;function rx(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&Gr===0&&(Gr=62500*Gg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>Gr?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(s)}}:null}function zc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rc=new Map,t.forEach(ox,e),Rc=null,zc.call(e))}function ox(e,t){if(!(t.state.loading&4)){var l=Rc.get(e);if(l)var n=l.get(null);else{l=new Map,Rc.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var d=s[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),n=d)}n&&l.set(null,n)}s=t.instance,d=s.getAttribute("data-precedence"),c=l.get(d)||n,c===n&&l.set(null,s),l.set(d,s),this.count++,n=zc.bind(this),s.addEventListener("load",n),s.addEventListener("error",n),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:fe,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function fx(e,t,l,n,s,c,d,m,b){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=fn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fn(0),this.hiddenUpdates=fn(null),this.identifierPrefix=n,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Jh(e,t,l,n,s,c,d,m,b,z,U,$){return e=new fx(e,t,l,d,b,z,U,$,m),t=1,c===!0&&(t|=24),c=Vt(3,null,null,t),e.current=c,c.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:n,isDehydrated:l,cache:t},Tu(c),e}function Ih(e){return e?(e=Da,e):Da}function Fh(e,t,l,n,s,c){s=Ih(s),n.context===null?n.context=s:n.pendingContext=s,n=wn(t),n.payload={element:l},c=c===void 0?null:c,c!==null&&(n.callback=c),l=kn(e,n,t),l!==null&&($t(l,e,t),Hs(l,e,t))}function Wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Xr(e,t){Wh(e,t),(e=e.alternate)&&Wh(e,t)}function Ph(e){if(e.tag===13||e.tag===31){var t=ea(e,67108864);t!==null&&$t(t,e,67108864),Xr(e,67108864)}}function em(e){if(e.tag===13||e.tag===31){var t=Wt();t=gs(t);var l=ea(e,t);l!==null&&$t(l,e,t),Xr(e,t)}}var Oc=!0;function dx(e,t,l,n){var s=D.T;D.T=null;var c=K.p;try{K.p=2,Qr(e,t,l,n)}finally{K.p=c,D.T=s}}function hx(e,t,l,n){var s=D.T;D.T=null;var c=K.p;try{K.p=8,Qr(e,t,l,n)}finally{K.p=c,D.T=s}}function Qr(e,t,l,n){if(Oc){var s=Zr(n);if(s===null)Rr(e,t,n,Dc,l),lm(e,n);else if(px(s,e,t,l,n))n.stopPropagation();else if(lm(e,n),t&4&&-1<mx.indexOf(e)){for(;s!==null;){var c=Yl(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=zl(c.pendingLanes);if(d!==0){var m=c;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-zt(d);m.entanglements[1]|=b,d&=~b}Ll(c),(Le&6)===0&&(gc=_t()+500,ei(0))}}break;case 31:case 13:m=ea(c,2),m!==null&&$t(m,c,2),vc(),Xr(c,2)}if(c=Zr(n),c===null&&Rr(e,t,n,Dc,l),c===s)break;s=c}s!==null&&n.stopPropagation()}else Rr(e,t,n,null,l)}}function Zr(e){return e=te(e),Vr(e)}var Dc=null;function Vr(e){if(Dc=null,e=$l(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=g(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dc=e,null}function tm(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(Ni()){case xl:return 2;case _l:return 8;case nl:case ds:return 32;case Qn:return 268435456;default:return 32}default:return 32}}var Kr=!1,Un=null,Ln=null,Hn=null,ci=new Map,ui=new Map,Bn=[],mx="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 lm(e,t){switch(e){case"focusin":case"focusout":Un=null;break;case"dragenter":case"dragleave":Ln=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function ri(e,t,l,n,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Yl(t),t!==null&&Ph(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function px(e,t,l,n,s){switch(t){case"focusin":return Un=ri(Un,e,t,l,n,s),!0;case"dragenter":return Ln=ri(Ln,e,t,l,n,s),!0;case"mouseover":return Hn=ri(Hn,e,t,l,n,s),!0;case"pointerover":var c=s.pointerId;return ci.set(c,ri(ci.get(c)||null,e,t,l,n,s)),!0;case"gotpointercapture":return c=s.pointerId,ui.set(c,ri(ui.get(c)||null,e,t,l,n,s)),!0}return!1}function nm(e){var t=$l(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,xs(e.priority,function(){em(l)});return}}else if(t===31){if(t=g(l),t!==null){e.blockedOn=t,xs(e.priority,function(){em(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Zr(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);G=n,l.target.dispatchEvent(n),G=null}else return t=Yl(l),t!==null&&Ph(t),e.blockedOn=l,!1;t.shift()}return!0}function am(e,t,l){Mc(e)&&l.delete(t)}function gx(){Kr=!1,Un!==null&&Mc(Un)&&(Un=null),Ln!==null&&Mc(Ln)&&(Ln=null),Hn!==null&&Mc(Hn)&&(Hn=null),ci.forEach(am),ui.forEach(am)}function Uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Kr||(Kr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,gx)))}var Lc=null;function sm(e){Lc!==e&&(Lc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Lc===e&&(Lc=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],s=e[t+2];if(typeof n!="function"){if(Vr(n||l)===null)continue;break}var c=Yl(l);c!==null&&(e.splice(t,3),t-=3,Zu(c,{pending:!0,data:s,method:l.method,action:n},n,s))}}))}function as(e){function t(b){return Uc(b,e)}Un!==null&&Uc(Un,e),Ln!==null&&Uc(Ln,e),Hn!==null&&Uc(Hn,e),ci.forEach(t),ui.forEach(t);for(var l=0;l<Bn.length;l++){var n=Bn[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Bn.length&&(l=Bn[0],l.blockedOn===null);)nm(l),l.blockedOn===null&&Bn.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var s=l[n],c=l[n+1],d=s[it]||null;if(typeof c=="function")d||sm(l);else if(d){var m=null;if(c&&c.hasAttribute("formAction")){if(s=c,d=c[it]||null)m=d.formAction;else if(Vr(s)!==null)continue}else m=d.action;typeof m=="function"?l[n+1]=m:(l.splice(n,3),n-=3),sm(l)}}}function im(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),n||setTimeout(l,20)}function l(){if(!n&&!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 n=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Jr(e){this._internalRoot=e}Hc.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,n=Wt();Fh(l,n,e,t,null,null)},Hc.prototype.unmount=Jr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fh(e.current,2,null,e,null,null),vc(),t[dn]=null}};function Hc(e){this._internalRoot=e}Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=ka();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Bn.length&&t!==0&&t<Bn[l].priority;l++);Bn.splice(l,0,e),l===0&&nm(e)}};var cm=i.version;if(cm!=="19.2.8")throw Error(r(527,cm,"19.2.8"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var xx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{al=Bc.inject(xx),yt=Bc}catch{}}return fi.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,n="",s=md,c=pd,d=gd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Jh(e,1,!1,null,null,l,n,null,s,c,d,im),e[dn]=t.current,zr(e),new Jr(t)},fi.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var n=!1,s="",c=md,d=pd,m=gd,b=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Jh(e,1,!0,t,l??null,n,s,b,c,d,m,im),t.context=Ih(null),l=t.current,n=Wt(),n=gs(n),s=wn(n),s.callback=null,kn(l,s,n),l=n,t.current.lanes=l,Rl(t,l),Ll(t),e[dn]=t.current,zr(e),new Hc(t)},fi.version="19.2.8",fi}var xm;function Ex(){if(xm)return Wr.exports;xm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),Wr.exports=Tx(),Wr.exports}var Ax=Ex();function P({name:u,fill:i,className:o}){return a.jsx("span",{className:`ms material-symbols-rounded${i?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:u})}function _x(){const[u,i]=C.useState(()=>window.location.hash.slice(1)||"/");return C.useEffect(()=>{const o=()=>i(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),u}let uo="kraftwerk inspector",ro="";function Fm(){document.title=ro?`${ro} — ${uo}`:uo}function zx(u){uo=u,Fm()}function vm(u){ro=u,Fm()}function gl(u,i){i?.replace?window.location.replace(`#${u}`):window.location.hash=u}function Ce({href:u,...i}){return a.jsx("a",{href:`#${u}`,...i})}const Wm="kw-expert";let vo=(()=>{try{return localStorage.getItem(Wm)!=="off"}catch{return!0}})();const oo=new Set;document.documentElement.dataset.expert=vo?"on":"off";function Rx(u){vo=u,document.documentElement.dataset.expert=u?"on":"off";try{localStorage.setItem(Wm,u?"on":"off")}catch{}oo.forEach(i=>i())}function Gn(){return C.useSyncExternalStore(u=>(oo.add(u),()=>oo.delete(u)),()=>vo)}function $e(u,i){const[o,r]=C.useState(null),f=C.useRef(u);return f.current=u,C.useEffect(()=>{let h=!0,p;const g=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&r(await y.json())}catch{}h&&(p=setTimeout(g,i?1500:6e3))};return g(),()=>{h=!1,clearTimeout(p)}},[u,i]),o}function vi(u){if(u==null)return"—";const i=Math.round(u/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m${String(i%60).padStart(2,"0")}s`}function yo(u){return u==null?"—":`$${u.toFixed(2)}`}function Yc(u){return u?u>=1e3?`${(u/1e3).toFixed(1)}k`:String(u):"0"}function bo(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} K`:`${(u/1024/1024).toFixed(1)} M`}function ga(u){if(!u)return"—";const i=new Date(u),o=new Date,r=i.toDateString()===o.toDateString(),f=i.toTimeString().slice(0,5);return r?f:`${i.toISOString().slice(5,10)} ${f}`}function Cx(u){if(!u)return"—";const i=Date.now()-Date.parse(u);if(i<6e4)return"just now";const o=Math.floor(i/6e4);if(o<60)return`${o}m ago`;const r=Math.floor(o/60);if(r<24)return`${r}h ago`;const f=Math.floor(r/24);return f<7?`${f}d ago`:new Date(u).toISOString().slice(5,10)}function jo({since:u}){const[,i]=C.useState(0);return C.useEffect(()=>{const o=setInterval(()=>i(r=>r+1),1e3);return()=>clearInterval(o)},[]),u?a.jsx("span",{className:"num",children:vi(Date.now()-Date.parse(u))}):null}function Vc({status:u}){return a.jsx("span",{className:`lamp ${u}`})}function Ox({status:u}){return a.jsx("span",{className:`status-word ${u}`,children:u})}function No(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ya=No();function Pm(u){ya=u}var pa={exec:()=>null};function ss(u){let i=[];return o=>{let r=Math.max(0,Math.min(3,o-1)),f=i[r];return f||(f=u(r),i[r]=f),f}}function we(u,i=""){let o=typeof u=="string"?u:u.source,r={replace:(f,h)=>{let p=typeof h=="string"?h:h.source;return p=p.replace(Ot.caret,"$1"),o=o.replace(f,p),r},getRegex:()=>new RegExp(o,i)};return r}var Dx=((u="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+u)}catch{return!1}})(),Ot={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ss(u=>new RegExp(`^ {0,${u}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ss(u=>new RegExp(`^ {0,${u}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ss(u=>new RegExp(`^ {0,${u}}(?:\`\`\`|~~~)`)),headingBeginRegex:ss(u=>new RegExp(`^ {0,${u}}#`)),htmlBeginRegex:ss(u=>new RegExp(`^ {0,${u}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ss(u=>new RegExp(`^ {0,${u}}>`))},Mx=/^(?:[ \t]*(?:\n|$))+/,Ux=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Lx=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,So=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ep=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,tp=we(ep).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bx=we(ep).replace(/bull/g,So).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),wo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,qx=/^[^\n]+/,ko=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,$x=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ko).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yx=we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,So).getRegex(),Kc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",To=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gx=we("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",To).replace("tag",Kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lp=u=>we(wo).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",u).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Xx=lp(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Qx=lp(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Zx=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qx).getRegex(),Eo={blockquote:Zx,code:Ux,def:$x,fences:Lx,heading:Hx,hr:yi,html:Gx,lheading:tp,list:Yx,newline:Mx,paragraph:Xx,table:pa,text:qx},ym=we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Vx={...Eo,lheading:Bx,table:ym,paragraph:we(wo).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ym).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex()},Kx={...Eo,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",To).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:pa,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:we(wo).replace("hr",yi).replace("heading",` *#{1,6} *[^
|
|
10
|
+
]`).replace("lheading",tp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ix=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,np=/^( {2,}|\\)\n(?!\s*$)/,Fx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,un=/[\p{P}\p{S}]/u,us=/[\s\p{P}\p{S}]/u,bi=/[^\s\p{P}\p{S}]/u,Wx=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,us).getRegex(),Px=/[\p{Pi}\p{Ps}"']/u,ap=/(?!~)[\p{P}\p{S}]/u,ev=/(?!~)[\s\p{P}\p{S}]/u,tv=/(?:[^\s\p{P}\p{S}]|~)/u,lv=we(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Dx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sp=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,nv=we(sp,"u").replace(/punct/g,un).getRegex(),av=we(sp,"u").replace(/punct/g,ap).getRegex(),sv=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,iv=we(sv,"u").replace(/openQuote/g,Px).replace(/punct/g,un).getRegex(),ip="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cv=we(ip,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,un).getRegex(),uv=we(ip,"gu").replace(/notPunctSpace/g,tv).replace(/punctSpace/g,ev).replace(/punct/g,ap).getRegex(),rv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",ov=we(rv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,un).getRegex(),fv=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,un).getRegex(),dv="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",hv=we(dv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,un).getRegex(),mv=we(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,un).getRegex(),pv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",gv=we(pv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,un).getRegex(),xv=we(/\\(punct)/,"gu").replace(/punct/g,un).getRegex(),vv=we(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yv=we(To).replace("(?:-->|$)","-->").getRegex(),bv=we("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",yv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Gc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,jv=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Gc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),cp=we(/^!?\[(label)\]\[(ref)\]/).replace("label",Gc).replace("ref",ko).getRegex(),up=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",ko).getRegex(),Nv=we("reflink|nolink(?!\\()","g").replace("reflink",cp).replace("nolink",up).getRegex(),bm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ao={_backpedal:pa,anyPunctuation:xv,autolink:vv,blockSkip:lv,br:np,code:Ix,del:pa,delLDelim:pa,delRDelim:pa,emStrongLDelim:nv,emStrongRDelimAst:cv,emStrongRDelimUnd:fv,escape:Jx,link:jv,nolink:up,punctuation:Wx,reflink:cp,reflinkSearch:Nv,tag:bv,text:Fx,url:pa},Sv={...Ao,emStrongLDelim:iv,emStrongRDelimAst:ov,emStrongRDelimUnd:hv,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",Gc).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Gc).getRegex()},fo={...Ao,emStrongRDelimAst:uv,emStrongLDelim:av,delLDelim:mv,delRDelim:gv,url:we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",bm).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:we(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",bm).getRegex()},wv={...fo,br:we(np).replace("{2,}","*").getRegex(),text:we(fo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qc={normal:Eo,gfm:Vx,pedantic:Kx},di={normal:Ao,gfm:fo,breaks:wv,pedantic:Sv},kv={"&":"&","<":"<",">":">",'"':""","'":"'"},jm=u=>kv[u];function Hl(u,i){if(i){if(Ot.escapeTest.test(u))return u.replace(Ot.escapeReplace,jm)}else if(Ot.escapeTestNoEncode.test(u))return u.replace(Ot.escapeReplaceNoEncode,jm);return u}function Nm(u){try{u=encodeURI(u).replace(Ot.percentDecode,"%")}catch{return null}return u}function Sm(u,i){let o=u.replace(Ot.findPipe,(h,p,g)=>{let y=!1,v=p;for(;--v>=0&&g[v]==="\\";)y=!y;return y?"|":" |"}),r=o.split(Ot.splitPipe),f=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),i)if(r.length>i)r.splice(i);else for(;r.length<i;)r.push("");for(;f<r.length;f++)r[f]=r[f].trim().replace(Ot.slashPipe,"|");return r}function $n(u,i,o){let r=u.length;if(r===0)return"";let f=0;for(;f<r&&u.charAt(r-f-1)===i;)f++;return u.slice(0,r-f)}function wm(u){let i=u.split(`
|
|
11
|
+
`),o=i.length-1;for(;o>=0&&Ot.blankLine.test(i[o]);)o--;return i.length-o<=2?u:i.slice(0,o+1).join(`
|
|
12
|
+
`)}function Tv(u,i){if(u.indexOf(i[1])===-1)return-1;let o=0;for(let r=0;r<u.length;r++)if(u[r]==="\\")r++;else if(u[r]===i[0])o++;else if(u[r]===i[1]&&(o--,o<0))return r;return o>0?-2:-1}function Ev(u,i=0){let o=i,r="";for(let f of u)if(f===" "){let h=4-o%4;r+=" ".repeat(h),o+=h}else r+=f,o++;return r}function km(u,i,o,r,f){let h=i.href,p=i.title||null,g=u[1].replace(f.other.outputLinkReplace,"$1"),y=u[0].charAt(0)==="!";r.state.inLink=!0;let v=r.state.linkEmitted,S=r.state.inRawBlock;r.state.linkEmitted=!1;let E=r.inlineTokens(g),w=r.state.linkEmitted;if(r.state.linkEmitted=v,r.state.inLink=!1,!y){if(w){r.state.inRawBlock=S;return}r.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:p,text:g,tokens:E}}function Av(u,i,o){let r=u.match(o.other.indentCodeCompensation);if(r===null)return i;let f=r[1];return i.split(`
|
|
13
|
+
`).map(h=>{let p=h.match(o.other.beginningSpace);if(p===null)return h;let[g]=p;return g.length>=f.length?h.slice(f.length):h}).join(`
|
|
14
|
+
`)}var Xc=class{options;rules;lexer;constructor(u){this.options=u||ya}space(u){let i=this.rules.block.newline.exec(u);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(u){let i=this.rules.block.code.exec(u);if(i){let o=this.options.pedantic?i[0]:wm(i[0]),r=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:r}}}fences(u){let i=this.rules.block.fences.exec(u);if(i){let o=i[0],r=Av(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:r}}}heading(u){let i=this.rules.block.heading.exec(u);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){let r=$n(o,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(o=r.trim())}return{type:"heading",raw:$n(i[0],`
|
|
15
|
+
`),depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(u){let i=this.rules.block.hr.exec(u);if(i)return{type:"hr",raw:$n(i[0],`
|
|
16
|
+
`)}}blockquote(u){let i=this.rules.block.blockquote.exec(u);if(i){let o=$n(i[0],`
|
|
17
|
+
`).split(`
|
|
18
|
+
`),r="",f="",h=[];for(;o.length>0;){let p=!1,g=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))g.push(o[y]),p=!0;else if(!p)g.push(o[y]);else break;o=o.slice(y);let v=g.join(`
|
|
19
|
+
`),S=v.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
21
|
+
${v}`:v,f=f?`${f}
|
|
22
|
+
${S}`:S;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,h,!0),this.lexer.state.top=E,o.length===0)break;let w=h.at(-1);if(w?.type==="code")break;if(w?.type==="blockquote"){let M=w,L=o.join(`
|
|
23
|
+
`),J=M.raw+`
|
|
24
|
+
`+L.replace(this.rules.other.blockquoteSetextReplace2,""),X=this.blockquote(J);h[h.length-1]=X,r=`${r}
|
|
25
|
+
${L}`,f=f.substring(0,f.length-M.text.length)+X.text;break}else if(w?.type==="list"){let M=w,L=M.raw+`
|
|
26
|
+
`+o.join(`
|
|
27
|
+
`),J=this.list(L);h[h.length-1]=J,r=r.substring(0,r.length-w.raw.length)+J.raw,f=f.substring(0,f.length-M.raw.length)+J.raw,o=L.substring(h.at(-1).raw.length).split(`
|
|
28
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:h,text:f}}}list(u){let i=this.rules.block.list.exec(u);if(i){let o=i[1].trim(),r=o.length>1,f={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=r?o:"[*+-]");let h=this.rules.other.listItemRegex(o),p=!1;for(;u;){let y=!1,v="",S="";if(!(i=h.exec(u))||this.rules.block.hr.test(u))break;v=i[0],u=u.substring(v.length);let E=Ev(i[2].split(`
|
|
29
|
+
`,1)[0],i[1].length),w=u.split(`
|
|
30
|
+
`,1)[0],M=!E.trim(),L=0;if(this.options.pedantic?(L=2,S=E.trimStart()):M?L=i[1].length+1:(L=E.search(this.rules.other.nonSpaceChar),L=L>4?1:L,S=E.slice(L),L+=i[1].length),M&&this.rules.other.blankLine.test(w)&&(v+=w+`
|
|
31
|
+
`,u=u.substring(w.length+1),y=!0),!y){let J=this.rules.other.nextBulletRegex(L),X=this.rules.other.hrRegex(L),A=this.rules.other.fencesBeginRegex(L),oe=this.rules.other.headingBeginRegex(L),fe=this.rules.other.htmlBeginRegex(L),W=this.rules.other.blockquoteBeginRegex(L);for(;u;){let I=u.split(`
|
|
32
|
+
`,1)[0],Y;if(w=I,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),Y=w):Y=w.replace(this.rules.other.tabCharGlobal," "),A.test(w)||oe.test(w)||fe.test(w)||W.test(w)||J.test(w)||X.test(w))break;if(Y.search(this.rules.other.nonSpaceChar)>=L||!w.trim())S+=`
|
|
33
|
+
`+Y.slice(L);else{if(M||E.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(E)||oe.test(E)||X.test(E))break;S+=`
|
|
34
|
+
`+w}M=!w.trim(),v+=I+`
|
|
35
|
+
`,u=u.substring(I.length+1),E=Y.slice(L)}}f.loose||(p?f.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(p=!0)),f.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(S),loose:!1,text:S,tokens:[]}),f.raw+=v}let g=f.items.at(-1);if(g)g.raw=g.raw.trimEnd(),g.text=g.text.trimEnd();else return;f.raw=f.raw.trimEnd();for(let y of f.items)if(this.lexer.state.top=!1,y.tokens=this.lexer.blockTokens(y.text,[]),!f.loose){let v=y.tokens.filter(E=>E.type==="space"),S=v.length>0&&v.some(E=>this.rules.other.anyLine.test(E.raw));f.loose=S}for(let y of f.items){let v=y.tokens[0];if(y.task&&(v?.type==="text"||v?.type==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),v.raw=v.raw.replace(this.rules.other.listReplaceTask,""),v.text=v.text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}let S=this.rules.other.listTaskCheckbox.exec(y.raw);if(S){let E={type:"checkbox",raw:S[0]+" ",checked:S[0]!=="[ ]"};y.checked=E.checked,f.loose?y.tokens[0]&&["paragraph","text"].includes(y.tokens[0].type)&&"tokens"in y.tokens[0]&&y.tokens[0].tokens?(y.tokens[0].raw=E.raw+y.tokens[0].raw,y.tokens[0].text=E.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(E)):y.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):y.tokens.unshift(E)}}else y.task&&(y.task=!1)}if(f.loose)for(let y of f.items){y.loose=!0;for(let v of y.tokens)v.type==="text"&&(v.type="paragraph")}return f}}html(u){let i=this.rules.block.html.exec(u);if(i){let o=wm(i[0]);return{type:"html",block:!0,raw:o,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:o}}}def(u){let i=this.rules.block.def.exec(u);if(i){let o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:$n(i[0],`
|
|
36
|
+
`),href:r,title:f}}}table(u){let i=this.rules.block.table.exec(u);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let o=Sm(i[1]),r=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
37
|
+
`):[],h={type:"table",raw:$n(i[0],`
|
|
38
|
+
`),header:[],align:[],rows:[]};if(o.length===r.length){for(let p of r)this.rules.other.tableAlignRight.test(p)?h.align.push("right"):this.rules.other.tableAlignCenter.test(p)?h.align.push("center"):this.rules.other.tableAlignLeft.test(p)?h.align.push("left"):h.align.push(null);for(let p=0;p<o.length;p++)h.header.push({text:o[p],tokens:this.lexer.inline(o[p]),header:!0,align:h.align[p]});for(let p of f)h.rows.push(Sm(p,h.header.length).map((g,y)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:h.align[y]})));return h}}lheading(u){let i=this.rules.block.lheading.exec(u);if(i){let o=i[1].trim();return{type:"heading",raw:$n(i[0],`
|
|
39
|
+
`),depth:i[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(u){let i=this.rules.block.paragraph.exec(u);if(i){let o=i[1].charAt(i[1].length-1)===`
|
|
40
|
+
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(u){let i=this.rules.block.text.exec(u);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(u){let i=this.rules.inline.escape.exec(u);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(u){let i=this.rules.inline.tag.exec(u);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(u){let i=this.rules.inline.link.exec(u);if(i){let o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let h=$n(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=Tv(i[2],"()");if(h===-2)return;if(h>-1){let p=(i[0].indexOf("!")===0?5:4)+i[1].length+h;i[2]=i[2].substring(0,h),i[0]=i[0].substring(0,p).trim(),i[3]=""}}let r=i[2],f="";if(this.options.pedantic){let h=this.rules.other.pedanticHrefTitle.exec(r);h&&(r=h[1],f=h[3])}else f=i[3]?i[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?r=r.slice(1):r=r.slice(1,-1)),km(i,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(u,i){let o;if((o=this.rules.inline.reflink.exec(u))||(o=this.rules.inline.nolink.exec(u))){let r=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=i[r.toLowerCase()];if(!f){let h=o[0].charAt(0);return{type:"text",raw:h,text:h}}return km(o,f,o[0],this.lexer,this.rules)}}emStrong(u,i,o=""){let r=this.rules.inline.emStrongLDelim.exec(u);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,g=f,y=0,v=r[0][0],S=o===v,E=v==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,i=i.slice(-1*u.length+f);(r=E.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h)continue;if(p=[...h].length,r[3]||r[4]){g+=p;continue}else if(r[5]||r[6]){if(f%3&&!((f+p)%3)){y+=p;continue}if(S)break}if(g-=p,g>0)continue;p=Math.min(p,p+g+y);let w=[...r[0]][0].length,M=u.slice(0,f+r.index+w+p);if(Math.min(f,p)%2){let J=M.slice(1,-1);return{type:"em",raw:M,text:J,tokens:this.lexer.inlineTokens(J)}}let L=M.slice(2,-2);return{type:"strong",raw:M,text:L,tokens:this.lexer.inlineTokens(L)}}}}codespan(u){let i=this.rules.inline.code.exec(u);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(o),f=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return r&&f&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(u){let i=this.rules.inline.br.exec(u);if(i)return{type:"br",raw:i[0]}}del(u,i,o=""){let r=this.rules.inline.delLDelim.exec(u);if(r&&(!r[1]||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,g=f,y=this.rules.inline.delRDelim;for(y.lastIndex=0,i=i.slice(-1*u.length+f);(r=y.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h||(p=[...h].length,p!==f))continue;if(r[3]||r[4]){g+=p;continue}if(g-=p,g>0)continue;p=Math.min(p,p+g);let v=[...r[0]][0].length,S=u.slice(0,f+r.index+v+p),E=S.slice(f,-f);return{type:"del",raw:S,text:E,tokens:this.lexer.inlineTokens(E)}}}}autolink(u){let i=this.rules.inline.autolink.exec(u);if(i){let o,r;return i[2]==="@"?(o=i[1],r="mailto:"+o):(o=i[1],r=o),{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(u){let i;if(i=this.rules.inline.url.exec(u)){let o,r;if(i[2]==="@")o=i[0],r="mailto:"+o;else{let f;do f=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(f!==i[0]);o=i[0],i[1]==="www."?r="http://"+i[0]:r=i[0]}return{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(u){let i=this.rules.inline.text.exec(u);if(i){let o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},El=class ho{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||ya,this.options.tokenizer=this.options.tokenizer||new Xc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let o={other:Ot,block:qc.normal,inline:di.normal};this.options.pedantic?(o.block=qc.pedantic,o.inline=di.pedantic):this.options.gfm&&(o.block=qc.gfm,this.options.breaks?o.inline=di.breaks:o.inline=di.gfm),this.tokenizer.rules=o}static get rules(){return{block:qc,inline:di}}static lex(i,o){return new ho(o).lex(i)}static lexInline(i,o){return new ho(o).inlineTokens(i)}lex(i){i=i.replace(Ot.carriageReturn,`
|
|
41
|
+
`),this.blockTokens(i,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let r=this.inlineQueue[o];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,o=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(i=i.replace(Ot.tabCharGlobal," ").replace(Ot.spaceLine,""));let f=1/0;for(;i;){if(i.length<f)f=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}let h;if(this.options.extensions?.block?.some(g=>(h=g.call({lexer:this},i,o))?(i=i.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(i)){i=i.substring(h.raw.length);let g=o.at(-1);h.raw.length===1&&g!==void 0?g.raw+=`
|
|
42
|
+
`:o.push(h);continue}if(h=this.tokenizer.code(i)){i=i.substring(h.raw.length);let g=o.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
|
|
43
|
+
`)?"":`
|
|
44
|
+
`)+h.raw,g.text+=`
|
|
45
|
+
`+h.text,this.inlineQueue.at(-1).src=g.text):o.push(h);continue}if(h=this.tokenizer.fences(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(i)){i=i.substring(h.raw.length);let g=o.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
|
|
46
|
+
`)?"":`
|
|
47
|
+
`)+h.raw,g.text+=`
|
|
48
|
+
`+h.raw,this.inlineQueue.at(-1).src=g.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},o.push(h));continue}if(h=this.tokenizer.table(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(i)){i=i.substring(h.raw.length),o.push(h);continue}let p=i;if(this.options.extensions?.startBlock){let g=1/0,y=i.slice(1),v;this.options.extensions.startBlock.forEach(S=>{v=S.call({lexer:this},y),typeof v=="number"&&v>=0&&(g=Math.min(g,v))}),g<1/0&&g>=0&&(p=i.substring(0,g+1))}if(this.state.top&&(h=this.tokenizer.paragraph(p))){let g=o.at(-1);r&&g?.type==="paragraph"?(g.raw+=(g.raw.endsWith(`
|
|
49
|
+
`)?"":`
|
|
50
|
+
`)+h.raw,g.text+=`
|
|
51
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):o.push(h),r=p.length!==i.length,i=i.substring(h.raw.length);continue}if(h=this.tokenizer.text(i)){i=i.substring(h.raw.length);let g=o.at(-1);g?.type==="text"?(g.raw+=(g.raw.endsWith(`
|
|
52
|
+
`)?"":`
|
|
53
|
+
`)+h.raw,g.text+=`
|
|
54
|
+
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):o.push(h);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}linkInText(i){if(!i.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let r of i.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(r[0])&&i.charAt(r.index-1)!=="!")return!0;for(let r of i.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let f=r[0],h=f.lastIndexOf("[");if(!(f.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,f.slice(h+1,-1)))&&!(h>1&&this.linkInText(f.slice(1,h-1))))return!0}return!1}inlineTokens(i,o=[]){this.tokenizer.lexer=this;let r=i;if(this.tokens.links&&i.includes("[")){let g=this.tokenizer.rules.inline.reflinkSearch,y=v=>{let S=v.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,v.slice(S+1,-1)))return v;if(S>1&&v.charAt(0)!=="!"){let E=v.slice(1,S-1);if(this.linkInText(E))return"["+E.replace(g,y)+"]["+"a".repeat(v.length-S-2)+"]"}return"["+"a".repeat(v.length-2)+"]"};r=r.replace(g,y)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,g=>"+".repeat(g.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(g,y,v)=>{let S=v?v.length:0;return g.slice(0,S)+"["+"a".repeat(g.length-S-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let f=!1,h="",p=1/0;for(;i;){if(i.length<p)p=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}f||(h=""),f=!1;let g;if(this.options.extensions?.inline?.some(v=>(g=v.call({lexer:this},i,o))?(i=i.substring(g.raw.length),o.push(g),!0):!1))continue;if(g=this.tokenizer.escape(i)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.tag(i)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.link(i)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(g.raw.length);let v=o.at(-1);g.type==="text"&&v?.type==="text"?(v.raw+=g.raw,v.text+=g.text):o.push(g);continue}if(g=this.tokenizer.emStrong(i,r,h)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.codespan(i)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.br(i)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.del(i,r,h)){i=i.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.autolink(i)){i=i.substring(g.raw.length),o.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(i))){i=i.substring(g.raw.length),o.push(g);continue}let y=i;if(this.options.extensions?.startInline){let v=1/0,S=i.slice(1),E;this.options.extensions.startInline.forEach(w=>{E=w.call({lexer:this},S),typeof E=="number"&&E>=0&&(v=Math.min(v,E))}),v<1/0&&v>=0&&(y=i.substring(0,v+1))}if(g=this.tokenizer.inlineText(y)){i=i.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(h=g.raw.slice(-1)),f=!0;let v=o.at(-1);v?.type==="text"?(v.raw+=g.raw,v.text+=g.text):o.push(g);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return o}infiniteLoopError(i){let o="Infinite loop on byte: "+i;if(this.options.silent)console.error(o);else throw new Error(o)}},Qc=class{options;parser;constructor(u){this.options=u||ya}space(u){return""}code({text:u,lang:i,escaped:o}){let r=(i||"").match(Ot.notSpaceStart)?.[0],f=u.replace(Ot.endingNewline,"")+`
|
|
55
|
+
`;return r?'<pre><code class="language-'+Hl(r)+'">'+(o?f:Hl(f,!0))+`</code></pre>
|
|
56
|
+
`:"<pre><code>"+(o?f:Hl(f,!0))+`</code></pre>
|
|
57
|
+
`}blockquote({tokens:u}){return`<blockquote>
|
|
58
|
+
${this.parser.parse(u)}</blockquote>
|
|
59
|
+
`}html({text:u}){return u}def(u){return""}heading({tokens:u,depth:i}){return`<h${i}>${this.parser.parseInline(u)}</h${i}>
|
|
60
|
+
`}hr(u){return`<hr>
|
|
61
|
+
`}list(u){let i=u.ordered,o=u.start,r="";for(let p=0;p<u.items.length;p++){let g=u.items[p];r+=this.listitem(g)}let f=i?"ol":"ul",h=i&&o!==1?' start="'+o+'"':"";return"<"+f+h+`>
|
|
62
|
+
`+r+"</"+f+`>
|
|
63
|
+
`}listitem(u){return`<li>${this.parser.parse(u.tokens)}</li>
|
|
64
|
+
`}checkbox({checked:u}){return"<input "+(u?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:u}){return`<p>${this.parser.parseInline(u)}</p>
|
|
65
|
+
`}table(u){let i="",o="";for(let f=0;f<u.header.length;f++)o+=this.tablecell(u.header[f]);i+=this.tablerow({text:o});let r="";for(let f=0;f<u.rows.length;f++){let h=u.rows[f];o="";for(let p=0;p<h.length;p++)o+=this.tablecell(h[p]);r+=this.tablerow({text:o})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
66
|
+
<thead>
|
|
67
|
+
`+i+`</thead>
|
|
68
|
+
`+r+`</table>
|
|
69
|
+
`}tablerow({text:u}){return`<tr>
|
|
70
|
+
${u}</tr>
|
|
71
|
+
`}tablecell(u){let i=this.parser.parseInline(u.tokens),o=u.header?"th":"td";return(u.align?`<${o} align="${u.align}">`:`<${o}>`)+i+`</${o}>
|
|
72
|
+
`}strong({tokens:u}){return`<strong>${this.parser.parseInline(u)}</strong>`}em({tokens:u}){return`<em>${this.parser.parseInline(u)}</em>`}codespan({text:u}){return`<code>${Hl(u,!0)}</code>`}br(u){return"<br>"}del({tokens:u}){return`<del>${this.parser.parseInline(u)}</del>`}link({href:u,title:i,tokens:o}){let r=this.parser.parseInline(o),f=Nm(u);if(f===null)return r;u=f;let h='<a href="'+u+'"';return i&&(h+=' title="'+Hl(i)+'"'),h+=">"+r+"</a>",h}image({href:u,title:i,text:o,tokens:r}){r&&(o=this.parser.parseInline(r,this.parser.textRenderer));let f=Nm(u);if(f===null)return Hl(o);u=f;let h=`<img src="${u}" alt="${Hl(o)}"`;return i&&(h+=` title="${Hl(i)}"`),h+=">",h}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:Hl(u.text)}},_o=class{strong({text:u}){return u}em({text:u}){return u}codespan({text:u}){return u}del({text:u}){return u}html({text:u}){return u}text({text:u}){return u}link({text:u}){return""+u}image({text:u}){return""+u}br(){return""}checkbox({raw:u}){return u}},Al=class mo{options;renderer;textRenderer;constructor(i){this.options=i||ya,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _o}static parse(i,o){return new mo(o).parse(i)}static parseInline(i,o){return new mo(o).parseInline(i)}parse(i){this.renderer.parser=this;let o="";for(let r=0;r<i.length;r++){let f=i[r];if(this.options.extensions?.renderers?.[f.type]){let p=f,g=this.options.extensions.renderers[p.type].call({parser:this},p);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=g||"";continue}}let h=f;switch(h.type){case"space":{o+=this.renderer.space(h);break}case"hr":{o+=this.renderer.hr(h);break}case"heading":{o+=this.renderer.heading(h);break}case"code":{o+=this.renderer.code(h);break}case"table":{o+=this.renderer.table(h);break}case"blockquote":{o+=this.renderer.blockquote(h);break}case"list":{o+=this.renderer.list(h);break}case"checkbox":{o+=this.renderer.checkbox(h);break}case"html":{o+=this.renderer.html(h);break}case"def":{o+=this.renderer.def(h);break}case"paragraph":{o+=this.renderer.paragraph(h);break}case"text":{o+=this.renderer.text(h);break}default:{let p='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return o}parseInline(i,o=this.renderer){this.renderer.parser=this;let r="";for(let f=0;f<i.length;f++){let h=i[f];if(this.options.extensions?.renderers?.[h.type]){let g=this.options.extensions.renderers[h.type].call({parser:this},h);if(g!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(h.type)){r+=g||"";continue}}let p=h;switch(p.type){case"escape":{r+=o.text(p);break}case"html":{r+=o.html(p);break}case"link":{r+=o.link(p);break}case"image":{r+=o.image(p);break}case"checkbox":{r+=o.checkbox(p);break}case"strong":{r+=o.strong(p);break}case"em":{r+=o.em(p);break}case"codespan":{r+=o.codespan(p);break}case"br":{r+=o.br(p);break}case"del":{r+=o.del(p);break}case"text":{r+=o.text(p);break}default:{let g='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return r}},gi=class{options;block;constructor(u){this.options=u||ya}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(u){return u}postprocess(u){return u}processAllTokens(u){return u}emStrongMask(u){return u}provideLexer(u=this.block){return u?El.lex:El.lexInline}provideParser(u=this.block){return u?Al.parse:Al.parseInline}},_v=class{defaults=No();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Al;Renderer=Qc;TextRenderer=_o;Lexer=El;Tokenizer=Xc;Hooks=gi;constructor(...u){this.use(...u)}walkTokens(u,i){let o=[];for(let r of u)switch(o=o.concat(i.call(this,r)),r.type){case"table":{let f=r;for(let h of f.header)o=o.concat(this.walkTokens(h.tokens,i));for(let h of f.rows)for(let p of h)o=o.concat(this.walkTokens(p.tokens,i));break}case"list":{let f=r;o=o.concat(this.walkTokens(f.items,i));break}default:{let f=r;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let p=f[h].flat(1/0);o=o.concat(this.walkTokens(p,i))}):f.tokens&&(o=o.concat(this.walkTokens(f.tokens,i)))}}return o}use(...u){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return u.forEach(o=>{let r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let h=i.renderers[f.name];h?i.renderers[f.name]=function(...p){let g=f.renderer.apply(this,p);return g===!1&&(g=h.apply(this,p)),g}:i.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let h=i[f.level];h?h.unshift(f.tokenizer):i[f.level]=[f.tokenizer],f.start&&(f.level==="block"?i.startBlock?i.startBlock.push(f.start):i.startBlock=[f.start]:f.level==="inline"&&(i.startInline?i.startInline.push(f.start):i.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(i.childTokens[f.name]=f.childTokens)}),r.extensions=i),o.renderer){let f=this.defaults.renderer||new Qc(this.defaults);for(let h in o.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;let p=h,g=o.renderer[p],y=f[p];f[p]=(...v)=>{let S=g.apply(f,v);return S===!1&&(S=y.apply(f,v)),S||""}}r.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new Xc(this.defaults);for(let h in o.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;let p=h,g=o.tokenizer[p],y=f[p];f[p]=(...v)=>{let S=g.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.tokenizer=f}if(o.hooks){let f=this.defaults.hooks||new gi;for(let h in o.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;let p=h,g=o.hooks[p],y=f[p];gi.passThroughHooks.has(h)?f[p]=v=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(h))return(async()=>{let E=await g.call(f,v);return y.call(f,E)})();let S=g.call(f,v);return y.call(f,S)}:f[p]=(...v)=>{if(this.defaults.async)return(async()=>{let E=await g.apply(f,v);return E===!1&&(E=await y.apply(f,v)),E})();let S=g.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;r.walkTokens=function(p){let g=[];return g.push(h.call(this,p)),f&&(g=g.concat(f.call(this,p))),g}}this.defaults={...this.defaults,...r}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,i){return El.lex(u,i??this.defaults)}parser(u,i){return Al.parse(u,i??this.defaults)}parseMarkdown(u){return(i,o)=>{let r={...o},f={...this.defaults,...r},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&r.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=u),f.async)return(async()=>{let p=f.hooks?await f.hooks.preprocess(i):i,g=await(f.hooks?await f.hooks.provideLexer(u):u?El.lex:El.lexInline)(p,f),y=f.hooks?await f.hooks.processAllTokens(g):g;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let v=await(f.hooks?await f.hooks.provideParser(u):u?Al.parse:Al.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(v):v})().catch(h);try{f.hooks&&(i=f.hooks.preprocess(i));let p=(f.hooks?f.hooks.provideLexer(u):u?El.lex:El.lexInline)(i,f);f.hooks&&(p=f.hooks.processAllTokens(p)),f.walkTokens&&this.walkTokens(p,f.walkTokens);let g=(f.hooks?f.hooks.provideParser(u):u?Al.parse:Al.parseInline)(p,f);return f.hooks&&(g=f.hooks.postprocess(g)),g}catch(p){return h(p)}}}onError(u,i){return o=>{if(o.message+=`
|
|
73
|
+
Please report this to https://github.com/markedjs/marked.`,u){let r="<p>An error occurred:</p><pre>"+Hl(o.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(o);throw o}}},xa=new _v;function Re(u,i){return xa.parse(u,i)}Re.options=Re.setOptions=function(u){return xa.setOptions(u),Re.defaults=xa.defaults,Pm(Re.defaults),Re};Re.getDefaults=No;Re.defaults=ya;function zv(...u){return xa.use(...u),Re.defaults=xa.defaults,Pm(Re.defaults),Re}Re.use=zv;Re.walkTokens=function(u,i){return xa.walkTokens(u,i)};Re.parseInline=xa.parseInline;Re.Parser=Al;Re.parser=Al.parse;Re.Renderer=Qc;Re.TextRenderer=_o;Re.Lexer=El;Re.lexer=El.lex;Re.Tokenizer=Xc;Re.Hooks=gi;Re.parse=Re;Re.options;Re.setOptions;Re.walkTokens;Re.parseInline;Al.parse;El.lex;function Tm(u,i){(i==null||i>u.length)&&(i=u.length);for(var o=0,r=Array(i);o<i;o++)r[o]=u[o];return r}function Rv(u){if(Array.isArray(u))return u}function Cv(u,i){var o=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(o!=null){var r,f,h,p,g=[],y=!0,v=!1;try{if(h=(o=o.call(u)).next,i!==0)for(;!(y=(r=h.call(o)).done)&&(g.push(r.value),g.length!==i);y=!0);}catch(S){v=!0,f=S}finally{try{if(!y&&o.return!=null&&(p=o.return(),Object(p)!==p))return}finally{if(v)throw f}}return g}}function Ov(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dv(u,i){return Rv(u)||Cv(u,i)||Mv(u,i)||Ov()}function Mv(u,i){if(u){if(typeof u=="string")return Tm(u,i);var o={}.toString.call(u).slice(8,-1);return o==="Object"&&u.constructor&&(o=u.constructor.name),o==="Map"||o==="Set"?Array.from(u):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Tm(u,i):void 0}}const rp=Object.entries,Em=Object.setPrototypeOf,Uv=Object.isFrozen,Lv=Object.getPrototypeOf,Hv=Object.getOwnPropertyDescriptor;let vt=Object.freeze,jt=Object.seal,is=Object.create,op=typeof Reflect<"u"&&Reflect,po=op.apply,go=op.construct;vt||(vt=function(i){return i});jt||(jt=function(i){return i});po||(po=function(i,o){for(var r=arguments.length,f=new Array(r>2?r-2:0),h=2;h<r;h++)f[h-2]=arguments[h];return i.apply(o,f)});go||(go=function(i){for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return new i(...r)});const ma=ht(Array.prototype.forEach),Bv=ht(Array.prototype.lastIndexOf),Am=ht(Array.prototype.pop),hi=ht(Array.prototype.push),qv=ht(Array.prototype.splice),cs=Array.isArray,xi=ht(String.prototype.toLowerCase),lo=ht(String.prototype.toString),_m=ht(String.prototype.match),mi=ht(String.prototype.replace),zm=ht(String.prototype.indexOf),$v=ht(String.prototype.trim),Yv=ht(Number.prototype.toString),Gv=ht(Boolean.prototype.toString),Rm=typeof BigInt>"u"?null:ht(BigInt.prototype.toString),Cm=typeof Symbol>"u"?null:ht(Symbol.prototype.toString),Yt=ht(Object.prototype.hasOwnProperty),pi=ht(Object.prototype.toString),Ct=ht(RegExp.prototype.test),ha=Xv(TypeError);function ht(u){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return po(u,i,r)}}function Xv(u){return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return go(u,o)}}function De(u,i){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi;if(Em&&Em(u,null),!cs(i))return u;let r=i.length;for(;r--;){let f=i[r];if(typeof f=="string"){const h=o(f);h!==f&&(Uv(i)||(i[r]=h),f=h)}u[f]=!0}return u}function Qv(u){for(let i=0;i<u.length;i++)Yt(u,i)||(u[i]=null);return u}function el(u){const i=is(null);for(const r of rp(u)){var o=Dv(r,2);const f=o[0],h=o[1];Yt(u,f)&&(cs(h)?i[f]=Qv(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=el(h):i[f]=h)}return i}function Zv(u){switch(typeof u){case"string":return u;case"number":return Yv(u);case"boolean":return Gv(u);case"bigint":return Rm?Rm(u):"0";case"symbol":return Cm?Cm(u):"Symbol()";case"undefined":return pi(u);case"function":case"object":{if(u===null)return pi(u);const i=u,o=kl(i,"toString");if(typeof o=="function"){const r=o(i);return typeof r=="string"?r:pi(r)}return pi(u)}default:return pi(u)}}function kl(u,i){for(;u!==null;){const r=Hv(u,i);if(r){if(r.get)return ht(r.get);if(typeof r.value=="function")return ht(r.value)}u=Lv(u)}function o(){return null}return o}function Vv(u){try{return Ct(u,""),!0}catch{return!1}}const Om=vt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),no=vt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ao=vt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Kv=vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),so=vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Jv=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dm=vt(["#text"]),Mm=vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),io=vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Um=vt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),$c=vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Iv=jt(/{{[\w\W]*|^[\w\W]*}}/g),Fv=jt(/<%[\w\W]*|^[\w\W]*%>/g),Wv=jt(/\${[\w\W]*/g),Pv=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),ey=jt(/^aria-[\-\w]+$/),Lm=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ty=jt(/^(?:\w+script|data):/i),ly=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ny=jt(/^html$/i),ay=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Hm=jt(/<[/\w!]/g),Bm=jt(/<[/\w]/g),sy=jt(/<\/no(script|embed|frames)/i),iy=jt(/\/>/i),Pt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},fp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],cy=vt(De({},fp)),uy=(function(){const u={};return ma(fp,i=>{u[i]=jt(new RegExp("</"+i+"(?=[\\t\\n\\f\\r />])","i"))}),vt(u)})(),ry=function(){return typeof window>"u"?null:window},oy=function(i,o){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";o&&o.hasAttribute(f)&&(r=o.getAttribute(f));const h="dompurify"+(r?"#"+r:"");try{return i.createPolicy(h,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},qm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Yn=function(i,o,r,f){return Yt(i,o)&&cs(i[o])?De(f.base?el(f.base):{},i[o],f.transform):r},co=function(i,o,r){const f=Yt(i,o)?i[o]:void 0;return f&&typeof f=="object"?el(f):r()};function dp(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ry();const i=Q=>dp(Q);if(i.version="3.4.14",i.removed=[],!u||!u.document||u.document.nodeType!==Pt.document||!u.Element)return i.isSupported=!1,i;let o=u.document;const r=o,f=r.currentScript;u.DocumentFragment;const h=u.HTMLTemplateElement,p=u.Node,g=u.Element,y=u.NodeFilter,v=u.NamedNodeMap;v===void 0&&(u.NamedNodeMap||u.MozNamedAttrMap),u.HTMLFormElement;const S=u.DOMParser,E=u.trustedTypes,w=g.prototype,M=kl(w,"cloneNode"),L=kl(w,"remove"),J=kl(w,"nextSibling"),X=kl(w,"childNodes"),A=kl(w,"parentNode"),oe=kl(w,"shadowRoot"),fe=kl(w,"attributes"),W=p&&p.prototype?kl(p.prototype,"nodeType"):null,I=p&&p.prototype?kl(p.prototype,"nodeName"):null,Y=p&&p.prototype?kl(p.prototype,"ownerDocument"):null,V=function(x){return W?W(x):x.nodeType},le=function(x){return I?I(x):x.nodeName};if(typeof h=="function"){const Q=o.createElement("template");Q.content&&Q.content.ownerDocument&&(o=Q.content.ownerDocument)}let ne,je="",be,ee=!1,ve=0;const Je=function(){if(ve>0)throw ha('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},nt=function(x){Je(),ve++;try{return ne.createHTML(x)}finally{ve--}},D=function(x){Je(),ve++;try{return ne.createScriptURL(x)}finally{ve--}},K=function(){return ee||(be=oy(E,f),ee=!0),be},ce=o,_e=ce.implementation,ye=ce.createNodeIterator,N=ce.createDocumentFragment,q=ce.getElementsByTagName,F=r.importNode;let Z=qm();i.isSupported=typeof rp=="function"&&typeof A=="function"&&_e&&_e.createHTMLDocument!==void 0;const he=Iv,pe=Fv,Ee=Wv,mt=Pv,B=ey,ze=ty,Ye=ly,We=ay;let tl=Lm,Oe=null;const Xn=De({},[...Om,...no,...ao,...so,...Dm]);let Ge=null;const os=De({},[...Mm,...io,...Um,...$c]);let Gt=Object.seal(is(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Bl=null,ba=null;const ll=Object.seal(is(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ji=!0,fs=!0,_t=!1,Ni=!0,xl=!1,_l=!0,nl=!1,ds=!1,Qn=null,ja=null,hs=!1,al=!1,yt=!1,Xt=!1,zt=!0,Si=!1;const wi="user-content-";let ms=!0,rn=!1,vl={},yl=null;const zl=De({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Zn=null;const on=De({},["audio","video","img","source","image","track"]);let ki=null;const ps=De({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fn="http://www.w3.org/1998/Math/MathML",Rl="http://www.w3.org/2000/svg",sl="http://www.w3.org/1999/xhtml";let ql=sl,Na=!1,Sa=null;const gs=De({},[fn,Rl,sl],lo),wa=vt(["mi","mo","mn","ms","mtext"]);let ka=De({},wa);const xs=vt(["annotation-xml"]);let il=De({},xs);const pt=De({},["title","style","font","a","script"]);let it=null;const dn=["application/xhtml+xml","text/html"],vs="text/html";let et=null,hn=null;const Ti=o.createElement("form"),mn=function(x){return x instanceof RegExp||x instanceof Function},Vn=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(hn&&hn===x)return;(!x||typeof x!="object")&&(x={}),x=el(x),it=dn.indexOf(x.PARSER_MEDIA_TYPE)===-1?vs:x.PARSER_MEDIA_TYPE,et=it==="application/xhtml+xml"?lo:xi,Oe=Yn(x,"ALLOWED_TAGS",Xn,{transform:et}),Ge=Yn(x,"ALLOWED_ATTR",os,{transform:et}),Sa=Yn(x,"ALLOWED_NAMESPACES",gs,{transform:lo}),ki=Yn(x,"ADD_URI_SAFE_ATTR",ps,{transform:et,base:ps}),Zn=Yn(x,"ADD_DATA_URI_TAGS",on,{transform:et,base:on}),yl=Yn(x,"FORBID_CONTENTS",zl,{transform:et}),Bl=Yn(x,"FORBID_TAGS",el({}),{transform:et}),ba=Yn(x,"FORBID_ATTR",el({}),{transform:et}),vl=Yt(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?el(x.USE_PROFILES):x.USE_PROFILES:!1,ji=x.ALLOW_ARIA_ATTR!==!1,fs=x.ALLOW_DATA_ATTR!==!1,_t=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Ni=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xl=x.SAFE_FOR_TEMPLATES||!1,_l=x.SAFE_FOR_XML!==!1,nl=x.WHOLE_DOCUMENT||!1,al=x.RETURN_DOM||!1,yt=x.RETURN_DOM_FRAGMENT||!1,Xt=x.RETURN_TRUSTED_TYPE||!1,hs=x.FORCE_BODY||!1,zt=x.SANITIZE_DOM!==!1,Si=x.SANITIZE_NAMED_PROPS||!1,ms=x.KEEP_CONTENT!==!1,rn=x.IN_PLACE||!1,tl=Vv(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:Lm,ql=typeof x.NAMESPACE=="string"?x.NAMESPACE:sl,ka=co(x,"MATHML_TEXT_INTEGRATION_POINTS",()=>De({},wa)),il=co(x,"HTML_INTEGRATION_POINTS",()=>De({},xs));const k=co(x,"CUSTOM_ELEMENT_HANDLING",()=>is(null));if(Gt=is(null),Yt(k,"tagNameCheck")&&mn(k.tagNameCheck)&&(Gt.tagNameCheck=k.tagNameCheck),Yt(k,"attributeNameCheck")&&mn(k.attributeNameCheck)&&(Gt.attributeNameCheck=k.attributeNameCheck),Yt(k,"allowCustomizedBuiltInElements")&&typeof k.allowCustomizedBuiltInElements=="boolean"&&(Gt.allowCustomizedBuiltInElements=k.allowCustomizedBuiltInElements),jt(Gt),xl&&(fs=!1),yt&&(al=!0),vl&&(Oe=De({},Dm),Ge=is(null),vl.html===!0&&(De(Oe,Om),De(Ge,Mm)),vl.svg===!0&&(De(Oe,no),De(Ge,io),De(Ge,$c)),vl.svgFilters===!0&&(De(Oe,ao),De(Ge,io),De(Ge,$c)),vl.mathMl===!0&&(De(Oe,so),De(Ge,Um),De(Ge,$c))),ll.tagCheck=null,ll.attributeCheck=null,Yt(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?ll.tagCheck=x.ADD_TAGS:cs(x.ADD_TAGS)&&(Oe===Xn&&(Oe=el(Oe)),De(Oe,x.ADD_TAGS,et))),Yt(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?ll.attributeCheck=x.ADD_ATTR:cs(x.ADD_ATTR)&&(Ge===os&&(Ge=el(Ge)),De(Ge,x.ADD_ATTR,et))),Yt(x,"ADD_FORBID_CONTENTS")&&cs(x.ADD_FORBID_CONTENTS)&&(yl===zl&&(yl=el(yl)),De(yl,x.ADD_FORBID_CONTENTS,et)),ms&&(Oe["#text"]=!0),nl&&De(Oe,["html","head","body"]),Oe.table&&(De(Oe,["tbody"]),delete Bl.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw ha('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ha('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=ne;ne=x.TRUSTED_TYPES_POLICY;try{je=nt("")}catch(te){throw ne=G,te}}else x.TRUSTED_TYPES_POLICY===null?(ne=void 0,je=""):(ne===void 0&&(ne=K()),ne&&typeof je=="string"&&(je=nt("")));vt&&vt(x),hn=x},$l=De({},[...no,...ao,...Kv]),Yl=De({},[...so,...Jv]),Kn=function(x,k,G){return k.namespaceURI===sl?x==="svg":k.namespaceURI===fn?x==="svg"&&(G==="annotation-xml"||ka[G]):!!$l[x]},pn=function(x,k,G){return k.namespaceURI===sl?x==="math":k.namespaceURI===Rl?x==="math"&&il[G]:!!Yl[x]},ct=function(x,k,G){return k.namespaceURI===Rl&&!il[G]||k.namespaceURI===fn&&!ka[G]?!1:!Yl[x]&&(pt[x]||!$l[x])},Ei=function(x){let k=A(x);(!k||!k.tagName)&&(k={namespaceURI:ql,tagName:"template"});const G=xi(x.tagName),te=xi(k.tagName);return Sa[x.namespaceURI]?x.namespaceURI===Rl?Kn(G,k,te):x.namespaceURI===fn?pn(G,k,te):x.namespaceURI===sl?ct(G,k,te):!!(it==="application/xhtml+xml"&&Sa[x.namespaceURI]):!1},bl=function(x){hi(i.removed,{element:x});try{A(x).removeChild(x)}catch{if(L(x),!A(x))throw ha("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Cl=function(x,k,G){try{x.removeAttributeNode(k)}catch{try{x.removeAttribute(G)}catch{}}},jl=function(x){Jn(x);const k=X(x);if(k){const te=[];ma(k,ae=>{hi(te,ae)}),ma(te,ae=>{try{L(ae)}catch{}})}const G=fe(x);if(G)for(let te=G.length-1;te>=0;--te){const ae=G[te],re=ae&&ae.name;typeof re=="string"&&Cl(x,ae,re)}},Gl=function(x,k,G){if(!G)try{G=k.getAttributeNode(x)}catch{G=null}hi(i.removed,{attribute:G||null,from:k});try{G?k.removeAttributeNode(G):k.removeAttribute(x)}catch{try{k.removeAttribute(x)}catch{}}if(x==="is")if(al||yt)try{bl(k)}catch{}else try{k.setAttribute(x,"")}catch{}},Ai=function(x){const k=fe(x);if(k)for(let G=k.length-1;G>=0;--G){const te=k[G],ae=te&&te.name;typeof ae!="string"||Ge[et(ae)]||Cl(x,te,ae)}},Jn=function(x){const k=[x];for(;k.length>0;){const G=k.pop();V(G)===Pt.element&&Ai(G);const ae=X(G);if(ae)for(let re=ae.length-1;re>=0;--re)k.push(ae[re])}},_i=function(x,k){return _l?x==="patchsrc"?!0:x==="for"&&k!=="label"&&k!=="output":!1},Ta=function(x){if(!_l)return;const k=[x];for(;k.length>0;){const G=k.pop(),te=V(G);if(te===Pt.processingInstruction||te===Pt.comment&&Ct(Bm,G.data)){try{L(G)}catch{}continue}if(te===Pt.element){const re=G,He=et(le(G));try{re.hasAttribute&&re.hasAttribute("patchsrc")&&re.removeAttribute("patchsrc"),re.hasAttribute&&re.hasAttribute("for")&&_i("for",He)&&re.removeAttribute("for")}catch{}}const ae=X(G);if(ae)for(let re=ae.length-1;re>=0;--re)k.push(ae[re])}},In=function(x){let k=null,G=null;if(hs)x="<remove></remove>"+x;else{const re=_m(x,/^[\r\n\t ]+/);G=re&&re[0]}it==="application/xhtml+xml"&&ql===sl&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const te=ne?nt(x):x;if(ql===sl)try{k=new S().parseFromString(te,it)}catch{}if(!k||!k.documentElement){k=_e.createDocument(ql,"template",null);try{k.documentElement.innerHTML=Na?je:te}catch{}}const ae=k.body||k.documentElement;return x&&G&&ae.insertBefore(o.createTextNode(G),ae.childNodes[0]||null),ql===sl?q.call(k,nl?"html":"body")[0]:nl?k.documentElement:ae},cl=function(x){const k=Y?Y(x):x.ownerDocument;return ye.call(k||x,x,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Nt=function(x){return x=mi(x,he," "),x=mi(x,pe," "),x=mi(x,Ee," "),x},Ea=function(x){var k;x.normalize();const G=Y?Y(x):x.ownerDocument,te=ye.call(G||x,x,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ae=te.nextNode();for(;ae;)ae.data=Nt(ae.data),ae=te.nextNode();const re=(k=x.querySelectorAll)===null||k===void 0?void 0:k.call(x,"template");re&&ma(re,He=>{Ol(He.content)&&Ea(He.content)})},Aa=function(x){const k=I?I(x):null;return typeof k!="string"||et(k)!=="form"?!1:typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||x.attributes!==fe(x)||typeof x.removeAttribute!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function"||x.nodeType!==W(x)||x.childNodes!==X(x)},Ol=function(x){if(!W||typeof x!="object"||x===null)return!1;try{return W(x)===Pt.documentFragment}catch{return!1}},gn=function(x){if(!W||typeof x!="object"||x===null)return!1;try{return typeof W(x)=="number"}catch{return!1}};function Dt(Q,x,k){Q.length!==0&&ma(Q,G=>{G.call(i,x,k,hn)})}const Jc=function(x,k){return!!(_l&&x.hasChildNodes()&&!gn(x.firstElementChild)&&Ct(Hm,x.textContent)&&Ct(Hm,x.innerHTML)||_l&&x.namespaceURI===sl&&cy[k]&&(gn(x.firstElementChild)||typeof x.textContent=="string"&&Ct(uy[k],x.textContent))||x.nodeType===Pt.processingInstruction||_l&&x.nodeType===Pt.comment&&Ct(Bm,x.data))},St=function(x,k){if(x instanceof RegExp)return Ct(x,k);if(x instanceof Function){for(var G=arguments.length,te=new Array(G>2?G-2:0),ae=2;ae<G;ae++)te[ae-2]=arguments[ae];return!!x(k,...te)}return!1},ys=function(x,k,G){if(!Bl[k]&&Ql(k)&&St(Gt.tagNameCheck,k))return!1;if(ms&&!yl[k]){const te=A(x),ae=X(x);if(ae&&te){const re=ae.length;for(let He=re-1;He>=0;--He){const Ve=x===G?M(ae[He],!0):ae[He];te.insertBefore(Ve,J(x))}}}return bl(x),!0},bs=function(x,k,G,te){return x.length===0?k:k===G||k===te?el(k):k},_a=function(x,k){return x===k||A(x)!==null?!1:(rn&&Jn(x),!0)},Xl=function(x,k){if(Dt(Z.beforeSanitizeElements,x,null),_a(x,k))return!0;if(Aa(x))return bl(x),!0;const G=et(le(x));if(Oe=bs(Z.uponSanitizeElement,Oe,Xn,Qn),Dt(Z.uponSanitizeElement,x,{tagName:G,allowedTags:Oe}),_a(x,k))return!0;if(Jc(x,G))return bl(x),!0;if(Bl[G]||!(ll.tagCheck instanceof Function&&ll.tagCheck(G))&&!Oe[G]){const ae=ys(x,G,k);return ae===!1&&Dt(Z.afterSanitizeElements,x,null),ae}if(V(x)===Pt.element&&!Ei(x)||(G==="noscript"||G==="noembed"||G==="noframes")&&Ct(sy,x.innerHTML))return bl(x),!0;if(xl&&x.nodeType===Pt.text){const ae=Nt(x.textContent);x.textContent!==ae&&(hi(i.removed,{element:x.cloneNode()}),x.textContent=ae)}return Dt(Z.afterSanitizeElements,x,null),!1},js=function(x,k,G){if(ba[k]||_i(k,x)||zt&&(k==="id"||k==="name")&&(G in o||G in Ti))return!1;const te=Ge[k]||ll.attributeCheck instanceof Function&&ll.attributeCheck(k,x);return fs&&Ct(mt,k)||ji&&Ct(B,k)?!0:te?ki[k]||Ct(tl,mi(G,Ye,""))||(k==="src"||k==="xlink:href"||k==="href")&&x!=="script"&&zm(G,"data:")===0&&Zn[x]||_t&&!Ct(ze,mi(G,Ye,""))?!0:!G:Ql(x)&&St(Gt.tagNameCheck,x)&&St(Gt.attributeNameCheck,k,x)||k==="is"&&Gt.allowCustomizedBuiltInElements&&St(Gt.tagNameCheck,G)},zi=De({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ql=function(x){return!zi[xi(x)]&&Ct(We,x)},Ic=function(x,k,G,te){if(ne&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!G)switch(E.getAttributeType(x,k)){case"TrustedHTML":return nt(te);case"TrustedScriptURL":return D(te)}return te},Ri=function(x,k,G,te){try{G?x.setAttributeNS(G,k,te):x.setAttribute(k,te),Aa(x)?bl(x):Am(i.removed)}catch{Gl(k,x)}},Ns=function(x){Dt(Z.beforeSanitizeAttributes,x,null);const k=x.attributes;if(!k||Aa(x))return;Ge=bs(Z.uponSanitizeAttribute,Ge,os,ja);const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ge,forceKeepAttr:void 0};let te=k.length;const ae=et(x.nodeName);for(;te--;){const re=k[te],He=re.name,Ve=re.namespaceURI,wt=re.value,ut=et(He),Qt=wt;let gt=He==="value"?Qt:$v(Qt);if(G.attrName=ut,G.attrValue=gt,G.keepAttr=!0,G.forceKeepAttr=void 0,Dt(Z.uponSanitizeAttribute,x,G),gt=G.attrValue,Si&&(ut==="id"||ut==="name")&&zm(gt,wi)!==0&&(Gl(He,x,re),gt=wi+gt),_l&&Ct(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){Gl(He,x,re);continue}if(ut==="attributename"&&_m(gt,"href")){Gl(He,x,re);continue}if(!G.forceKeepAttr){if(!G.keepAttr){Gl(He,x,re);continue}if(!Ni&&Ct(iy,gt)){Gl(He,x,re);continue}if(xl&&(gt=Nt(gt)),!js(ae,ut,gt)){Gl(He,x,re);continue}gt=Ic(ae,ut,Ve,gt),gt!==Qt&&Ri(x,He,Ve,gt)}}Dt(Z.afterSanitizeAttributes,x,null)},xn=function(x){let k=null;const G=cl(x);for(Dt(Z.beforeSanitizeShadowDOM,x,null);k=G.nextNode();)if(Dt(Z.uponSanitizeShadowNode,k,null),Xl(k,x),Ns(k),Ol(k.content)&&xn(k.content),V(k)===Pt.element){const te=oe(k);Ol(te)&&(Ss(te),xn(te))}Dt(Z.afterSanitizeShadowDOM,x,null)},Ss=function(x){const k=[{node:x,shadow:null}];for(;k.length>0;){const G=k.pop();if(G.shadow){xn(G.shadow);continue}const te=G.node,re=V(te)===Pt.element,He=X(te);if(He)for(let Ve=He.length-1;Ve>=0;--Ve)k.push({node:He[Ve],shadow:null});if(re){const Ve=I?I(te):null;if(typeof Ve=="string"&&et(Ve)==="template"){const wt=te.content;Ol(wt)&&k.push({node:wt,shadow:null})}}if(re){const Ve=oe(te);Ol(Ve)&&k.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return i.sanitize=function(Q){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,G=null,te=null,ae=null;if(Na=!Q,Na&&(Q="<!-->"),typeof Q!="string"&&!gn(Q)&&(Q=Zv(Q),typeof Q!="string"))throw ha("dirty is not a string, aborting");if(!i.isSupported)return Q;ds?(Oe=Qn,Ge=ja):Vn(x),(Z.uponSanitizeElement.length>0||Z.uponSanitizeAttribute.length>0)&&(Oe=el(Oe)),Z.uponSanitizeAttribute.length>0&&(Ge=el(Ge)),i.removed=[];const re=rn&&typeof Q!="string"&&gn(Q);if(re){Ta(Q);const wt=le(Q);if(typeof wt=="string"){const ut=et(wt);if(!Oe[ut]||Bl[ut])throw jl(Q),ha("root node is forbidden and cannot be sanitized in-place")}if(Aa(Q))throw jl(Q),ha("root node is clobbered and cannot be sanitized in-place");try{Ss(Q)}catch(ut){throw jl(Q),ut}}else if(gn(Q))k=In("<!---->"),G=k.ownerDocument.importNode(Q,!0),G.nodeType===Pt.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?k=G:k.appendChild(G),Ss(G);else{if(!al&&!xl&&!nl&&Q.indexOf("<")===-1)return ne&&Xt?nt(Q):Q;if(k=In(Q),!k)return al?null:Xt?je:""}k&&hs&&bl(k.firstChild);const He=re?Q:k;try{const wt=cl(He);for(;te=wt.nextNode();)Xl(te,He),Ns(te),Ol(te.content)&&xn(te.content)}catch(wt){throw re&&(jl(Q),ma(i.removed,ut=>{ut.element&&Jn(ut.element)})),wt}if(re)return ma(i.removed,wt=>{wt.element&&Jn(wt.element)}),xl&&Ea(Q),Q;if(al){if(xl&&Ea(k),yt)for(ae=N.call(k.ownerDocument);k.firstChild;)ae.appendChild(k.firstChild);else ae=k;return(Ge.shadowroot||Ge.shadowrootmode)&&(ae=F.call(r,ae,!0)),ae}let Ve=nl?k.outerHTML:k.innerHTML;return nl&&Oe["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&Ct(ny,k.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
|
|
75
|
+
`+Ve),xl&&(Ve=Nt(Ve)),ne&&Xt?nt(Ve):Ve},i.setConfig=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vn(Q),ds=!0,Qn=Oe,ja=Ge},i.clearConfig=function(){hn=null,ds=!1,Qn=null,ja=null,ne=be,je=""},i.isValidAttribute=function(Q,x,k){hn||Vn({});const G=et(Q),te=et(x);return js(G,te,k)},i.addHook=function(Q,x){typeof x=="function"&&Yt(Z,Q)&&hi(Z[Q],x)},i.removeHook=function(Q,x){if(Yt(Z,Q)){if(x!==void 0){const k=Bv(Z[Q],x);return k===-1?void 0:qv(Z[Q],k,1)[0]}return Am(Z[Q])}},i.removeHooks=function(Q){Yt(Z,Q)&&(Z[Q]=[])},i.removeAllHooks=function(){Z=qm()},i}var va=dp();const fy=[{id:"claude",label:"claude",hint:"Claude Code via ACP"},{id:"codex",label:"codex",hint:"Codex (ChatGPT) via ACP"},{id:"pi",label:"pi",hint:"pi coding agent"}];async function rs(u,i){const r=await(await fetch("/api/chats",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:u,scope:i})})).json();r.id&&gl(r.scope?.kind==="team"?`/agents/${encodeURIComponent(r.scope.member)}/chat/${r.id}`:`/agents/chats/${r.id}`)}function dy(){const[u,i]=C.useState("claude"),[o,r]=C.useState(!0),[f,h]=C.useState(!1);return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"new chat"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"agent"})}),a.jsx("div",{className:"agent-pick",children:fy.map(p=>a.jsxs("button",{className:`agent-pick-btn ${u===p.id?"active":""}`,onClick:()=>i(p.id),children:[a.jsx("b",{children:p.label}),a.jsx("span",{children:p.hint})]},p.id))}),a.jsx("div",{className:"run-opts",style:{padding:"0 16px 14px"},children:a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:o,onChange:p=>r(p.target.checked)}),"kraftwerk-aware",a.jsx("span",{className:"opt-hint",children:"— agent gets workflows + recent runs as context"})]})}),a.jsx("div",{style:{padding:"0 16px 16px"},children:a.jsx("button",{className:"run-btn",disabled:f,onClick:async()=>{h(!0),await rs(u,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function $m({id:u,agentName:i,agentDescription:o}){const[r,f]=C.useState(null),[h,p]=C.useState([]),[g,y]=C.useState(!1);C.useEffect(()=>{let E=!0,w=null;return fetch(`/api/chats/${u}`).then(M=>M.ok?M.json():Promise.reject()).then(M=>{if(!E)return;f(M.meta),p(M.events);const L=M.events[M.events.length-1]?.seq??0;w=new EventSource(`/api/chats/${u}/events?after=${L}`),w.onmessage=J=>{const X=JSON.parse(J.data);p(A=>A.some(oe=>oe.seq===X.seq)?A:[...A,X])}}).catch(()=>E&&y(!0)),()=>{E=!1,w?.close()}},[u]);const v=C.useMemo(()=>{for(let E=h.length-1;E>=0;E--){const w=h[E].type;if(w==="user_message")return!0;if(w==="turn_end"||w==="error")return!1}return!1},[h]),S=C.useMemo(()=>{if(r?.title)return r.title;const E=h.find(w=>w.type==="user_message");return E&&E.type==="user_message"?E.text.replace(/\s+/g," ").trim().slice(0,80):""},[r,h]);return C.useEffect(()=>{if(!r)return;const E=i??(r.scope.kind==="team"?r.scope.member:r.agent);return vm([E,o,S||"new chat"].filter(Boolean).join(" · ")),()=>vm("")},[r,S,i,o]),g?a.jsx("div",{className:"empty",children:"chat not found"}):r?a.jsxs("div",{className:"chat-thread",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("span",{className:`lamp ${v?"running":"ok"}`}),a.jsx("h1",{children:S||"new chat"}),a.jsx("span",{className:"chip agent",children:r.agent}),r.scope.kind==="run"&&a.jsx(Ce,{href:`/runs/${r.scope.runId}`,className:"chip",children:r.scope.runId}),r.scope.kind==="kraftwerk"&&a.jsx("span",{className:"chip",children:"kraftwerk-aware"}),r.scope.kind==="knowledge"&&a.jsxs(Ce,{href:r.scope.bundle?`/knowledge/${encodeURIComponent(r.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",r.scope.bundle?`:${r.scope.bundle}`:""]}),r.scope.kind==="team"&&a.jsxs(Ce,{href:`/agents/${encodeURIComponent(r.scope.member)}/info`,className:"chip",children:["agent:",r.scope.member]}),a.jsx("span",{className:"rid",title:r.cwd,children:r.cwd})]}),a.jsx(my,{id:u,events:h,busy:v}),a.jsx(vy,{id:u,busy:v,scope:r.scope})]}):a.jsx("div",{className:"empty",children:"loading…"})}function hy(u){const i=[],o=new Map,r=new Map;for(const f of u){const h=i[i.length-1];switch(f.type){case"user_message":i.push({kind:"user",text:f.text,key:`e${f.seq}`});break;case"text":h?.kind==="agent"?h.text+=f.text:i.push({kind:"agent",text:f.text,key:`e${f.seq}`});break;case"thought":h?.kind==="thought"?h.text+=f.text:i.push({kind:"thought",text:f.text,key:`e${f.seq}`});break;case"tool_call":o.set(f.callId,i.length),i.push({kind:"tool",callId:f.callId,title:f.title,toolKind:f.kind,status:f.status,key:`e${f.seq}`});break;case"tool_update":{const p=o.get(f.callId);if(p!=null){const g=i[p];f.title&&(g.title=f.title),f.status&&(g.status=f.status)}break}case"permission_request":r.set(f.requestId,i.length),i.push({kind:"permission",requestId:f.requestId,title:f.title,options:f.options,resolved:void 0,key:`e${f.seq}`});break;case"permission_resolved":{const p=r.get(f.requestId);p!=null&&(i[p].resolved=f.optionId);break}case"error":i.push({kind:"error",text:f.message,key:`e${f.seq}`});break}}return i}function my({id:u,events:i,busy:o}){const r=Gn(),f=C.useMemo(()=>{const g=hy(i);return r?g:g.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[i,r]),h=C.useRef(null),p=C.useRef(!0);return C.useEffect(()=>{const g=h.current;g&&p.current&&(g.scrollTop=g.scrollHeight)},[f,o]),a.jsxs("div",{className:"chat-scroll",ref:h,onScroll:g=>{const y=g.currentTarget;p.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:[f.length===0&&a.jsx("div",{className:"empty",children:"say something — the agent starts on your first message"}),f.map(g=>a.jsx(gy,{b:g,chatId:u},g.key)),o&&a.jsxs("div",{className:"chat-working",children:[a.jsx("span",{className:"lamp running"})," working…"]})]})}function py({text:u}){const i=C.useMemo(()=>va.sanitize(Re.parse(u,{async:!1})),[u]);return a.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:i}})}function gy({b:u,chatId:i}){switch(u.kind){case"user":return a.jsx("div",{className:"msg user",children:u.text});case"agent":return a.jsx(py,{text:u.text});case"thought":return a.jsxs("details",{className:"msg thought",children:[a.jsx("summary",{children:"thinking"}),a.jsx("div",{children:u.text})]});case"tool":return a.jsxs("div",{className:`tool-card ${u.status??""}`,children:[a.jsx("span",{className:`lamp ${u.status==="completed"?"ok":u.status==="failed"?"failed":"running"}`}),u.toolKind&&a.jsx("span",{className:"chip tool-kind",children:u.toolKind}),a.jsx("span",{className:"tool-title",children:u.title})]});case"permission":return a.jsx(xy,{b:u,chatId:i});case"error":return a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",u.text]})}}function xy({b:u,chatId:i}){const[o,r]=C.useState(!1),f=u.resolved===void 0;async function h(p){r(!0),await fetch(`/api/chats/${i}/permission`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:u.requestId,optionId:p})}).catch(()=>{}),r(!1)}return a.jsxs("div",{className:`perm-card ${f?"pending":""}`,children:[a.jsxs("div",{className:"perm-title",children:[a.jsx("span",{className:"microlabel",children:"permission"})," ",u.title]}),f?a.jsx("div",{className:"perm-actions",children:u.options.map(p=>a.jsx("button",{className:`perm-btn ${p.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(p.optionId),children:p.name},p.optionId))}):a.jsx("div",{className:"perm-resolved",children:u.resolved?`→ ${u.options.find(p=>p.optionId===u.resolved)?.name??u.resolved}`:"→ dismissed"})]})}function vy({id:u,busy:i,scope:o}){const[r,f]=C.useState(""),[h,p]=C.useState([]),[g,y]=C.useState(0),[v,S]=C.useState(!1);C.useEffect(()=>{let A=!0;return(async()=>{try{let fe=(await fetch("/api/skills").then(W=>W.json())).skills??[];if(o?.kind==="team"){const[W,I]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(le=>le.ok?le.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(le=>le.ok?le.json():null).catch(()=>null)]);if(W&&Array.isArray(W.skills)){const le=new Set(W.skills.map(ne=>ne.toLowerCase()));fe=fe.filter(ne=>le.has(ne.name.toLowerCase()))}const Y=I?.skills??[],V=new Set(Y.map(le=>le.name.toLowerCase()));fe=[...Y,...fe.filter(le=>!V.has(le.name.toLowerCase()))]}A&&p(fe)}catch{}})(),()=>{A=!1}},[u]);const E=/^\/([\w-]*)$/.exec(r)?.[1],w=E!==void 0&&!v?h.filter(A=>A.name.toLowerCase().startsWith(E.toLowerCase())):[],M=w.length>0,L=Math.min(g,w.length-1);function J(A){f(`/${A.name} `),y(0)}async function X(){const A=r.trim();!A||i||(f(""),await fetch(`/api/chats/${u}/message`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:A})}).catch(()=>{}))}return a.jsxs("div",{className:"composer",children:[M&&a.jsx("div",{className:"skill-menu",children:w.map((A,oe)=>a.jsxs("button",{className:oe===L?"active":"",onMouseDown:fe=>{fe.preventDefault(),J(A)},children:[a.jsxs("b",{children:["/",A.name]}),A.description&&a.jsxs("span",{children:[" — ",A.description]}),a.jsx("span",{className:"skill-src",children:A.source})]},A.name))}),a.jsx("textarea",{value:r,placeholder:i?"agent is working…":"message · Enter to send, Shift+Enter for newline, / for skills",rows:Math.min(6,Math.max(1,r.split(`
|
|
76
|
+
`).length)),onChange:A=>{f(A.target.value),y(0),S(!1)},onKeyDown:A=>{if(M){if(A.key==="ArrowDown")return A.preventDefault(),y((L+1)%w.length);if(A.key==="ArrowUp")return A.preventDefault(),y((L-1+w.length)%w.length);if(A.key==="Tab"||A.key==="Enter")return A.preventDefault(),J(w[L]);if(A.key==="Escape")return A.preventDefault(),S(!0)}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),X())}}),i?a.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${u}/cancel`,{method:"POST"}).catch(()=>{}),children:[a.jsx(P,{name:"stop",className:"ms-sm"})," stop"]}):a.jsxs("button",{className:"run-btn",disabled:!r.trim(),onClick:X,children:[a.jsx(P,{name:"send",className:"ms-sm"})," send"]})]})}function yy({id:u}){const i=$e("/api/runs",!0),o=i?.runs??[];return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"runs"}),a.jsx("span",{className:"spacer"}),a.jsx("span",{className:"microlabel num",children:o.length})]}),a.jsxs("div",{className:"side-list",children:[o.map(r=>a.jsx(by,{r,active:r.id===u},r.id)),i&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),a.jsx("div",{className:"runs-main",children:a.jsx(jy,{id:u},u)})]})}function by({r:u,active:i}){return a.jsxs(Ce,{href:`/runs/${u.id}`,className:`side-row ${i?"active":""}`,children:[a.jsx(Vc,{status:u.status}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsx("span",{className:"side-wf",children:u.workflow??"unknown"}),a.jsx("span",{className:"side-when num",children:ga(u.startedAt)})]}),a.jsxs("div",{className:"side-row-sub",children:[a.jsx("span",{className:"side-req",title:u.request,children:u.status==="running"&&u.currentPhase?`${u.currentPhase}`:u.request??""}),a.jsx("span",{className:"side-meta num",children:u.status==="running"?a.jsx(jo,{since:u.startedAt}):vi(u.durationMs)})]})]})]})}function jy({id:u}){const i=$e(`/api/runs/${u}`,!0),o=i?.status==="running",[r,f]=C.useState(null),[h,p]=C.useState(!1),g=Gn();if(!i)return a.jsx("div",{className:"empty",children:"loading…"});const y=i.files.some(w=>w.name==="runner.json"),v=r??(o?"run":"artifacts"),S=g?i.files.length:i.files.filter(w=>!Zc(w.name)).length;async function E(){p(!0),await fetch(`/api/runs/${u}/stop`,{method:"POST"}).catch(()=>{})}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"detail-head",children:[a.jsx(Vc,{status:i.status}),a.jsx("h1",{children:i.workflow?a.jsx(Ce,{href:`/workflows/${encodeURIComponent(i.workflow)}`,title:"open workflow",children:i.workflow}):"unknown workflow"}),a.jsx(Ox,{status:i.status}),y&&a.jsxs("span",{className:"chip sandbox-chip",children:[a.jsx(P,{name:"science",className:"ms-sm"})," sandbox"]}),a.jsx("span",{className:"rid",children:u.replace(/^run-/,"")}),o&&y&&a.jsx("button",{className:"stop-btn",onClick:E,disabled:h,children:h?"stopping…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"stop",className:"ms-sm"})," stop"]})}),a.jsx("span",{className:"spacer"}),a.jsx("button",{className:"open-raw",title:"chat with an agent about this run",onClick:()=>{rs("claude",{kind:"run",runId:u})},children:"⌬ discuss"}),a.jsxs("nav",{className:"tabs",children:[a.jsx("button",{className:v==="run"?"active":"",onClick:()=>f("run"),children:"run"}),a.jsxs("button",{className:v==="artifacts"?"active":"",onClick:()=>f("artifacts"),children:["artifacts ",a.jsxs("span",{className:"num",children:["(",S,")"]})]})]})]}),i.request&&a.jsx("p",{className:"detail-req",children:i.request}),v==="run"?a.jsx(Ny,{run:i,live:o}):a.jsx(Ty,{id:u,files:i.files,live:o})]})}function Ny({run:u,live:i}){return a.jsxs("div",{className:"run-tab",children:[a.jsxs("div",{className:"statgrid",children:[a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"phases"}),a.jsxs("div",{className:"v num",children:[u.phasesDone,u.phasesTotal!=null?` / ${u.phasesTotal}`:""]})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"duration"}),a.jsx("div",{className:"v num",children:i?a.jsx(jo,{since:u.startedAt}):vi(u.durationMs)})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"cost"}),a.jsx("div",{className:"v num",children:yo(u.costUsd??Sy(u.phases))})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"tokens in / out"}),a.jsxs("div",{className:"v num",children:[Yc(Ym(u.phases,"tokensIn"))," / ",Yc(Ym(u.phases,"tokensOut"))]})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"phase timeline"}),a.jsx("span",{className:"spacer"}),i&&a.jsxs("span",{className:"live-note",children:[a.jsx("span",{className:"lamp running"})," live · polling"]})]}),a.jsx("div",{className:"phases",children:u.phases.map(o=>a.jsx(wy,{p:o},o.phase))})]})]})}function Ym(u,i){return u.reduce((o,r)=>o+(r[i]??0),0)}function Sy(u){return u.reduce((i,o)=>i+(o.costUsd??0),0)}function wy({p:u}){const i=u.gates.filter(o=>!o.passed);return a.jsxs("div",{className:"phase-row",children:[a.jsx(Vc,{status:u.status}),a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:u.phase}),u.kind==="agent"?a.jsxs("span",{className:"chip agent",children:[u.agent,u.model?` · ${u.model}`:""]}):a.jsx("span",{className:"chip",children:"script"}),a.jsxs("span",{className:"right num",children:[u.attempts>1&&a.jsxs("span",{children:["att ",u.attempts]}),u.status==="running"?a.jsx(jo,{since:u.startedAt}):u.durationMs!=null&&a.jsx("span",{children:vi(u.durationMs)}),u.kind==="agent"&&u.tokensIn!=null&&a.jsxs("span",{children:[Yc(u.tokensIn)," / ",Yc(u.tokensOut)]}),u.costUsd!=null&&u.costUsd>0&&a.jsx("span",{children:yo(u.costUsd)})]})]}),u.status==="running"&&u.lastActivity&&a.jsx("div",{className:"phase-activity",children:u.lastActivity}),u.summary&&u.status!=="running"&&a.jsx("div",{className:"phase-sub",children:u.summary}),u.gates.length>0&&a.jsx("div",{className:"gate-line",children:u.gates.map(o=>a.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[a.jsx(P,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),i.map(o=>a.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const hp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Zc(u){return u==="runner.json"||u.endsWith(".jsonl")||u.endsWith(".log")}function ky(u){const o=["report.html","recommendation.md"].find(h=>u.some(p=>p.name===h));if(o)return o;const r=h=>{const p=h.split(".").pop()?.toLowerCase()??"";return["html","md","markdown","pdf"].includes(p)||hp.has(p)?0:Zc(h)?2:1};let f=null;for(const h of u)(!f||r(h.name)<r(f.name))&&(f=h);return f?.name??null}function Ty({id:u,files:i,live:o}){const[r,f]=C.useState(null),h=Gn(),p=C.useMemo(()=>h?i:i.filter(g=>!Zc(g.name)),[i,h]);return C.useEffect(()=>{!h&&r&&Zc(r)&&f(null)},[h,r]),C.useEffect(()=>{r||p.length===0||f(ky(p))},[p,r]),a.jsxs("div",{className:"art-layout",children:[a.jsxs("section",{className:"panel art-files",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["files ",a.jsxs("span",{className:"num",children:["(",p.length,")"]})]})}),a.jsxs("div",{className:"file-list",children:[p.map(g=>a.jsxs("button",{className:`file-row ${r===g.name?"active":""}`,onClick:()=>f(g.name),children:[a.jsx("span",{className:"fname",children:g.name}),a.jsx("span",{className:"fsize num",children:bo(g.size)})]},g.name)),p.length===0&&a.jsx("div",{className:"viewer-note",children:i.length>0?"no result files — raw run files live in expert mode":"no files yet"})]})]}),a.jsxs("section",{className:"panel art-viewer",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:r??"viewer"}),a.jsx("span",{className:"spacer"}),r&&a.jsx("a",{className:"open-raw",href:`/api/runs/${u}/file?name=${encodeURIComponent(r)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),r?a.jsx(Ey,{id:u,name:r,live:o}):a.jsx("div",{className:"empty",children:"select a file"})]})]})}function Ey({id:u,name:i,live:o}){const r=i.split(".").pop()?.toLowerCase()??"",f=`/api/runs/${u}/file?name=${encodeURIComponent(i)}&raw=1`;return r==="html"?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("iframe",{src:f,sandbox:"allow-scripts",allow:"clipboard-write",title:i})})}):r==="pdf"?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("iframe",{src:f,title:i})})}):hp.has(r)?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("img",{src:f,alt:i})})}):r==="md"||r==="markdown"?a.jsx(Ay,{id:u,name:i,live:o}):a.jsx(_y,{id:u,name:i,live:o})}function Ay({id:u,name:i,live:o}){const[r,f]=C.useState("rendered"),h=$e(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o),p=C.useMemo(()=>h?va.sanitize(Re.parse(h.content,{async:!1})):"",[h?.content]);return a.jsxs("div",{className:"viewer",children:[a.jsxs("div",{className:"viewer-note md-toolbar",children:[a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:r==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),a.jsx("button",{className:r==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&a.jsxs("span",{children:["large file — showing the last ",bo(4e5)]})]}),a.jsx("div",{className:"viewer-body",children:h?r==="rendered"?a.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:p}}):a.jsx("pre",{children:h.content||"(empty)"}):a.jsx("pre",{children:"loading…"})})]})}function _y({id:u,name:i,live:o}){const r=$e(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o);return a.jsxs("div",{className:"viewer",children:[r?.truncated&&a.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",bo(4e5)]}),a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:r?r.content||"(empty)":"loading…"})})]})}function zy(){const u=$e("/api/workflows",!1),i=u?.workflows??[];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:"Workflows"}),a.jsxs("span",{className:"count num",children:[i.length," discovered"]}),u?.root&&a.jsx("span",{className:"count mono",children:u.root})]}),u&&i.length===0&&a.jsxs("div",{className:"empty",children:["No workflows found — expected ",a.jsx("code",{children:"src/workflows/"})," or ",a.jsx("code",{children:"workflows/"})," ","next to the output folder."]}),a.jsx("div",{className:"wf-grid",children:i.map(o=>a.jsxs(Ce,{href:`/workflows/${o.slug}`,className:"wf-card",children:[a.jsxs("div",{className:"wf-card-head",children:[a.jsx("span",{className:"wf-name",children:o.name??o.slug}),o.error&&a.jsx("span",{className:"status-word failed",children:"broken"})]}),a.jsx("p",{className:"wf-desc",children:o.error??o.description??""}),a.jsxs("div",{className:"wf-meta num",children:[a.jsxs("span",{children:[o.agents," agents"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{children:[o.steps," steps"]})]})]},o.slug))})]})}function Ry({slug:u}){const i=$e(`/api/workflows/${encodeURIComponent(u)}`,!1),o=$e("/api/runs",!1);if(!i)return a.jsx("div",{className:"empty",children:"loading…"});if(i.error)return a.jsxs(a.Fragment,{children:[a.jsx(Gm,{slug:i.slug}),a.jsxs("div",{className:"empty",children:[a.jsx("span",{className:"status-word failed",children:"broken workflow"}),a.jsx("pre",{style:{marginTop:12,textAlign:"left"},children:i.error})]})]});const r=new Map(i.agents.map((h,p)=>[h.id,p%4])),f=(o?.runs??[]).filter(h=>h.workflow===i.name).slice(0,8);return a.jsxs(a.Fragment,{children:[a.jsx(Gm,{slug:i.slug}),a.jsxs("div",{className:"detail-head",children:[a.jsx("h1",{children:i.name??i.slug}),a.jsx("span",{className:"rid mono",children:i.dir})]}),i.description&&a.jsx("p",{className:"detail-req",children:i.description}),a.jsxs("div",{className:"statgrid",children:[a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"agents"}),a.jsx("div",{className:"v num",children:i.agents.length})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"steps"}),a.jsxs("div",{className:"v num",children:[i.steps.length," ",a.jsxs("span",{style:{color:"var(--muted)",fontWeight:400},children:["(",i.steps.filter(h=>h.kind==="agent").length," agent ·"," ",i.steps.filter(h=>h.kind==="script").length," script)"]})]})]}),i.workspace&&a.jsxs("div",{className:"stat",style:{maxWidth:420},children:[a.jsx("div",{className:"microlabel",children:"workspace"}),a.jsx("div",{className:"wf-workspace mono",children:i.workspace})]})]}),a.jsx(Cy,{slug:i.slug,lastRequest:f[0]?.request}),a.jsxs("section",{className:"panel",style:{marginBottom:18},children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"agents"})}),a.jsxs("div",{className:"agent-grid",children:[i.agents.map(h=>a.jsx(Oy,{a:h,idx:r.get(h.id)??0},h.id)),i.agents.length===0&&a.jsx("div",{className:"viewer-note",children:"no agents — script-only workflow"})]})]}),a.jsxs("div",{className:"columns",children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"pipeline"})}),a.jsx("div",{className:"pipeline",children:i.steps.map((h,p)=>a.jsx(Dy,{s:h,i:p,idx:h.agent?r.get(h.agent)??0:null},h.name))})]}),a.jsxs("div",{style:{display:"grid",gap:18},children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["folder ",a.jsxs("span",{className:"num",children:["(",i.files.length," files)"]})]})}),a.jsx("div",{className:"file-list",children:i.files.map(h=>a.jsx("div",{className:"file-row",style:{cursor:"default"},children:a.jsx("span",{className:"fname",children:h})},h))})]}),a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsxs("span",{className:"microlabel",children:["recent runs ",a.jsxs("span",{className:"num",children:["(",f.length,")"]})]})}),a.jsxs("div",{className:"file-list",children:[f.map(h=>a.jsxs(Ce,{href:`/runs/${h.id}`,className:"file-row",children:[a.jsx(Vc,{status:h.status}),a.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),a.jsxs("span",{className:"fsize num",children:[vi(h.durationMs)," · ",yo(h.costUsd)," · ",ga(h.startedAt)]})]},h.id)),f.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function Cy({slug:u,lastRequest:i}){const[o,r]=C.useState(""),[f,h]=C.useState(!0),[p,g]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(null),w=$e(`/api/workflows/${encodeURIComponent(u)}/run`,!1);C.useEffect(()=>{!o&&i&&r(i)},[i]);const M=w?.available&&w?.image,L=w?w.available?w.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function J(){if(!(!o.trim()||y)){v(!0),E(null);try{const X=await fetch(`/api/workflows/${encodeURIComponent(u)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:p})}),A=await X.json();if(!X.ok)throw new Error(A.error??`HTTP ${X.status}`);gl(`/runs/${A.runId}`)}catch(X){E(X.message),v(!1)}}}return a.jsxs("section",{className:"panel run-panel",style:{marginBottom:18},children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"trigger run"})}),a.jsxs("div",{className:"run-form",children:[a.jsx("input",{type:"text",value:o,placeholder:"request — topic, URL, host …",onChange:X=>r(X.target.value),onKeyDown:X=>X.key==="Enter"&&J()}),a.jsx("button",{className:"run-btn",onClick:J,disabled:y||!o.trim()||f&&!M,children:y?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"play_arrow",className:"ms-sm"})," ",f?"run in sandbox":"run locally"]})})]}),a.jsxs("div",{className:"run-opts",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:f,onChange:X=>h(X.target.checked)}),"docker sandbox ",L&&a.jsxs("span",{className:"opt-hint",children:["— ",L]})]}),a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:p,onChange:X=>g(X.target.checked),disabled:!f}),"forward SSH agent"]})]}),S&&a.jsx("div",{className:"gate-fail-msg",children:S})]})}function Gm({slug:u}){return a.jsxs("nav",{className:"crumbs",children:[a.jsx(Ce,{href:"/workflows",children:"workflows"}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{className:"mono",children:u})]})}function Oy({a:u,idx:i}){return a.jsxs("div",{className:`agent-card aid-${i}`,children:[a.jsxs("div",{className:"agent-head",children:[a.jsx("span",{className:"agent-dot"}),a.jsx("b",{children:u.name??u.id}),a.jsxs("code",{className:"agent-id",children:["[",u.id,"]"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"chip",children:[u.model??"default",u.effort?` · ${u.effort}`:""]})]}),u.tools.length>0&&a.jsx("div",{className:"agent-tools",children:u.tools.map(o=>a.jsx("span",{className:"tool-chip",children:o},o))}),u.persona&&a.jsx("p",{className:"agent-persona",children:u.persona})]})}function Dy({s:u,i,idx:o}){const r=u.kind==="script"?u.script:u.prompt;return a.jsxs("div",{className:"step-node",children:[a.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:i+1}),a.jsxs("div",{className:"step-body",children:[a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:u.name}),u.kind==="agent"?a.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",u.agent]}):a.jsxs("span",{className:"chip",children:["script",u.sourceRef?` · ${u.sourceRef}`:""]})]}),r&&a.jsxs("details",{className:"step-source",children:[a.jsx("summary",{children:u.kind==="agent"?"prompt":"script"}),a.jsx("pre",{children:r})]}),u.gates.length>0&&a.jsx("div",{className:"gate-line",children:u.gates.map(f=>a.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const My=u=>u==="ok"?"ok":u==="running"?"running":u==="aborted"?"aborted":"failed",Uy=u=>u==="ok"?"done":u==="running"?"working":u==="aborted"?"stopped":"failed";function Ly(u){return u.scope.kind==="team"?`/agents/${u.scope.member}/chat/${u.id}`:`/agents/chats/${u.id}`}function Xm(u){switch(u.scope.kind){case"team":return u.scope.member;case"run":return u.scope.runId;case"knowledge":return u.scope.bundle?`knowledge:${u.scope.bundle}`:"knowledge";case"kraftwerk":return"kraftwerk-aware";default:return"general"}}function Qm(u){return u.length>64?`${u.slice(0,46)}…${u.slice(-14)}`:u}function Hy(){const u=$e("/api/runs",!1),i=$e("/api/chats",!1),o=$e("/api/knowledge",!1),r=$e("/api/team",!1),f=$e("/api/workflows",!1),h=$e("/api/skills",!1),p=$e("/api/meta",!1),[g,y]=C.useState("all"),v=u?.runs??[],S=i?.chats??[],E=o?.bundles??[],w=(h?.skills??[]).filter(J=>J.source==="workspace"),M=[[f?.workflows.length,"workflows","/workflows"],[u?v.length:void 0,"runs","/runs"],[o?E.length:void 0,"bundles","/knowledge"],[h?w.length:void 0,"skills","/skills"],[i?S.length:void 0,"chats","/agents/chats"]],L=v.filter(J=>J.status==="failed"&&Date.now()-Date.parse(J.updatedAt)<24*36e5);return a.jsxs("div",{className:"dash",children:[a.jsxs("div",{className:"page-head",children:[a.jsxs("h1",{children:[p?.projectIcon?`${p.projectIcon} `:"",p?.projectName||"workspace"]}),a.jsx("span",{className:"spacer"}),a.jsx("span",{className:"dash-mini",children:M.map(([J,X,A])=>a.jsxs(Ce,{href:A,children:[a.jsx("b",{className:"num",children:J??"…"})," ",X]},X))}),a.jsx(By,{workflows:f?.workflows??[]})]}),a.jsx(qy,{members:r?.members.filter(J=>!J.archived),chats:S}),L.length>0&&g!=="failed"&&a.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",L.length," run",L.length===1?"":"s"," failed in the last 24 h — review"]}),a.jsx(Gy,{runs:v,chats:S,bundles:E,members:r?.members??[],workflows:f?.workflows??[],filter:g,setFilter:y})]})}function By({workflows:u}){const[i,o]=C.useState(!1);return C.useEffect(()=>{if(!i)return;const r=f=>{f.target.closest(".wf-pick-wrap")||o(!1)};return window.addEventListener("mousedown",r),()=>window.removeEventListener("mousedown",r)},[i]),a.jsxs("div",{className:"dash-actions",children:[a.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>gl("/agents/chats"),children:[a.jsx(P,{name:"forum"})," new chat"]}),a.jsxs("span",{className:"wf-pick-wrap",children:[a.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(r=>!r),children:[a.jsx(P,{name:"play_arrow"})," run workflow"]}),i&&a.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[u.length===0&&a.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),u.map(r=>a.jsxs(Ce,{href:`/workflows/${encodeURIComponent(r.slug)}`,className:"wf-pick-item",role:"menuitem",children:[a.jsx("span",{className:"wf-pick-name",children:r.name??r.slug}),r.description&&a.jsx("span",{className:"wf-pick-desc",children:r.description})]},r.slug))]})]})]})}function qy({members:u,chats:i}){const o=Gn();return u&&u.length===0?a.jsx("section",{className:"panel dash-team-empty",children:a.jsx("div",{className:"viewer-note",children:o?a.jsxs(a.Fragment,{children:["No agent teammates yet — ",a.jsx(Ce,{href:"/agents/new",children:"create your first agent"})," and it will show up here, ready to chat."]}):a.jsx(a.Fragment,{children:"No agent teammates yet — ask an expert-mode user to create one."})})}):a.jsx("div",{className:"dash-team",children:(u??[]).map(r=>{const h=i.filter(g=>g.scope.kind==="team"&&g.scope.member===r.slug).find(g=>g.busy),p=()=>gl(`/agents/${encodeURIComponent(r.slug)}`);return a.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:p,onKeyDown:g=>{g.key==="Enter"&&p()},children:[a.jsxs("div",{className:"dash-member-id",children:[a.jsxs("span",{className:"agent-avatar lg",children:[a.jsx("span",{"aria-hidden":!0,children:r.emoji}),a.jsx("span",{className:`lamp ${h?"running":"idle"}`})]}),a.jsx("span",{className:"dash-member-name",children:r.name}),r.description&&a.jsx("span",{className:"dash-member-desc",children:r.description})]}),a.jsxs("div",{className:"dash-member-foot",children:[a.jsx("span",{className:"dash-member-state",children:h&&a.jsx(Ce,{href:`/agents/${encodeURIComponent(r.slug)}/chat/${h.id}`,onClick:g=>g.stopPropagation(),children:"working…"})}),a.jsxs("button",{className:"run-btn dash-chat-btn",onClick:g=>{g.stopPropagation(),rs("claude",{kind:"team",member:r.slug})},children:[a.jsx(P,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},r.slug)})})}function $y(u){if(u.lamp==="running")return"now";const i=new Date(u.at),o=new Date;if(i.toDateString()===o.toDateString())return"today";const r=new Date(o);return r.setDate(r.getDate()-1),i.toDateString()===r.toDateString()?"yesterday":"earlier"}const Yy=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function Gy({runs:u,chats:i,bundles:o,members:r,workflows:f,filter:h,setFilter:p}){const g=Gn(),y=C.useMemo(()=>{const S=[],E=M=>M?f.find(L=>L.slug===M)?.name??M:void 0;for(const M of u)S.push({at:M.updatedAt,kind:"run",emoji:"⚙️",title:E(M.workflow)??M.id,sub:M.request??"",href:`/runs/${M.id}`,lamp:My(M.status),status:Uy(M.status)});for(const M of i){const L=M.scope.kind==="team"?r.find(J=>M.scope.kind==="team"&&J.slug===M.scope.member):void 0;S.push({at:M.updatedAt,kind:"session",emoji:L?L.emoji||"🤖":"💬",title:L?L.name:M.title||"new chat",sub:L?`${M.title||"new chat"}${g?` · ${M.agent}`:""}`:g?`${M.agent} · ${Xm(M)}`:Xm(M),href:Ly(M),lamp:M.busy?"running":"ok",status:M.busy?"working":void 0})}for(const M of o)M.updatedAt&&S.push({at:M.updatedAt,kind:"knowledge",emoji:"📚",title:M.name,sub:`${M.concepts} concepts`,href:`/knowledge/${encodeURIComponent(M.name)}`,lamp:"ok"});return(h==="all"?S:h==="failed"?S.filter(M=>M.kind==="run"&&M.lamp==="failed"):S.filter(M=>M.kind===h)).sort((M,L)=>{const J=+(L.lamp==="running")-+(M.lamp==="running");return J!==0?J:L.at.localeCompare(M.at)}).slice(0,15)},[u,i,o,r,g,h]);let v="";return a.jsxs("section",{className:"panel dash-feed",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"activity"}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"dash-feed-filter",children:[Yy.map(([S,E])=>a.jsx("button",{className:`feed-chip ${h===S?"on":""}`,onClick:()=>p(S),children:E},S)),h==="failed"&&a.jsxs("button",{className:"feed-chip on failed",onClick:()=>p("all"),children:["failed ",a.jsx(P,{name:"close",className:"ms-sm"})]})]})]}),y.length===0?a.jsx("div",{className:"viewer-note",children:h==="all"?"nothing yet — run a workflow or start a session":"nothing here for this filter"}):a.jsx("div",{className:"m3-list",children:y.map(S=>{const E=$y(S),w=E!==v?E:null;return v=E,a.jsxs("div",{className:"feed-group",children:[w&&a.jsx("div",{className:"feed-day microlabel",children:w}),a.jsxs(Ce,{href:S.href,className:"m3-row m3-link",children:[a.jsxs("span",{className:"agent-avatar",children:[a.jsx("span",{"aria-hidden":!0,children:S.emoji}),S.lamp==="running"&&a.jsx("span",{className:"lamp running"})]}),a.jsx("span",{className:`chip dash-kind ${S.kind}`,children:S.kind==="session"?"chat":S.kind}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:Qm(S.title)}),S.sub&&a.jsx("span",{className:"m3-sub",children:Qm(S.sub)})]}),S.status&&a.jsx("span",{className:`chip status ${S.lamp}`,children:S.status}),a.jsx("span",{className:"side-when num",title:new Date(S.at).toLocaleString(),children:Cx(S.at)}),a.jsx("span",{className:"m3-chev",children:a.jsx(P,{name:"chevron_right"})})]})]},`${S.kind}:${S.href}:${S.at}`)})})]})}async function zo(u,i){const o=window.open("","_blank");if(!o)return;const r=i?`${u}/${i}`:u;o.document.write(`<title>${Tl(r)}</title><body style="font-family:system-ui;padding:40px;color:#555">preparing ${Tl(r)}…</body>`);const f=L=>`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(L)}`;let h,p="";try{const[L,J]=await Promise.all([i?Promise.resolve([i]):fetch(`/api/knowledge/${encodeURIComponent(u)}`).then(X=>X.json()).then(X=>X.concepts.map(A=>A.id)),fetch("/api/meta").then(X=>X.json()).catch(()=>({}))]);if(p=J.projectName??"",h=await Promise.all(L.map(X=>fetch(f(X)).then(A=>A.json()))),h.some(X=>typeof X?.id!="string"))throw new Error("missing concept")}catch{o.document.body.textContent=`could not load "${r}"`;return}const g=[],y=h.map(L=>{const J=[L.type,L.generated?.at?`updated ${L.generated.at.slice(0,10)}`:"",L.trustTier==="human-reviewed"?"human-reviewed":"",(L.tags??[]).map(Y=>`#${Y}`).join(" ")].filter(Boolean).join(" · "),{md:X,notes:A}=Xy(mp(L.body??"",null)),oe=!L.title||L.title===L.id||L.title===L.id.split("/").pop(),{html:fe,title:W}=Qy(va.sanitize(Re.parse(X,{async:!1})),{title:L.title||L.id,meta:J,titleIsFallback:oe});g.push(W);const I=A.length?`<ol class="notes">${A.map(Y=>`<li id="fn-${Tl(Y.id)}">${va.sanitize(Re.parseInline(Y.text,{async:!1}))}</li>`).join("")}</ol>`:"";return`<article>
|
|
77
|
+
${fe}
|
|
78
|
+
${I}
|
|
79
|
+
</article>`}).join(`
|
|
80
|
+
`),v=new Date().toISOString().slice(0,10),S=p?`${Tl(p)} · ${Tl(u)}`:Tl(u),E=i?g[0]||r:u,w=i?"":`<h1 class="cover">${Tl(u)}</h1>
|
|
81
|
+
<div class="cover-sub">${p?`${Tl(p)} · `:""}knowledge bundle · ${h.length} concept${h.length===1?"":"s"} · exported ${v}</div>`,M=`<!doctype html>
|
|
82
|
+
<html>
|
|
83
|
+
<head>
|
|
84
|
+
<meta charset="utf-8">
|
|
85
|
+
<title>${Tl(E)}</title>
|
|
86
|
+
<style>
|
|
87
|
+
:root { color-scheme: light; }
|
|
88
|
+
/* Page margins live in the sheet itself (repeating thead/tfoot cells +
|
|
89
|
+
cell padding), not in @page — print dialogs that override or drop CSS
|
|
90
|
+
page margins (macOS system dialog, "Margins: None") then still print
|
|
91
|
+
the intended layout. Top 14mm, right 48mm (notes), bottom 16mm, left 20mm. */
|
|
92
|
+
@page { size: A4; margin: 0; }
|
|
93
|
+
* { box-sizing: border-box; }
|
|
94
|
+
body {
|
|
95
|
+
margin: 0; background: #e9e5df;
|
|
96
|
+
font: 10pt/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; color: #1c1b19;
|
|
97
|
+
font-feature-settings: "kern", "liga", "tnum";
|
|
98
|
+
-webkit-print-color-adjust: exact; print-color-adjust: exact;
|
|
99
|
+
}
|
|
100
|
+
.no-print {
|
|
101
|
+
position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: center;
|
|
102
|
+
padding: 10px 24px; background: #f4efea; border-bottom: 1px solid #ded6cb; font-size: 13px;
|
|
103
|
+
}
|
|
104
|
+
.no-print button {
|
|
105
|
+
font: inherit; font-weight: 600; padding: 6px 16px; cursor: pointer;
|
|
106
|
+
background: #191919; color: #fff; border: none; border-radius: 999px;
|
|
107
|
+
}
|
|
108
|
+
/* Screen preview mimics the printed page incl. the note gutter. */
|
|
109
|
+
.sheet {
|
|
110
|
+
width: 210mm; margin: 24px auto; background: #fff;
|
|
111
|
+
border-collapse: separate; border-spacing: 0; box-shadow: 0 2px 12px rgba(0,0,0,.12);
|
|
112
|
+
}
|
|
113
|
+
.sheet > thead > tr > td { padding: 14mm 48mm 0 20mm; vertical-align: top; }
|
|
114
|
+
.sheet > tbody > tr > td { padding: 0 48mm 0 20mm; vertical-align: top; }
|
|
115
|
+
.sheet > tfoot > tr > td { padding: 16mm 0 0; }
|
|
116
|
+
|
|
117
|
+
/* Running header */
|
|
118
|
+
.runhead {
|
|
119
|
+
display: flex; justify-content: space-between; gap: 16px;
|
|
120
|
+
font-size: 7.5pt; line-height: 1; color: #6b6660; letter-spacing: 0.08em; text-transform: uppercase;
|
|
121
|
+
padding-bottom: 6px; border-bottom: 0.5pt solid #1c1b19; margin-bottom: 30px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Cover */
|
|
125
|
+
.cover { margin: 0 0 3px; font-size: 22pt; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
|
|
126
|
+
.cover-sub { color: #6b6660; font-size: 8.5pt; margin-bottom: 26px; }
|
|
127
|
+
|
|
128
|
+
/* Concept */
|
|
129
|
+
article { margin-top: 36px; }
|
|
130
|
+
article:first-of-type { margin-top: 0; }
|
|
131
|
+
article header { break-inside: avoid; break-after: avoid; margin-bottom: 12px; }
|
|
132
|
+
article h1 { font-size: 16pt; font-weight: 700; margin: 0 0 3px; letter-spacing: -0.015em; line-height: 1.2; }
|
|
133
|
+
article .meta { color: #6b6660; font-size: 8pt; letter-spacing: 0.01em; }
|
|
134
|
+
|
|
135
|
+
/* Type scale for body headings (concept body starts at h2 after demotion) */
|
|
136
|
+
h2 { font-size: 13pt; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin: 22px 0 6px; break-after: avoid; }
|
|
137
|
+
h3 { font-size: 11pt; font-weight: 650; line-height: 1.3; margin: 18px 0 4px; break-after: avoid; }
|
|
138
|
+
h4 { font-size: 9.5pt; font-weight: 650; color: #3d3a36; margin: 14px 0 2px; break-after: avoid; }
|
|
139
|
+
h5, h6 { font-size: 10pt; font-weight: 650; margin: 12px 0 2px; }
|
|
140
|
+
h2 + h3, h3 + h4 { margin-top: 6px; }
|
|
141
|
+
.keep { break-inside: avoid; }
|
|
142
|
+
|
|
143
|
+
/* Copy */
|
|
144
|
+
p, ul, ol { margin: 0 0 8px; orphans: 3; widows: 3; }
|
|
145
|
+
ul, ol { padding-left: 16px; }
|
|
146
|
+
li { margin: 0 0 3px; padding-left: 2px; }
|
|
147
|
+
li > p { margin: 0; }
|
|
148
|
+
li::marker { color: #8a857e; }
|
|
149
|
+
ul ul, ol ol, ul ol, ol ul { margin: 2px 0 0; }
|
|
150
|
+
strong { font-weight: 650; }
|
|
151
|
+
em { font-style: italic; }
|
|
152
|
+
a { color: inherit; text-decoration-color: #b8b2aa; text-decoration-thickness: 0.5pt; text-underline-offset: 2px; }
|
|
153
|
+
hr { border: 0; border-top: 0.5pt solid #ded6cb; margin: 14px 0; }
|
|
154
|
+
code { font: 8.5pt/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: #f2ede7; padding: 0 3px; border-radius: 3px; }
|
|
155
|
+
pre { background: #f2ede7; padding: 8px 10px; border-radius: 4px; overflow-x: auto; white-space: pre-wrap; margin: 4px 0 10px; }
|
|
156
|
+
pre code { background: none; padding: 0; }
|
|
157
|
+
blockquote { margin: 6px 0 10px; padding: 1px 0 1px 12px; border-left: 2px solid #c9c2b8; color: #4d4944; }
|
|
158
|
+
img { max-width: 100%; }
|
|
159
|
+
li:has(> input[type="checkbox"]) { list-style: none; margin-left: -16px; }
|
|
160
|
+
input[type="checkbox"] { width: 9px; height: 9px; margin: 0 6px 0 0; vertical-align: -0.5px; }
|
|
161
|
+
pre, blockquote, table, img { break-inside: avoid; }
|
|
162
|
+
|
|
163
|
+
/* Tables: hairline rules, tabular figures, tight leading */
|
|
164
|
+
table.md { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 8.75pt; line-height: 1.35; }
|
|
165
|
+
table.md th, table.md td { padding: 4px 10px 4px 0; text-align: left; vertical-align: top; border-bottom: 0.5pt solid #ded6cb; }
|
|
166
|
+
table.md th:last-child, table.md td:last-child { padding-right: 0; }
|
|
167
|
+
table.md th { font-weight: 650; padding-bottom: 5px; border-top: 0.5pt solid #1c1b19; border-bottom: 0.5pt solid #1c1b19; color: #1c1b19; }
|
|
168
|
+
table.md tr:last-child td { border-bottom: 0.5pt solid #1c1b19; }
|
|
169
|
+
table.md .nw { white-space: nowrap; }
|
|
170
|
+
|
|
171
|
+
/* Footnotes */
|
|
172
|
+
.fnref { font-size: 6.5pt; line-height: 0; margin-left: 1px; color: #6b6660; }
|
|
173
|
+
.fnref + .fnref::before { content: ","; }
|
|
174
|
+
.notes { margin: 14px 0 0; padding: 8px 0 0 14px; border-top: 0.5pt solid #ded6cb; font-size: 8pt; line-height: 1.4; color: #6b6660; }
|
|
175
|
+
.notes li { margin: 0 0 2px; }
|
|
176
|
+
@media print {
|
|
177
|
+
body { background: #fff; }
|
|
178
|
+
.no-print { display: none; }
|
|
179
|
+
.sheet { width: 100%; margin: 0; box-shadow: none; }
|
|
180
|
+
.runhead { margin-bottom: 24px; }
|
|
181
|
+
}
|
|
182
|
+
</style>
|
|
183
|
+
</head>
|
|
184
|
+
<body>
|
|
185
|
+
<div class="no-print">
|
|
186
|
+
<span>Use “Save as PDF” in the print dialog.</span>
|
|
187
|
+
<button onclick="window.print()">print / save as PDF</button>
|
|
188
|
+
</div>
|
|
189
|
+
<table class="sheet">
|
|
190
|
+
<thead><tr><td>
|
|
191
|
+
<div class="runhead"><span>${S}</span><span>${v}</span></div>
|
|
192
|
+
</td></tr></thead>
|
|
193
|
+
<tbody><tr><td>
|
|
194
|
+
${w}
|
|
195
|
+
${y}
|
|
196
|
+
</td></tr></tbody>
|
|
197
|
+
<tfoot><tr><td></td></tr></tfoot>
|
|
198
|
+
</table>
|
|
199
|
+
<script>setTimeout(() => window.print(), 400);<\/script>
|
|
200
|
+
</body>
|
|
201
|
+
</html>`;o.location.href=URL.createObjectURL(new Blob([M],{type:"text/html"}))}function mp(u,i){return u.split(/(```[\s\S]*?```|`[^`]*`)/).map((o,r)=>r%2===1?o:o.replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,(f,h,p)=>{const g=h.trim().replace(/\.md$/,""),y=(p??g).trim();return i===null?y:`[${y}](#/knowledge/${encodeURIComponent(i)}/${g})`})).join("")}function Xy(u){const i=[];return{md:u.replace(/^\[\^([^\]]+)\]:[ \t]*(.+)$/gm,(r,f,h)=>(i.push({id:f,text:h.trim()}),"")).replace(/\[\^([^\]]+)\]/g,(r,f)=>{const h=i.findIndex(p=>p.id===f);return h>=0?`<sup class="fnref">${h+1}</sup>`:""}),notes:i}}function Qy(u,i){const o=new DOMParser().parseFromString(u,"text/html");let r=i.title;const f=o.body.firstElementChild;i.titleIsFallback&&f?.tagName==="H1"&&(r=f.textContent?.trim()||r,f.remove());const h=o.createElement("header");h.innerHTML=`<h1>${Tl(r)}</h1><div class="meta">${Tl(i.meta)}</div>`,o.body.prepend(h);for(const p of o.querySelectorAll("table")){p.classList.add("md");for(const g of p.querySelectorAll("th, td"))(g.textContent??"").trim().length<=14&&g.classList.add("nw")}for(const p of[5,4,3,2,1])for(const g of Array.from(o.body.querySelectorAll(`:scope > h${p}`))){const y=o.createElement(`h${p+1}`);y.innerHTML=g.innerHTML,g.replaceWith(y)}for(const p of Array.from(o.body.querySelectorAll(":scope > header, :scope > h2, :scope > h3, :scope > h4"))){const g=p.nextElementSibling;if(!g||/^H[1-6]$/.test(g.tagName))continue;const y=o.createElement("div");y.className="keep",p.replaceWith(y),y.append(p,g)}return{html:o.body.innerHTML,title:r}}function Tl(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Zy({bundle:u,conceptId:i}){const o=$e("/api/knowledge",!1),r=o?.bundles??[];return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"bundles"}),a.jsx("span",{className:"spacer"}),a.jsxs(Ce,{href:"/knowledge",className:"open-raw",children:[a.jsx(P,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[r.map(f=>a.jsxs(Ce,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===u?"active":""}`,children:[a.jsx("span",{className:"lamp ok"}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsx("span",{className:"side-wf",children:f.name}),a.jsx("span",{className:"side-when num",children:f.concepts})]}),a.jsx("div",{className:"side-row-sub",children:a.jsxs("span",{className:"side-req",children:[f.okfVersion?`okf ${f.okfVersion}`:"okf",f.updatedAt?` · ${f.updatedAt.slice(0,10)}`:""]})})]})]},f.name)),o&&r.length===0&&a.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),a.jsx("div",{className:"runs-main",children:u?a.jsx(Ky,{name:u,conceptId:i},u):a.jsx(Vy,{root:o?.root})})]})}function Vy({root:u}){const[i,o]=C.useState(""),[r,f]=C.useState(""),[h,p]=C.useState(!1);async function g(){const y=i.trim();if(!y)return;p(!0),f("");const S=await(await fetch("/api/knowledge",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:y})})).json();p(!1),S.error?f(S.error):window.location.hash=`/knowledge/${encodeURIComponent(y)}`}return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"context & knowledge"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.jsxs("div",{className:"know-intro",children:["Curated knowledge as ",a.jsx("b",{children:"OKF bundles"})," (Open Knowledge Format v0.2): plain markdown files with YAML frontmatter",u?a.jsxs(a.Fragment,{children:[" under ",a.jsx("code",{children:u})]}):null,", readable by humans and agents, diffable in git. Agents write through"," ",a.jsx("code",{children:"kraftwerk knowledge put"})," (provenance is stamped automatically); you raise a concept's trust tier by verifying it here."]}),a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"new bundle"})}),a.jsxs("div",{className:"know-newbundle",children:[a.jsx("input",{value:i,placeholder:"bundle name, e.g. customer-support",onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&void g()}),a.jsx("button",{className:"run-btn",disabled:!i.trim()||h,onClick:g,children:h?"creating…":"create"})]}),r&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",r]})]})]})}function Zm({tier:u}){return a.jsx("span",{className:`chip trust ${u}`,children:u})}const Vm="@activity";function Ky({name:u,conceptId:i}){const o=$e(`/api/knowledge/${encodeURIComponent(u)}`,!1);if(!o)return a.jsx("div",{className:"empty",children:"loading…"});if("error"in o)return a.jsx("div",{className:"empty",children:"bundle not found"});const r=i===Vm?"activity":"pages",f=o.concepts,h=r==="pages"?i&&f.some(g=>g.id===i)?i:f[0]?.id:void 0,p=`/knowledge/${encodeURIComponent(u)}`;return a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:u}),a.jsxs("span",{className:"count",children:[f.length," pages"]}),a.jsxs("div",{className:"tabs",children:[a.jsx(Ce,{href:p,className:r==="pages"?"active":"",children:"pages"}),a.jsx(Ce,{href:`${p}/${Vm}`,className:r==="activity"?"active":"",children:"activity"})]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{zo(u)},children:[a.jsx(P,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),a.jsx("button",{className:"run-btn",onClick:()=>{rs("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"})]}),r==="activity"?o.log?a.jsx(Wy,{name:u,log:o.log}):a.jsx("section",{className:"panel",children:a.jsx("div",{className:"viewer-note",children:"no activity yet"})}):f.length===0?a.jsx("section",{className:"panel",children:a.jsxs("div",{className:"viewer-note",children:["No pages yet — start a chat to author some, or write one with"," ",a.jsxs("code",{children:["kraftwerk knowledge put ",u,"/<path>"]}),"."]})}):a.jsxs("div",{className:"wiki",children:[a.jsx("aside",{className:"wiki-side",children:Py(f).map(({folder:g,concepts:y})=>a.jsxs(C.Fragment,{children:[g&&a.jsxs("div",{className:"wiki-folder",children:[g,"/"]}),y.map(v=>a.jsxs(Ce,{href:`${p}/${v.id}`,className:`wiki-page ${v.id===h?"active":""}`,title:`${v.id}.md`,children:[a.jsx(P,{name:Jy(v.type),className:"ms-sm"}),a.jsx("span",{className:"wiki-page-title",children:v.title}),(v.stale||v.error)&&a.jsx("span",{className:"wiki-dot",title:v.error??"stale"})]},v.id))]},g||"."))}),a.jsx("div",{className:"wiki-main",children:h&&a.jsx(eb,{bundle:u,conceptId:h},h)})]})]})}function Jy(u){switch((u??"").toLowerCase()){case"reference":return"article";case"policy":return"gavel";case"guide":case"howto":return"route";case"decision":return"balance";default:return"menu_book"}}function Iy(u){const i=[];for(const o of u.split(`
|
|
202
|
+
`)){const r=o.match(/^##\s+(\d{4}-\d{2}-\d{2})/);if(r){i.push({date:r[1],entries:[]});continue}const f=o.match(/^[*-]\s+\*\*([^*]+)\*\*:\s*(.*)$/);f&&i.length>0&&i[i.length-1].entries.push({kind:f[1].toLowerCase(),text:f[2]})}return i.filter(o=>o.entries.length>0)}function Fy(u,i){const o=[],r=/\[([^\]]+)\]\(\/?([^)]+?)\.md\)/g;let f=0,h;for(;h=r.exec(i);)h.index>f&&o.push(i.slice(f,h.index)),o.push(a.jsx(Ce,{href:`/knowledge/${encodeURIComponent(u)}/${h[2].replace(/^\//,"")}`,children:h[1]},h.index)),f=h.index+h[0].length;return f<i.length&&o.push(i.slice(f)),o}function Wy({name:u,log:i}){const o=Iy(i),[r,f]=C.useState(!1);return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"activity"}),a.jsx("span",{className:"spacer"}),a.jsx("button",{className:"open-raw",onClick:()=>f(!r),children:r?"timeline":"raw log"})]}),r||o.length===0?a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:i})}):a.jsx("div",{className:"know-log",children:o.map(h=>a.jsxs(C.Fragment,{children:[a.jsx("div",{className:"m3-subhead num",children:h.date}),h.entries.map((p,g)=>a.jsxs("div",{className:"know-log-row",children:[a.jsx("span",{className:`chip log-kind log-${p.kind}`,children:p.kind}),a.jsx("span",{className:"know-log-text",children:Fy(u,p.text)})]},g))]},h.date))})]})}function Py(u){const i=new Map;for(const o of u){const r=o.id.includes("/")?o.id.slice(0,o.id.lastIndexOf("/")):"";(i.get(r)??i.set(r,[]).get(r)).push(o)}return[...i.keys()].sort((o,r)=>o===""?-1:r===""?1:o.localeCompare(r)).map(o=>({folder:o,concepts:i.get(o)}))}function eb({bundle:u,conceptId:i}){const[o,r]=C.useState(null),[f,h]=C.useState(!1),[p,g]=C.useState(!1),[y,v]=C.useState(!1),[S,E]=C.useState(""),[w,M]=C.useState(!1),[L,J]=C.useState(""),[X,A]=C.useState("rendered"),oe=C.useMemo(()=>o?va.sanitize(Re.parse(mp(o.body,u),{async:!1})):"",[o?.body,u]),fe=()=>{fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`).then(Y=>Y.ok?Y.json():Promise.reject()).then(r).catch(()=>h(!0))};C.useEffect(()=>{if(y)return;let Y=!0,V;const le=async()=>{try{const ne=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`,{cache:"no-store"});if(ne.ok){const je=await ne.json();Y&&(h(!1),r(be=>JSON.stringify(be)===JSON.stringify(je)?be:je))}else ne.status===404&&Y&&h(!0)}catch{}Y&&(V=setTimeout(le,6e3))};return le(),()=>{Y=!1,clearTimeout(V)}},[u,i,y]);async function W(){g(!0),await fetch(`/api/knowledge/${encodeURIComponent(u)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i})}).catch(()=>{}),g(!1),fe()}async function I(){M(!0),J("");const Y=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i,content:S})}).then(V=>V.json()).catch(()=>({error:"save failed"}));M(!1),Y.error?J(Y.error):(r(Y),v(!1))}return f?a.jsx("div",{className:"empty",children:"concept not found"}):o?a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("h1",{children:o.title}),o.type&&a.jsx("span",{className:"chip agent",children:o.type}),a.jsx(Zm,{tier:o.trustTier}),o.status!=="stable"&&a.jsx("span",{className:`chip ${o.status}`,children:o.status}),o.stale&&a.jsxs("span",{className:"chip stale",children:["stale since ",o.staleAfter?.slice(0,10)]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{zo(u,o.id)},children:[a.jsx(P,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),a.jsx("button",{className:"run-btn",disabled:p,onClick:W,children:p?"verifying…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",o.error]}),a.jsxs("div",{className:"detail-cols",children:[a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"content"}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"side-meta",children:[u,"/",o.id,".md"]}),y?a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"open-raw",onClick:()=>{v(!1),J("")},children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:w,onClick:I,children:w?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"check",className:"ms-sm"})," save"]})})]}):a.jsxs("button",{className:"open-raw",onClick:()=>{E(o.raw),v(!0),J("")},children:[a.jsx(P,{name:"edit",className:"ms-sm"})," edit"]})]}),y?a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"concept-edit",value:S,rows:Math.min(40,Math.max(18,S.split(`
|
|
203
|
+
`).length+2)),onChange:Y=>E(Y.target.value),spellCheck:!1}),a.jsxs("div",{className:"viewer-note",children:["full file (frontmatter + markdown body) — saving stamps provenance as"," ",a.jsx("code",{children:"human:user"})," and logs an update."]})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"viewer-note md-toolbar",children:a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:X==="rendered"?"active":"",onClick:()=>A("rendered"),children:"rendered"}),a.jsx("button",{className:X==="source"?"active":"",onClick:()=>A("source"),children:"source"})]})}),a.jsx("div",{className:"viewer-body",children:X==="rendered"?a.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:oe}}):a.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),L&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",L]})]}),a.jsxs("aside",{className:"detail-rail",children:[a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"about"})}),a.jsxs("div",{className:"rail-list",children:[a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"trust"}),a.jsx("span",{className:"v",children:a.jsx(Zm,{tier:o.trustTier})})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"generated"}),a.jsx("span",{className:`v ${o.generated?"":"dim"}`,children:o.generated?`${o.generated.by??"?"} · ${(o.generated.at??"?").slice(0,10)}`:"not stamped"})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"verified"}),o.verified.length===0?a.jsx("span",{className:"v dim",children:"never"}):o.verified.map((Y,V)=>a.jsxs("span",{className:"v",children:[Y.by??"?"," · ",(Y.at??"?").slice(0,10)]},V))]}),o.staleAfter&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"stale after"}),a.jsxs("span",{className:`v ${o.stale?"":"dim"}`,children:[o.staleAfter.slice(0,10),o.stale&&a.jsx("span",{className:"chip stale",children:"stale"})]})]}),o.tags.length>0&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"tags"}),a.jsx("span",{className:"m3-chips",children:o.tags.map(Y=>a.jsx("span",{className:"chip",children:Y},Y))})]})]})]}),o.sources.length>0&&a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"sources"})}),a.jsx("div",{className:"rail-list",children:o.sources.map((Y,V)=>a.jsxs("div",{className:"rail-kv",children:[a.jsxs("span",{className:"v",children:[Y.resource?.startsWith("http")?a.jsx("a",{href:Y.resource,target:"_blank",rel:"noreferrer",children:Y.title??Y.resource}):Y.title??Y.resource??"?",Y.id&&a.jsxs("span",{className:"know-id",children:["[^",Y.id,"]"]})]}),a.jsx("span",{className:"v dim",children:[Y.author,Y.usage_count!=null?`${Y.usage_count} uses`:null,Y.last_modified?`mod ${Y.last_modified.slice(0,10)}`:null].filter(Boolean).join(" · ")})]},V))})]})]})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const tb={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function pp(u){return a.jsx("span",{className:`chip skill-src ${u}`,children:tb[u]})}function lb({name:u}){const i=$e("/api/skills",!1),o=i?.skills??[],r=o.filter(p=>p.source==="workspace"),f=o.filter(p=>p.source!=="workspace"),h=p=>a.jsxs(Ce,{href:`/skills/${encodeURIComponent(p.name)}`,className:`side-row ${p.name===u?"active":""}`,children:[a.jsx("span",{className:`lamp ${p.source==="workspace"?"ok":"dim"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsxs("span",{className:"side-wf",children:["/",p.name]}),p.source!=="workspace"&&pp(p.source)]}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:p.description||"no description"})})]})]},`${p.source}:${p.name}`);return a.jsxs("div",{className:"runs-screen",children:[a.jsxs("aside",{className:"runs-side",children:[a.jsx("div",{className:"side-head",children:a.jsx("span",{className:"microlabel",children:"workspace skills"})}),a.jsxs("div",{className:"side-list",children:[r.map(h),i&&r.length===0&&a.jsx("div",{className:"viewer-note",children:"no workspace skills yet"}),f.length>0&&a.jsxs(C.Fragment,{children:[a.jsx("div",{className:"side-head skills-local-head",children:a.jsx("span",{className:"microlabel",children:"local (this machine / repo)"})}),f.map(h)]})]})]}),a.jsx("div",{className:"runs-main",children:u?a.jsx(ab,{name:u},u):a.jsx(nb,{root:i?.root,workspace:r})})]})}function nb({root:u,workspace:i}){return a.jsxs("div",{className:"new-chat",children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:"skills"}),a.jsxs("span",{className:"count",children:[i.length," in workspace"]})]}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.jsxs("div",{className:"know-intro",children:["Skills are reusable ",a.jsx("b",{children:"instruction packages"}),": one folder per skill with a"," ",a.jsx("code",{children:"SKILL.md"})," (YAML frontmatter: name, description). ",a.jsx("b",{children:"Workspace skills"}),u?a.jsxs(a.Fragment,{children:[" live under ",a.jsx("code",{children:u})]}):null,", are tracked in git and shared with everyone in this workspace — they are the ones to build on. Skills from"," ",a.jsx("code",{children:".claude/skills"})," and your personal ",a.jsx("code",{children:"~/.claude/skills"})," also work here, but stay repo-/machine-local. Invoke any skill in a session with"," ",a.jsx("code",{children:"/<name>"}),"."]}),a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"add a workspace skill"})}),a.jsxs("div",{className:"know-intro",children:["Create ",a.jsxs("code",{children:[u?`${u}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",a.jsx("code",{children:"/"})," menu."]})]})]})}function ab({name:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState("rendered"),g=C.useMemo(()=>i?i.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[i?.content]),y=C.useMemo(()=>i?va.sanitize(Re.parse(g,{async:!1})):"",[g]);return C.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(u)}`).then(v=>v.ok?v.json():Promise.reject()).then(o).catch(()=>f(!0))},[u]),r?a.jsx("div",{className:"empty",children:"skill not found"}):i?a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsxs("h1",{children:["/",i.name]}),pp(i.source)]}),i.description&&a.jsx("div",{className:"know-intro skill-desc",children:i.description}),a.jsxs("div",{className:"detail-cols",children:[a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"SKILL.md"}),a.jsx("span",{className:"spacer"}),a.jsxs("div",{className:"tabs",children:[a.jsx("button",{className:h==="rendered"?"active":"",onClick:()=>p("rendered"),children:"rendered"}),a.jsx("button",{className:h==="source"?"active":"",onClick:()=>p("source"),children:"source"})]})]}),a.jsx("div",{className:"viewer-body",children:h==="rendered"?a.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:y}}):a.jsx("pre",{children:i.content.trim()||"(empty)"})})]}),a.jsx("aside",{className:"detail-rail",children:a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"about"})}),a.jsxs("div",{className:"rail-list",children:[a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"source"}),a.jsx("span",{className:"v",children:i.source==="workspace"?"workspace — git-tracked, shared with the team":i.source==="project"?"repo .claude/skills — tracked, but outside the workspace root":"global ~/.claude/skills — only on this machine"})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"path"}),a.jsx("span",{className:"v mono skill-path",title:i.path,children:i.path})]}),a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"invoke"}),a.jsxs("span",{className:"v",children:[a.jsxs("code",{children:["/",i.name]})," in any session"]})]}),i.files.length>0&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"bundled files"}),i.files.map(v=>a.jsx("span",{className:"v mono",children:v},v))]})]})]})})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const sb=["","low","medium","high","xhigh","max"],ib=["🤖","🧑💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function Km({seg:u}){const i=u[0]&&u[0]!=="new"&&u[0]!=="chats"?decodeURIComponent(u[0]):void 0,o=u[0]==="new"?"new":u[0]==="chats"?"chats":u[1]==="edit"?"edit":u[1]==="info"?"info":u[1]==="chat"?"chat":i?"member":"home",r=o==="chat"?u[2]:o==="chats"?u[1]:void 0,f=$e("/api/team",!1),h=Gn(),[p,g]=C.useState(()=>{try{const B=JSON.parse(localStorage.getItem("kw-agent-groups")??"[]");return Array.isArray(B)?B.map(String):[]}catch{return[]}}),[y,v]=C.useState(!1),[S,E]=C.useState(""),[w,M]=C.useState(null),[L,J]=C.useState(""),[X,A]=C.useState(null),[oe,fe]=C.useState(null),[W,I]=C.useState({}),Y=(f?.members??[]).map(B=>W[B.slug]!==void 0?{...B,group:W[B.slug]||void 0}:B);C.useEffect(()=>{I(B=>{const ze={...B};let Ye=!1;for(const We of f?.members??[])ze[We.slug]!==void 0&&(We.group??"")===ze[We.slug]&&(delete ze[We.slug],Ye=!0);return Ye?ze:B})},[f]);const V=Y.filter(B=>!B.archived),le=Y.filter(B=>B.archived),[ne,je]=C.useState(!1),be=[...new Set([...V.map(B=>B.group??"").filter(Boolean),...p])].sort((B,ze)=>B.localeCompare(ze)),ee=V.filter(B=>!B.group);function ve(B){g(B);try{localStorage.setItem("kw-agent-groups",JSON.stringify(B))}catch{}}function Je(){const B=S.trim();v(!1),E(""),B&&!be.includes(B)&&ve([...p,B])}function nt(B,ze){M(null);const Ye=ze.trim();if(!(!Ye||Ye===B)){for(const We of Y.filter(tl=>tl.group===B))D(We.slug,Ye);p.includes(B)&&ve([...new Set(p.map(We=>We===B?Ye:We))])}}async function D(B,ze){if((Y.find(We=>We.slug===B)?.group??"")!==ze){I(We=>({...We,[B]:ze}));try{const We=await fetch(`/api/team/${encodeURIComponent(B)}`);if(!We.ok)throw new Error;const tl=await We.json();if(!(await fetch(`/api/team/${encodeURIComponent(B)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...tl,group:ze||void 0})})).ok)throw new Error}catch{I(We=>{const tl={...We};return delete tl[B],tl})}}}const K=B=>h?{onDragOver:ze=>{X!=null&&(ze.preventDefault(),ze.dataTransfer.dropEffect="move",oe!==B&&fe(B))},onDrop:ze=>{ze.preventDefault();const Ye=ze.dataTransfer.getData("text/plain")||X;Ye&&D(Ye,B),A(null),fe(null)}}:{},ce=B=>a.jsxs(Ce,{href:`/agents/${encodeURIComponent(B.slug)}`,className:`side-row ${B.slug===i?"active":""} ${X===B.slug?"dragging":""}`,draggable:h,onDragStart:ze=>{ze.dataTransfer.setData("text/plain",B.slug),ze.dataTransfer.effectAllowed="move",A(B.slug)},onDragEnd:()=>{A(null),fe(null)},children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:B.emoji})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:B.name})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:B.description||B.harness})})]})]},B.slug),_e=B=>a.jsxs(Ce,{href:`/agents/${encodeURIComponent(B.slug)}/info`,className:`side-row archived-row ${B.slug===i?"active":""}`,children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:B.emoji})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:B.name})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:B.description||B.harness})})]})]},B.slug);let ye;o==="new"?ye=a.jsx(Im,{},"new"):o==="edit"&&i?ye=a.jsx(Im,{slug:i},i):o==="chat"&&i&&r?ye=a.jsx("div",{className:"chat-main",children:a.jsx($m,{id:r,agentName:Y.find(B=>B.slug===i)?.name??i,agentDescription:Y.find(B=>B.slug===i)?.description},r)}):o==="chats"?ye=r?a.jsx("div",{className:"chat-main",children:a.jsx($m,{id:r},r)}):a.jsx(dy,{}):o==="info"&&i?ye=a.jsx(gp,{slug:i},i):i?ye=a.jsx(ub,{slug:i},i):ye=a.jsx(fb,{hasMembers:V.length>0,root:f?.root});const N=(o==="member"||o==="info"||o==="chat")&&i?Y.find(B=>B.slug===i)?.knowledge??[]:[],[q,F]=C.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[Z,he]=C.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),pe=N.length>0&&q;function Ee(B){F(B),localStorage.setItem("kw-kside",B?"open":"hidden")}function mt(B){he(B),localStorage.setItem("kw-kside-w",String(B))}return a.jsxs("div",{className:`runs-screen team-screen ${i||o==="chats"?"has-sessions":""} ${pe?"has-knowledge":""}`,style:pe?{"--kside-w":`${Z}px`}:void 0,children:[a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"agents"}),a.jsx("span",{className:"spacer"}),h&&a.jsxs(Ce,{href:"/agents/new",className:"open-raw",children:[a.jsx(P,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[a.jsxs(Ce,{href:"/agents/chats",className:`side-row side-general ${o==="chats"?"active":""}`,children:[a.jsx("span",{className:"agent-avatar sm",children:a.jsx("span",{"aria-hidden":!0,children:"💬"})}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:"General Chats"})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:"chats without an agent"})})]})]}),a.jsxs("div",{className:`side-group ${X&&oe===""?"drop-over":""}`,...K(""),children:[ee.map(ce),X!=null&&ee.length===0&&a.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),be.map(B=>{const ze=V.filter(Ye=>Ye.group===B);return a.jsxs("div",{className:`side-group ${X&&oe===B?"drop-over":""}`,...K(B),children:[a.jsxs("div",{className:"side-group-head",children:[w===B?a.jsx("input",{className:"side-group-rename",autoFocus:!0,value:L,onChange:Ye=>J(Ye.target.value),onKeyDown:Ye=>{Ye.key==="Enter"&&nt(B,L),Ye.key==="Escape"&&M(null)},onBlur:()=>nt(B,L)}):a.jsx("span",{className:"microlabel",children:B}),a.jsx("span",{className:"side-group-count num",children:ze.length}),a.jsx("span",{className:"spacer"}),h&&w!==B&&a.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{M(B),J(B)},children:a.jsx(P,{name:"edit",className:"ms-sm"})}),h&&ze.length===0&&p.includes(B)&&a.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ve(p.filter(Ye=>Ye!==B)),children:a.jsx(P,{name:"close",className:"ms-sm"})})]}),ze.map(ce),ze.length===0&&a.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},B)}),le.length>0&&a.jsxs("div",{className:"side-group side-archived",children:[a.jsxs("button",{className:"side-archived-toggle","aria-expanded":ne,onClick:()=>je(B=>!B),children:[a.jsx("span",{className:"microlabel",children:"archived"}),a.jsx("span",{className:"side-group-count num",children:le.length}),a.jsx("span",{className:"spacer"}),a.jsx(P,{name:ne?"expand_less":"expand_more",className:"ms-sm"})]}),ne&&le.map(_e)]}),f&&Y.length===0&&a.jsx("div",{className:"viewer-note",children:"no agents yet"}),h&&(y?a.jsx("div",{className:"side-group-new",children:a.jsx("input",{autoFocus:!0,value:S,placeholder:"group name, e.g. Team Content",onChange:B=>E(B.target.value),onKeyDown:B=>{B.key==="Enter"&&Je(),B.key==="Escape"&&(v(!1),E(""))},onBlur:Je})}):a.jsxs("button",{className:"side-group-add",onClick:()=>v(!0),children:[a.jsx(P,{name:"add",className:"ms-sm"})," group"]}))]})]}),i&&a.jsx(rb,{slug:i,chatId:r}),o==="chats"&&a.jsx(ob,{chatId:r}),a.jsx("div",{className:"runs-main",children:ye}),pe&&a.jsx(cb,{bundles:N,onHide:()=>Ee(!1),onResize:mt}),N.length>0&&!q&&a.jsxs("button",{className:"kside-reopen",onClick:()=>Ee(!0),title:"Show knowledge sidebar",children:[a.jsx(P,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function cb({bundles:u,onHide:i,onResize:o}){const[r,f]=C.useState({}),[h,p]=C.useState(null),[g,y]=C.useState({}),[v,S]=C.useState({}),[E,w]=C.useState(null),[M,L]=C.useState(""),[J,X]=C.useState(!1),[A,oe]=C.useState("");C.useEffect(()=>{f({});let I=!0,Y;const V=async()=>{await Promise.all(u.map(async le=>{try{const ne=await fetch(`/api/knowledge/${encodeURIComponent(le)}`,{cache:"no-store"}),je=ne.ok?await ne.json():null;I&&f(be=>JSON.stringify(be[le])===JSON.stringify(je)?be:{...be,[le]:je})}catch{I&&f(ne=>le in ne?ne:{...ne,[le]:null})}})),I&&(Y=setTimeout(V,6e3))};return V(),()=>{I=!1,clearTimeout(Y)}},[u.join(",")]),C.useEffect(()=>{if(!h||E===h)return;const I=h.indexOf("::"),Y=h.slice(0,I),V=h.slice(I+2);let le=!0,ne;const je=async()=>{try{const be=await fetch(`/api/knowledge/${encodeURIComponent(Y)}/concept?id=${encodeURIComponent(V)}`,{cache:"no-store"}),ee=be.ok?await be.json():null;le&&y(ve=>JSON.stringify(ve[h])===JSON.stringify(ee)?ve:{...ve,[h]:ee})}catch{le&&y(be=>h in be?be:{...be,[h]:null})}le&&(ne=setTimeout(je,6e3))};return je(),()=>{le=!1,clearTimeout(ne)}},[h,E]);function fe(I,Y){const V=`${I}::${Y}`;p(h===V?null:V)}async function W(I,Y){const V=`${I}::${Y}`;X(!0),oe("");try{const ne=await(await fetch(`/api/knowledge/${encodeURIComponent(I)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:Y,content:M})})).json();ne.error?oe(ne.error):(y(je=>({...je,[V]:ne})),w(null))}catch(le){oe(le.message)}X(!1)}return a.jsxs("aside",{className:"runs-side knowledge-side",children:[a.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:I=>{I.preventDefault();const Y=I.clientX,V=I.currentTarget.parentElement.offsetWidth,le=je=>o(Math.min(900,Math.max(280,V+(Y-je.clientX)))),ne=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",ne)};window.addEventListener("mousemove",le),window.addEventListener("mouseup",ne)}}),a.jsxs("div",{className:"side-head",children:[a.jsxs("span",{className:"kside-headline",children:[a.jsx("span",{className:"microlabel",children:"knowledge"}),a.jsx("span",{className:"kside-hint",children:"read & kept current by this agent"})]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:i,title:"Hide knowledge sidebar",children:["hide ",a.jsx(P,{name:"close",className:"ms-sm"})]})]}),a.jsx("div",{className:"side-list",children:u.map(I=>{const Y=r[I],V=v[I]===!0;return a.jsxs("div",{className:"kside-bundle",children:[a.jsxs("div",{className:"kside-bundle-head",children:[a.jsxs("button",{className:"kside-bundle-toggle","aria-expanded":!V,onClick:()=>S({...v,[I]:!V}),children:[a.jsx("span",{className:`kside-chev ${V?"":"open"}`,"aria-hidden":!0,children:a.jsx(P,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-bundle-name",children:I}),Y&&a.jsx("span",{className:"kside-count num",children:Y.concepts.length})]}),a.jsx("button",{className:"kside-open",title:"Export this bundle as PDF",onClick:()=>{zo(I)},children:a.jsx(P,{name:"picture_as_pdf",className:"ms-sm"})}),a.jsx(Ce,{href:`/knowledge/${encodeURIComponent(I)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!V&&Y===null&&a.jsx("div",{className:"viewer-note",children:"bundle not found"}),!V&&Y?.concepts.map(le=>{const ne=`${I}::${le.id}`,je=h===ne,be=`/knowledge/${encodeURIComponent(I)}/${le.id.split("/").map(encodeURIComponent).join("/")}`;return a.jsxs("div",{className:`kside-concept ${je?"open":""}`,children:[a.jsxs("button",{className:"kside-row","aria-expanded":je,title:le.description||void 0,onClick:()=>fe(I,le.id),children:[a.jsx("span",{className:`kside-chev ${je?"open":""}`,"aria-hidden":!0,children:a.jsx(P,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-title",children:le.title||le.id}),le.stale&&a.jsx("span",{className:"kside-stale",title:"Past its stale-after date — ask the agent to re-verify it",children:"stale"})]}),je&&a.jsx("div",{className:"kside-card",ref:ee=>ee?.scrollIntoView({block:"nearest"}),children:g[ne]===void 0?a.jsx("div",{className:"viewer-note",children:"loading…"}):g[ne]===null?a.jsx("div",{className:"viewer-note",children:"could not load concept"}):E===ne?a.jsxs("div",{className:"kside-edit",children:[a.jsx("textarea",{className:"concept-edit",value:M,rows:Math.min(28,Math.max(10,M.split(`
|
|
204
|
+
`).length+2)),onChange:ee=>L(ee.target.value),spellCheck:!1}),a.jsxs("div",{className:"kside-actions",children:[a.jsx("button",{className:"open-raw",disabled:J,onClick:()=>w(null),children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:J,onClick:()=>W(I,le.id),children:J?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"check",className:"ms-sm"})," save"]})})]}),A&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",A]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"kside-card-bar",children:[le.type&&a.jsx("span",{className:"kside-type",children:le.type}),Jm(le)&&a.jsxs("span",{className:"kside-updated num",children:["updated ",ga(Jm(le))]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{L(g[ne].raw),w(ne),oe("")},children:[a.jsx(P,{name:"edit",className:"ms-sm"})," edit"]}),a.jsx(Ce,{href:be,className:"open-raw",children:"open ↗"})]}),a.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:va.sanitize(Re.parse(g[ne].body??"",{async:!1}))}})]})})]},le.id)}),!V&&Y&&Y.concepts.length===0&&a.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},I)})})]})}function Jm(u){return[u.generated?.at,...u.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function ub({slug:u}){const[i,o]=C.useState(!1);return C.useEffect(()=>{let r=!0;return o(!1),fetch("/api/chats").then(f=>f.json()).then(f=>{if(!r)return;const h=f.chats.find(p=>p.scope.kind==="team"&&p.scope.member===u);h?gl(`/agents/${encodeURIComponent(u)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>r&&o(!0)),()=>{r=!1}},[u]),i?a.jsx(gp,{slug:u}):a.jsx("div",{className:"empty",children:"loading…"})}function rb({slug:u,chatId:i}){const o=$e("/api/chats",!1),r=(o?.chats??[]).filter(p=>p.scope.kind==="team"&&p.scope.member===u),[f,h]=C.useState(!1);return a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"sessions"}),a.jsx("span",{className:"spacer"}),a.jsx(Ce,{href:`/agents/${encodeURIComponent(u)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),a.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await rs("claude",{kind:"team",member:u}),h(!1)},children:f?"…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"add",className:"ms-sm"})," new"]})})]}),a.jsxs("div",{className:"side-list",children:[r.map(p=>a.jsxs(Ce,{href:`/agents/${encodeURIComponent(u)}/chat/${p.id}`,className:`side-row ${p.id===i?"active":""}`,children:[a.jsx("span",{className:`lamp ${p.busy?"running":"pending"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:p.title||"new session"})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-when num",children:ga(p.updatedAt)})})]}),a.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async g=>{g.preventDefault(),g.stopPropagation(),window.confirm(`Delete session "${p.title||p.id}"?`)&&(await fetch(`/api/chats/${p.id}`,{method:"DELETE"}).catch(()=>{}),p.id===i&&gl(`/agents/${encodeURIComponent(u)}`))},children:a.jsx(P,{name:"close",className:"ms-sm"})})]},p.id)),o&&r.length===0&&a.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function ob({chatId:u}){const i=$e("/api/chats",!1),o=(i?.chats??[]).filter(r=>r.scope.kind!=="team");return a.jsxs("aside",{className:"runs-side",children:[a.jsxs("div",{className:"side-head",children:[a.jsx("span",{className:"microlabel",children:"chats"}),a.jsx("span",{className:"spacer"}),a.jsxs(Ce,{href:"/agents/chats",className:"open-raw",children:[a.jsx(P,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[o.map(r=>a.jsxs(Ce,{href:`/agents/chats/${r.id}`,className:`side-row ${r.id===u?"active":""}`,children:[a.jsx("span",{className:`lamp ${r.busy?"running":"pending"}`}),a.jsxs("div",{className:"side-row-body",children:[a.jsx("div",{className:"side-row-top",children:a.jsx("span",{className:"side-wf",children:r.title||"new chat"})}),a.jsxs("div",{className:"side-row-sub",children:[a.jsxs("span",{className:"side-req",children:[r.agent,r.scope.kind==="run"?` · ${r.scope.runId}`:r.scope.kind==="kraftwerk"?" · kraftwerk":r.scope.kind==="knowledge"?` · knowledge${r.scope.bundle?`:${r.scope.bundle}`:""}`:""]}),a.jsx("span",{className:"side-when num",children:ga(r.updatedAt)})]})]}),a.jsx("button",{type:"button",className:"row-x",title:"delete chat",onClick:async f=>{f.preventDefault(),f.stopPropagation(),window.confirm(`Delete chat "${r.title||r.id}"?`)&&(await fetch(`/api/chats/${r.id}`,{method:"DELETE"}).catch(()=>{}),r.id===u&&gl("/agents/chats"))},children:a.jsx(P,{name:"close",className:"ms-sm"})})]},r.id)),i&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function fb({hasMembers:u,root:i}){const o=Gn();return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:"agents"})}),a.jsxs("section",{className:"panel new-chat-panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"what lives here"})}),a.jsxs("div",{className:"know-intro",children:["Your agents, set up like teammates: each one has a name, a role (system prompt), a harness/model to run on, and the workflows that belong to its job. An agent lives in"," ",a.jsx("code",{children:i?`${i}/<slug>/`:"agents/<slug>/"})," as ",a.jsx("code",{children:"agent.yml"})," +"," ",a.jsx("code",{children:"system.md"})," — git-tracked, so your team travels with the repo. Every session is a persistent conversation with that agent; it knows its connected workflows and knowledge bundles, runs the workflows for you, and keeps the knowledge current."]}),o?a.jsx("div",{style:{padding:"0 16px 16px"},children:a.jsx("button",{className:"run-btn",onClick:()=>gl("/agents/new"),children:a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"add",className:"ms-sm"})," ",u?"new agent":"create your first agent"]})})}):a.jsx("div",{className:"settings-note",style:{padding:"0 16px 16px"},children:"Creating agents needs expert mode — flip the switch in the top bar."})]})]})}function gp({slug:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState(!1),[g,y]=C.useState(!1),[v,S]=C.useState(""),[E,w]=C.useState(""),[M,L]=C.useState([]),[J,X]=C.useState(!0),[A,oe]=C.useState(!1),[fe,W]=C.useState(""),I=$e("/api/workflows",!1),Y=$e("/api/knowledge",!1),V=$e("/api/skills",!1);C.useEffect(()=>{let ee=!0;return fetch(`/api/team/${encodeURIComponent(u)}`).then(ve=>ve.ok?ve.json():Promise.reject()).then(ve=>ee&&o(ve)).catch(()=>ee&&f(!0)),()=>{ee=!1}},[u]);async function le(ee){if(i){oe(!0),W("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:i.name,emoji:i.emoji,description:i.description,harness:i.harness,model:i.model,effort:i.effort,group:i.group,system:i.system,workflows:i.workflows,knowledge:i.knowledge,skills:i.skills,...ee})})).json();Je.error?W(Je.error):(o(Je),S(""))}catch(ve){W(ve.message)}oe(!1)}}function ne(ee,ve){L(ve?[...M,ee]:M.filter(Je=>Je!==ee))}async function je(ee){oe(!0),W("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({archived:ee})})).json();Je.error?W(Je.error):o(Je)}catch(ve){W(ve.message)}oe(!1)}if(r)return a.jsx("div",{className:"empty",children:"agent not found"});if(!i)return a.jsx("div",{className:"empty",children:"loading…"});const be=ee=>a.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[a.jsx("button",{className:"run-btn",disabled:A,onClick:()=>{le(ee)},children:A?"saving…":"save"}),a.jsx("button",{className:"open-raw",disabled:A,onClick:()=>(S(""),W("")),children:"cancel"})]});return a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsx("span",{className:"agent-avatar lg",children:a.jsx("span",{"aria-hidden":!0,children:i.emoji})}),a.jsx("h1",{children:i.name}),a.jsx("span",{className:"chip agent",children:i.harness}),i.model&&a.jsx("span",{className:"chip",children:i.model}),i.effort&&a.jsxs("span",{className:"chip",children:["effort: ",i.effort]}),i.archived&&a.jsxs("span",{className:"chip archived-chip",children:[a.jsx(P,{name:"inventory_2",className:"ms-sm"})," archived"]}),a.jsx("span",{className:"spacer"}),a.jsx(Ce,{href:`/agents/${encodeURIComponent(u)}/edit`,className:"open-raw",children:"edit"}),i.archived?a.jsxs("button",{className:"run-btn tonal",disabled:A,onClick:()=>{je(!1)},children:[a.jsx(P,{name:"unarchive",className:"ms-sm"})," ",A?"…":"unarchive"]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"open-raw",disabled:A,title:"Hide this agent from the roster — restorable any time",onClick:()=>{je(!0)},children:[a.jsx(P,{name:"archive",className:"ms-sm"})," archive"]}),a.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{p(!0),await rs("claude",{kind:"team",member:u}),p(!1)},children:h?"starting…":"new session"})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"m3-list",children:[a.jsxs("button",{type:"button",className:"m3-row m3-toggle",onClick:()=>y(!g),children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"badge"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"role"}),!g&&a.jsx("span",{className:"m3-sub m3-ellipsis",children:(i.system||"").trim().split(`
|
|
205
|
+
`)[0]||"empty — expand to give this agent a role"})]}),a.jsx("span",{className:`m3-chev ${g?"open":""}`,children:a.jsx(P,{name:"expand_more",className:"ms-sm"})})]}),g&&v!=="role"&&a.jsxs("div",{className:"m3-expand",children:[a.jsx("pre",{children:i.system||"(empty — click edit to give this agent a role)"}),a.jsxs("div",{className:"team-form-row",style:{marginTop:10},children:[a.jsxs("button",{className:"open-raw",onClick:()=>{w(i.system),S("role"),W("")},children:[a.jsx(P,{name:"edit",className:"ms-sm"})," edit role"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"m3-sub",children:["agents/",i.slug,"/system.md"]})]})]}),g&&v==="role"&&a.jsxs("div",{className:"m3-expand",children:[a.jsx("textarea",{className:"concept-edit",rows:Math.min(24,Math.max(8,E.split(`
|
|
206
|
+
`).length+2)),value:E,placeholder:"You are the ... for this project. Your job is ...",onChange:ee=>w(ee.target.value),spellCheck:!1}),be({system:E})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"account_tree"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"workflows"}),v==="workflows"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[(I?.workflows??[]).map(ee=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(ee.slug),onChange:ve=>ne(ee.slug,ve.target.checked)}),a.jsx("b",{children:ee.slug}),ee.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",ee.description]})]},ee.slug)),(I?.workflows??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),be({workflows:M})]}):i.workflows.length===0?a.jsx("span",{className:"m3-sub",children:"none connected — the agent can run any workflow you connect"}):a.jsx("span",{className:"m3-chips",children:i.workflows.map(ee=>a.jsx(Ce,{href:`/workflows/${encodeURIComponent(ee)}`,className:"chip",children:ee},ee))})]}),v!=="workflows"&&a.jsx("button",{className:"open-raw",onClick:()=>{L(i.workflows),S("workflows"),W("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"menu_book"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"knowledge"}),v==="knowledge"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[(Y?.bundles??[]).map(ee=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(ee.name),onChange:ve=>ne(ee.name,ve.target.checked)}),a.jsx("b",{children:ee.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",ee.concepts," concepts"]})]},ee.name)),(Y?.bundles??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),be({knowledge:M})]}):i.knowledge.length===0?a.jsx("span",{className:"m3-sub",children:"none connected — connected bundles are read and kept current by the agent"}):a.jsx("span",{className:"m3-chips",children:i.knowledge.map(ee=>a.jsx(Ce,{href:`/knowledge/${encodeURIComponent(ee)}`,className:"chip",children:ee},ee))})]}),v!=="knowledge"&&a.jsx("button",{className:"open-raw",onClick:()=>{L(i.knowledge),S("knowledge"),W("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"extension"})}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:"shared skills"}),v==="skills"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"wf-checks",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:J,onChange:ee=>X(ee.target.checked)}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!J&&(V?.skills??[]).map(ee=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(ee.name),onChange:ve=>ne(ee.name,ve.target.checked)}),a.jsxs("b",{children:["/",ee.name]}),ee.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",ee.description]})]},ee.name)),!J&&(V?.skills??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),be({skills:J?void 0:M})]}):i.skills===void 0?a.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):i.skills.length===0?a.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):a.jsx("span",{className:"m3-chips",children:i.skills.map(ee=>a.jsxs("span",{className:"chip",children:["/",ee]},ee))})]}),v!=="skills"&&a.jsx("button",{className:"open-raw",onClick:()=>{X(i.skills===void 0),L(i.skills??[]),S("skills"),W("")},children:"edit"})]})]}),fe&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",fe]})]}),a.jsx(hb,{slug:u}),a.jsx(mb,{slug:u})]})}const db=`---
|
|
207
|
+
description: What this skill is for (one line)
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
Instructions this agent follows when the skill applies or is invoked with /<name>.
|
|
211
|
+
`;function hb({slug:u}){const o=$e(`/api/team/${encodeURIComponent(u)}/skills`,!1)?.skills??[],[r,f]=C.useState(null),[h,p]=C.useState(!1),[g,y]=C.useState("");async function v(w){y("");const M=await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(w)}`),L=await M.json().catch(()=>null);if(!M.ok||!L||L.error)return void y(L?.error??"could not load skill");f({name:w,content:L.content??"",isNew:!1})}async function S(){if(!r)return;p(!0),y("");const M=await(await fetch(`/api/team/${encodeURIComponent(u)}/skills`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:r.name,content:r.content})})).json().catch(()=>({error:"save failed"}));p(!1),M.error?y(M.error):f(null)}async function E(w){window.confirm(`Delete skill "/${w}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(w)}`,{method:"DELETE"}).catch(()=>{}),r?.name===w&&f(null))}return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"own skills — only this agent"}),a.jsx("span",{className:"spacer"}),!r&&a.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:db,isNew:!0}),y("")},children:[a.jsx(P,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!r&&a.jsxs("div",{className:"viewer-note",children:["none — skills in ",a.jsxs("code",{children:["agents/",u,"/skills/"]})," are private to this agent; skills for every agent live in the workspace skills folder."]}),o.length>0&&!r&&a.jsx("div",{className:"m3-list",children:o.map(w=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"extension"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:["/",w.name]}),a.jsx("span",{className:"m3-sub",children:w.description||a.jsx("code",{children:"SKILL.md"})})]}),a.jsxs("button",{className:"open-raw",onClick:()=>{v(w.name)},children:[a.jsx(P,{name:"edit",className:"ms-sm"})," edit"]}),a.jsx("button",{className:"open-raw",onClick:()=>{E(w.name)},children:a.jsx(P,{name:"close",className:"ms-sm"})})]},w.name))}),r&&a.jsxs("div",{className:"team-form",children:[a.jsx("div",{className:"team-form-row",children:a.jsxs("label",{className:"team-field",style:{flex:1},children:["name — invoked as /<name>",a.jsx("input",{value:r.name,placeholder:"e.g. report-html",disabled:!r.isNew,onChange:w=>f({...r,name:w.target.value})})]})}),a.jsxs("label",{className:"team-field",children:["SKILL.md — frontmatter (description) + the instructions",a.jsx("textarea",{className:"concept-edit",rows:Math.min(28,Math.max(12,r.content.split(`
|
|
212
|
+
`).length+2)),value:r.content,spellCheck:!1,onChange:w=>f({...r,content:w.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:h||!r.name.trim(),onClick:()=>{S()},children:h?"saving…":"save"}),a.jsx("button",{className:"open-raw",disabled:h,onClick:()=>f(null),children:"cancel"})]})]}),g&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",g]})]})}function mb({slug:u}){const o=$e(`/api/team/${encodeURIComponent(u)}/routines`,!1)?.routines??[],[r,f]=C.useState(null),[h,p]=C.useState(""),[g,y]=C.useState("");async function v(w){p("");const L=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(w)})).json();return L.error?(p(L.error),!1):!0}async function S(w){y(w),p("");const L=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(w)}/run`,{method:"POST"})).json();y(""),L.error?p(L.error):L.chatId&&gl(`/agents/${encodeURIComponent(u)}/chat/${L.chatId}`)}async function E(w){window.confirm(`Delete routine "${w}"?`)&&await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(w)}`,{method:"DELETE"}).catch(()=>{})}return a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"routines — scheduled prompts"}),a.jsx("span",{className:"spacer"}),!r&&a.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[a.jsx(P,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!r&&a.jsx("div",{className:"viewer-note",children:"none — a routine messages this agent on a schedule (cron, server local time) and each run opens a new session with the result."}),o.length>0&&a.jsx("div",{className:"m3-list",children:o.map(w=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(P,{name:"schedule"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:[w.name,w.lastError&&a.jsx("span",{className:"chip stale",title:w.lastError,children:"error"})]}),a.jsxs("span",{className:"m3-sub",children:[a.jsx("code",{children:w.schedule}),w.enabled?w.nextRunAt?` · next ${ga(w.nextRunAt)}`:"":" · paused"," · ",w.lastChatId?a.jsxs(Ce,{href:`/agents/${encodeURIComponent(u)}/chat/${w.lastChatId}`,children:["last run ",ga(w.lastRunAt)]}):"never ran"]})]}),a.jsx("button",{className:"open-raw",disabled:g===w.id,onClick:()=>S(w.id),children:g===w.id?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"play_arrow",className:"ms-sm"})," run"]})}),a.jsx("button",{className:"open-raw",onClick:()=>f({id:w.id,name:w.name,schedule:w.schedule,prompt:w.prompt,enabled:w.enabled}),children:"edit"}),a.jsx("button",{className:"open-raw",onClick:()=>{E(w.id)},children:"delete"}),a.jsxs("label",{className:"m3-switch",title:w.enabled?"enabled — click to pause":"paused — click to enable",children:[a.jsx("input",{type:"checkbox",checked:w.enabled,onChange:()=>{v({id:w.id,name:w.name,schedule:w.schedule,prompt:w.prompt,enabled:!w.enabled})}}),a.jsx("span",{className:"m3-switch-track"})]})]},w.id))}),r&&a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:r.name,placeholder:"e.g. Morning report",onChange:w=>f({...r,name:w.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",a.jsx("input",{value:r.schedule,placeholder:"0 9 * * 1-5",onChange:w=>f({...r,schedule:w.target.value})})]}),a.jsxs("label",{className:"team-field wf-checks",style:{width:90},children:["enabled",a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:r.enabled,onChange:w=>f({...r,enabled:w.target.checked})}),"on"]})]})]}),a.jsxs("label",{className:"team-field",children:["prompt — what to ask this agent on each run",a.jsx("textarea",{rows:5,value:r.prompt,placeholder:"Check ... and summarize what changed.",onChange:w=>f({...r,prompt:w.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!r.name.trim()||!r.prompt.trim(),onClick:async()=>{await v(r)&&f(null)},children:r.id?"save routine":"create routine"}),a.jsx("button",{className:"open-raw",onClick:()=>(f(null),p("")),children:"cancel"})]})]}),h&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",h]})]})}function Im({slug:u}){const[i,o]=C.useState(u?null:M()),[r,f]=C.useState(""),[h,p]=C.useState(!1),y=$e("/api/workflows",!1)?.workflows??[],S=$e("/api/knowledge",!1)?.bundles??[],w=$e("/api/skills",!1)?.skills??[];C.useEffect(()=>{u&&fetch(`/api/team/${encodeURIComponent(u)}`).then(A=>A.ok?A.json():Promise.reject()).then(A=>o({name:A.name,emoji:A.emoji,description:A.description??"",harness:A.harness,model:A.model??"",effort:A.effort??"",group:A.group??"",system:A.system,workflows:A.workflows,knowledge:A.knowledge??[],skillsAll:A.skills===void 0,skills:A.skills??[]})).catch(()=>f("agent not found"))},[u]);function M(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function L(){if(!i)return;p(!0),f("");const oe=await(await fetch(u?`/api/team/${encodeURIComponent(u)}`:"/api/team",{method:u?"PUT":"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...i,skills:i.skillsAll?void 0:i.skills})})).json();p(!1),oe.error?f(oe.error):gl(`/agents/${encodeURIComponent(oe.slug)}/info`)}async function J(){!u||!window.confirm(`Delete agent "${u}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"DELETE"}).catch(()=>{}),gl("/agents"))}if(!i)return a.jsx("div",{className:"empty",children:r||"loading…"});const X=A=>o({...i,...A});return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:u?`edit ${u}`:"new agent"})}),a.jsx("section",{className:"panel new-chat-panel",children:a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:i.name,placeholder:"e.g. Max",onChange:A=>X({name:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",a.jsx("input",{value:i.emoji,onChange:A=>X({emoji:A.target.value})})]})]}),a.jsx("div",{className:"emoji-pick",children:ib.map(A=>a.jsx("button",{type:"button",className:i.emoji===A?"active":"",onClick:()=>X({emoji:A}),children:A},A))}),a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{flex:1},children:["description",a.jsx("input",{value:i.description,placeholder:"one line: what this agent is for",onChange:A=>X({description:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:180},children:["group",a.jsx("input",{value:i.group,placeholder:"none",onChange:A=>X({group:A.target.value})})]})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:140},children:["harness",a.jsxs("select",{value:i.harness,onChange:A=>X({harness:A.target.value}),children:[a.jsx("option",{value:"claude",children:"claude"}),a.jsx("option",{value:"codex",children:"codex"}),a.jsx("option",{value:"pi",children:"pi"})]})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["model",a.jsx("input",{value:i.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:A=>X({model:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:140},children:["effort",a.jsx("select",{value:i.effort,onChange:A=>X({effort:A.target.value}),children:sb.map(A=>a.jsx("option",{value:A,children:A||"default"},A))})]})]}),a.jsxs("label",{className:"team-field",children:["system prompt — the agent's role",a.jsx("textarea",{rows:10,value:i.system,placeholder:"You are the ... for this project. Your job is ...",onChange:A=>X({system:A.target.value})})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected workflows — autoloaded into the agent's context; it can run them"}),a.jsxs("div",{className:"wf-checks",children:[y.map(A=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.workflows.includes(A.slug),onChange:oe=>X({workflows:oe.target.checked?[...i.workflows,A.slug]:i.workflows.filter(fe=>fe!==A.slug)})}),a.jsx("b",{children:A.slug}),A.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",A.description]})]},A.slug)),y.length===0&&a.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected knowledge — OKF bundles the agent consults and maintains"}),a.jsxs("div",{className:"wf-checks",children:[S.map(A=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.knowledge.includes(A.name),onChange:oe=>X({knowledge:oe.target.checked?[...i.knowledge,A.name]:i.knowledge.filter(fe=>fe!==A.name)})}),a.jsx("b",{children:A.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",A.concepts," concepts"]})]},A.name)),S.length===0&&a.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]})]}),a.jsxs("div",{className:"team-field",children:[a.jsx("span",{className:"team-field-label",children:"connected skills — workspace skill packages (see the skills tab); invoked with /name in sessions"}),a.jsxs("div",{className:"wf-checks",children:[a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.skillsAll,onChange:A=>X({skillsAll:A.target.checked})}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!i.skillsAll&&w.map(A=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:i.skills.includes(A.name),onChange:oe=>X({skills:oe.target.checked?[...i.skills,A.name]:i.skills.filter(fe=>fe!==A.name)})}),a.jsxs("b",{children:["/",A.name]}),A.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",A.description]})]},A.name)),!i.skillsAll&&w.length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),r&&a.jsxs("div",{className:"msg error",children:[a.jsx(P,{name:"error",className:"ms-sm"})," ",r]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!i.name.trim()||h,onClick:L,children:h?"saving…":u?"save":"create"}),a.jsx("span",{className:"spacer"}),u&&a.jsx("button",{className:"stop-btn",onClick:J,children:"delete agent"})]})]})})]})}function pb(){const[u,i]=C.useState(null),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,g]=C.useState([]),[y,v]=C.useState(!1),[S,E]=C.useState(!1),[w,M]=C.useState(!1),[L,J]=C.useState("");C.useEffect(()=>{fetch("/api/settings").then(W=>W.json()).then(W=>{i(W),r(W.config.name??""),h(W.config.icon??""),g(W.config.switcher??[])}).catch(()=>J("could not load settings"))},[]);const X=()=>{v(!0),M(!1),J("")};async function A(){E(!0),J("");try{const W=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:p})}),I=await W.json();if(!W.ok)throw new Error(I.error||"save failed");i(I),g(I.config.switcher??[]),v(!1),M(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(W){J(W.message)}finally{E(!1)}}const oe=(W,I)=>{g(Y=>Y.map((V,le)=>le===W?{...V,...I}:V)),X()};if(!u)return a.jsx("div",{className:"empty",children:L||"loading…"});const fe=[["port",String(u.resolved.port),"kraftwerk ui listens here (CLI --port wins)"],["workflows",u.resolved.workflowsRoot??"— none found","workflow definitions"],["output",u.resolved.outputDir,"run artifacts"],["knowledge",u.config.knowledge??"knowledge","OKF knowledge bundles"],["agents",u.config.agents??"agents","team agent definitions"],["skills",u.config.skills??"skills","workspace skills"]];return a.jsxs("div",{className:"settings-screen",children:[a.jsxs("div",{className:"settings-head",children:[a.jsxs("h1",{children:[a.jsx(P,{name:"settings",className:"ms-lg"})," Settings"]}),a.jsx("span",{className:"spacer"}),L&&a.jsx("span",{className:"settings-err",children:L}),w&&!y&&a.jsxs("span",{className:"settings-saved",children:[a.jsx(P,{name:"check",className:"ms-sm"})," saved"]}),a.jsx("button",{className:"run-btn",disabled:S||!y,onClick:()=>{A()},children:S?"saving…":"save changes"})]}),a.jsxs("section",{className:"panel",children:[a.jsx("div",{className:"panel-head",children:a.jsx("span",{className:"microlabel",children:"workspace"})}),a.jsxs("div",{className:"team-form",children:[a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:90},children:["icon",a.jsx("input",{value:f,placeholder:"🤖",onChange:W=>{h(W.target.value),X()}})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:o,placeholder:"my workspace",onChange:W=>{r(W.target.value),X()}})]})]}),a.jsx("div",{className:"settings-note",children:"Shown in the header, browser tab and to other workspaces discovering this one."})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"workspace switcher"}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"run-btn tonal",onClick:()=>{g(W=>[...W,{name:"",url:"http://localhost:"}]),X()},children:[a.jsx(P,{name:"add",className:"ms-sm"})," add entry"]})]}),a.jsxs("div",{className:"team-form",children:[p.length===0&&a.jsx("div",{className:"settings-note",children:"No manual entries."}),p.map((W,I)=>a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:70},children:["icon",a.jsx("input",{value:W.icon??"",placeholder:"•",onChange:Y=>oe(I,{icon:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:W.name,placeholder:"other workspace",onChange:Y=>oe(I,{name:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",a.jsx("input",{value:W.url,placeholder:"http://localhost:1982",onChange:Y=>oe(I,{url:Y.target.value})})]}),a.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{g(Y=>Y.filter((V,le)=>le!==I)),X()},children:a.jsx(P,{name:"close",className:"ms-sm"})})]},I)),a.jsx("div",{className:"settings-note",children:"Running workspaces on this machine are discovered automatically — manual entries are for remote instances or extra links."})]})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"paths & port"}),a.jsx("span",{className:"spacer"}),a.jsx("code",{className:"settings-file",title:u.configPath,children:u.exists?u.configPath:`${u.configPath} (not created yet)`})]}),a.jsx("div",{className:"settings-kv-list",children:fe.map(([W,I,Y])=>a.jsxs("div",{className:"settings-kv",children:[a.jsx("span",{className:"microlabel",children:W}),a.jsx("code",{children:I}),a.jsx("span",{className:"settings-kv-hint",children:Y})]},W))}),a.jsxs("div",{className:"settings-note",style:{padding:"0 18px 14px"},children:["Read-only here — edit ",a.jsx("code",{children:"kraftwerk.yml"})," directly to change these."]})]})]})}function gb(){const i=_x().split("/").filter(Boolean),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,g]=C.useState([]);C.useEffect(()=>{let v=!0,S;const E=async()=>{try{const M=await fetch("/api/meta",{cache:"no-store"}).then(L=>L.json());if(!v)return;r(M.projectName??""),h(M.projectIcon??""),g(Array.isArray(M.switcher)?M.switcher:[])}catch{}v&&(S=setTimeout(E,3e4))};E();const w=()=>{clearTimeout(S),E()};return window.addEventListener("kw-meta-refresh",w),()=>{v=!1,clearTimeout(S),window.removeEventListener("kw-meta-refresh",w)}},[]),C.useEffect(()=>{if(zx(o?`${o} — kraftwerk`:"kraftwerk inspector"),!f)return;const v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${f}</text></svg>`;let S=document.querySelector('link[rel="icon"]');S||(S=document.createElement("link"),S.rel="icon",document.head.appendChild(S)),S.href=`data:image/svg+xml,${encodeURIComponent(v)}`},[o,f]);let y;return i[0]==="runs"&&i[1]?y=a.jsx(yy,{id:i[1]}):i[0]==="runs"?y=a.jsx(vb,{}):i[0]==="workflows"&&i[1]?y=a.jsx(Ry,{slug:decodeURIComponent(i[1])}):i[0]==="workflows"?y=a.jsx(zy,{}):i[0]==="chats"?y=a.jsx(Km,{seg:i}):i[0]==="skills"?y=a.jsx(lb,{name:i[1]?decodeURIComponent(i[1]):void 0}):i[0]==="settings"?y=a.jsx(pb,{}):i[0]==="agents"||i[0]==="team"?y=a.jsx(Km,{seg:i.slice(1)}):i[0]==="knowledge"?y=a.jsx(Zy,{bundle:i[1]?decodeURIComponent(i[1]):void 0,conceptId:i.length>2?i.slice(2).map(decodeURIComponent).join("/"):void 0}):y=a.jsx(Hy,{}),a.jsxs(a.Fragment,{children:[a.jsxs("header",{className:"topbar",children:[a.jsxs("span",{className:"wordmark",children:[a.jsx("a",{href:"#/",className:"home-link",title:"Dashboard",children:f||a.jsx(P,{name:"home"})}),o&&a.jsx(xb,{name:o,icon:f,entries:p})]}),a.jsxs("nav",{children:[a.jsxs("a",{href:"#/agents",children:[a.jsx(P,{name:"groups"})," agents"]}),a.jsxs("a",{href:"#/knowledge",children:[a.jsx(P,{name:"menu_book"})," context & knowledge"]}),a.jsxs("a",{href:"#/workflows",children:[a.jsx(P,{name:"account_tree"})," workflows"]}),a.jsxs("a",{href:"#/runs",children:[a.jsx(P,{name:"history"})," workflow runs"]}),a.jsxs("a",{href:"#/skills",children:[a.jsx(P,{name:"extension"})," skills"]})]}),a.jsx("span",{className:"spacer"}),a.jsx(yb,{}),a.jsx(bb,{}),a.jsx(jb,{})]}),a.jsx("main",{className:"shell",children:y})]})}function xb({name:u,icon:i,entries:o}){const[r,f]=C.useState(!1);return C.useEffect(()=>{if(!r)return;const h=p=>{p.target.closest(".switcher-wrap")||f(!1)};return window.addEventListener("mousedown",h),()=>window.removeEventListener("mousedown",h)},[r]),o.length===0?a.jsx("span",{className:"env-name",title:"Project (kraftwerk.yml: name)",children:u}):a.jsxs("span",{className:"switcher-wrap",children:[a.jsxs("button",{className:"env-name env-switch",title:"Switch workspace (kraftwerk.yml: switcher)","aria-haspopup":"menu","aria-expanded":r,onClick:()=>f(h=>!h),children:[u,a.jsx(P,{name:"expand_more"})]}),r&&a.jsxs("div",{className:"switcher-pop",role:"menu",children:[a.jsx("div",{className:"switcher-head",children:"Workspaces"}),a.jsxs("span",{className:"switcher-item current","aria-current":"true",children:[a.jsx("span",{className:"switcher-icon",children:i||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:u}),a.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),a.jsx("span",{className:"switcher-hint",children:"current"})]}),o.map(h=>a.jsxs("a",{className:"switcher-item",role:"menuitem",href:h.url,children:[a.jsx("span",{className:"switcher-icon",children:h.icon||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:h.name}),a.jsxs("span",{className:"switcher-sub",children:[h.live&&a.jsx("span",{className:"live-dot",title:"running"}),h.url.replace(/^https?:\/\//,"")]})]})]},h.url))]})]})}function vb(){const[u,i]=C.useState(null);return C.useEffect(()=>{let o=!0;return fetch("/api/runs").then(r=>r.json()).then(r=>{o&&(r.runs.length>0?gl(`/runs/${r.runs[0].id}`,{replace:!0}):i({outputDir:r.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),u?a.jsxs("div",{className:"empty",children:["No runs found in ",a.jsx("code",{children:u.outputDir}),". Start one with"," ",a.jsx("code",{children:"kraftwerk run <workflow> <request>"})," or from a workflow page."]}):a.jsx("div",{className:"empty",children:"loading…"})}function yb(){const[u,i]=C.useState(null),[o,r]=C.useState(!1);C.useEffect(()=>{let p=!0,g;const y=async()=>{try{const v=await fetch("/api/meta",{cache:"no-store"}).then(S=>S.json());p&&i(v)}catch{}p&&(g=setTimeout(y,3e4))};return y(),()=>{p=!1,clearTimeout(g)}},[]);const f=u?.restartable&&u.diskVersion&&u.diskVersion!==u.version?u.diskVersion:null;async function h(){if(f){r(!0),await fetch("/api/restart",{method:"POST"}).catch(()=>{});for(let p=0;p<60;p++){await new Promise(g=>setTimeout(g,500));try{if((await fetch("/api/meta",{cache:"no-store"}).then(y=>y.json())).version===f)break}catch{}}location.reload()}}return!f&&!o?null:a.jsx("button",{className:"relaunch-note",disabled:o,title:`v${f} is installed on disk, the server still runs v${u?.version}. Click to relaunch with the new version.`,onClick:()=>{h()},children:o?"relaunching…":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function bb(){const u=Gn();return a.jsxs("button",{className:`expert-toggle ${u?"on":""}`,title:u?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":u,onClick:()=>Rx(!u),children:[a.jsx("span",{className:"expert-track",children:a.jsx("span",{className:"expert-knob"})}),"expert"]})}function jb(){const[u,i]=C.useState(!1),[o,r]=C.useState(null),[f,h]=C.useState(null),[p,g]=C.useState("");C.useEffect(()=>{if(!u)return;fetch("/api/runs").then(S=>S.json()).then(r).catch(()=>{}),fetch("/api/workflows").then(S=>S.json()).then(h).catch(()=>{}),fetch("/api/meta").then(S=>S.json()).then(S=>g(S.version)).catch(()=>{});const v=S=>{S.target.closest(".info-wrap")||i(!1)};return window.addEventListener("mousedown",v),()=>window.removeEventListener("mousedown",v)},[u]);const y=o?.runs[0];return a.jsxs("span",{className:"info-wrap",children:[a.jsx("button",{className:"info-btn",title:"Project info","aria-label":"Project info",onClick:()=>i(v=>!v),children:a.jsx(P,{name:"info"})}),u&&a.jsxs("div",{className:"info-pop",children:[a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"microlabel",children:"Workflows"}),a.jsx("span",{className:"info-v",children:f?`${f.workflows.length} discovered`:"…"}),a.jsx("code",{className:"info-path",title:f?.root,children:f?.root??""})]}),a.jsxs("div",{className:"info-row",children:[a.jsx("span",{className:"microlabel",children:"Runs"}),a.jsxs("span",{className:"info-v",children:[o?`${o.runs.length} total`:"…",y?` · latest ${y.status}`:""]}),a.jsx("code",{className:"info-path",title:o?.outputDir,children:o?.outputDir??""})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Workspace"}),a.jsxs("a",{className:"update-btn",href:"#/settings",onClick:()=>i(!1),children:[a.jsx(P,{name:"settings",className:"ms-sm"})," settings"]})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Theme"}),a.jsx(wb,{})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Version"}),a.jsx("span",{className:"info-v mono",children:p?`kraftwerk ${p}`:"…"}),a.jsx(Sb,{})]})]})]})}function Nb(u,i){const o=u.split(".").map(Number),r=i.split(".").map(Number);for(let f=0;f<3;f++)if((o[f]??0)!==(r[f]??0))return(o[f]??0)<(r[f]??0);return!1}function Sb(){const[u,i]=C.useState("idle"),[o,r]=C.useState(null);async function f(){i("busy");try{const h=await fetch("/api/update-check",{cache:"no-store"}),p=await h.json();if(!h.ok||!p.latest)throw new Error;r(p),i("done")}catch{i("err")}}return u==="done"&&o?Nb(o.current,o.latest)?a.jsxs("span",{className:"update-result newer",children:["v",o.latest," available — ",a.jsxs("code",{children:["npm i -g ",o.name,"@latest"]})]}):a.jsxs("span",{className:"update-result",children:[a.jsx(P,{name:"check",className:"ms-sm"})," up to date"]}):a.jsx("button",{className:"update-btn",disabled:u==="busy",onClick:()=>{f()},children:u==="busy"?"checking…":u==="err"?"npm unreachable — retry":a.jsxs(a.Fragment,{children:[a.jsx(P,{name:"sync",className:"ms-sm"})," check for updates"]})})}function wb(){return a.jsx("button",{className:"theme-btn",onClick:()=>{const u=document.documentElement,i=u.dataset.theme==="light"?"dark":"light";u.dataset.theme=i;try{localStorage.setItem("kw-theme",i)}catch{}},children:"day / night"})}Ax.createRoot(document.getElementById("root")).render(a.jsx(C.StrictMode,{children:a.jsx(gb,{})}));
|