@netnodeag/kraftwerk 0.33.0 → 0.34.1

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.
Files changed (29) hide show
  1. package/README.md +317 -242
  2. package/dist/cli/projects.js +30 -8
  3. package/dist/inspector/instances.d.ts +40 -0
  4. package/dist/inspector/instances.js +120 -1
  5. package/dist/inspector/server.js +18 -1
  6. package/inspector/dist/assets/{editor-BlAeAqt0.js → editor-CXrDJOv_.js} +3 -3
  7. package/inspector/dist/assets/{index-Dnqjpy0h.js → index-7J4zAS6J.js} +1 -1
  8. package/inspector/dist/assets/index-B7rwNdVj.css +1 -0
  9. package/inspector/dist/assets/index-BBGjdXk1.js +213 -0
  10. package/inspector/dist/assets/{index-e-11MUIo.js → index-BIDsfw8C.js} +1 -1
  11. package/inspector/dist/assets/{index--wwp-KD0.js → index-BNcXQYbv.js} +1 -1
  12. package/inspector/dist/assets/{index-BvCAG0mQ.js → index-BQMgADlc.js} +1 -1
  13. package/inspector/dist/assets/{index-AR7uGZPa.js → index-BULB2rC_.js} +1 -1
  14. package/inspector/dist/assets/{index-BKnMNAOc.js → index-Bumwg9SM.js} +1 -1
  15. package/inspector/dist/assets/{index-DcXZX6dj.js → index-BxEG-IdY.js} +1 -1
  16. package/inspector/dist/assets/{index--9LQl_DL.js → index-C3hpUVfp.js} +1 -1
  17. package/inspector/dist/assets/{index-LBoNKP4N.js → index-CMMYSoL3.js} +1 -1
  18. package/inspector/dist/assets/{index-D3O4auYk.js → index-CNJyAniG.js} +1 -1
  19. package/inspector/dist/assets/{index-9rElziKS.js → index-CUCCMUMY.js} +1 -1
  20. package/inspector/dist/assets/{index-C3ugp_Wf.js → index-ChuqpBnv.js} +1 -1
  21. package/inspector/dist/assets/{index-CdkhUV5I.js → index-CszaAR9T.js} +1 -1
  22. package/inspector/dist/assets/{index-CV4Aiss-.js → index-DAi1VtJ8.js} +1 -1
  23. package/inspector/dist/assets/{index-B0qGMqfM.js → index-DrSWAGft.js} +1 -1
  24. package/inspector/dist/assets/{index-BvGhLr64.js → index-Upf-BEsx.js} +1 -1
  25. package/inspector/dist/assets/{index-BxPjb1aG.js → index-x5G6Np7T.js} +1 -1
  26. package/inspector/dist/index.html +2 -2
  27. package/package.json +1 -1
  28. package/inspector/dist/assets/index-B7W4QbA2.css +0 -1
  29. package/inspector/dist/assets/index-C5IBvIVa.js +0 -213
@@ -0,0 +1,213 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/editor-CXrDJOv_.js","assets/editor-9rr2cQaW.css"])))=>i.map(i=>d[i]);
2
+ function wx(i,c){for(var o=0;o<c.length;o++){const u=c[o];if(typeof u!="string"&&!Array.isArray(u)){for(const f in u)if(f!=="default"&&!(f in i)){const h=Object.getOwnPropertyDescriptor(u,f);h&&Object.defineProperty(i,f,h.get?h:{enumerable:!0,get:()=>u[f]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).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 u(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();function kx(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fu={exports:{}},oi={};var fm;function Tx(){if(fm)return oi;fm=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(u,f,h){var m=null;if(h!==void 0&&(m=""+h),f.key!==void 0&&(m=""+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:i,type:u,key:m,ref:f!==void 0?f:null,props:h}}return oi.Fragment=c,oi.jsx=o,oi.jsxs=o,oi}var dm;function Ex(){return dm||(dm=1,Fu.exports=Tx()),Fu.exports}var a=Ex(),Wu={exports:{}},me={};var hm;function _x(){if(hm)return me;hm=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),j=Symbol.iterator;function M(k){return k===null||typeof k!="object"?null:(k=j&&k[j]||k["@@iterator"],typeof k=="function"?k:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q=Object.assign,G={};function A(k,q,W){this.props=k,this.context=q,this.refs=G,this.updater=W||S}A.prototype.isReactComponent={},A.prototype.setState=function(k,q){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,q,"setState")},A.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function ce(){}ce.prototype=A.prototype;function fe(k,q,W){this.props=k,this.context=q,this.refs=G,this.updater=W||S}var P=fe.prototype=new ce;P.constructor=fe,Q(P,A.prototype),P.isPureReactComponent=!0;var F=Array.isArray;function Y(){}var J={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function le(k,q,W){var V=W.ref;return{$$typeof:i,type:k,key:q,ref:V!==void 0?V:null,props:W}}function je(k,q){return le(k.type,q,k.props)}function be(k){return typeof k=="object"&&k!==null&&k.$$typeof===i}function te(k){var q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(W){return q[W]})}var ve=/\/+/g;function Je(k,q){return typeof k=="object"&&k!==null&&k.key!=null?te(""+k.key):q.toString(36)}function lt(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(Y,Y):(k.status="pending",k.then(function(q){k.status==="pending"&&(k.status="fulfilled",k.value=q)},function(q){k.status==="pending"&&(k.status="rejected",k.reason=q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function U(k,q,W,V,he){var pe=typeof k;(pe==="undefined"||pe==="boolean")&&(k=null);var _e=!1;if(k===null)_e=!0;else switch(pe){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(k.$$typeof){case i:case c:_e=!0;break;case w:return _e=k._init,U(_e(k._payload),q,W,V,he)}}if(_e)return he=he(k),_e=V===""?"."+Je(k,0):V,F(he)?(W="",_e!=null&&(W=_e.replace(ve,"$&/")+"/"),U(he,q,W,"",function(Ce){return Ce})):he!=null&&(be(he)&&(he=je(he,W+(he.key==null||k&&k.key===he.key?"":(""+he.key).replace(ve,"$&/")+"/")+_e)),q.push(he)),1;_e=0;var mt=V===""?".":V+":";if(F(k))for(var B=0;B<k.length;B++)V=k[B],pe=mt+Je(V,B),_e+=U(V,q,W,pe,he);else if(B=M(k),typeof B=="function")for(k=B.call(k),B=0;!(V=k.next()).done;)V=V.value,pe=mt+Je(V,B++),_e+=U(V,q,W,pe,he);else if(pe==="object"){if(typeof k.then=="function")return U(lt(k),q,W,V,he);throw q=String(k),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return _e}function I(k,q,W){if(k==null)return k;var V=[],he=0;return U(k,V,"","",function(pe){return q.call(W,pe,he++)}),V}function re(k){if(k._status===-1){var q=k._result;q=q(),q.then(function(W){(k._status===0||k._status===-1)&&(k._status=1,k._result=W)},function(W){(k._status===0||k._status===-1)&&(k._status=2,k._result=W)}),k._status===-1&&(k._status=0,k._result=q)}if(k._status===1)return k._result.default;throw k._result}var Re=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ye={map:I,forEach:function(k,q,W){I(k,function(){q.apply(this,arguments)},W)},count:function(k){var q=0;return I(k,function(){q++}),q},toArray:function(k){return I(k,function(q){return q})||[]},only:function(k){if(!be(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return me.Activity=T,me.Children=ye,me.Component=A,me.Fragment=o,me.Profiler=f,me.PureComponent=fe,me.StrictMode=u,me.Suspense=y,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,me.__COMPILER_RUNTIME={__proto__:null,c:function(k){return J.H.useMemoCache(k)}},me.cache=function(k){return function(){return k.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(k,q,W){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var V=Q({},k.props),he=k.key;if(q!=null)for(pe in q.key!==void 0&&(he=""+q.key),q)!ee.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(V[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)V.children=W;else if(1<pe){for(var _e=Array(pe),mt=0;mt<pe;mt++)_e[mt]=arguments[mt+2];V.children=_e}return le(k.type,he,V)},me.createContext=function(k){return k={$$typeof:m,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:h,_context:k},k},me.createElement=function(k,q,W){var V,he={},pe=null;if(q!=null)for(V in q.key!==void 0&&(pe=""+q.key),q)ee.call(q,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(he[V]=q[V]);var _e=arguments.length-2;if(_e===1)he.children=W;else if(1<_e){for(var mt=Array(_e),B=0;B<_e;B++)mt[B]=arguments[B+2];he.children=mt}if(k&&k.defaultProps)for(V in _e=k.defaultProps,_e)he[V]===void 0&&(he[V]=_e[V]);return le(k,pe,he)},me.createRef=function(){return{current:null}},me.forwardRef=function(k){return{$$typeof:g,render:k}},me.isValidElement=be,me.lazy=function(k){return{$$typeof:w,_payload:{_status:-1,_result:k},_init:re}},me.memo=function(k,q){return{$$typeof:v,type:k,compare:q===void 0?null:q}},me.startTransition=function(k){var q=J.T,W={};J.T=W;try{var V=k(),he=J.S;he!==null&&he(W,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(Y,Re)}catch(pe){Re(pe)}finally{q!==null&&W.types!==null&&(q.types=W.types),J.T=q}},me.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},me.use=function(k){return J.H.use(k)},me.useActionState=function(k,q,W){return J.H.useActionState(k,q,W)},me.useCallback=function(k,q){return J.H.useCallback(k,q)},me.useContext=function(k){return J.H.useContext(k)},me.useDebugValue=function(){},me.useDeferredValue=function(k,q){return J.H.useDeferredValue(k,q)},me.useEffect=function(k,q){return J.H.useEffect(k,q)},me.useEffectEvent=function(k){return J.H.useEffectEvent(k)},me.useId=function(){return J.H.useId()},me.useImperativeHandle=function(k,q,W){return J.H.useImperativeHandle(k,q,W)},me.useInsertionEffect=function(k,q){return J.H.useInsertionEffect(k,q)},me.useLayoutEffect=function(k,q){return J.H.useLayoutEffect(k,q)},me.useMemo=function(k,q){return J.H.useMemo(k,q)},me.useOptimistic=function(k,q){return J.H.useOptimistic(k,q)},me.useReducer=function(k,q,W){return J.H.useReducer(k,q,W)},me.useRef=function(k){return J.H.useRef(k)},me.useState=function(k){return J.H.useState(k)},me.useSyncExternalStore=function(k,q,W){return J.H.useSyncExternalStore(k,q,W)},me.useTransition=function(){return J.H.useTransition()},me.version="19.2.8",me}var mm;function bo(){return mm||(mm=1,Wu.exports=_x()),Wu.exports}var C=bo();const Ax=kx(C),Bb=wx({__proto__:null,default:Ax},[C]);var Pu={exports:{}},fi={},eo={exports:{}},to={};var pm;function Rx(){return pm||(pm=1,(function(i){function c(U,I){var re=U.length;U.push(I);e:for(;0<re;){var Re=re-1>>>1,ye=U[Re];if(0<f(ye,I))U[Re]=I,U[re]=ye,re=Re;else break e}}function o(U){return U.length===0?null:U[0]}function u(U){if(U.length===0)return null;var I=U[0],re=U.pop();if(re!==I){U[0]=re;e:for(var Re=0,ye=U.length,k=ye>>>1;Re<k;){var q=2*(Re+1)-1,W=U[q],V=q+1,he=U[V];if(0>f(W,re))V<ye&&0>f(he,W)?(U[Re]=he,U[V]=re,Re=V):(U[Re]=W,U[q]=re,Re=q);else if(V<ye&&0>f(he,re))U[Re]=he,U[V]=re,Re=V;else break e}}return I}function f(U,I){var re=U.sortIndex-I.sortIndex;return re!==0?re:U.id-I.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;i.unstable_now=function(){return h.now()}}else{var m=Date,g=m.now();i.unstable_now=function(){return m.now()-g}}var y=[],v=[],w=1,T=null,j=3,M=!1,S=!1,Q=!1,G=!1,A=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,fe=typeof setImmediate<"u"?setImmediate:null;function P(U){for(var I=o(v);I!==null;){if(I.callback===null)u(v);else if(I.startTime<=U)u(v),I.sortIndex=I.expirationTime,c(y,I);else break;I=o(v)}}function F(U){if(Q=!1,P(U),!S)if(o(y)!==null)S=!0,Y||(Y=!0,te());else{var I=o(v);I!==null&&lt(F,I.startTime-U)}}var Y=!1,J=-1,ee=5,le=-1;function je(){return G?!0:!(i.unstable_now()-le<ee)}function be(){if(G=!1,Y){var U=i.unstable_now();le=U;var I=!0;try{e:{S=!1,Q&&(Q=!1,ce(J),J=-1),M=!0;var re=j;try{t:{for(P(U),T=o(y);T!==null&&!(T.expirationTime>U&&je());){var Re=T.callback;if(typeof Re=="function"){T.callback=null,j=T.priorityLevel;var ye=Re(T.expirationTime<=U);if(U=i.unstable_now(),typeof ye=="function"){T.callback=ye,P(U),I=!0;break t}T===o(y)&&u(y),P(U)}else u(y);T=o(y)}if(T!==null)I=!0;else{var k=o(v);k!==null&&lt(F,k.startTime-U),I=!1}}break e}finally{T=null,j=re,M=!1}I=void 0}}finally{I?te():Y=!1}}}var te;if(typeof fe=="function")te=function(){fe(be)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Je=ve.port2;ve.port1.onmessage=be,te=function(){Je.postMessage(null)}}else te=function(){A(be,0)};function lt(U,I){J=A(function(){U(i.unstable_now())},I)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(U){U.callback=null},i.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ee=0<U?Math.floor(1e3/U):5},i.unstable_getCurrentPriorityLevel=function(){return j},i.unstable_next=function(U){switch(j){case 1:case 2:case 3:var I=3;break;default:I=j}var re=j;j=I;try{return U()}finally{j=re}},i.unstable_requestPaint=function(){G=!0},i.unstable_runWithPriority=function(U,I){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var re=j;j=U;try{return I()}finally{j=re}},i.unstable_scheduleCallback=function(U,I,re){var Re=i.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?Re+re:Re):re=Re,U){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=re+ye,U={id:w++,callback:I,priorityLevel:U,startTime:re,expirationTime:ye,sortIndex:-1},re>Re?(U.sortIndex=re,c(v,U),o(y)===null&&U===o(v)&&(Q?(ce(J),J=-1):Q=!0,lt(F,re-Re))):(U.sortIndex=ye,c(y,U),S||M||(S=!0,Y||(Y=!0,te()))),U},i.unstable_shouldYield=je,i.unstable_wrapCallback=function(U){var I=j;return function(){var re=j;j=I;try{return U.apply(this,arguments)}finally{j=re}}}})(to)),to}var gm;function Cx(){return gm||(gm=1,eo.exports=Rx()),eo.exports}var no={exports:{}},Ct={};var xm;function zx(){if(xm)return Ct;xm=1;var i=bo();function c(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)v+="&args[]="+encodeURIComponent(arguments[w])}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 u={d:{f:o,r:function(){throw Error(c(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,w){var T=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:T==null?null:""+T,children:y,containerInfo:v,implementation:w}}var m=i.__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 Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ct.createPortal=function(y,v){var w=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(c(299));return h(y,v,null,w)},Ct.flushSync=function(y){var v=m.T,w=u.p;try{if(m.T=null,u.p=2,y)return y()}finally{m.T=v,u.p=w,u.d.f()}},Ct.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,u.d.C(y,v))},Ct.prefetchDNS=function(y){typeof y=="string"&&u.d.D(y)},Ct.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var w=v.as,T=g(w,v.crossOrigin),j=typeof v.integrity=="string"?v.integrity:void 0,M=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;w==="style"?u.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:T,integrity:j,fetchPriority:M}):w==="script"&&u.d.X(y,{crossOrigin:T,integrity:j,fetchPriority:M,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},Ct.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var w=g(v.as,v.crossOrigin);u.d.M(y,{crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&u.d.M(y)},Ct.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var w=v.as,T=g(w,v.crossOrigin);u.d.L(y,w,{crossOrigin:T,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})}},Ct.preloadModule=function(y,v){if(typeof y=="string")if(v){var w=g(v.as,v.crossOrigin);u.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:w,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else u.d.m(y)},Ct.requestFormReset=function(y){u.d.r(y)},Ct.unstable_batchedUpdates=function(y,v){return y(v)},Ct.useFormState=function(y,v,w){return m.H.useFormState(y,v,w)},Ct.useFormStatus=function(){return m.H.useHostTransitionStatus()},Ct.version="19.2.8",Ct}var vm;function Ox(){if(vm)return no.exports;vm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),no.exports=zx(),no.exports}var ym;function Dx(){if(ym)return fi;ym=1;var i=Cx(),c=bo(),o=Ox();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function m(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(u(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var s=n.return;if(s===null)break;var r=s.alternate;if(r===null){if(l=s.return,l!==null){n=l;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===n)return y(s),e;if(r===l)return y(s),t;r=r.sibling}throw Error(u(188))}if(n.return!==l.return)n=s,l=r;else{for(var d=!1,p=s.child;p;){if(p===n){d=!0,n=s,l=r;break}if(p===l){d=!0,l=s,n=r;break}p=p.sibling}if(!d){for(p=r.child;p;){if(p===n){d=!0,n=r,l=s;break}if(p===l){d=!0,l=r,n=s;break}p=p.sibling}if(!d)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function w(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=w(e),t!==null)return t;e=e.sibling}return null}var T=Object.assign,j=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),fe=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),Y=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),ee=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function te(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 Q:return"Fragment";case A:return"Profiler";case G:return"StrictMode";case F:return"Suspense";case Y:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case fe:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case P:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return t=e.displayName||null,t!==null?t:Je(e.type)||"Memo";case ee:t=e._payload,e=e._init;try{return Je(e(t))}catch{}}return null}var lt=Array.isArray,U=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},Re=[],ye=-1;function k(e){return{current:e}}function q(e){0>ye||(e.current=Re[ye],Re[ye]=null,ye--)}function W(e,t){ye++,Re[ye]=e.current,e.current=t}var V=k(null),he=k(null),pe=k(null),_e=k(null);function mt(e,t){switch(W(pe,t),W(he,e),W(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dh(t),e=Mh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(V),W(V,e)}function B(){q(V),q(he),q(pe)}function Ce(e){e.memoizedState!==null&&W(_e,e);var t=V.current,n=Mh(t,e.type);t!==n&&(W(he,e),W(V,n))}function Ge(e){he.current===e&&(q(V),q(he)),_e.current===e&&(q(_e),ii._currentValue=re)}var We,tn;function Oe(e){if(We===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",tn=-1<n.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+We+e+tn}var Xl=!1;function Ye(e,t){if(!e||Xl)return"";Xl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={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(D){var O=D}Reflect.construct(e,[],$)}else{try{$.call()}catch(D){O=D}e.call($.prototype)}}else{try{throw Error()}catch(D){O=D}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(D){if(D&&O&&typeof D.stack=="string")return[D.stack,O.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),d=r[0],p=r[1];if(d&&p){var b=d.split(`
5
+ `),z=p.split(`
6
+ `);for(s=l=0;l<b.length&&!b[l].includes("DetermineComponentFrameRoot");)l++;for(;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;if(l===b.length||s===z.length)for(l=b.length-1,s=z.length-1;1<=l&&0<=s&&b[l]!==z[s];)s--;for(;1<=l&&0<=s;l--,s--)if(b[l]!==z[s]){if(l!==1||s!==1)do if(l--,s--,0>s||b[l]!==z[s]){var L=`
7
+ `+b[l].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=l&&0<=s);break}}}finally{Xl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Oe(n):""}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 Ye(e.type,!1);case 11:return Ye(e.type.render,!1);case 1:return Ye(e.type,!0);case 31:return Oe("Activity");default:return""}}function Yt(e){try{var t="",n=null;do t+=os(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
8
+ Error generating stack: `+l.message+`
9
+ `+l.stack}}var $n=Object.prototype.hasOwnProperty,ba=i.unstable_scheduleCallback,nn=i.unstable_cancelCallback,ji=i.unstable_shouldYield,fs=i.unstable_requestPaint,At=i.unstable_now,Ni=i.unstable_getCurrentPriorityLevel,vn=i.unstable_ImmediatePriority,Rn=i.unstable_UserBlockingPriority,ln=i.unstable_NormalPriority,ds=i.unstable_LowPriority,Ql=i.unstable_IdlePriority,ja=i.log,hs=i.unstable_setDisableYieldValue,an=null,yt=null;function Xt(e){if(typeof ja=="function"&&hs(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(an,e)}catch{}}var Rt=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 ol=256,yn=262144,bn=4194304;function Cn(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 Zl(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var s=0,r=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=l&134217727;return p!==0?(l=p&~r,l!==0?s=Cn(l):(d&=p,d!==0?s=Cn(d):n||(n=p&~e,n!==0&&(s=Cn(n))))):(p=l&~r,p!==0?s=Cn(p):d!==0?s=Cn(d):n||(n=l&~e,n!==0&&(s=Cn(n)))),s===0?0:t!==0&&t!==s&&(t&r)===0&&(r=s&-s,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:s}function fl(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=bn;return bn<<=1,(bn&62914560)===0&&(bn=4194304),e}function dl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sn(e,t,n,l,s,r){var d=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,b=e.expirationTimes,z=e.hiddenUpdates;for(n=d&~n;0<n;){var L=31-Rt(n),$=1<<L;p[L]=0,b[L]=-1;var O=z[L];if(O!==null)for(z[L]=null,L=0;L<O.length;L++){var D=O[L];D!==null&&(D.lane&=-536870913)}n&=~$}l!==0&&Gn(e,l,0),r!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=r&~(d&~t))}function Gn(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Rt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function Na(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Rt(n),s=1<<l;s&t|e[l]&t&&(e[l]|=t),n&=~s}}function Sa(e,t){var n=t&-t;return n=(n&42)!==0?1:gs(n),(n&(e.suspendedLanes|t))!==0?0:n}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=I.p;return e!==0?e:(e=window.event,e===void 0?32:am(e.type))}function xs(e,t){var n=I.p;try{return I.p=e,t()}finally{I.p=n}}var cn=Math.random().toString(36).slice(2),pt="__reactFiber$"+cn,it="__reactProps$"+cn,hl="__reactContainer$"+cn,vs="__reactEvents$"+cn,et="__reactListeners$"+cn,ml="__reactHandles$"+cn,Ti="__reactResources$"+cn,pl="__reactMarker$"+cn;function Vl(e){delete e[pt],delete e[it],delete e[vs],delete e[et],delete e[ml]}function Yn(e){var t=e[pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[hl]||n[pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Gh(e);e!==null;){if(n=e[pt])return n;e=Gh(e)}return t}e=n,n=e.parentNode}return null}function Xn(e){if(e=e[pt]||e[hl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Kl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function gl(e){var t=e[Ti];return t||(t=e[Ti]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[pl]=!0}var Ei=new Set,jn={};function On(e,t){Nn(e,t),Nn(e+"Capture",t)}function Nn(e,t){for(jn[e]=t,e=0;e<t.length;e++)Ei.add(t[e])}var Qn=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]*$"),_i={},Jl={};function Ai(e){return $n.call(Jl,e)?!0:$n.call(_i,e)?!1:Qn.test(e)?Jl[e]=!0:(_i[e]=!0,!1)}function Ta(e,t,n){if(Ai(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Il(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function rn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function 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 _a(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var s=l.get,r=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){n=""+d,r.call(this,d)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(d){n=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dn(e){if(!e._valueTracker){var t=Ea(e)?"checked":"value";e._valueTracker=_a(e,t,""+e[t])}}function xl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Ea(e)?e.checked?"true":"false":e.value),e=l,e!==n?(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 Ic=/[\n"\\]/g;function St(e){return e.replace(Ic,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,n,l,s,r,d,p){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?Aa(e,d,Nt(t)):n!=null?Aa(e,d,Nt(n)):l!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Nt(p):e.removeAttribute("name")}function bs(e,t,n,l,s,r,d,p){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null)){Dn(e);return}n=n!=null?""+Nt(n):"",t=t!=null?""+Nt(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}l=l??s,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=p?e.checked:!!l,e.defaultChecked=!!l,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Dn(e)}function Aa(e,t,n){t==="number"&&Dt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Zn(e,t,n,l){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Nt(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,l&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function js(e,t,n){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Nt(n):""}function Ri(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(lt(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Nt(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Dn(e)}function Vn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fc=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 Ci(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Fc.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ns(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var s in t)l=t[s],t.hasOwnProperty(s)&&n[s]!==l&&Ci(e,s,l)}else for(var r in t)t.hasOwnProperty(r)&&Ci(e,r,t[r])}function vl(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"]]),Z=/^[\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 Z.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function E(){}var X=null;function ne(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ae=null,oe=null;function He(e){var t=Xn(e);if(t&&(e=t.stateNode)){var n=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+St(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var s=l[it]||null;if(!s)throw Error(u(90));ys(l,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&xl(l)}break e;case"textarea":js(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Zn(e,!!n.multiple,t,!1)}}}var Ve=!1;function wt(e,t,n){if(Ve)return e(t,n);Ve=!0;try{var l=e(t);return l}finally{if(Ve=!1,(ae!==null||oe!==null)&&(vc(),ae&&(t=ae,e=oe,oe=ae=null,He(t),e)))for(t=0;t<e.length;t++)He(e[t])}}function rt(e,t){var n=e.stateNode;if(n===null)return null;var l=n[it]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var 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 yl=null,Wc=null,zi=null;function Do(){if(zi)return zi;var e,t=Wc,n=t.length,l,s="value"in yl?yl.value:yl.textContent,r=s.length;for(e=0;e<n&&t[e]===s[e];e++);var d=n-e;for(l=1;l<=d&&t[n-l]===s[r-l];l++);return zi=s.slice(e,1<l?1-l: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 Mo(){return!1}function Ut(e){function t(n,l,s,r,d){this._reactName=n,this._targetInst=s,this.type=l,this.nativeEvent=r,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(r):r[p]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Di:Mo,this.isPropagationStopped=Mo,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Ut(Fl),ks=T({},Fl,{view:0,detail:0}),Np=Ut(ks),Pc,er,Ts,Ui=T({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nr,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"?(Pc=e.screenX-Ts.screenX,er=e.screenY-Ts.screenY):er=Pc=0,Ts=e),Pc)},movementY:function(e){return"movementY"in e?e.movementY:er}}),Uo=Ut(Ui),Sp=T({},Ui,{dataTransfer:0}),wp=Ut(Sp),kp=T({},ks,{relatedTarget:0}),tr=Ut(kp),Tp=T({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ep=Ut(Tp),_p=T({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ap=Ut(_p),Rp=T({},Fl,{data:0}),Lo=Ut(Rp),Cp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zp={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"},Op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Dp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Op[e])?!!t[e]:!1}function nr(){return Dp}var Mp=T({},ks,{key:function(e){if(e.key){var t=Cp[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"?zp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nr,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}}),Up=Ut(Mp),Lp=T({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ho=Ut(Lp),Hp=T({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nr}),Bp=Ut(Hp),qp=T({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),$p=Ut(qp),Gp=T({},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}),Yp=Ut(Gp),Xp=T({},Fl,{newState:0,oldState:0}),Qp=Ut(Xp),Zp=[9,13,27,32],lr=Qt&&"CompositionEvent"in window,Es=null;Qt&&"documentMode"in document&&(Es=document.documentMode);var Vp=Qt&&"TextEvent"in window&&!Es,Bo=Qt&&(!lr||Es&&8<Es&&11>=Es),qo=" ",$o=!1;function Go(e,t){switch(e){case"keyup":return Zp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ra=!1;function Kp(e,t){switch(e){case"compositionend":return Yo(t);case"keypress":return t.which!==32?null:($o=!0,qo);case"textInput":return e=t.data,e===qo&&$o?null:e;default:return null}}function Jp(e,t){if(Ra)return e==="compositionend"||!lr&&Go(e,t)?(e=Do(),zi=Wc=yl=null,Ra=!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 Bo&&t.locale!=="ko"?null:t.data;default:return null}}var Ip={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 Xo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ip[e.type]:t==="textarea"}function Qo(e,t,n,l){ae?oe?oe.push(l):oe=[l]:ae=l,t=kc(t,"onChange"),0<t.length&&(n=new Mi("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var _s=null,As=null;function Fp(e){_h(e,0)}function Li(e){var t=Kl(e);if(xl(t))return e}function Zo(e,t){if(e==="change")return t}var Vo=!1;if(Qt){var ar;if(Qt){var sr="oninput"in document;if(!sr){var Ko=document.createElement("div");Ko.setAttribute("oninput","return;"),sr=typeof Ko.oninput=="function"}ar=sr}else ar=!1;Vo=ar&&(!document.documentMode||9<document.documentMode)}function Jo(){_s&&(_s.detachEvent("onpropertychange",Io),As=_s=null)}function Io(e){if(e.propertyName==="value"&&Li(As)){var t=[];Qo(t,As,e,ne(e)),wt(Fp,t)}}function Wp(e,t,n){e==="focusin"?(Jo(),_s=t,As=n,_s.attachEvent("onpropertychange",Io)):e==="focusout"&&Jo()}function Pp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(As)}function eg(e,t){if(e==="click")return Li(t)}function tg(e,t){if(e==="input"||e==="change")return Li(t)}function ng(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:ng;function Rs(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var s=n[l];if(!$n.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function Fo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wo(e,t){var n=Fo(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fo(n)}}function Po(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Po(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ef(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 n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dt(e.document)}return t}function ir(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 lg=Qt&&"documentMode"in document&&11>=document.documentMode,Ca=null,cr=null,Cs=null,rr=!1;function tf(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rr||Ca==null||Ca!==Dt(l)||(l=Ca,"selectionStart"in l&&ir(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Cs&&Rs(Cs,l)||(Cs=l,l=kc(cr,"onSelect"),0<l.length&&(t=new Mi("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Ca)))}function Wl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var za={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionrun:Wl("Transition","TransitionRun"),transitionstart:Wl("Transition","TransitionStart"),transitioncancel:Wl("Transition","TransitionCancel"),transitionend:Wl("Transition","TransitionEnd")},ur={},nf={};Qt&&(nf=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Pl(e){if(ur[e])return ur[e];if(!za[e])return e;var t=za[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in nf)return ur[e]=t[n];return e}var lf=Pl("animationend"),af=Pl("animationiteration"),sf=Pl("animationstart"),ag=Pl("transitionrun"),sg=Pl("transitionstart"),ig=Pl("transitioncancel"),cf=Pl("transitionend"),rf=new Map,or="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(" ");or.push("scrollEnd");function Sn(e,t){rf.set(e,t),On(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)},un=[],Oa=0,fr=0;function Bi(){for(var e=Oa,t=fr=Oa=0;t<e;){var n=un[t];un[t++]=null;var l=un[t];un[t++]=null;var s=un[t];un[t++]=null;var r=un[t];if(un[t++]=null,l!==null&&s!==null){var d=l.pending;d===null?s.next=s:(s.next=d.next,d.next=s),l.pending=s}r!==0&&uf(n,s,r)}}function qi(e,t,n,l){un[Oa++]=e,un[Oa++]=t,un[Oa++]=n,un[Oa++]=l,fr|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function dr(e,t,n,l){return qi(e,t,n,l),$i(e)}function ea(e,t){return qi(e,null,null,t),$i(e)}function uf(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var s=!1,r=e.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(s=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,s&&t!==null&&(s=31-Rt(n),e=r.hiddenUpdates,l=e[s],l===null?e[s]=[t]:l.push(t),t.lane=n|536870912),r):null}function $i(e){if(50<Ps)throw Ps=0,ju=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Da={};function cg(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,n,l){return new cg(e,t,n,l)}function hr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kn(e,t){var n=e.alternate;return n===null?(n=Vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function of(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Gi(e,t,n,l,s,r){var d=0;if(l=e,typeof e=="function")hr(e)&&(d=1);else if(typeof e=="string")d=dx(e,n,V.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=Vt(31,n,t,s),e.elementType=le,e.lanes=r,e;case Q:return ta(n.children,s,r,t);case G:d=8,s|=24;break;case A:return e=Vt(12,n,t,s|2),e.elementType=A,e.lanes=r,e;case F:return e=Vt(13,n,t,s),e.elementType=F,e.lanes=r,e;case Y:return e=Vt(19,n,t,s),e.elementType=Y,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:d=10;break e;case ce:d=9;break e;case P:d=11;break e;case J:d=14;break e;case ee:d=16,l=null;break e}d=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Vt(d,n,t,s),t.elementType=e,t.type=l,t.lanes=r,t}function ta(e,t,n,l){return e=Vt(7,e,l,t),e.lanes=n,e}function mr(e,t,n){return e=Vt(6,e,null,t),e.lanes=n,e}function ff(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function pr(e,t,n){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var df=new WeakMap;function on(e,t){if(typeof e=="object"&&e!==null){var n=df.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Yt(t)},df.set(e,t),t)}return{value:e,source:t,stack:Yt(t)}}var Ma=[],Ua=0,Yi=null,zs=0,fn=[],dn=0,bl=null,Mn=1,Un="";function Jn(e,t){Ma[Ua++]=zs,Ma[Ua++]=Yi,Yi=e,zs=t}function hf(e,t,n){fn[dn++]=Mn,fn[dn++]=Un,fn[dn++]=bl,bl=e;var l=Mn;e=Un;var s=32-Rt(l)-1;l&=~(1<<s),n+=1;var r=32-Rt(t)+s;if(30<r){var d=s-s%5;r=(l&(1<<d)-1).toString(32),l>>=d,s-=d,Mn=1<<32-Rt(t)+s|n<<s|l,Un=r+e}else Mn=1<<r|n<<s|l,Un=e}function gr(e){e.return!==null&&(Jn(e,1),hf(e,1,0))}function xr(e){for(;e===Yi;)Yi=Ma[--Ua],Ma[Ua]=null,zs=Ma[--Ua],Ma[Ua]=null;for(;e===bl;)bl=fn[--dn],fn[dn]=null,Un=fn[--dn],fn[dn]=null,Mn=fn[--dn],fn[dn]=null}function mf(e,t){fn[dn++]=Mn,fn[dn++]=Un,fn[dn++]=bl,Mn=t.id,Un=t.overflow,bl=e}var kt=null,Ie=null,Ae=!1,jl=null,hn=!1,vr=Error(u(519));function Nl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(on(t,e)),vr}function pf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[pt]=e,t[it]=l,n){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(n=0;n<ti.length;n++)Se(ti[n],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,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),Ri(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||zh(t.textContent,n)?(l.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),l.onScroll!=null&&Se("scroll",t),l.onScrollEnd!=null&&Se("scrollend",t),l.onClick!=null&&(t.onclick=E),t=!0):t=!1,t||Nl(e,!0)}function gf(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:kt=kt.return}}function La(e){if(e!==kt)return!1;if(!Ae)return gf(e),Ae=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Uu(e.type,e.memoizedProps)),n=!n),n&&Ie&&Nl(e),gf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ie=$h(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ie=$h(e)}else t===27?(t=Ie,Ul(e.type)?(e=$u,$u=null,Ie=e):Ie=t):Ie=kt?pn(e.stateNode.nextSibling):null;return!0}function na(){Ie=kt=null,Ae=!1}function yr(){var e=jl;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),jl=null),e}function Os(e){jl===null?jl=[e]:jl.push(e)}var br=k(null),la=null,In=null;function Sl(e,t,n){W(br,t._currentValue),t._currentValue=n}function Fn(e){e._currentValue=br.current,q(br)}function jr(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Nr(e,t,n,l){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var r=s.dependencies;if(r!==null){var d=s.child;r=r.firstContext;e:for(;r!==null;){var p=r;r=s;for(var b=0;b<t.length;b++)if(p.context===t[b]){r.lanes|=n,p=r.alternate,p!==null&&(p.lanes|=n),jr(r.return,n,e),l||(d=null);break e}r=p.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(u(341));d.lanes|=n,r=d.alternate,r!==null&&(r.lanes|=n),jr(d,n,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,n,l){e=null;for(var s=t,r=!1;s!==null;){if(!r){if((s.flags&524288)!==0)r=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(u(387));if(d=d.memoizedProps,d!==null){var p=s.type;Zt(s.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(s===_e.current){if(d=s.alternate,d===null)throw Error(u(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}s=s.return}e!==null&&Nr(t,e,n,l),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){la=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return xf(la,e)}function Qi(e,t){return la===null&&aa(e),xf(e,t)}function xf(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},In===null){if(e===null)throw Error(u(308));In=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else In=In.next=t;return n}var rg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},ug=i.unstable_scheduleCallback,og=i.unstable_NormalPriority,ut={$$typeof:fe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sr(){return{controller:new rg,data:new Map,refCount:0}}function Ds(e){e.refCount--,e.refCount===0&&ug(og,function(){e.controller.abort()})}var Ms=null,wr=0,Ba=0,qa=null;function fg(e,t){if(Ms===null){var n=Ms=[];wr=0,Ba=Eu(),qa={status:"pending",value:void 0,then:function(l){n.push(l)}}}return wr++,t.then(vf,vf),t}function vf(){if(--wr===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 dg(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(l.status="rejected",l.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),l}var yf=U.S;U.S=function(e,t){nh=At(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&fg(e,t),yf!==null&&yf(e,t)};var sa=k(null);function kr(){var e=sa.current;return e!==null?e:Ke.pooledCache}function Zi(e,t){t===null?W(sa,sa.current):W(sa,t.pool)}function bf(){var e=kr();return e===null?null:{parent:ut._currentValue,pool:e}}var $a=Error(u(460)),Tr=Error(u(474)),Vi=Error(u(542)),Ki={then:function(){}};function jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(E,E),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wf(e),e;default:if(typeof t.status=="string")t.then(E,E);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=l}},function(l){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,wf(e),e}throw ca=t,$a}}function ia(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ca=n,$a):n}}var ca=null;function Sf(){if(ca===null)throw Error(u(459));var e=ca;return ca=null,e}function wf(e){if(e===$a||e===Vi)throw Error(u(483))}var Ga=null,Us=0;function Ji(e){var t=Us;return Us+=1,Ga===null&&(Ga=[]),Nf(Ga,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===j?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function kf(e){function t(_,N){if(e){var R=_.deletions;R===null?(_.deletions=[N],_.flags|=16):R.push(N)}}function n(_,N){if(!e)return null;for(;N!==null;)t(_,N),N=N.sibling;return null}function l(_){for(var N=new Map;_!==null;)_.key!==null?N.set(_.key,_):N.set(_.index,_),_=_.sibling;return N}function s(_,N){return _=Kn(_,N),_.index=0,_.sibling=null,_}function r(_,N,R){return _.index=R,e?(R=_.alternate,R!==null?(R=R.index,R<N?(_.flags|=67108866,N):R):(_.flags|=67108866,N)):(_.flags|=1048576,N)}function d(_){return e&&_.alternate===null&&(_.flags|=67108866),_}function p(_,N,R,H){return N===null||N.tag!==6?(N=mr(R,_.mode,H),N.return=_,N):(N=s(N,R),N.return=_,N)}function b(_,N,R,H){var ue=R.type;return ue===Q?L(_,N,R.props.children,H,R.key):N!==null&&(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===ee&&ia(ue)===N.type)?(N=s(N,R.props),Ls(N,R),N.return=_,N):(N=Gi(R.type,R.key,R.props,null,_.mode,H),Ls(N,R),N.return=_,N)}function z(_,N,R,H){return N===null||N.tag!==4||N.stateNode.containerInfo!==R.containerInfo||N.stateNode.implementation!==R.implementation?(N=pr(R,_.mode,H),N.return=_,N):(N=s(N,R.children||[]),N.return=_,N)}function L(_,N,R,H,ue){return N===null||N.tag!==7?(N=ta(R,_.mode,H,ue),N.return=_,N):(N=s(N,R),N.return=_,N)}function $(_,N,R){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=mr(""+N,_.mode,R),N.return=_,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case M:return R=Gi(N.type,N.key,N.props,null,_.mode,R),Ls(R,N),R.return=_,R;case S:return N=pr(N,_.mode,R),N.return=_,N;case ee:return N=ia(N),$(_,N,R)}if(lt(N)||te(N))return N=ta(N,_.mode,R,null),N.return=_,N;if(typeof N.then=="function")return $(_,Ji(N),R);if(N.$$typeof===fe)return $(_,Qi(_,N),R);Ii(_,N)}return null}function O(_,N,R,H){var ue=N!==null?N.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return ue!==null?null:p(_,N,""+R,H);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case M:return R.key===ue?b(_,N,R,H):null;case S:return R.key===ue?z(_,N,R,H):null;case ee:return R=ia(R),O(_,N,R,H)}if(lt(R)||te(R))return ue!==null?null:L(_,N,R,H,null);if(typeof R.then=="function")return O(_,N,Ji(R),H);if(R.$$typeof===fe)return O(_,N,Qi(_,R),H);Ii(_,R)}return null}function D(_,N,R,H,ue){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return _=_.get(R)||null,p(N,_,""+H,ue);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case M:return _=_.get(H.key===null?R:H.key)||null,b(N,_,H,ue);case S:return _=_.get(H.key===null?R:H.key)||null,z(N,_,H,ue);case ee:return H=ia(H),D(_,N,R,H,ue)}if(lt(H)||te(H))return _=_.get(R)||null,L(N,_,H,ue,null);if(typeof H.then=="function")return D(_,N,R,Ji(H),ue);if(H.$$typeof===fe)return D(_,N,R,Qi(N,H),ue);Ii(N,H)}return null}function se(_,N,R,H){for(var ue=null,Me=null,ie=N,xe=N=0,Te=null;ie!==null&&xe<R.length;xe++){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Ue=O(_,ie,R[xe],H);if(Ue===null){ie===null&&(ie=Te);break}e&&ie&&Ue.alternate===null&&t(_,ie),N=r(Ue,N,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue,ie=Te}if(xe===R.length)return n(_,ie),Ae&&Jn(_,xe),ue;if(ie===null){for(;xe<R.length;xe++)ie=$(_,R[xe],H),ie!==null&&(N=r(ie,N,xe),Me===null?ue=ie:Me.sibling=ie,Me=ie);return Ae&&Jn(_,xe),ue}for(ie=l(ie);xe<R.length;xe++)Te=D(ie,_,xe,R[xe],H),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),N=r(Te,N,xe),Me===null?ue=Te:Me.sibling=Te,Me=Te);return e&&ie.forEach(function($l){return t(_,$l)}),Ae&&Jn(_,xe),ue}function de(_,N,R,H){if(R==null)throw Error(u(151));for(var ue=null,Me=null,ie=N,xe=N=0,Te=null,Ue=R.next();ie!==null&&!Ue.done;xe++,Ue=R.next()){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var $l=O(_,ie,Ue.value,H);if($l===null){ie===null&&(ie=Te);break}e&&ie&&$l.alternate===null&&t(_,ie),N=r($l,N,xe),Me===null?ue=$l:Me.sibling=$l,Me=$l,ie=Te}if(Ue.done)return n(_,ie),Ae&&Jn(_,xe),ue;if(ie===null){for(;!Ue.done;xe++,Ue=R.next())Ue=$(_,Ue.value,H),Ue!==null&&(N=r(Ue,N,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue);return Ae&&Jn(_,xe),ue}for(ie=l(ie);!Ue.done;xe++,Ue=R.next())Ue=D(ie,_,xe,Ue.value,H),Ue!==null&&(e&&Ue.alternate!==null&&ie.delete(Ue.key===null?xe:Ue.key),N=r(Ue,N,xe),Me===null?ue=Ue:Me.sibling=Ue,Me=Ue);return e&&ie.forEach(function(Sx){return t(_,Sx)}),Ae&&Jn(_,xe),ue}function Ze(_,N,R,H){if(typeof R=="object"&&R!==null&&R.type===Q&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case M:e:{for(var ue=R.key;N!==null;){if(N.key===ue){if(ue=R.type,ue===Q){if(N.tag===7){n(_,N.sibling),H=s(N,R.props.children),H.return=_,_=H;break e}}else if(N.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===ee&&ia(ue)===N.type){n(_,N.sibling),H=s(N,R.props),Ls(H,R),H.return=_,_=H;break e}n(_,N);break}else t(_,N);N=N.sibling}R.type===Q?(H=ta(R.props.children,_.mode,H,R.key),H.return=_,_=H):(H=Gi(R.type,R.key,R.props,null,_.mode,H),Ls(H,R),H.return=_,_=H)}return d(_);case S:e:{for(ue=R.key;N!==null;){if(N.key===ue)if(N.tag===4&&N.stateNode.containerInfo===R.containerInfo&&N.stateNode.implementation===R.implementation){n(_,N.sibling),H=s(N,R.children||[]),H.return=_,_=H;break e}else{n(_,N);break}else t(_,N);N=N.sibling}H=pr(R,_.mode,H),H.return=_,_=H}return d(_);case ee:return R=ia(R),Ze(_,N,R,H)}if(lt(R))return se(_,N,R,H);if(te(R)){if(ue=te(R),typeof ue!="function")throw Error(u(150));return R=ue.call(R),de(_,N,R,H)}if(typeof R.then=="function")return Ze(_,N,Ji(R),H);if(R.$$typeof===fe)return Ze(_,N,Qi(_,R),H);Ii(_,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,N!==null&&N.tag===6?(n(_,N.sibling),H=s(N,R),H.return=_,_=H):(n(_,N),H=mr(R,_.mode,H),H.return=_,_=H),d(_)):n(_,N)}return function(_,N,R,H){try{Us=0;var ue=Ze(_,N,R,H);return Ga=null,ue}catch(ie){if(ie===$a||ie===Vi)throw ie;var Me=Vt(29,ie,null,_.mode);return Me.lanes=H,Me.return=_,Me}}}var ra=kf(!0),Tf=kf(!1),wl=!1;function Er(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function _r(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 kl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Tl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Le&2)!==0){var s=l.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),l.pending=t,t=$i(e),uf(e,null,n),t}return qi(e,l,t,n),$i(e)}function Hs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Na(e,n)}}function Ar(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var s=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var d={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?s=r=d:r=r.next=d,n=n.next}while(n!==null);r===null?s=r=t:r=r.next=t}else s=r=t;n={baseState:l.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Rr=!1;function Bs(){if(Rr){var e=qa;if(e!==null)throw e}}function qs(e,t,n,l){Rr=!1;var s=e.updateQueue;wl=!1;var r=s.firstBaseUpdate,d=s.lastBaseUpdate,p=s.shared.pending;if(p!==null){s.shared.pending=null;var b=p,z=b.next;b.next=null,d===null?r=z:d.next=z,d=b;var L=e.alternate;L!==null&&(L=L.updateQueue,p=L.lastBaseUpdate,p!==d&&(p===null?L.firstBaseUpdate=z:p.next=z,L.lastBaseUpdate=b))}if(r!==null){var $=s.baseState;d=0,L=z=b=null,p=r;do{var O=p.lane&-536870913,D=O!==p.lane;if(D?(ke&O)===O:(l&O)===O){O!==0&&O===Ba&&(Rr=!0),L!==null&&(L=L.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var se=e,de=p;O=t;var Ze=n;switch(de.tag){case 1:if(se=de.payload,typeof se=="function"){$=se.call(Ze,$,O);break e}$=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=de.payload,O=typeof se=="function"?se.call(Ze,$,O):se,O==null)break e;$=T({},$,O);break e;case 2:wl=!0}}O=p.callback,O!==null&&(e.flags|=64,D&&(e.flags|=8192),D=s.callbacks,D===null?s.callbacks=[O]:D.push(O))}else D={lane:O,tag:p.tag,payload:p.payload,callback:p.callback,next:null},L===null?(z=L=D,b=$):L=L.next=D,d|=O;if(p=p.next,p===null){if(p=s.shared.pending,p===null)break;D=p,p=D.next,D.next=null,s.lastBaseUpdate=D,s.shared.pending=null}}while(!0);L===null&&(b=$),s.baseState=b,s.firstBaseUpdate=z,s.lastBaseUpdate=L,r===null&&(s.shared.lanes=0),Cl|=d,e.lanes=d,e.memoizedState=$}}function Ef(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function _f(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ef(n[e],t)}var Ya=k(null),Fi=k(0);function Af(e,t){e=il,W(Fi,e),W(Ya,t),il=e|t.baseLanes}function Cr(){W(Fi,il),W(Ya,Ya.current)}function zr(){il=Fi.current,q(Ya),q(Fi)}var Kt=k(null),mn=null;function El(e){var t=e.alternate;W(at,at.current&1),W(Kt,e),mn===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(mn=e)}function Or(e){W(at,at.current),W(Kt,e),mn===null&&(mn=e)}function Rf(e){e.tag===22?(W(at,at.current),W(Kt,e),mn===null&&(mn=e)):_l()}function _l(){W(at,at.current),W(Kt,Kt.current)}function Jt(e){q(Kt),mn===e&&(mn=null),q(at)}var at=k(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bu(n)||qu(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,ge=null,Xe=null,ot=null,Pi=!1,Xa=!1,ua=!1,ec=0,$s=0,Qa=null,hg=0;function tt(){throw Error(u(321))}function Dr(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function Mr(e,t,n,l,s,r){return Wn=r,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?hd:Ir,ua=!1,r=n(l,s),ua=!1,Xa&&(r=zf(t,n,l,s)),Cf(e),r}function Cf(e){U.H=Xs;var t=Xe!==null&&Xe.next!==null;if(Wn=0,ot=Xe=ge=null,Pi=!1,$s=0,Qa=null,t)throw Error(u(300));e===null||ft||(e=e.dependencies,e!==null&&Xi(e)&&(ft=!0))}function zf(e,t,n,l){ge=e;var s=0;do{if(Xa&&(Qa=null),$s=0,Xa=!1,25<=s)throw Error(u(301));if(s+=1,ot=Xe=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}U.H=md,r=t(n,l)}while(Xa);return r}function mg(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Gs(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Ur(){var e=ec!==0;return ec=0,e}function Lr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hr(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Wn=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(u(467)):Error(u(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 Gs(e){var t=$s;return $s+=1,Qa===null&&(Qa=[]),e=Nf(Qa,e,t),t=ge,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?hd:Ir),e}function nc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gs(e);if(e.$$typeof===fe)return Tt(e)}throw Error(u(438,String(e)))}function Br(e){var t=null,n=ge.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=ge.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=tc(),ge.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=je;return t.index++,n}function Pn(e,t){return typeof t=="function"?t(e):t}function lc(e){var t=st();return qr(t,Xe,e)}function qr(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var s=e.baseQueue,r=l.pending;if(r!==null){if(s!==null){var d=s.next;s.next=r.next,r.next=d}t.baseQueue=s=r,l.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var p=d=null,b=null,z=t,L=!1;do{var $=z.lane&-536870913;if($!==z.lane?(ke&$)===$:(Wn&$)===$){var O=z.revertLane;if(O===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),$===Ba&&(L=!0);else if((Wn&O)===O){z=z.next,O===Ba&&(L=!0);continue}else $={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(p=b=$,d=r):b=b.next=$,ge.lanes|=O,Cl|=O;$=z.action,ua&&n(r,$),r=z.hasEagerState?z.eagerState:n(r,$)}else O={lane:$,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},b===null?(p=b=O,d=r):b=b.next=O,ge.lanes|=$,Cl|=$;z=z.next}while(z!==null&&z!==t);if(b===null?d=r:b.next=p,!Zt(r,e.memoizedState)&&(ft=!0,L&&(n=qa,n!==null)))throw n;e.memoizedState=r,e.baseState=d,e.baseQueue=b,l.lastRenderedState=r}return s===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function $r(e){var t=st(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,s=n.pending,r=t.memoizedState;if(s!==null){n.pending=null;var d=s=s.next;do r=e(r,d.action),d=d.next;while(d!==s);Zt(r,t.memoizedState)||(ft=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,l]}function Of(e,t,n){var l=ge,s=st(),r=Ae;if(r){if(n===void 0)throw Error(u(407));n=n()}else n=t();var d=!Zt((Xe||s).memoizedState,n);if(d&&(s.memoizedState=n,ft=!0),s=s.queue,Xr(Uf.bind(null,l,s,e),[e]),s.getSnapshot!==t||d||ot!==null&&ot.memoizedState.tag&1){if(l.flags|=2048,Za(9,{destroy:void 0},Mf.bind(null,l,s,n,t),null),Ke===null)throw Error(u(349));r||(Wn&127)!==0||Df(l,t,n)}return n}function Df(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ge.updateQueue,t===null?(t=tc(),ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mf(e,t,n,l){t.value=n,t.getSnapshot=l,Lf(t)&&Hf(e)}function Uf(e,t,n){return n(function(){Lf(t)&&Hf(e)})}function Lf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zt(e,n)}catch{return!0}}function Hf(e){var t=ea(e,2);t!==null&&$t(t,e,2)}function Gr(e){var t=Mt();if(typeof e=="function"){var n=e;if(e=n(),ua){Xt(!0);try{n()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:e},t}function Bf(e,t,n,l){return e.baseState=n,qr(e,Xe,typeof l=="function"?l:Pn)}function pg(e,t,n,l,s){if(ic(e))throw Error(u(485));if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){r.listeners.push(d)}};U.T!==null?n(!0):r.isTransition=!1,l(r),n=t.pending,n===null?(r.next=t.pending=r,qf(t,r)):(r.next=n.next,t.pending=n.next=r)}}function qf(e,t){var n=t.action,l=t.payload,s=e.state;if(t.isTransition){var r=U.T,d={};U.T=d;try{var p=n(s,l),b=U.S;b!==null&&b(d,p),$f(e,t,p)}catch(z){Yr(e,t,z)}finally{r!==null&&d.types!==null&&(r.types=d.types),U.T=r}}else try{r=n(s,l),$f(e,t,r)}catch(z){Yr(e,t,z)}}function $f(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Gf(e,t,l)},function(l){return Yr(e,t,l)}):Gf(e,t,n)}function Gf(e,t,n){t.status="fulfilled",t.value=n,Yf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,qf(e,n)))}function Yr(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,Yf(t),t=t.next;while(t!==l)}e.action=null}function Yf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Xf(e,t){return t}function Qf(e,t){if(Ae){var n=Ke.formState;if(n!==null){e:{var l=ge;if(Ae){if(Ie){t:{for(var s=Ie,r=hn;s.nodeType!==8;){if(!r){s=null;break t}if(s=pn(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){Ie=pn(s.nextSibling),l=s.data==="F!";break e}}Nl(l)}l=!1}l&&(t=n[0])}}return n=Mt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xf,lastRenderedState:t},n.queue=l,n=od.bind(null,ge,l),l.dispatch=n,l=Gr(!1),r=Jr.bind(null,ge,!1,l.queue),l=Mt(),s={state:t,dispatch:null,action:e,pending:null},l.queue=s,n=pg.bind(null,ge,s,r,n),s.dispatch=n,l.memoizedState=e,[t,n,!1]}function Zf(e){var t=st();return Vf(t,Xe,e)}function Vf(e,t,n){if(t=qr(e,t,Xf)[0],e=lc(Pn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Gs(t)}catch(d){throw d===$a?Vi:d}else l=t;t=st();var s=t.queue,r=s.dispatch;return n!==t.memoizedState&&(ge.flags|=2048,Za(9,{destroy:void 0},gg.bind(null,s,n),null)),[l,r,e]}function gg(e,t){e.action=t}function Kf(e){var t=st(),n=Xe;if(n!==null)return Vf(t,n,e);st(),t=t.memoizedState,n=st();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function Za(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=ge.updateQueue,t===null&&(t=tc(),ge.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Jf(){return st().memoizedState}function ac(e,t,n,l){var s=Mt();ge.flags|=e,s.memoizedState=Za(1|t,{destroy:void 0},n,l===void 0?null:l)}function sc(e,t,n,l){var s=st();l=l===void 0?null:l;var r=s.memoizedState.inst;Xe!==null&&l!==null&&Dr(l,Xe.memoizedState.deps)?s.memoizedState=Za(t,r,n,l):(ge.flags|=e,s.memoizedState=Za(1|t,r,n,l))}function If(e,t){ac(8390656,8,e,t)}function Xr(e,t){sc(2048,8,e,t)}function xg(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=tc(),ge.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ff(e){var t=st().memoizedState;return xg({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Wf(e,t){return sc(4,2,e,t)}function Pf(e,t){return sc(4,4,e,t)}function ed(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function td(e,t,n){n=n!=null?n.concat([e]):null,sc(4,4,ed.bind(null,t,e),n)}function Qr(){}function nd(e,t){var n=st();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Dr(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function ld(e,t){var n=st();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Dr(t,l[1]))return l[0];if(l=e(),ua){Xt(!0);try{e()}finally{Xt(!1)}}return n.memoizedState=[l,t],l}function Zr(e,t,n){return n===void 0||(Wn&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=ah(),ge.lanes|=e,Cl|=e,n)}function ad(e,t,n,l){return Zt(n,t)?n:Ya.current!==null?(e=Zr(e,n,l),Zt(e,t)||(ft=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=n):(e=ah(),ge.lanes|=e,Cl|=e,t)}function sd(e,t,n,l,s){var r=I.p;I.p=r!==0&&8>r?r:8;var d=U.T,p={};U.T=p,Jr(e,!1,t,n);try{var b=s(),z=U.S;if(z!==null&&z(p,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var L=dg(b,l);Ys(e,t,L,Wt(e))}else Ys(e,t,l,Wt(e))}catch($){Ys(e,t,{then:function(){},status:"rejected",reason:$},Wt())}finally{I.p=r,d!==null&&p.types!==null&&(d.types=p.types),U.T=d}}function vg(){}function Vr(e,t,n,l){if(e.tag!==5)throw Error(u(476));var s=id(e).queue;sd(e,s,t,re,n===null?vg:function(){return cd(e),n(l)})}function id(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cd(e){var t=id(e);t.next===null&&(t=e.alternate.memoizedState),Ys(e,t.next.queue,{},Wt())}function Kr(){return Tt(ii)}function rd(){return st().memoizedState}function ud(){return st().memoizedState}function yg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Wt();e=kl(n);var l=Tl(t,e,n);l!==null&&($t(l,t,n),Hs(l,t,n)),t={cache:Sr()},e.payload=t;return}t=t.return}}function bg(e,t,n){var l=Wt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?fd(t,n):(n=dr(e,t,n,l),n!==null&&($t(n,e,l),dd(n,t,l)))}function od(e,t,n){var l=Wt();Ys(e,t,n,l)}function Ys(e,t,n,l){var s={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))fd(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var d=t.lastRenderedState,p=r(d,n);if(s.hasEagerState=!0,s.eagerState=p,Zt(p,d))return qi(e,t,s,0),Ke===null&&Bi(),!1}catch{}if(n=dr(e,t,s,l),n!==null)return $t(n,e,l),dd(n,t,l),!0}return!1}function Jr(e,t,n,l){if(l={lane:2,revertLane:Eu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(u(479))}else t=dr(e,n,l,2),t!==null&&$t(t,e,2)}function ic(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function fd(e,t){Xa=Pi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dd(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,Na(e,n)}}var Xs={readContext:Tt,use:nc,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 hd={readContext:Tt,use:nc,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:If,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ac(4194308,4,ed.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ac(4194308,4,e,t)},useInsertionEffect:function(e,t){ac(4,2,e,t)},useMemo:function(e,t){var n=Mt();t=t===void 0?null:t;var l=e();if(ua){Xt(!0);try{e()}finally{Xt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Mt();if(n!==void 0){var s=n(t);if(ua){Xt(!0);try{n(t)}finally{Xt(!1)}}}else s=t;return l.memoizedState=l.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},l.queue=e,e=e.dispatch=bg.bind(null,ge,e),[l.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Gr(e);var t=e.queue,n=od.bind(null,ge,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qr,useDeferredValue:function(e,t){var n=Mt();return Zr(n,e,t)},useTransition:function(){var e=Gr(!1);return e=sd.bind(null,ge,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=ge,s=Mt();if(Ae){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ke===null)throw Error(u(349));(ke&127)!==0||Df(l,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,If(Uf.bind(null,l,r,e),[e]),l.flags|=2048,Za(9,{destroy:void 0},Mf.bind(null,l,r,n,t),null),n},useId:function(){var e=Mt(),t=Ke.identifierPrefix;if(Ae){var n=Un,l=Mn;n=(l&~(1<<32-Rt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ec++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=hg++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Kr,useFormState:Qf,useActionState:Qf,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Jr.bind(null,ge,!0,n),n.dispatch=t,[e,t]},useMemoCache:Br,useCacheRefresh:function(){return Mt().memoizedState=yg.bind(null,ge)},useEffectEvent:function(e){var t=Mt(),n={impl:e};return t.memoizedState=n,function(){if((Le&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Ir={readContext:Tt,use:nc,useCallback:nd,useContext:Tt,useEffect:Xr,useImperativeHandle:td,useInsertionEffect:Wf,useLayoutEffect:Pf,useMemo:ld,useReducer:lc,useRef:Jf,useState:function(){return lc(Pn)},useDebugValue:Qr,useDeferredValue:function(e,t){var n=st();return ad(n,Xe.memoizedState,e,t)},useTransition:function(){var e=lc(Pn)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:Of,useId:rd,useHostTransitionStatus:Kr,useFormState:Zf,useActionState:Zf,useOptimistic:function(e,t){var n=st();return Bf(n,Xe,e,t)},useMemoCache:Br,useCacheRefresh:ud};Ir.useEffectEvent=Ff;var md={readContext:Tt,use:nc,useCallback:nd,useContext:Tt,useEffect:Xr,useImperativeHandle:td,useInsertionEffect:Wf,useLayoutEffect:Pf,useMemo:ld,useReducer:$r,useRef:Jf,useState:function(){return $r(Pn)},useDebugValue:Qr,useDeferredValue:function(e,t){var n=st();return Xe===null?Zr(n,e,t):ad(n,Xe.memoizedState,e,t)},useTransition:function(){var e=$r(Pn)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Gs(e),t]},useSyncExternalStore:Of,useId:rd,useHostTransitionStatus:Kr,useFormState:Kf,useActionState:Kf,useOptimistic:function(e,t){var n=st();return Xe!==null?Bf(n,Xe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Br,useCacheRefresh:ud};md.useEffectEvent=Ff;function Fr(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wr={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=Wt(),s=kl(l);s.payload=t,n!=null&&(s.callback=n),t=Tl(e,s,l),t!==null&&($t(t,e,l),Hs(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=Wt(),s=kl(l);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Tl(e,s,l),t!==null&&($t(t,e,l),Hs(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wt(),l=kl(n);l.tag=2,t!=null&&(l.callback=t),t=Tl(e,l,n),t!==null&&($t(t,e,n),Hs(t,e,n))}};function pd(e,t,n,l,s,r,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,r,d):t.prototype&&t.prototype.isPureReactComponent?!Rs(n,l)||!Rs(s,r):!0}function gd(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Wr.enqueueReplaceState(t,t.state,null)}function oa(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=T({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}function xd(e){Hi(e)}function vd(e){console.error(e)}function yd(e){Hi(e)}function cc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function bd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Pr(e,t,n){return n=kl(n),n.tag=3,n.payload={element:null},n.callback=function(){cc(e,t)},n}function jd(e){return e=kl(e),e.tag=3,e}function Nd(e,t,n,l){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var r=l.value;e.payload=function(){return s(r)},e.callback=function(){bd(t,n,l)}}var d=n.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){bd(t,n,l),typeof s!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var p=l.stack;this.componentDidCatch(l.value,{componentStack:p!==null?p:""})})}function jg(e,t,n,l,s){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Ha(t,n,s,!0),n=Kt.current,n!==null){switch(n.tag){case 31:case 13:return mn===null?yc():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=s,l===Ki?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),wu(e,l,s)),!1;case 22:return n.flags|=65536,l===Ki?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),wu(e,l,s)),!1}throw Error(u(435,n.tag))}return wu(e,l,s),yc(),!1}if(Ae)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,l!==vr&&(e=Error(u(422),{cause:l}),Os(on(e,n)))):(l!==vr&&(t=Error(u(423),{cause:l}),Os(on(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,l=on(l,n),s=Pr(e.stateNode,l,s),Ar(e,s),nt!==4&&(nt=2)),!1;var r=Error(u(520),{cause:l});if(r=on(r,n),Ws===null?Ws=[r]:Ws.push(r),nt!==4&&(nt=2),t===null)return!0;l=on(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=Pr(n.stateNode,l,e),Ar(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(zl===null||!zl.has(r))))return n.flags|=65536,s&=-s,n.lanes|=s,s=jd(s),Nd(s,e,n,l),Ar(n,s),!1}n=n.return}while(n!==null);return!1}var eu=Error(u(461)),ft=!1;function Et(e,t,n,l){t.child=e===null?Tf(t,null,n,l):ra(t,e.child,n,l)}function Sd(e,t,n,l,s){n=n.render;var r=t.ref;if("ref"in l){var d={};for(var p in l)p!=="ref"&&(d[p]=l[p])}else d=l;return aa(t),l=Mr(e,t,n,d,r,s),p=Ur(),e!==null&&!ft?(Lr(e,t,s),el(e,t,s)):(Ae&&p&&gr(t),t.flags|=1,Et(e,t,l,s),t.child)}function wd(e,t,n,l,s){if(e===null){var r=n.type;return typeof r=="function"&&!hr(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,kd(e,t,r,l,s)):(e=Gi(n.type,null,l,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!ru(e,s)){var d=r.memoizedProps;if(n=n.compare,n=n!==null?n:Rs,n(d,l)&&e.ref===t.ref)return el(e,t,s)}return t.flags|=1,e=Kn(r,l),e.ref=t.ref,e.return=t,t.child=e}function kd(e,t,n,l,s){if(e!==null){var r=e.memoizedProps;if(Rs(r,l)&&e.ref===t.ref)if(ft=!1,t.pendingProps=l=r,ru(e,s))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,el(e,t,s)}return tu(e,t,n,l,s)}function Td(e,t,n,l){var s=l.children,r=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(r=r!==null?r.baseLanes|n:n,e!==null){for(l=t.child=e.child,s=0;l!==null;)s=s|l.lanes|l.childLanes,l=l.sibling;l=s&~r}else l=0,t.child=null;return Ed(e,t,r,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zi(t,r!==null?r.cachePool:null),r!==null?Af(t,r):Cr(),Rf(t);else return l=t.lanes=536870912,Ed(e,t,r!==null?r.baseLanes|n:n,n,l)}else r!==null?(Zi(t,r.cachePool),Af(t,r),_l(),t.memoizedState=null):(e!==null&&Zi(t,null),Cr(),_l());return Et(e,t,s,n),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 Ed(e,t,n,l,s){var r=kr();return r=r===null?null:{parent:ut._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Zi(t,null),Cr(),Rf(t),e!==null&&Ha(e,t,l,!0),t.childLanes=s,null}function rc(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 _d(e,t,n){return ra(t,e.child,null,n),e=rc(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function Ng(e,t,n){var l=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(l.mode==="hidden")return e=rc(t,l),t.lanes=536870912,Qs(null,e);if(Or(t),(e=Ie)?(e=qh(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Mn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},n=ff(e),n.return=t,t.child=n,kt=t,Ie=null)):e=null,e===null)throw Nl(t);return t.lanes=536870912,null}return rc(t,l)}var r=e.memoizedState;if(r!==null){var d=r.dehydrated;if(Or(t),s)if(t.flags&256)t.flags&=-257,t=_d(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(ft||Ha(e,t,n,!1),s=(n&e.childLanes)!==0,ft||s){if(l=Ke,l!==null&&(d=Sa(l,n),d!==0&&d!==r.retryLane))throw r.retryLane=d,ea(e,d),$t(l,e,d),eu;yc(),t=_d(e,t,n)}else e=r.treeContext,Ie=pn(d.nextSibling),kt=t,Ae=!0,jl=null,hn=!1,e!==null&&mf(t,e),t=rc(t,l),t.flags|=4096;return t}return e=Kn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function tu(e,t,n,l,s){return aa(t),n=Mr(e,t,n,l,void 0,s),l=Ur(),e!==null&&!ft?(Lr(e,t,s),el(e,t,s)):(Ae&&l&&gr(t),t.flags|=1,Et(e,t,n,s),t.child)}function Ad(e,t,n,l,s,r){return aa(t),t.updateQueue=null,n=zf(t,l,n,s),Cf(e),l=Ur(),e!==null&&!ft?(Lr(e,t,r),el(e,t,r)):(Ae&&l&&gr(t),t.flags|=1,Et(e,t,n,r),t.child)}function Rd(e,t,n,l,s){if(aa(t),t.stateNode===null){var r=Da,d=n.contextType;typeof d=="object"&&d!==null&&(r=Tt(d)),r=new n(l,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Wr,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=l,r.state=t.memoizedState,r.refs={},Er(t),d=n.contextType,r.context=typeof d=="object"&&d!==null?Tt(d):Da,r.state=t.memoizedState,d=n.getDerivedStateFromProps,typeof d=="function"&&(Fr(t,n,d,l),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(d=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),d!==r.state&&Wr.enqueueReplaceState(r,r.state,null),qs(t,l,r,s),Bs(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){r=t.stateNode;var p=t.memoizedProps,b=oa(n,p);r.props=b;var z=r.context,L=n.contextType;d=Da,typeof L=="object"&&L!==null&&(d=Tt(L));var $=n.getDerivedStateFromProps;L=typeof $=="function"||typeof r.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,L||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(p||z!==d)&&gd(t,r,l,d),wl=!1;var O=t.memoizedState;r.state=O,qs(t,l,r,s),Bs(),z=t.memoizedState,p||O!==z||wl?(typeof $=="function"&&(Fr(t,n,$,l),z=t.memoizedState),(b=wl||pd(t,n,b,l,O,z,d))?(L||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),r.props=l,r.state=z,r.context=d,l=b):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{r=t.stateNode,_r(e,t),d=t.memoizedProps,L=oa(n,d),r.props=L,$=t.pendingProps,O=r.context,z=n.contextType,b=Da,typeof z=="object"&&z!==null&&(b=Tt(z)),p=n.getDerivedStateFromProps,(z=typeof p=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(d!==$||O!==b)&&gd(t,r,l,b),wl=!1,O=t.memoizedState,r.state=O,qs(t,l,r,s),Bs();var D=t.memoizedState;d!==$||O!==D||wl||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof p=="function"&&(Fr(t,n,p,l),D=t.memoizedState),(L=wl||pd(t,n,L,l,O,D,b)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(z||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,D,b),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,D,b)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=D),r.props=l,r.state=D,r.context=b,l=L):(typeof r.componentDidUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),l=!1)}return r=l,uc(e,t),l=(t.flags&128)!==0,r||l?(r=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&l?(t.child=ra(t,e.child,null,s),t.child=ra(t,null,n,s)):Et(e,t,n,s),t.memoizedState=r.state,e=t.child):e=el(e,t,s),e}function Cd(e,t,n,l){return na(),t.flags|=256,Et(e,t,n,l),t.child}var nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lu(e){return{baseLanes:e,cachePool:bf()}}function au(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ft),e}function zd(e,t,n){var l=t.pendingProps,s=!1,r=(t.flags&128)!==0,d;if((d=r)||(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?El(t):_l(),(e=Ie)?(e=qh(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bl!==null?{id:Mn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},n=ff(e),n.return=t,t.child=n,kt=t,Ie=null)):e=null,e===null)throw Nl(t);return qu(e)?t.lanes=32:t.lanes=536870912,null}var p=l.children;return l=l.fallback,s?(_l(),s=t.mode,p=oc({mode:"hidden",children:p},s),l=ta(l,s,n,null),p.return=t,l.return=t,p.sibling=l,t.child=p,l=t.child,l.memoizedState=lu(n),l.childLanes=au(e,d,n),t.memoizedState=nu,Qs(null,l)):(El(t),su(t,p))}var b=e.memoizedState;if(b!==null&&(p=b.dehydrated,p!==null)){if(r)t.flags&256?(El(t),t.flags&=-257,t=iu(e,t,n)):t.memoizedState!==null?(_l(),t.child=e.child,t.flags|=128,t=null):(_l(),p=l.fallback,s=t.mode,l=oc({mode:"visible",children:l.children},s),p=ta(p,s,n,null),p.flags|=2,l.return=t,p.return=t,l.sibling=p,t.child=l,ra(t,e.child,null,n),l=t.child,l.memoizedState=lu(n),l.childLanes=au(e,d,n),t.memoizedState=nu,t=Qs(null,l));else if(El(t),qu(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var z=d.dgst;d=z,l=Error(u(419)),l.stack="",l.digest=d,Os({value:l,source:null,stack:null}),t=iu(e,t,n)}else if(ft||Ha(e,t,n,!1),d=(n&e.childLanes)!==0,ft||d){if(d=Ke,d!==null&&(l=Sa(d,n),l!==0&&l!==b.retryLane))throw b.retryLane=l,ea(e,l),$t(d,e,l),eu;Bu(p)||yc(),t=iu(e,t,n)}else Bu(p)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ie=pn(p.nextSibling),kt=t,Ae=!0,jl=null,hn=!1,e!==null&&mf(t,e),t=su(t,l.children),t.flags|=4096);return t}return s?(_l(),p=l.fallback,s=t.mode,b=e.child,z=b.sibling,l=Kn(b,{mode:"hidden",children:l.children}),l.subtreeFlags=b.subtreeFlags&65011712,z!==null?p=Kn(z,p):(p=ta(p,s,n,null),p.flags|=2),p.return=t,l.return=t,l.sibling=p,t.child=l,Qs(null,l),l=t.child,p=e.child.memoizedState,p===null?p=lu(n):(s=p.cachePool,s!==null?(b=ut._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=bf(),p={baseLanes:p.baseLanes|n,cachePool:s}),l.memoizedState=p,l.childLanes=au(e,d,n),t.memoizedState=nu,Qs(e.child,l)):(El(t),n=e.child,e=n.sibling,n=Kn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=n,t.memoizedState=null,n)}function su(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 iu(e,t,n){return ra(t,e.child,null,n),e=su(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Od(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),jr(e.return,t,n)}function cu(e,t,n,l,s,r){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:s,treeForkCount:r}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=l,d.tail=n,d.tailMode=s,d.treeForkCount=r)}function Dd(e,t,n){var l=t.pendingProps,s=l.revealOrder,r=l.tail;l=l.children;var d=at.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,W(at,d),Et(e,t,l,n),l=Ae?zs:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Od(e,n,t);else if(e.tag===19)Od(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Wi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),cu(t,!1,s,n,r,l);break;case"backwards":case"unstable_legacy-backwards":for(n=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=n,n=s,s=e}cu(t,!0,n,null,r,l);break;case"together":cu(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function el(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ha(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ru(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xi(e)))}function Sg(e,t,n){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),Sl(t,ut,e.memoizedState.cache),na();break;case 27:case 5:Ce(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:Sl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Or(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(El(t),t.flags|=128,null):(n&t.child.childLanes)!==0?zd(e,t,n):(El(t),e=el(e,t,n),e!==null?e.sibling:null);El(t);break;case 19:var s=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Ha(e,t,n,!1),l=(n&t.childLanes)!==0),s){if(l)return Dd(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),W(at,at.current),l)break;return null;case 22:return t.lanes=0,Td(e,t,n,t.pendingProps);case 24:Sl(t,ut,e.memoizedState.cache)}return el(e,t,n)}function Md(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!ru(e,n)&&(t.flags&128)===0)return ft=!1,Sg(e,t,n);ft=(e.flags&131072)!==0}else ft=!1,Ae&&(t.flags&1048576)!==0&&hf(t,zs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=ia(t.elementType),t.type=e,typeof e=="function")hr(e)?(l=oa(e,l),t.tag=1,t=Rd(null,t,e,l,n)):(t.tag=0,t=tu(null,t,e,l,n));else{if(e!=null){var s=e.$$typeof;if(s===P){t.tag=11,t=Sd(null,t,e,l,n);break e}else if(s===J){t.tag=14,t=wd(null,t,e,l,n);break e}}throw t=Je(e)||e,Error(u(306,t,""))}}return t;case 0:return tu(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,s=oa(l,t.pendingProps),Rd(e,t,l,s,n);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var r=t.memoizedState;s=r.element,_r(e,t),qs(t,l,null,n);var d=t.memoizedState;if(l=d.cache,Sl(t,ut,l),l!==r.cache&&Nr(t,[ut],n,!0),Bs(),l=d.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Cd(e,t,l,n);break e}else if(l!==s){s=on(Error(u(424)),t),Os(s),t=Cd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=pn(e.firstChild),kt=t,Ae=!0,jl=null,hn=!0,n=Tf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(na(),l===s){t=el(e,t,n);break e}Et(e,t,l,n)}t=t.child}return t;case 26:return uc(e,t),e===null?(n=Zh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ae||(n=t.type,e=t.pendingProps,l=Tc(pe.current).createElement(n),l[pt]=t,l[it]=e,_t(l,n,e),ct(l),t.stateNode=l):t.memoizedState=Zh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ce(t),e===null&&Ae&&(l=t.stateNode=Yh(t.type,t.pendingProps,pe.current),kt=t,hn=!0,s=Ie,Ul(t.type)?($u=s,Ie=pn(l.firstChild)):Ie=s),Et(e,t,t.pendingProps.children,n),uc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((s=l=Ie)&&(l=Pg(l,t.type,t.pendingProps,hn),l!==null?(t.stateNode=l,kt=t,Ie=pn(l.firstChild),hn=!1,s=!0):s=!1),s||Nl(t)),Ce(t),s=t.type,r=t.pendingProps,d=e!==null?e.memoizedProps:null,l=r.children,Uu(s,r)?l=null:d!==null&&Uu(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Mr(e,t,mg,null,null,n),ii._currentValue=s),uc(e,t),Et(e,t,l,n),t.child;case 6:return e===null&&Ae&&((e=n=Ie)&&(n=ex(n,t.pendingProps,hn),n!==null?(t.stateNode=n,kt=t,Ie=null,e=!0):e=!1),e||Nl(t)),null;case 13:return zd(e,t,n);case 4:return mt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=ra(t,null,l,n):Et(e,t,l,n),t.child;case 11:return Sd(e,t,t.type,t.pendingProps,n);case 7:return Et(e,t,t.pendingProps,n),t.child;case 8:return Et(e,t,t.pendingProps.children,n),t.child;case 12:return Et(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Sl(t,t.type,l.value),Et(e,t,l.children,n),t.child;case 9:return s=t.type._context,l=t.pendingProps.children,aa(t),s=Tt(s),l=l(s),t.flags|=1,Et(e,t,l,n),t.child;case 14:return wd(e,t,t.type,t.pendingProps,n);case 15:return kd(e,t,t.type,t.pendingProps,n);case 19:return Dd(e,t,n);case 31:return Ng(e,t,n);case 22:return Td(e,t,n,t.pendingProps);case 24:return aa(t),l=Tt(ut),e===null?(s=kr(),s===null&&(s=Ke,r=Sr(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=n),s=r),t.memoizedState={parent:l,cache:s},Er(t),Sl(t,ut,s)):((e.lanes&n)!==0&&(_r(e,t),qs(t,null,null,n),Bs()),s=e.memoizedState,r=t.memoizedState,s.parent!==l?(s={parent:l,cache:l},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Sl(t,ut,l)):(l=r.cache,Sl(t,ut,l),l!==s.cache&&Nr(t,[ut],n,!0))),Et(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function tl(e){e.flags|=4}function uu(e,t,n,l,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(rh())e.flags|=8192;else throw ca=Ki,Tr}else e.flags&=-16777217}function Ud(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Fh(t))if(rh())e.flags|=8192;else throw ca=Ki,Tr}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 n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,l|=s.subtreeFlags&65011712,l|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,l|=s.subtreeFlags,l|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function wg(e,t,n){var l=t.pendingProps;switch(xr(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 n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Fn(ut),B(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(La(t)?tl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,yr())),Fe(t),null;case 26:var s=t.type,r=t.memoizedState;return e===null?(tl(t),r!==null?(Fe(t),Ud(t,r)):(Fe(t),uu(t,s,null,l,n))):r?r!==e.memoizedState?(tl(t),Fe(t),Ud(t,r)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&tl(t),Fe(t),uu(t,s,e,l,n)),null;case 27:if(Ge(t),n=pe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Fe(t),null}e=V.current,La(t)?pf(t):(e=Yh(s,l,n),t.stateNode=e,tl(t))}return Fe(t),null;case 5:if(Ge(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return Fe(t),null}if(r=V.current,La(t))pf(t);else{var d=Tc(pe.current);switch(r){case 1:r=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:r=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":r=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":r=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":r=d.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild);break;case"select":r=typeof l.is=="string"?d.createElement("select",{is:l.is}):d.createElement("select"),l.multiple?r.multiple=!0:l.size&&(r.size=l.size);break;default:r=typeof l.is=="string"?d.createElement(s,{is:l.is}):d.createElement(s)}}r[pt]=t,r[it]=l;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)r.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=r;e:switch(_t(r,s,l),s){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&tl(t)}}return Fe(t),uu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&tl(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=pe.current,La(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,s=kt,s!==null)switch(s.tag){case 27:case 5:l=s.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||zh(e.nodeValue,n)),e||Nl(t,!0)}else e=Tc(e).createTextNode(l),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=La(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[pt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else n=yr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Fe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=La(t),l!==null&&l.dehydrated!==null){if(e===null){if(!s)throw Error(u(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[pt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=yr(),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=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,s=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(s=l.alternate.memoizedState.cachePool.pool),r=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==s&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fc(t,t.updateQueue),Fe(t),null);case 4:return B(),e===null&&Cu(t.stateNode.containerInfo),Fe(t),null;case 10:return Fn(t.type),Fe(t),null;case 19:if(q(at),l=t.memoizedState,l===null)return Fe(t),null;if(s=(t.flags&128)!==0,r=l.rendering,r===null)if(s)Zs(l,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Wi(e),r!==null){for(t.flags|=128,Zs(l,!1),e=r.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)of(n,e),n=n.sibling;return W(at,at.current&1|2),Ae&&Jn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&At()>gc&&(t.flags|=128,s=!0,Zs(l,!1),t.lanes=4194304)}else{if(!s)if(e=Wi(r),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,fc(t,e),Zs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!r.alternate&&!Ae)return Fe(t),null}else 2*At()-l.renderingStartTime>gc&&n!==536870912&&(t.flags|=128,s=!0,Zs(l,!1),t.lanes=4194304);l.isBackwards?(r.sibling=t.child,t.child=r):(e=l.last,e!==null?e.sibling=r:t.child=r,l.last=r)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=At(),e.sibling=null,n=at.current,W(at,s?n&1|2:n&1),Ae&&Jn(t,l.treeForkCount),e):(Fe(t),null);case 22:case 23:return Jt(t),zr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),n=t.updateQueue,n!==null&&fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&q(sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fn(ut),Fe(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function kg(e,t){switch(xr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(ut),B(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ge(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(u(340));na()}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(u(340));na()}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 Fn(t.type),null;case 22:case 23:return Jt(t),zr(),e!==null&&q(sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(ut),null;case 25:return null;default:return null}}function Ld(e,t){switch(xr(t),t.tag){case 3:Fn(ut),B();break;case 26:case 27:case 5:Ge(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:Fn(t.type);break;case 22:case 23:Jt(t),zr(),e!==null&&q(sa);break;case 24:Fn(ut)}}function Vs(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var s=l.next;n=s;do{if((n.tag&e)===e){l=void 0;var r=n.create,d=n.inst;l=r(),d.destroy=l}n=n.next}while(n!==s)}}catch(p){qe(t,t.return,p)}}function Al(e,t,n){try{var l=t.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var r=s.next;l=r;do{if((l.tag&e)===e){var d=l.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,s=t;var b=n,z=p;try{z()}catch(L){qe(s,b,L)}}}l=l.next}while(l!==r)}}catch(L){qe(t,t.return,L)}}function Hd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_f(t,n)}catch(l){qe(e,e.return,l)}}}function Bd(e,t,n){n.props=oa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){qe(e,t,l)}}function Ks(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(s){qe(e,t,s)}}function Ln(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(s){qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){qe(e,t,s)}else n.current=null}function qd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(s){qe(e,e.return,s)}}function ou(e,t,n){try{var l=e.stateNode;Vg(l,e.type,n,t),l[it]=t}catch(s){qe(e,e.return,s)}}function $d(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$d(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&&Ul(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 du(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=E));else if(l!==4&&(l===27&&Ul(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(du(e,t,n),e=e.sibling;e!==null;)du(e,t,n),e=e.sibling}function dc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Ul(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}function Gd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);_t(t,l,n),t[pt]=e,t[it]=n}catch(r){qe(e,e.return,r)}}var nl=!1,dt=!1,hu=!1,Yd=typeof WeakSet=="function"?WeakSet:Set,bt=null;function Tg(e,t){if(e=e.containerInfo,Du=Oc,e=ef(e),ir(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var s=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var d=0,p=-1,b=-1,z=0,L=0,$=e,O=null;t:for(;;){for(var D;$!==n||s!==0&&$.nodeType!==3||(p=d+s),$!==r||l!==0&&$.nodeType!==3||(b=d+l),$.nodeType===3&&(d+=$.nodeValue.length),(D=$.firstChild)!==null;)O=$,$=D;for(;;){if($===e)break t;if(O===n&&++z===s&&(p=d),O===r&&++L===l&&(b=d),(D=$.nextSibling)!==null)break;$=O,O=$.parentNode}$=D}n=p===-1||b===-1?null:{start:p,end:b}}else n=null}n=n||{start:0,end:0}}else n=null;for(Mu={focusedElem:e,selectionRange:n},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,r=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)s=e[n],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,n=t,s=r.memoizedProps,r=r.memoizedState,l=n.stateNode;try{var se=oa(n.type,s);e=l.getSnapshotBeforeUpdate(se,r),l.__reactInternalSnapshotBeforeUpdate=e}catch(de){qe(n,n.return,de)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hu(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function Xd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:al(e,n),l&4&&Vs(5,n);break;case 1:if(al(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(d){qe(n,n.return,d)}else{var s=oa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){qe(n,n.return,d)}}l&64&&Hd(n),l&512&&Ks(n,n.return);break;case 3:if(al(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_f(e,t)}catch(d){qe(n,n.return,d)}}break;case 27:t===null&&l&4&&Gd(n);case 26:case 5:al(e,n),t===null&&l&4&&qd(n),l&512&&Ks(n,n.return);break;case 12:al(e,n);break;case 31:al(e,n),l&4&&Vd(e,n);break;case 13:al(e,n),l&4&&Kd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Mg.bind(null,n),tx(e,n))));break;case 22:if(l=n.memoizedState!==null||nl,!l){t=t!==null&&t.memoizedState!==null||dt,s=nl;var r=dt;nl=l,(dt=t)&&!r?sl(e,n,(n.subtreeFlags&8772)!==0):al(e,n),nl=s,dt=r}break;case 30:break;default:al(e,n)}}function Qd(e){var t=e.alternate;t!==null&&(e.alternate=null,Qd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vl(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 ll(e,t,n){for(n=n.child;n!==null;)Zd(e,t,n),n=n.sibling}function Zd(e,t,n){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(an,n)}catch{}switch(n.tag){case 26:dt||Ln(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:dt||Ln(n,t);var l=Pe,s=Lt;Ul(n.type)&&(Pe=n.stateNode,Lt=!1),ll(e,t,n),li(n.stateNode),Pe=l,Lt=s;break;case 5:dt||Ln(n,t);case 6:if(l=Pe,s=Lt,Pe=null,ll(e,t,n),Pe=l,Lt=s,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(n.stateNode)}catch(r){qe(n,t,r)}else try{Pe.removeChild(n.stateNode)}catch(r){qe(n,t,r)}break;case 18:Pe!==null&&(Lt?(e=Pe,Hh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),as(e)):Hh(Pe,n.stateNode));break;case 4:l=Pe,s=Lt,Pe=n.stateNode.containerInfo,Lt=!0,ll(e,t,n),Pe=l,Lt=s;break;case 0:case 11:case 14:case 15:Al(2,n,t),dt||Al(4,n,t),ll(e,t,n);break;case 1:dt||(Ln(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Bd(n,t,l)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:dt=(l=dt)||n.memoizedState!==null,ll(e,t,n),dt=l;break;default:ll(e,t,n)}}function Vd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{as(e)}catch(n){qe(t,t.return,n)}}}function Kd(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(n){qe(t,t.return,n)}}function Eg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yd),t;default:throw Error(u(435,e.tag))}}function hc(e,t){var n=Eg(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var s=Ug.bind(null,e,l);l.then(s,s)}})}function Ht(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var s=n[l],r=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Ul(p.type)){Pe=p.stateNode,Lt=!1;break e}break;case 5:Pe=p.stateNode,Lt=!1;break e;case 3:case 4:Pe=p.stateNode.containerInfo,Lt=!0;break e}p=p.return}if(Pe===null)throw Error(u(160));Zd(r,d,s),Pe=null,Lt=!1,r=s.alternate,r!==null&&(r.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Jd(t,e),t=t.sibling}var wn=null;function Jd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Bt(e),l&4&&(Al(3,e,e.return),Vs(3,e),Al(5,e,e.return));break;case 1:Ht(t,e),Bt(e),l&512&&(dt||n===null||Ln(n,n.return)),l&64&&nl&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var s=wn;if(Ht(t,e),Bt(e),l&512&&(dt||n===null||Ln(n,n.return)),l&4){var r=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(l){case"title":r=s.getElementsByTagName("title")[0],(!r||r[pl]||r[pt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(l),s.head.insertBefore(r,s.querySelector("head > title"))),_t(r,l,n),r[pt]=e,ct(r),l=r;break e;case"link":var d=Jh("link","href",s).get(l+(n.href||""));if(d){for(var p=0;p<d.length;p++)if(r=d[p],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){d.splice(p,1);break t}}r=s.createElement(l),_t(r,l,n),s.head.appendChild(r);break;case"meta":if(d=Jh("meta","content",s).get(l+(n.content||""))){for(p=0;p<d.length;p++)if(r=d[p],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){d.splice(p,1);break t}}r=s.createElement(l),_t(r,l,n),s.head.appendChild(r);break;default:throw Error(u(468,l))}r[pt]=e,ct(r),l=r}e.stateNode=l}else Ih(s,e.type,e.stateNode);else e.stateNode=Kh(s,l,e.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?Ih(s,e.type,e.stateNode):Kh(s,l,e.memoizedProps)):l===null&&e.stateNode!==null&&ou(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ht(t,e),Bt(e),l&512&&(dt||n===null||Ln(n,n.return)),n!==null&&l&4&&ou(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ht(t,e),Bt(e),l&512&&(dt||n===null||Ln(n,n.return)),e.flags&32){s=e.stateNode;try{Vn(s,"")}catch(se){qe(e,e.return,se)}}l&4&&e.stateNode!=null&&(s=e.memoizedProps,ou(e,s,n!==null?n.memoizedProps:s)),l&1024&&(hu=!0);break;case 6:if(Ht(t,e),Bt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(se){qe(e,e.return,se)}}break;case 3:if(Ac=null,s=wn,wn=Ec(t.containerInfo),Ht(t,e),wn=s,Bt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(se){qe(e,e.return,se)}hu&&(hu=!1,Id(e));break;case 4:l=wn,wn=Ec(e.stateNode.containerInfo),Ht(t,e),Bt(e),wn=l;break;case 12:Ht(t,e),Bt(e);break;case 31:Ht(t,e),Bt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hc(e,l)));break;case 13:Ht(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(pc=At()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hc(e,l)));break;case 22:s=e.memoizedState!==null;var b=n!==null&&n.memoizedState!==null,z=nl,L=dt;if(nl=z||s,dt=L||b,Ht(t,e),dt=L,nl=z,Bt(e),l&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(n===null||b||nl||dt||fa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){b=n=t;try{if(r=b.stateNode,s)d=r.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=b.stateNode;var $=b.memoizedProps.style,O=$!=null&&$.hasOwnProperty("display")?$.display:null;p.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(se){qe(b,b.return,se)}}}else if(t.tag===6){if(n===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){qe(b,b.return,se)}}}else if(t.tag===18){if(n===null){b=t;try{var D=b.stateNode;s?Bh(D,!0):Bh(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;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,hc(e,n))));break;case 19:Ht(t,e),Bt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hc(e,l)));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 n,l=e.return;l!==null;){if($d(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var s=n.stateNode,r=fu(e);dc(e,r,s);break;case 5:var d=n.stateNode;n.flags&32&&(Vn(d,""),n.flags&=-33);var p=fu(e);dc(e,p,d);break;case 3:case 4:var b=n.stateNode.containerInfo,z=fu(e);du(e,z,b);break;default:throw Error(u(161))}}catch(L){qe(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Id(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Id(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function al(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Xd(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:Al(4,t,t.return),fa(t);break;case 1:Ln(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Bd(t,t.return,n),fa(t);break;case 27:li(t.stateNode);case 26:case 5:Ln(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 sl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,s=e,r=t,d=r.flags;switch(r.tag){case 0:case 11:case 15:sl(s,r,n),Vs(4,r);break;case 1:if(sl(s,r,n),l=r,s=l.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(z){qe(l,l.return,z)}if(l=r,s=l.updateQueue,s!==null){var p=l.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)Ef(b[s],p)}catch(z){qe(l,l.return,z)}}n&&d&64&&Hd(r),Ks(r,r.return);break;case 27:Gd(r);case 26:case 5:sl(s,r,n),n&&l===null&&d&4&&qd(r),Ks(r,r.return);break;case 12:sl(s,r,n);break;case 31:sl(s,r,n),n&&d&4&&Vd(s,r);break;case 13:sl(s,r,n),n&&d&4&&Kd(s,r);break;case 22:r.memoizedState===null&&sl(s,r,n),Ks(r,r.return);break;case 30:break;default:sl(s,r,n)}t=t.sibling}}function mu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ds(n))}function pu(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 kn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fd(e,t,n,l),t=t.sibling}function Fd(e,t,n,l){var s=t.flags;switch(t.tag){case 0:case 11:case 15:kn(e,t,n,l),s&2048&&Vs(9,t);break;case 1:kn(e,t,n,l);break;case 3:kn(e,t,n,l),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){kn(e,t,n,l),e=t.stateNode;try{var r=t.memoizedProps,d=r.id,p=r.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){qe(t,t.return,b)}}else kn(e,t,n,l);break;case 31:kn(e,t,n,l);break;case 13:kn(e,t,n,l);break;case 23:break;case 22:r=t.stateNode,d=t.alternate,t.memoizedState!==null?r._visibility&2?kn(e,t,n,l):Js(e,t):r._visibility&2?kn(e,t,n,l):(r._visibility|=2,Va(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),s&2048&&mu(d,t);break;case 24:kn(e,t,n,l),s&2048&&pu(t.alternate,t);break;default:kn(e,t,n,l)}}function Va(e,t,n,l,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var r=e,d=t,p=n,b=l,z=d.flags;switch(d.tag){case 0:case 11:case 15:Va(r,d,p,b,s),Vs(8,d);break;case 23:break;case 22:var L=d.stateNode;d.memoizedState!==null?L._visibility&2?Va(r,d,p,b,s):Js(r,d):(L._visibility|=2,Va(r,d,p,b,s)),s&&z&2048&&mu(d.alternate,d);break;case 24:Va(r,d,p,b,s),s&&z&2048&&pu(d.alternate,d);break;default:Va(r,d,p,b,s)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,s=l.flags;switch(l.tag){case 22:Js(n,l),s&2048&&mu(l.alternate,l);break;case 24:Js(n,l),s&2048&&pu(l.alternate,l);break;default:Js(n,l)}t=t.sibling}}var Is=8192;function Ka(e,t,n){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Wd(e,t,n),e=e.sibling}function Wd(e,t,n){switch(e.tag){case 26:Ka(e,t,n),e.flags&Is&&e.memoizedState!==null&&hx(n,wn,e.memoizedState,e.memoizedProps);break;case 5:Ka(e,t,n);break;case 3:case 4:var l=wn;wn=Ec(e.stateNode.containerInfo),Ka(e,t,n),wn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Is,Is=16777216,Ka(e,t,n),Is=l):Ka(e,t,n));break;default:Ka(e,t,n)}}function Pd(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 n=0;n<t.length;n++){var l=t[n];bt=l,th(l,e)}Pd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)eh(e),e=e.sibling}function eh(e){switch(e.tag){case 0:case 11:case 15:Fs(e),e.flags&2048&&Al(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 n=0;n<t.length;n++){var l=t[n];bt=l,th(l,e)}Pd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),mc(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,mc(t));break;default:mc(t)}e=e.sibling}}function th(e,t){for(;bt!==null;){var n=bt;switch(n.tag){case 0:case 11:case 15:Al(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ds(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,bt=l;else e:for(n=e;bt!==null;){l=bt;var s=l.sibling,r=l.return;if(Qd(l),l===n){bt=null;break e}if(s!==null){s.return=r,bt=s;break e}bt=r}}}var _g={getCacheForType:function(e){var t=Tt(ut),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Tt(ut).controller.signal}},Ag=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ne=null,ke=0,Be=0,It=null,Rl=!1,Ja=!1,gu=!1,il=0,nt=0,Cl=0,da=0,xu=0,Ft=0,Ia=0,Ws=null,qt=null,vu=!1,pc=0,nh=0,gc=1/0,xc=null,zl=null,xt=0,Ol=null,Fa=null,cl=0,yu=0,bu=null,lh=null,Ps=0,ju=null;function Wt(){return(Le&2)!==0&&ke!==0?ke&-ke:U.T!==null?Eu():ka()}function ah(){if(Ft===0)if((ke&536870912)===0||Ae){var e=yn;yn<<=1,(yn&3932160)===0&&(yn=262144),Ft=e}else Ft=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Ft}function $t(e,t,n){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Wa(e,0),Dl(e,ke,Ft,!1)),zn(e,n),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(da|=n),nt===4&&Dl(e,ke,Ft,!1)),Hn(e))}function sh(e,t,n){if((Le&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fl(e,t),s=l?zg(e,t):Su(e,t,!0),r=l;do{if(s===0){Ja&&!l&&Dl(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!Rg(n)){s=Su(e,t,!1),r=!1;continue}if(s===2){if(r=t,e.errorRecoveryDisabledLanes&r)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;s=Ws;var b=p.current.memoizedState.isDehydrated;if(b&&(Wa(p,d).flags|=256),d=Su(p,d,!1),d!==2){if(gu&&!b){p.errorRecoveryDisabledLanes|=r,da|=r,s=4;break e}r=qt,qt=s,r!==null&&(qt===null?qt=r:qt.push.apply(qt,r))}s=d}if(r=!1,s!==2)continue}}if(s===1){Wa(e,0),Dl(e,t,0,!0);break}e:{switch(l=e,r=s,r){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Dl(l,t,Ft,!Rl);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(s=pc+300-At(),10<s)){if(Dl(l,t,Ft,!Rl),Zl(l,0,!0)!==0)break e;cl=t,l.timeoutHandle=Uh(ih.bind(null,l,n,qt,xc,vu,t,Ft,da,Ia,Rl,r,"Throttled",-0,0),s);break e}ih(l,n,qt,xc,vu,t,Ft,da,Ia,Rl,r,null,-0,0)}}break}while(!0);Hn(e)}function ih(e,t,n,l,s,r,d,p,b,z,L,$,O,D){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:E},Wd(t,r,$);var se=(r&62914560)===r?pc-At():(r&4194048)===r?nh-At():0;if(se=mx($,se),se!==null){cl=r,e.cancelPendingCommit=se(mh.bind(null,e,t,r,n,l,s,d,p,b,L,$,null,O,D)),Dl(e,r,d,!z);return}}mh(e,t,r,n,l,s,d,p,b)}function Rg(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var s=n[l],r=s.getSnapshot;s=s.value;try{if(!Zt(r(),s))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Dl(e,t,n,l){t&=~xu,t&=~da,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var s=t;0<s;){var r=31-Rt(s),d=1<<r;l[r]=-1,s&=~d}n!==0&&Gn(e,n,t)}function vc(){return(Le&6)===0?(ei(0),!1):!0}function Nu(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,In=la=null,Hr(e),Ga=null,Us=0,e=Ne;for(;e!==null;)Ld(e.alternate,e),e=e.return;Ne=null}}function Wa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Ig(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),cl=0,Nu(),Ke=e,Ne=n=Kn(e.current,null),ke=t,Be=0,It=null,Rl=!1,Ja=fl(e,t),gu=!1,Ia=Ft=xu=da=Cl=nt=0,qt=Ws=null,vu=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var s=31-Rt(l),r=1<<s;t|=e[s],l&=~r}return il=t,Bi(),n}function ch(e,t){ge=null,U.H=Xs,t===$a||t===Vi?(t=Sf(),Be=3):t===Tr?(t=Sf(),Be=4):Be=t===eu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Ne===null&&(nt=1,cc(e,on(t,e.current)))}function rh(){var e=Kt.current;return e===null?!0:(ke&4194048)===ke?mn===null:(ke&62914560)===ke||(ke&536870912)!==0?e===mn:!1}function uh(){var e=U.H;return U.H=Xs,e===null?Xs:e}function oh(){var e=U.A;return U.A=_g,e}function yc(){nt=4,Rl||(ke&4194048)!==ke&&Kt.current!==null||(Ja=!0),(Cl&134217727)===0&&(da&134217727)===0||Ke===null||Dl(Ke,ke,Ft,!1)}function Su(e,t,n){var l=Le;Le|=2;var s=uh(),r=oh();(Ke!==e||ke!==t)&&(xc=null,Wa(e,t)),t=!1;var d=nt;e:do try{if(Be!==0&&Ne!==null){var p=Ne,b=It;switch(Be){case 8:Nu(),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,p,b,z),n&&Ja){d=0;break e}break;default:z=Be,Be=0,It=null,Pa(e,p,b,z)}}Cg(),d=nt;break}catch(L){ch(e,L)}while(!0);return t&&e.shellSuspendCounter++,In=la=null,Le=l,U.H=s,U.A=r,Ne===null&&(Ke=null,ke=0,Bi()),d}function Cg(){for(;Ne!==null;)fh(Ne)}function zg(e,t){var n=Le;Le|=2;var l=uh(),s=oh();Ke!==e||ke!==t?(xc=null,gc=At()+500,Wa(e,t)):Ja=fl(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var r=It;t:switch(Be){case 1:Be=0,It=null,Pa(e,t,r,1);break;case 2:case 9:if(jf(r)){Be=0,It=null,dh(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),Hn(e)},r.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:jf(r)?(Be=0,It=null,dh(t)):(Be=0,It=null,Pa(e,t,r,7));break;case 5:var d=null;switch(Ne.tag){case 26:d=Ne.memoizedState;case 5:case 27:var p=Ne;if(d?Fh(d):p.stateNode.complete){Be=0,It=null;var b=p.sibling;if(b!==null)Ne=b;else{var z=p.return;z!==null?(Ne=z,bc(z)):Ne=null}break t}}Be=0,It=null,Pa(e,t,r,5);break;case 6:Be=0,It=null,Pa(e,t,r,6);break;case 8:Nu(),nt=6;break e;default:throw Error(u(462))}}Og();break}catch(L){ch(e,L)}while(!0);return In=la=null,U.H=l,U.A=s,Le=n,Ne!==null?0:(Ke=null,ke=0,Bi(),nt)}function Og(){for(;Ne!==null&&!ji();)fh(Ne)}function fh(e){var t=Md(e.alternate,e,il);e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function dh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Ad(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Ad(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Hr(t);default:Ld(n,t),t=Ne=of(t,il),t=Md(n,t,il)}e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function Pa(e,t,n,l){In=la=null,Hr(t),Ga=null,Us=0;var s=t.return;try{if(jg(e,s,t,n,ke)){nt=1,cc(e,on(n,e.current)),Ne=null;return}}catch(r){if(s!==null)throw Ne=s,r;nt=1,cc(e,on(n,e.current)),Ne=null;return}t.flags&32768?(Ae||l===1?e=!0:Ja||(ke&536870912)!==0?e=!1:(Rl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Kt.current,l!==null&&l.tag===13&&(l.flags|=16384))),hh(t,e)):bc(t)}function bc(e){var t=e;do{if((t.flags&32768)!==0){hh(t,Rl);return}e=t.return;var n=wg(t.alternate,t,il);if(n!==null){Ne=n;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);nt===0&&(nt=5)}function hh(e,t){do{var n=kg(e.alternate,e);if(n!==null){n.flags&=32767,Ne=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=n}while(e!==null);nt=6,Ne=null}function mh(e,t,n,l,s,r,d,p,b){e.cancelPendingCommit=null;do jc();while(xt!==0);if((Le&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(r=t.lanes|t.childLanes,r|=fr,sn(e,n,r,d,p,b),e===Ke&&(Ne=Ke=null,ke=0),Fa=t,Ol=e,cl=n,yu=r,bu=s,lh=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Lg(ln,function(){return yh(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,s=I.p,I.p=2,d=Le,Le|=4;try{Tg(e,t,n)}finally{Le=d,I.p=s,U.T=l}}xt=1,ph(),gh(),xh()}}function ph(){if(xt===1){xt=0;var e=Ol,t=Fa,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=U.T,U.T=null;var l=I.p;I.p=2;var s=Le;Le|=4;try{Jd(t,e);var r=Mu,d=ef(e.containerInfo),p=r.focusedElem,b=r.selectionRange;if(d!==p&&p&&p.ownerDocument&&Po(p.ownerDocument.documentElement,p)){if(b!==null&&ir(p)){var z=b.start,L=b.end;if(L===void 0&&(L=z),"selectionStart"in p)p.selectionStart=z,p.selectionEnd=Math.min(L,p.value.length);else{var $=p.ownerDocument||document,O=$&&$.defaultView||window;if(O.getSelection){var D=O.getSelection(),se=p.textContent.length,de=Math.min(b.start,se),Ze=b.end===void 0?de:Math.min(b.end,se);!D.extend&&de>Ze&&(d=Ze,Ze=de,de=d);var _=Wo(p,de),N=Wo(p,Ze);if(_&&N&&(D.rangeCount!==1||D.anchorNode!==_.node||D.anchorOffset!==_.offset||D.focusNode!==N.node||D.focusOffset!==N.offset)){var R=$.createRange();R.setStart(_.node,_.offset),D.removeAllRanges(),de>Ze?(D.addRange(R),D.extend(N.node,N.offset)):(R.setEnd(N.node,N.offset),D.addRange(R))}}}}for($=[],D=p;D=D.parentNode;)D.nodeType===1&&$.push({element:D,left:D.scrollLeft,top:D.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<$.length;p++){var H=$[p];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Oc=!!Du,Mu=Du=null}finally{Le=s,I.p=l,U.T=n}}e.current=t,xt=2}}function gh(){if(xt===2){xt=0;var e=Ol,t=Fa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=U.T,U.T=null;var l=I.p;I.p=2;var s=Le;Le|=4;try{Xd(e,t.alternate,t)}finally{Le=s,I.p=l,U.T=n}}xt=3}}function xh(){if(xt===4||xt===3){xt=0,fs();var e=Ol,t=Fa,n=cl,l=lh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,Fa=Ol=null,vh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(zl=null),wa(n),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(an,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=U.T,s=I.p,I.p=2,U.T=null;try{for(var r=e.onRecoverableError,d=0;d<l.length;d++){var p=l[d];r(p.value,{componentStack:p.stack})}}finally{U.T=t,I.p=s}}(cl&3)!==0&&jc(),Hn(e),s=e.pendingLanes,(n&261930)!==0&&(s&42)!==0?e===ju?Ps++:(Ps=0,ju=e):Ps=0,ei(0)}}function vh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ds(t)))}function jc(){return ph(),gh(),xh(),yh()}function yh(){if(xt!==5)return!1;var e=Ol,t=yu;yu=0;var n=wa(cl),l=U.T,s=I.p;try{I.p=32>n?32:n,U.T=null,n=bu,bu=null;var r=Ol,d=cl;if(xt=0,Fa=Ol=null,cl=0,(Le&6)!==0)throw Error(u(331));var p=Le;if(Le|=4,eh(r.current),Fd(r,r.current,d,n),Le=p,ei(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(an,r)}catch{}return!0}finally{I.p=s,U.T=l,vh(e,t)}}function bh(e,t,n){t=on(n,t),t=Pr(e.stateNode,t,2),e=Tl(e,t,2),e!==null&&(zn(e,2),Hn(e))}function qe(e,t,n){if(e.tag===3)bh(e,e,n);else for(;t!==null;){if(t.tag===3){bh(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(zl===null||!zl.has(l))){e=on(n,e),n=jd(2),l=Tl(t,n,2),l!==null&&(Nd(n,l,t,e),zn(l,2),Hn(l));break}}t=t.return}}function wu(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Ag;var s=new Set;l.set(t,s)}else s=l.get(t),s===void 0&&(s=new Set,l.set(t,s));s.has(n)||(gu=!0,s.add(n),e=Dg.bind(null,e,t,n),t.then(e,e))}function Dg(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(ke&n)===n&&(nt===4||nt===3&&(ke&62914560)===ke&&300>At()-pc?(Le&2)===0&&Wa(e,0):xu|=n,Ia===ke&&(Ia=0)),Hn(e)}function jh(e,t){t===0&&(t=ps()),e=ea(e,t),e!==null&&(zn(e,t),Hn(e))}function Mg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),jh(e,n)}function Ug(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),jh(e,n)}function Lg(e,t){return ba(e,t)}var Nc=null,es=null,ku=!1,Sc=!1,Tu=!1,Ml=0;function Hn(e){e!==es&&e.next===null&&(es===null?Nc=es=e:es=es.next=e),Sc=!0,ku||(ku=!0,Bg())}function ei(e,t){if(!Tu&&Sc){Tu=!0;do for(var n=!1,l=Nc;l!==null;){if(e!==0){var s=l.pendingLanes;if(s===0)var r=0;else{var d=l.suspendedLanes,p=l.pingedLanes;r=(1<<31-Rt(42|e)+1)-1,r&=s&~(d&~p),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,kh(l,r))}else r=ke,r=Zl(l,l===Ke?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||fl(l,r)||(n=!0,kh(l,r));l=l.next}while(n);Tu=!1}}function Hg(){Nh()}function Nh(){Sc=ku=!1;var e=0;Ml!==0&&Jg()&&(e=Ml);for(var t=At(),n=null,l=Nc;l!==null;){var s=l.next,r=Sh(l,t);r===0?(l.next=null,n===null?Nc=s:n.next=s,s===null&&(es=n)):(n=l,(e!==0||(r&3)!==0)&&(Sc=!0)),l=s}xt!==0&&xt!==5||ei(e),Ml!==0&&(Ml=0)}function Sh(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var d=31-Rt(r),p=1<<d,b=s[d];b===-1?((p&n)===0||(p&l)!==0)&&(s[d]=ki(p,t)):b<=t&&(e.expiredLanes|=p),r&=~p}if(t=Ke,n=ke,n=Zl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&nn(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&nn(l),wa(n)){case 2:case 8:n=Rn;break;case 32:n=ln;break;case 268435456:n=Ql;break;default:n=ln}return l=wh.bind(null,e),n=ba(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&nn(l),e.callbackPriority=2,e.callbackNode=null,2}function wh(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(jc()&&e.callbackNode!==n)return null;var l=ke;return l=Zl(e,e===Ke?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(sh(e,l,t),Sh(e,At()),e.callbackNode!=null&&e.callbackNode===n?wh.bind(null,e):null)}function kh(e,t){if(jc())return null;sh(e,t,!0)}function Bg(){Fg(function(){(Le&6)!==0?ba(vn,Hg):Nh()})}function Eu(){if(Ml===0){var e=Ba;e===0&&(e=ol,ol<<=1,(ol&261888)===0&&(ol=256)),Ml=e}return Ml}function Th(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:x(""+e)}function Eh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function qg(e,t,n,l,s){if(t==="submit"&&n&&n.stateNode===s){var r=Th((s[it]||null).action),d=l.submitter;d&&(t=(t=d[it]||null)?Th(t.formAction):d.getAttribute("formAction"),t!==null&&(r=t,d=null));var p=new Mi("action","action",null,l,s);e.push({event:p,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ml!==0){var b=d?Eh(s,d):new FormData(s);Vr(n,{pending:!0,data:b,method:s.method,action:r},null,b)}}else typeof r=="function"&&(p.preventDefault(),b=d?Eh(s,d):new FormData(s),Vr(n,{pending:!0,data:b,method:s.method,action:r},r,b))},currentTarget:s}]})}}for(var _u=0;_u<or.length;_u++){var Au=or[_u],$g=Au.toLowerCase(),Gg=Au[0].toUpperCase()+Au.slice(1);Sn($g,"on"+Gg)}Sn(lf,"onAnimationEnd"),Sn(af,"onAnimationIteration"),Sn(sf,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(ag,"onTransitionRun"),Sn(sg,"onTransitionStart"),Sn(ig,"onTransitionCancel"),Sn(cf,"onTransitionEnd"),Nn("onMouseEnter",["mouseout","mouseover"]),Nn("onMouseLeave",["mouseout","mouseover"]),Nn("onPointerEnter",["pointerout","pointerover"]),Nn("onPointerLeave",["pointerout","pointerover"]),On("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),On("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),On("onBeforeInput",["compositionend","keypress","textInput","paste"]),On("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),On("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),On("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(" "),Yg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function _h(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],s=l.event;l=l.listeners;e:{var r=void 0;if(t)for(var d=l.length-1;0<=d;d--){var p=l[d],b=p.instance,z=p.currentTarget;if(p=p.listener,b!==r&&s.isPropagationStopped())break e;r=p,s.currentTarget=z;try{r(s)}catch(L){Hi(L)}s.currentTarget=null,r=b}else for(d=0;d<l.length;d++){if(p=l[d],b=p.instance,z=p.currentTarget,p=p.listener,b!==r&&s.isPropagationStopped())break e;r=p,s.currentTarget=z;try{r(s)}catch(L){Hi(L)}s.currentTarget=null,r=b}}}}function Se(e,t){var n=t[vs];n===void 0&&(n=t[vs]=new Set);var l=e+"__bubble";n.has(l)||(Ah(t,e,2,!1),n.add(l))}function Ru(e,t,n){var l=0;t&&(l|=4),Ah(n,e,l,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function Cu(e){if(!e[wc]){e[wc]=!0,Ei.forEach(function(n){n!=="selectionchange"&&(Yg.has(n)||Ru(n,!1,e),Ru(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,Ru("selectionchange",!1,t))}}function Ah(e,t,n,l){switch(am(t)){case 2:var s=xx;break;case 8:s=vx;break;default:s=Zu}n=s.bind(null,t,n,e),s=void 0,!gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),l?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function zu(e,t,n,l,s){var r=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var d=l.tag;if(d===3||d===4){var p=l.stateNode.containerInfo;if(p===s)break;if(d===4)for(d=l.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;p!==null;){if(d=Yn(p),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){l=r=d;continue e}p=p.parentNode}}l=l.return}wt(function(){var z=r,L=ne(n),$=[];e:{var O=rf.get(e);if(O!==void 0){var D=Mi,se=e;switch(e){case"keypress":if(Oi(n)===0)break e;case"keydown":case"keyup":D=Up;break;case"focusin":se="focus",D=tr;break;case"focusout":se="blur",D=tr;break;case"beforeblur":case"afterblur":D=tr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":D=Uo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":D=wp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":D=Bp;break;case lf:case af:case sf:D=Ep;break;case cf:D=$p;break;case"scroll":case"scrollend":D=Np;break;case"wheel":D=Yp;break;case"copy":case"cut":case"paste":D=Ap;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":D=Ho;break;case"toggle":case"beforetoggle":D=Qp}var de=(t&4)!==0,Ze=!de&&(e==="scroll"||e==="scrollend"),_=de?O!==null?O+"Capture":null:O;de=[];for(var N=z,R;N!==null;){var H=N;if(R=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||R===null||_===null||(H=rt(N,_),H!=null&&de.push(ni(N,H,R))),Ze)break;N=N.return}0<de.length&&(O=new D(O,se,null,n,L),$.push({event:O,listeners:de}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",D=e==="mouseout"||e==="pointerout",O&&n!==X&&(se=n.relatedTarget||n.fromElement)&&(Yn(se)||se[hl]))break e;if((D||O)&&(O=L.window===L?L:(O=L.ownerDocument)?O.defaultView||O.parentWindow:window,D?(se=n.relatedTarget||n.toElement,D=z,se=se?Yn(se):null,se!==null&&(Ze=h(se),de=se.tag,se!==Ze||de!==5&&de!==27&&de!==6)&&(se=null)):(D=null,se=z),D!==se)){if(de=Uo,H="onMouseLeave",_="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(de=Ho,H="onPointerLeave",_="onPointerEnter",N="pointer"),Ze=D==null?O:Kl(D),R=se==null?O:Kl(se),O=new de(H,N+"leave",D,n,L),O.target=Ze,O.relatedTarget=R,H=null,Yn(L)===z&&(de=new de(_,N+"enter",se,n,L),de.target=R,de.relatedTarget=Ze,H=de),Ze=H,D&&se)t:{for(de=Xg,_=D,N=se,R=0,H=_;H;H=de(H))R++;H=0;for(var ue=N;ue;ue=de(ue))H++;for(;0<R-H;)_=de(_),R--;for(;0<H-R;)N=de(N),H--;for(;R--;){if(_===N||N!==null&&_===N.alternate){de=_;break t}_=de(_),N=de(N)}de=null}else de=null;D!==null&&Rh($,O,D,de,!1),se!==null&&Ze!==null&&Rh($,Ze,se,de,!0)}}e:{if(O=z?Kl(z):window,D=O.nodeName&&O.nodeName.toLowerCase(),D==="select"||D==="input"&&O.type==="file")var Me=Zo;else if(Xo(O))if(Vo)Me=tg;else{Me=Pp;var ie=Wp}else D=O.nodeName,!D||D.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?z&&vl(z.elementType)&&(Me=Zo):Me=eg;if(Me&&(Me=Me(e,z))){Qo($,Me,n,L);break e}ie&&ie(e,O,z),e==="focusout"&&z&&O.type==="number"&&z.memoizedProps.value!=null&&Aa(O,"number",O.value)}switch(ie=z?Kl(z):window,e){case"focusin":(Xo(ie)||ie.contentEditable==="true")&&(Ca=ie,cr=z,Cs=null);break;case"focusout":Cs=cr=Ca=null;break;case"mousedown":rr=!0;break;case"contextmenu":case"mouseup":case"dragend":rr=!1,tf($,n,L);break;case"selectionchange":if(lg)break;case"keydown":case"keyup":tf($,n,L)}var xe;if(lr)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 Ra?Go(e,n)&&(Te="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Te="onCompositionStart");Te&&(Bo&&n.locale!=="ko"&&(Ra||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&Ra&&(xe=Do()):(yl=L,Wc="value"in yl?yl.value:yl.textContent,Ra=!0)),ie=kc(z,Te),0<ie.length&&(Te=new Lo(Te,e,null,n,L),$.push({event:Te,listeners:ie}),xe?Te.data=xe:(xe=Yo(n),xe!==null&&(Te.data=xe)))),(xe=Vp?Kp(e,n):Jp(e,n))&&(Te=kc(z,"onBeforeInput"),0<Te.length&&(ie=new Lo("onBeforeInput","beforeinput",null,n,L),$.push({event:ie,listeners:Te}),ie.data=xe)),qg($,e,z,n,L)}_h($,t)})}function ni(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kc(e,t){for(var n=t+"Capture",l=[];e!==null;){var s=e,r=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=rt(e,n),s!=null&&l.unshift(ni(e,s,r)),s=rt(e,t),s!=null&&l.push(ni(e,s,r))),e.tag===3)return l;e=e.return}return[]}function Xg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rh(e,t,n,l,s){for(var r=t._reactName,d=[];n!==null&&n!==l;){var p=n,b=p.alternate,z=p.stateNode;if(p=p.tag,b!==null&&b===l)break;p!==5&&p!==26&&p!==27||z===null||(b=z,s?(z=rt(n,r),z!=null&&d.unshift(ni(n,z,b))):s||(z=rt(n,r),z!=null&&d.push(ni(n,z,b)))),n=n.return}d.length!==0&&e.push({event:t,listeners:d})}var Qg=/\r\n?/g,Zg=/\u0000|\uFFFD/g;function Ch(e){return(typeof e=="string"?e:""+e).replace(Qg,`
10
+ `).replace(Zg,"")}function zh(e,t){return t=Ch(t),Ch(e)===t}function Qe(e,t,n,l,s,r){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Vn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Vn(e,""+l);break;case"className":Il(e,"class",l);break;case"tabIndex":Il(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Il(e,n,l);break;case"style":Ns(e,l,r);break;case"data":if(t!=="object"){Il(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=x(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof r=="function"&&(n==="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(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=x(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=E);break;case"onScroll":l!=null&&Se("scroll",e);break;case"onScrollEnd":l!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=x(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Se("beforetoggle",e),Se("toggle",e),Ta(e,"popover",l);break;case"xlinkActuate":rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":rn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":rn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":rn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":rn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ta(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Ss.get(n)||n,Ta(e,n,l))}}function Ou(e,t,n,l,s,r){switch(n){case"style":Ns(e,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Vn(e,l):(typeof l=="number"||typeof l=="bigint")&&Vn(e,""+l);break;case"onScroll":l!=null&&Se("scroll",e);break;case"onScrollEnd":l!=null&&Se("scrollend",e);break;case"onClick":l!=null&&(e.onclick=E);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jn.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),r=e[it]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof l=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,s);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Ta(e,n,l)}}}function _t(e,t,n){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 l=!1,s=!1,r;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"src":l=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Qe(e,t,r,d,n,null)}}s&&Qe(e,t,"srcSet",n.srcSet,n,null),l&&Qe(e,t,"src",n.src,n,null);return;case"input":Se("invalid",e);var p=r=d=s=null,b=null,z=null;for(l in n)if(n.hasOwnProperty(l)){var L=n[l];if(L!=null)switch(l){case"name":s=L;break;case"type":d=L;break;case"checked":b=L;break;case"defaultChecked":z=L;break;case"value":r=L;break;case"defaultValue":p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:Qe(e,t,l,L,n,null)}}bs(e,r,p,b,z,d,s,!1);return;case"select":Se("invalid",e),l=d=r=null;for(s in n)if(n.hasOwnProperty(s)&&(p=n[s],p!=null))switch(s){case"value":r=p;break;case"defaultValue":d=p;break;case"multiple":l=p;default:Qe(e,t,s,p,n,null)}t=r,n=d,e.multiple=!!l,t!=null?Zn(e,!!l,t,!1):n!=null&&Zn(e,!!l,n,!0);return;case"textarea":Se("invalid",e),r=s=l=null;for(d in n)if(n.hasOwnProperty(d)&&(p=n[d],p!=null))switch(d){case"value":l=p;break;case"defaultValue":s=p;break;case"children":r=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:Qe(e,t,d,p,n,null)}Ri(e,l,s,r);return;case"option":for(b in n)n.hasOwnProperty(b)&&(l=n[b],l!=null)&&(b==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Qe(e,t,b,l,n,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(l=0;l<ti.length;l++)Se(ti[l],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 n)if(n.hasOwnProperty(z)&&(l=n[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Qe(e,t,z,l,n,null)}return;default:if(vl(t)){for(L in n)n.hasOwnProperty(L)&&(l=n[L],l!==void 0&&Ou(e,t,L,l,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(l=n[p],l!=null&&Qe(e,t,p,l,n,null))}function Vg(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,d=null,p=null,b=null,z=null,L=null;for(D in n){var $=n[D];if(n.hasOwnProperty(D)&&$!=null)switch(D){case"checked":break;case"value":break;case"defaultValue":b=$;default:l.hasOwnProperty(D)||Qe(e,t,D,null,l,$)}}for(var O in l){var D=l[O];if($=n[O],l.hasOwnProperty(O)&&(D!=null||$!=null))switch(O){case"type":r=D;break;case"name":s=D;break;case"checked":z=D;break;case"defaultChecked":L=D;break;case"value":d=D;break;case"defaultValue":p=D;break;case"children":case"dangerouslySetInnerHTML":if(D!=null)throw Error(u(137,t));break;default:D!==$&&Qe(e,t,O,D,l,$)}}ys(e,d,p,b,z,L,r,s);return;case"select":D=d=p=O=null;for(r in n)if(b=n[r],n.hasOwnProperty(r)&&b!=null)switch(r){case"value":break;case"multiple":D=b;default:l.hasOwnProperty(r)||Qe(e,t,r,null,l,b)}for(s in l)if(r=l[s],b=n[s],l.hasOwnProperty(s)&&(r!=null||b!=null))switch(s){case"value":O=r;break;case"defaultValue":p=r;break;case"multiple":d=r;default:r!==b&&Qe(e,t,s,r,l,b)}t=p,n=d,l=D,O!=null?Zn(e,!!n,O,!1):!!l!=!!n&&(t!=null?Zn(e,!!n,t,!0):Zn(e,!!n,n?[]:"",!1));return;case"textarea":D=O=null;for(p in n)if(s=n[p],n.hasOwnProperty(p)&&s!=null&&!l.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:Qe(e,t,p,null,l,s)}for(d in l)if(s=l[d],r=n[d],l.hasOwnProperty(d)&&(s!=null||r!=null))switch(d){case"value":O=s;break;case"defaultValue":D=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==r&&Qe(e,t,d,s,l,r)}js(e,O,D);return;case"option":for(var se in n)O=n[se],n.hasOwnProperty(se)&&O!=null&&!l.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Qe(e,t,se,null,l,O));for(b in l)O=l[b],D=n[b],l.hasOwnProperty(b)&&O!==D&&(O!=null||D!=null)&&(b==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":Qe(e,t,b,O,l,D));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 n)O=n[de],n.hasOwnProperty(de)&&O!=null&&!l.hasOwnProperty(de)&&Qe(e,t,de,null,l,O);for(z in l)if(O=l[z],D=n[z],l.hasOwnProperty(z)&&O!==D&&(O!=null||D!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:Qe(e,t,z,O,l,D)}return;default:if(vl(t)){for(var Ze in n)O=n[Ze],n.hasOwnProperty(Ze)&&O!==void 0&&!l.hasOwnProperty(Ze)&&Ou(e,t,Ze,void 0,l,O);for(L in l)O=l[L],D=n[L],!l.hasOwnProperty(L)||O===D||O===void 0&&D===void 0||Ou(e,t,L,O,l,D);return}}for(var _ in n)O=n[_],n.hasOwnProperty(_)&&O!=null&&!l.hasOwnProperty(_)&&Qe(e,t,_,null,l,O);for($ in l)O=l[$],D=n[$],!l.hasOwnProperty($)||O===D||O==null&&D==null||Qe(e,t,$,O,l,D)}function Oh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Kg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var s=n[l],r=s.transferSize,d=s.initiatorType,p=s.duration;if(r&&p&&Oh(d)){for(d=0,p=s.responseEnd,l+=1;l<n.length;l++){var b=n[l],z=b.startTime;if(z>p)break;var L=b.transferSize,$=b.initiatorType;L&&Oh($)&&(b=b.responseEnd,d+=L*(b<p?1:(p-z)/(b-z)))}if(--l,t+=8*(r+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 Du=null,Mu=null;function Tc(e){return e.nodeType===9?e:e.ownerDocument}function Dh(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 Mh(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 Uu(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 Lu=null;function Jg(){var e=window.event;return e&&e.type==="popstate"?e===Lu?!1:(Lu=e,!0):(Lu=null,!1)}var Uh=typeof setTimeout=="function"?setTimeout:void 0,Ig=typeof clearTimeout=="function"?clearTimeout:void 0,Lh=typeof Promise=="function"?Promise:void 0,Fg=typeof queueMicrotask=="function"?queueMicrotask:typeof Lh<"u"?function(e){return Lh.resolve(null).then(e).catch(Wg)}:Uh;function Wg(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function Hh(e,t){var n=t,l=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(s),as(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")li(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,li(n);for(var r=n.firstChild;r;){var d=r.nextSibling,p=r.nodeName;r[pl]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&r.rel.toLowerCase()==="stylesheet"||n.removeChild(r),r=d}}else n==="body"&&li(e.ownerDocument.body);n=s}while(n);as(t)}function Bh(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function Hu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hu(n),Vl(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Pg(e,t,n,l){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[pl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==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(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=pn(e.nextSibling),e===null)break}return null}function ex(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=pn(e.nextSibling),e===null))return null;return e}function qh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=pn(e.nextSibling),e===null))return null;return e}function Bu(e){return e.data==="$?"||e.data==="$~"}function qu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function tx(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function pn(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 $u=null;function $h(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return pn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Gh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Yh(e,t,n){switch(t=Tc(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function li(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vl(e)}var gn=new Map,Xh=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rl=I.d;I.d={f:nx,r:lx,D:ax,C:sx,L:ix,m:cx,X:ux,S:rx,M:ox};function nx(){var e=rl.f(),t=vc();return e||t}function lx(e){var t=Xn(e);t!==null&&t.tag===5&&t.type==="form"?cd(t):rl.r(e)}var ts=typeof document>"u"?null:document;function Qh(e,t,n){var l=ts;if(l&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),Xh.has(s)||(Xh.add(s),e={rel:e,crossOrigin:n,href:t},l.querySelector(s)===null&&(t=l.createElement("link"),_t(t,"link",e),ct(t),l.head.appendChild(t)))}}function ax(e){rl.D(e),Qh("dns-prefetch",e,null)}function sx(e,t){rl.C(e,t),Qh("preconnect",e,t)}function ix(e,t,n){rl.L(e,t,n);var l=ts;if(l&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+St(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+St(n.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var r=s;switch(t){case"style":r=ns(e);break;case"script":r=ls(e)}gn.has(r)||(e=T({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),gn.set(r,e),l.querySelector(s)!==null||t==="style"&&l.querySelector(ai(r))||t==="script"&&l.querySelector(si(r))||(t=l.createElement("link"),_t(t,"link",e),ct(t),l.head.appendChild(t)))}}function cx(e,t){rl.m(e,t);var n=ts;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(l)+'"][href="'+St(e)+'"]',r=s;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=ls(e)}if(!gn.has(r)&&(e=T({rel:"modulepreload",href:e},t),gn.set(r,e),n.querySelector(s)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(si(r)))return}l=n.createElement("link"),_t(l,"link",e),ct(l),n.head.appendChild(l)}}}function rx(e,t,n){rl.S(e,t,n);var l=ts;if(l&&e){var s=gl(l).hoistableStyles,r=ns(e);t=t||"default";var d=s.get(r);if(!d){var p={loading:0,preload:null};if(d=l.querySelector(ai(r)))p.loading=5;else{e=T({rel:"stylesheet",href:e,"data-precedence":t},n),(n=gn.get(r))&&Gu(e,n);var b=d=l.createElement("link");ct(b),_t(b,"link",e),b._p=new Promise(function(z,L){b.onload=z,b.onerror=L}),b.addEventListener("load",function(){p.loading|=1}),b.addEventListener("error",function(){p.loading|=2}),p.loading|=4,_c(d,t,l)}d={type:"stylesheet",instance:d,count:1,state:p},s.set(r,d)}}}function ux(e,t){rl.X(e,t);var n=ts;if(n&&e){var l=gl(n).hoistableScripts,s=ls(e),r=l.get(s);r||(r=n.querySelector(si(s)),r||(e=T({src:e,async:!0},t),(t=gn.get(s))&&Yu(e,t),r=n.createElement("script"),ct(r),_t(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(s,r))}}function ox(e,t){rl.M(e,t);var n=ts;if(n&&e){var l=gl(n).hoistableScripts,s=ls(e),r=l.get(s);r||(r=n.querySelector(si(s)),r||(e=T({src:e,async:!0,type:"module"},t),(t=gn.get(s))&&Yu(e,t),r=n.createElement("script"),ct(r),_t(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(s,r))}}function Zh(e,t,n,l){var s=(s=pe.current)?Ec(s):null;if(!s)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ns(n.href),n=gl(s).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=ns(n.href);var r=gl(s).hoistableStyles,d=r.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,d),(r=s.querySelector(ai(e)))&&!r._p&&(d.instance=r,d.state.loading=5),gn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},gn.set(e,n),r||fx(s,e,n,d.state))),t&&l===null)throw Error(u(528,""));return d}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ls(n),n=gl(s).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function ns(e){return'href="'+St(e)+'"'}function ai(e){return'link[rel="stylesheet"]['+e+"]"}function Vh(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function fx(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),_t(t,"link",n),ct(t),e.head.appendChild(t))}function ls(e){return'[src="'+St(e)+'"]'}function si(e){return"script[async]"+e}function Kh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+St(n.href)+'"]');if(l)return t.instance=l,ct(l),l;var s=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ct(l),_t(l,"style",s),_c(l,n.precedence,e),t.instance=l;case"stylesheet":s=ns(n.href);var r=e.querySelector(ai(s));if(r)return t.state.loading|=4,t.instance=r,ct(r),r;l=Vh(n),(s=gn.get(s))&&Gu(l,s),r=(e.ownerDocument||e).createElement("link"),ct(r);var d=r;return d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),_t(r,"link",l),t.state.loading|=4,_c(r,n.precedence,e),t.instance=r;case"script":return r=ls(n.src),(s=e.querySelector(si(r)))?(t.instance=s,ct(s),s):(l=n,(s=gn.get(r))&&(l=T({},n),Yu(l,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),_t(s,"link",l),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,_c(l,n.precedence,e));return t.instance}function _c(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=l.length?l[l.length-1]:null,r=s,d=0;d<l.length;d++){var p=l[d];if(p.dataset.precedence===t)r=p;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ac=null;function Jh(e,t,n){if(Ac===null){var l=new Map,s=Ac=new Map;s.set(n,l)}else s=Ac,l=s.get(n),l||(l=new Map,s.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var r=n[s];if(!(r[pl]||r[pt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var d=r.getAttribute(t)||"";d=e+d;var p=l.get(d);p?p.push(r):l.set(d,[r])}}return l}function Ih(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function dx(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;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 Fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function hx(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var s=ns(l.href),r=t.querySelector(ai(s));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Rc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=r,ct(r);return}r=t.ownerDocument||t,l=Vh(l),(s=gn.get(s))&&Gu(l,s),r=r.createElement("link"),ct(r);var d=r;d._p=new Promise(function(p,b){d.onload=p,d.onerror=b}),_t(r,"link",l),n.instance=r}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Rc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Xu=0;function mx(e,t){return e.stylesheets&&e.count===0&&zc(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&zc(e,e.stylesheets),e.unsuspend){var r=e.unsuspend;e.unsuspend=null,r()}},6e4+t);0<e.imgBytes&&Xu===0&&(Xu=62500*Kg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&zc(e,e.stylesheets),e.unsuspend)){var r=e.unsuspend;e.unsuspend=null,r()}},(e.imgBytes>Xu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(s)}}:null}function Rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)zc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cc=null;function zc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cc=new Map,t.forEach(px,e),Cc=null,Rc.call(e))}function px(e,t){if(!(t.state.loading&4)){var n=Cc.get(e);if(n)var l=n.get(null);else{n=new Map,Cc.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var d=s[r];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(n.set(d.dataset.precedence,d),l=d)}l&&n.set(null,l)}s=t.instance,d=s.getAttribute("data-precedence"),r=n.get(d)||l,r===l&&n.set(null,s),n.set(d,s),this.count++,l=Rc.bind(this),s.addEventListener("load",l),s.addEventListener("error",l),r?r.parentNode.insertBefore(s,r.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:re,_currentValue2:re,_threadCount:0};function gx(e,t,n,l,s,r,d,p,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=dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.hiddenUpdates=dl(null),this.identifierPrefix=l,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Wh(e,t,n,l,s,r,d,p,b,z,L,$){return e=new gx(e,t,n,d,b,z,L,$,p),t=1,r===!0&&(t|=24),r=Vt(3,null,null,t),e.current=r,r.stateNode=e,t=Sr(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:t},Er(r),e}function Ph(e){return e?(e=Da,e):Da}function em(e,t,n,l,s,r){s=Ph(s),l.context===null?l.context=s:l.pendingContext=s,l=kl(t),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=Tl(e,l,t),n!==null&&($t(n,e,t),Hs(n,e,t))}function tm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qu(e,t){tm(e,t),(e=e.alternate)&&tm(e,t)}function nm(e){if(e.tag===13||e.tag===31){var t=ea(e,67108864);t!==null&&$t(t,e,67108864),Qu(e,67108864)}}function lm(e){if(e.tag===13||e.tag===31){var t=Wt();t=gs(t);var n=ea(e,t);n!==null&&$t(n,e,t),Qu(e,t)}}var Oc=!0;function xx(e,t,n,l){var s=U.T;U.T=null;var r=I.p;try{I.p=2,Zu(e,t,n,l)}finally{I.p=r,U.T=s}}function vx(e,t,n,l){var s=U.T;U.T=null;var r=I.p;try{I.p=8,Zu(e,t,n,l)}finally{I.p=r,U.T=s}}function Zu(e,t,n,l){if(Oc){var s=Vu(l);if(s===null)zu(e,t,l,Dc,n),sm(e,l);else if(bx(s,e,t,n,l))l.stopPropagation();else if(sm(e,l),t&4&&-1<yx.indexOf(e)){for(;s!==null;){var r=Xn(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var d=Cn(r.pendingLanes);if(d!==0){var p=r;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var b=1<<31-Rt(d);p.entanglements[1]|=b,d&=~b}Hn(r),(Le&6)===0&&(gc=At()+500,ei(0))}}break;case 31:case 13:p=ea(r,2),p!==null&&$t(p,r,2),vc(),Qu(r,2)}if(r=Vu(l),r===null&&zu(e,t,l,Dc,n),r===s)break;s=r}s!==null&&l.stopPropagation()}else zu(e,t,l,null,n)}}function Vu(e){return e=ne(e),Ku(e)}var Dc=null;function Ku(e){if(Dc=null,e=Yn(e),e!==null){var t=h(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=m(t),e!==null)return e;e=null}else if(n===31){if(e=g(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dc=e,null}function am(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 vn:return 2;case Rn:return 8;case ln:case ds:return 32;case Ql:return 268435456;default:return 32}default:return 32}}var Ju=!1,Ll=null,Hl=null,Bl=null,ci=new Map,ri=new Map,ql=[],yx="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 sm(e,t){switch(e){case"focusin":case"focusout":Ll=null;break;case"dragenter":case"dragleave":Hl=null;break;case"mouseover":case"mouseout":Bl=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ri.delete(t.pointerId)}}function ui(e,t,n,l,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[s]},t!==null&&(t=Xn(t),t!==null&&nm(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function bx(e,t,n,l,s){switch(t){case"focusin":return Ll=ui(Ll,e,t,n,l,s),!0;case"dragenter":return Hl=ui(Hl,e,t,n,l,s),!0;case"mouseover":return Bl=ui(Bl,e,t,n,l,s),!0;case"pointerover":var r=s.pointerId;return ci.set(r,ui(ci.get(r)||null,e,t,n,l,s)),!0;case"gotpointercapture":return r=s.pointerId,ri.set(r,ui(ri.get(r)||null,e,t,n,l,s)),!0}return!1}function im(e){var t=Yn(e.target);if(t!==null){var n=h(t);if(n!==null){if(t=n.tag,t===13){if(t=m(n),t!==null){e.blockedOn=t,xs(e.priority,function(){lm(n)});return}}else if(t===31){if(t=g(n),t!==null){e.blockedOn=t,xs(e.priority,function(){lm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vu(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);X=l,n.target.dispatchEvent(l),X=null}else return t=Xn(n),t!==null&&nm(t),e.blockedOn=n,!1;t.shift()}return!0}function cm(e,t,n){Mc(e)&&n.delete(t)}function jx(){Ju=!1,Ll!==null&&Mc(Ll)&&(Ll=null),Hl!==null&&Mc(Hl)&&(Hl=null),Bl!==null&&Mc(Bl)&&(Bl=null),ci.forEach(cm),ri.forEach(cm)}function Uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Ju||(Ju=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,jx)))}var Lc=null;function rm(e){Lc!==e&&(Lc=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Lc===e&&(Lc=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],s=e[t+2];if(typeof l!="function"){if(Ku(l||n)===null)continue;break}var r=Xn(n);r!==null&&(e.splice(t,3),t-=3,Vr(r,{pending:!0,data:s,method:n.method,action:l},l,s))}}))}function as(e){function t(b){return Uc(b,e)}Ll!==null&&Uc(Ll,e),Hl!==null&&Uc(Hl,e),Bl!==null&&Uc(Bl,e),ci.forEach(t),ri.forEach(t);for(var n=0;n<ql.length;n++){var l=ql[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ql.length&&(n=ql[0],n.blockedOn===null);)im(n),n.blockedOn===null&&ql.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var s=n[l],r=n[l+1],d=s[it]||null;if(typeof r=="function")d||rm(n);else if(d){var p=null;if(r&&r.hasAttribute("formAction")){if(s=r,d=r[it]||null)p=d.formAction;else if(Ku(s)!==null)continue}else p=d.action;typeof p=="function"?n[l+1]=p:(n.splice(l,3),l-=3),rm(n)}}}function um(){function e(r){r.canIntercept&&r.info==="react-transition"&&r.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var r=navigation.currentEntry;r&&r.url!=null&&navigation.navigate(r.url,{state:r.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Iu(e){this._internalRoot=e}Hc.prototype.render=Iu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=Wt();em(n,l,e,t,null,null)},Hc.prototype.unmount=Iu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;em(e.current,2,null,e,null,null),vc(),t[hl]=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 n=0;n<ql.length&&t!==0&&t<ql[n].priority;n++);ql.splice(n,0,e),n===0&&im(e)}};var om=c.version;if(om!=="19.2.8")throw Error(u(527,om,"19.2.8"));I.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=v(t),e=e!==null?w(e):null,e=e===null?null:e.stateNode,e};var Nx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{an=Bc.inject(Nx),yt=Bc}catch{}}return fi.createRoot=function(e,t){if(!f(e))throw Error(u(299));var n=!1,l="",s=xd,r=vd,d=yd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Wh(e,1,!1,null,null,n,l,null,s,r,d,um),e[hl]=t.current,Cu(e),new Iu(t)},fi.hydrateRoot=function(e,t,n){if(!f(e))throw Error(u(299));var l=!1,s="",r=xd,d=vd,p=yd,b=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(b=n.formState)),t=Wh(e,1,!0,t,n??null,l,s,b,r,d,p,um),t.context=Ph(null),n=t.current,l=Wt(),l=gs(l),s=kl(l),s.callback=null,Tl(n,s,l),n=l,t.current.lanes=n,zn(t,n),Hn(t),e[hl]=t.current,Cu(e),new Hc(t)},fi.version="19.2.8",fi}var bm;function Mx(){if(bm)return Pu.exports;bm=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Pu.exports=Dx(),Pu.exports}var Ux=Mx();const Lx="modulepreload",Hx=function(i){return"/"+i},jm={},Bx=function(c,o,u){let f=Promise.resolve();if(o&&o.length>0){let y=function(v){return Promise.all(v.map(w=>Promise.resolve(w).then(T=>({status:"fulfilled",value:T}),T=>({status:"rejected",reason:T}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=m?.nonce||m?.getAttribute("nonce");f=y(o.map(v=>{if(v=Hx(v),v in jm)return;jm[v]=!0;const w=v.endsWith(".css"),T=w?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${T}`))return;const j=document.createElement("link");if(j.rel=w?"stylesheet":Lx,w||(j.as="script"),j.crossOrigin="",j.href=v,g&&j.setAttribute("nonce",g),document.head.appendChild(j),w)return new Promise((M,S)=>{j.addEventListener("load",M),j.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${v}`)))})}))}function h(m){const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=m,window.dispatchEvent(g),!g.defaultPrevented)throw m}return f.then(m=>{for(const g of m||[])g.status==="rejected"&&h(g.reason);return c().catch(h)})};function K({name:i,fill:c,className:o}){return a.jsx("span",{className:`ms material-symbols-rounded${c?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:i})}function qx(){const[i,c]=C.useState(()=>window.location.hash.slice(1)||"/");return C.useEffect(()=>{const o=()=>c(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),i}let oo="kraftwerk inspector",fo="";function tp(){document.title=fo?`${fo} — ${oo}`:oo}function $x(i){oo=i,tp()}function Nm(i){fo=i,tp()}function xn(i,c){c?.replace?window.location.replace(`#${i}`):window.location.hash=i}function Ee({href:i,...c}){return a.jsx("a",{href:`#${i}`,...c})}const np="kw-expert";let jo=(()=>{try{return localStorage.getItem(np)!=="off"}catch{return!0}})();const ho=new Set;document.documentElement.dataset.expert=jo?"on":"off";function Gx(i){jo=i,document.documentElement.dataset.expert=i?"on":"off";try{localStorage.setItem(np,i?"on":"off")}catch{}ho.forEach(c=>c())}function qn(){return C.useSyncExternalStore(i=>(ho.add(i),()=>ho.delete(i)),()=>jo)}function $e(i,c){const[o,u]=C.useState(null),f=C.useRef(i);return f.current=i,C.useEffect(()=>{let h=!0,m;const g=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&u(await y.json())}catch{}h&&(m=setTimeout(g,c?1500:6e3))};return g(),()=>{h=!1,clearTimeout(m)}},[i,c]),o}function vi(i){if(i==null)return"—";const c=Math.round(i/1e3);return c<60?`${c}s`:`${Math.floor(c/60)}m${String(c%60).padStart(2,"0")}s`}function No(i){return i==null?"—":`$${i.toFixed(2)}`}function Yc(i){return i?i>=1e3?`${(i/1e3).toFixed(1)}k`:String(i):"0"}function So(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} K`:`${(i/1024/1024).toFixed(1)} M`}function ga(i){if(!i)return"—";const c=new Date(i),o=new Date,u=c.toDateString()===o.toDateString(),f=c.toTimeString().slice(0,5);return u?f:`${c.toISOString().slice(5,10)} ${f}`}function Gc(i){if(!i)return"—";const c=Date.now()-Date.parse(i);if(c<6e4)return"just now";const o=Math.floor(c/6e4);if(o<60)return`${o}m ago`;const u=Math.floor(o/60);if(u<24)return`${u}h ago`;const f=Math.floor(u/24);return f<7?`${f}d ago`:new Date(i).toISOString().slice(5,10)}function wo({since:i}){const[,c]=C.useState(0);return C.useEffect(()=>{const o=setInterval(()=>c(u=>u+1),1e3);return()=>clearInterval(o)},[]),i?a.jsx("span",{className:"num",children:vi(Date.now()-Date.parse(i))}):null}function Kc({status:i}){return a.jsx("span",{className:`lamp ${i}`})}function Yx({status:i}){return a.jsx("span",{className:`status-word ${i}`,children:i})}function ko(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ya=ko();function lp(i){ya=i}var pa={exec:()=>null};function ss(i){let c=[];return o=>{let u=Math.max(0,Math.min(3,o-1)),f=c[u];return f||(f=i(u),c[u]=f),f}}function we(i,c=""){let o=typeof i=="string"?i:i.source,u={replace:(f,h)=>{let m=typeof h=="string"?h:h.source;return m=m.replace(Ot.caret,"$1"),o=o.replace(f,m),u},getRegex:()=>new RegExp(o,c)};return u}var Xx=((i="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+i)}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:i=>new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ss(i=>new RegExp(`^ {0,${i}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ss(i=>new RegExp(`^ {0,${i}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ss(i=>new RegExp(`^ {0,${i}}(?:\`\`\`|~~~)`)),headingBeginRegex:ss(i=>new RegExp(`^ {0,${i}}#`)),htmlBeginRegex:ss(i=>new RegExp(`^ {0,${i}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ss(i=>new RegExp(`^ {0,${i}}>`))},Qx=/^(?:[ \t]*(?:\n|$))+/,Zx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vx=/^ {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+|$)/,Kx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,To=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ap=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sp=we(ap).replace(/bull/g,To).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(),Jx=we(ap).replace(/bull/g,To).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(),Eo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ix=/^[^\n]+/,_o=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Fx=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_o).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Wx=we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,To).getRegex(),Jc="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",Ao=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Px=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",Ao).replace("tag",Jc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ip=i=>we(Eo).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",i).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Jc).getRegex(),ev=ip(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),tv=ip(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),nv=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tv).getRegex(),Ro={blockquote:nv,code:Zx,def:Fx,fences:Vx,heading:Kx,hr:yi,html:Px,lheading:sp,list:Wx,newline:Qx,paragraph:ev,table:pa,text:Ix},Sm=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",Jc).getRegex(),lv={...Ro,lheading:Jx,table:Sm,paragraph:we(Eo).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Sm).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",Jc).getRegex()},av={...Ro,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ao).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(Eo).replace("hr",yi).replace("heading",` *#{1,6} *[^
11
+ ]`).replace("lheading",sp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},sv=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iv=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cp=/^( {2,}|\\)\n(?!\s*$)/,cv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ul=/[\p{P}\p{S}]/u,rs=/[\s\p{P}\p{S}]/u,bi=/[^\s\p{P}\p{S}]/u,rv=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,rs).getRegex(),uv=/[\p{Pi}\p{Ps}"']/u,rp=/(?!~)[\p{P}\p{S}]/u,ov=/(?!~)[\s\p{P}\p{S}]/u,fv=/(?:[^\s\p{P}\p{S}]|~)/u,dv=we(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xx?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),up=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,hv=we(up,"u").replace(/punct/g,ul).getRegex(),mv=we(up,"u").replace(/punct/g,rp).getRegex(),pv=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,gv=we(pv,"u").replace(/openQuote/g,uv).replace(/punct/g,ul).getRegex(),op="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xv=we(op,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,ul).getRegex(),vv=we(op,"gu").replace(/notPunctSpace/g,fv).replace(/punctSpace/g,ov).replace(/punct/g,rp).getRegex(),yv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",bv=we(yv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,ul).getRegex(),jv=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,ul).getRegex(),Nv="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Sv=we(Nv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,ul).getRegex(),wv=we(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ul).getRegex(),kv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Tv=we(kv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,rs).replace(/punct/g,ul).getRegex(),Ev=we(/\\(punct)/,"gu").replace(/punct/g,ul).getRegex(),_v=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(),Av=we(Ao).replace("(?:-->|$)","-->").getRegex(),Rv=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",Av).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Xc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Cv=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Xc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fp=we(/^!?\[(label)\]\[(ref)\]/).replace("label",Xc).replace("ref",_o).getRegex(),dp=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",_o).getRegex(),zv=we("reflink|nolink(?!\\()","g").replace("reflink",fp).replace("nolink",dp).getRegex(),wm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Co={_backpedal:pa,anyPunctuation:Ev,autolink:_v,blockSkip:dv,br:cp,code:iv,del:pa,delLDelim:pa,delRDelim:pa,emStrongLDelim:hv,emStrongRDelimAst:xv,emStrongRDelimUnd:jv,escape:sv,link:Cv,nolink:dp,punctuation:rv,reflink:fp,reflinkSearch:zv,tag:Rv,text:cv,url:pa},Ov={...Co,emStrongLDelim:gv,emStrongRDelimAst:bv,emStrongRDelimUnd:Sv,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",Xc).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Xc).getRegex()},mo={...Co,emStrongRDelimAst:vv,emStrongLDelim:mv,delLDelim:wv,delRDelim:Tv,url:we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wm).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",wm).getRegex()},Dv={...mo,br:we(cp).replace("{2,}","*").getRegex(),text:we(mo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qc={normal:Ro,gfm:lv,pedantic:av},di={normal:Co,gfm:mo,breaks:Dv,pedantic:Ov},Mv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},km=i=>Mv[i];function Bn(i,c){if(c){if(Ot.escapeTest.test(i))return i.replace(Ot.escapeReplace,km)}else if(Ot.escapeTestNoEncode.test(i))return i.replace(Ot.escapeReplaceNoEncode,km);return i}function Tm(i){try{i=encodeURI(i).replace(Ot.percentDecode,"%")}catch{return null}return i}function Em(i,c){let o=i.replace(Ot.findPipe,(h,m,g)=>{let y=!1,v=m;for(;--v>=0&&g[v]==="\\";)y=!y;return y?"|":" |"}),u=o.split(Ot.splitPipe),f=0;if(u[0].trim()||u.shift(),u.length>0&&!u.at(-1)?.trim()&&u.pop(),c)if(u.length>c)u.splice(c);else for(;u.length<c;)u.push("");for(;f<u.length;f++)u[f]=u[f].trim().replace(Ot.slashPipe,"|");return u}function Gl(i,c,o){let u=i.length;if(u===0)return"";let f=0;for(;f<u&&i.charAt(u-f-1)===c;)f++;return i.slice(0,u-f)}function _m(i){let c=i.split(`
12
+ `),o=c.length-1;for(;o>=0&&Ot.blankLine.test(c[o]);)o--;return c.length-o<=2?i:c.slice(0,o+1).join(`
13
+ `)}function Uv(i,c){if(i.indexOf(c[1])===-1)return-1;let o=0;for(let u=0;u<i.length;u++)if(i[u]==="\\")u++;else if(i[u]===c[0])o++;else if(i[u]===c[1]&&(o--,o<0))return u;return o>0?-2:-1}function Lv(i,c=0){let o=c,u="";for(let f of i)if(f===" "){let h=4-o%4;u+=" ".repeat(h),o+=h}else u+=f,o++;return u}function Am(i,c,o,u,f){let h=c.href,m=c.title||null,g=i[1].replace(f.other.outputLinkReplace,"$1"),y=i[0].charAt(0)==="!";u.state.inLink=!0;let v=u.state.linkEmitted,w=u.state.inRawBlock;u.state.linkEmitted=!1;let T=u.inlineTokens(g),j=u.state.linkEmitted;if(u.state.linkEmitted=v,u.state.inLink=!1,!y){if(j){u.state.inRawBlock=w;return}u.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:m,text:g,tokens:T}}function Hv(i,c,o){let u=i.match(o.other.indentCodeCompensation);if(u===null)return c;let f=u[1];return c.split(`
14
+ `).map(h=>{let m=h.match(o.other.beginningSpace);if(m===null)return h;let[g]=m;return g.length>=f.length?h.slice(f.length):h}).join(`
15
+ `)}var Qc=class{options;rules;lexer;constructor(i){this.options=i||ya}space(i){let c=this.rules.block.newline.exec(i);if(c&&c[0].length>0)return{type:"space",raw:c[0]}}code(i){let c=this.rules.block.code.exec(i);if(c){let o=this.options.pedantic?c[0]:_m(c[0]),u=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:u}}}fences(i){let c=this.rules.block.fences.exec(i);if(c){let o=c[0],u=Hv(o,c[3]||"",this.rules);return{type:"code",raw:o,lang:c[2]?c[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):c[2],text:u}}}heading(i){let c=this.rules.block.heading.exec(i);if(c){let o=c[2].trim();if(this.rules.other.endingHash.test(o)){let u=Gl(o,"#");(this.options.pedantic||!u||this.rules.other.endingSpaceChar.test(u))&&(o=u.trim())}return{type:"heading",raw:Gl(c[0],`
16
+ `),depth:c[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(i){let c=this.rules.block.hr.exec(i);if(c)return{type:"hr",raw:Gl(c[0],`
17
+ `)}}blockquote(i){let c=this.rules.block.blockquote.exec(i);if(c){let o=Gl(c[0],`
18
+ `).split(`
19
+ `),u="",f="",h=[];for(;o.length>0;){let m=!1,g=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))g.push(o[y]),m=!0;else if(!m)g.push(o[y]);else break;o=o.slice(y);let v=g.join(`
20
+ `),w=v.replace(this.rules.other.blockquoteSetextReplace,`
21
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");u=u?`${u}
22
+ ${v}`:v,f=f?`${f}
23
+ ${w}`:w;let T=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(w,h,!0),this.lexer.state.top=T,o.length===0)break;let j=h.at(-1);if(j?.type==="code")break;if(j?.type==="blockquote"){let M=j,S=o.join(`
24
+ `),Q=M.raw+`
25
+ `+S.replace(this.rules.other.blockquoteSetextReplace2,""),G=this.blockquote(Q);h[h.length-1]=G,u=`${u}
26
+ ${S}`,f=f.substring(0,f.length-M.text.length)+G.text;break}else if(j?.type==="list"){let M=j,S=M.raw+`
27
+ `+o.join(`
28
+ `),Q=this.list(S);h[h.length-1]=Q,u=u.substring(0,u.length-j.raw.length)+Q.raw,f=f.substring(0,f.length-M.raw.length)+Q.raw,o=S.substring(h.at(-1).raw.length).split(`
29
+ `);continue}}return{type:"blockquote",raw:u,tokens:h,text:f}}}list(i){let c=this.rules.block.list.exec(i);if(c){let o=c[1].trim(),u=o.length>1,f={type:"list",raw:"",ordered:u,start:u?+o.slice(0,-1):"",loose:!1,items:[]};o=u?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=u?o:"[*+-]");let h=this.rules.other.listItemRegex(o),m=!1;for(;i;){let y=!1,v="",w="";if(!(c=h.exec(i))||this.rules.block.hr.test(i))break;v=c[0],i=i.substring(v.length);let T=Lv(c[2].split(`
30
+ `,1)[0],c[1].length),j=i.split(`
31
+ `,1)[0],M=!T.trim(),S=0;if(this.options.pedantic?(S=2,w=T.trimStart()):M?S=c[1].length+1:(S=T.search(this.rules.other.nonSpaceChar),S=S>4?1:S,w=T.slice(S),S+=c[1].length),M&&this.rules.other.blankLine.test(j)&&(v+=j+`
32
+ `,i=i.substring(j.length+1),y=!0),!y){let Q=this.rules.other.nextBulletRegex(S),G=this.rules.other.hrRegex(S),A=this.rules.other.fencesBeginRegex(S),ce=this.rules.other.headingBeginRegex(S),fe=this.rules.other.htmlBeginRegex(S),P=this.rules.other.blockquoteBeginRegex(S);for(;i;){let F=i.split(`
33
+ `,1)[0],Y;if(j=F,this.options.pedantic?(j=j.replace(this.rules.other.listReplaceNesting," "),Y=j):Y=j.replace(this.rules.other.tabCharGlobal," "),A.test(j)||ce.test(j)||fe.test(j)||P.test(j)||Q.test(j)||G.test(j))break;if(Y.search(this.rules.other.nonSpaceChar)>=S||!j.trim())w+=`
34
+ `+Y.slice(S);else{if(M||T.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||A.test(T)||ce.test(T)||G.test(T))break;w+=`
35
+ `+j}M=!j.trim(),v+=F+`
36
+ `,i=i.substring(F.length+1),T=Y.slice(S)}}f.loose||(m?f.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(m=!0)),f.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(w),loose:!1,text:w,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(T=>T.type==="space"),w=v.length>0&&v.some(T=>this.rules.other.anyLine.test(T.raw));f.loose=w}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 T=this.lexer.inlineQueue.length-1;T>=0;T--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[T].src)){this.lexer.inlineQueue[T].src=this.lexer.inlineQueue[T].src.replace(this.rules.other.listReplaceTask,"");break}let w=this.rules.other.listTaskCheckbox.exec(y.raw);if(w){let T={type:"checkbox",raw:w[0]+" ",checked:w[0]!=="[ ]"};y.checked=T.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=T.raw+y.tokens[0].raw,y.tokens[0].text=T.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(T)):y.tokens.unshift({type:"paragraph",raw:T.raw,text:T.raw,tokens:[T]}):y.tokens.unshift(T)}}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(i){let c=this.rules.block.html.exec(i);if(c){let o=_m(c[0]);return{type:"html",block:!0,raw:o,pre:c[1]==="pre"||c[1]==="script"||c[1]==="style",text:o}}}def(i){let c=this.rules.block.def.exec(i);if(c){let o=c[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),u=c[2]?c[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=c[3]?c[3].substring(1,c[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):c[3];return{type:"def",tag:o,raw:Gl(c[0],`
37
+ `),href:u,title:f}}}table(i){let c=this.rules.block.table.exec(i);if(!c||!this.rules.other.tableDelimiter.test(c[2]))return;let o=Em(c[1]),u=c[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=c[3]?.trim()?c[3].replace(this.rules.other.tableRowBlankLine,"").split(`
38
+ `):[],h={type:"table",raw:Gl(c[0],`
39
+ `),header:[],align:[],rows:[]};if(o.length===u.length){for(let m of u)this.rules.other.tableAlignRight.test(m)?h.align.push("right"):this.rules.other.tableAlignCenter.test(m)?h.align.push("center"):this.rules.other.tableAlignLeft.test(m)?h.align.push("left"):h.align.push(null);for(let m=0;m<o.length;m++)h.header.push({text:o[m],tokens:this.lexer.inline(o[m]),header:!0,align:h.align[m]});for(let m of f)h.rows.push(Em(m,h.header.length).map((g,y)=>({text:g,tokens:this.lexer.inline(g),header:!1,align:h.align[y]})));return h}}lheading(i){let c=this.rules.block.lheading.exec(i);if(c){let o=c[1].trim();return{type:"heading",raw:Gl(c[0],`
40
+ `),depth:c[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(i){let c=this.rules.block.paragraph.exec(i);if(c){let o=c[1].charAt(c[1].length-1)===`
41
+ `?c[1].slice(0,-1):c[1];return{type:"paragraph",raw:c[0],text:o,tokens:this.lexer.inline(o)}}}text(i){let c=this.rules.block.text.exec(i);if(c)return{type:"text",raw:c[0],text:c[0],tokens:this.lexer.inline(c[0])}}escape(i){let c=this.rules.inline.escape.exec(i);if(c)return{type:"escape",raw:c[0],text:c[1]}}tag(i){let c=this.rules.inline.tag.exec(i);if(c)return!this.lexer.state.inLink&&this.rules.other.startATag.test(c[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(c[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(c[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(c[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:c[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:c[0]}}link(i){let c=this.rules.inline.link.exec(i);if(c){let o=c[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let h=Gl(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=Uv(c[2],"()");if(h===-2)return;if(h>-1){let m=(c[0].indexOf("!")===0?5:4)+c[1].length+h;c[2]=c[2].substring(0,h),c[0]=c[0].substring(0,m).trim(),c[3]=""}}let u=c[2],f="";if(this.options.pedantic){let h=this.rules.other.pedanticHrefTitle.exec(u);h&&(u=h[1],f=h[3])}else f=c[3]?c[3].slice(1,-1):"";return u=u.trim(),this.rules.other.startAngleBracket.test(u)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?u=u.slice(1):u=u.slice(1,-1)),Am(c,{href:u&&u.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},c[0],this.lexer,this.rules)}}reflink(i,c){let o;if((o=this.rules.inline.reflink.exec(i))||(o=this.rules.inline.nolink.exec(i))){let u=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=c[u.toLowerCase()];if(!f){let h=o[0].charAt(0);return{type:"text",raw:h,text:h}}return Am(o,f,o[0],this.lexer,this.rules)}}emStrong(i,c,o=""){let u=this.rules.inline.emStrongLDelim.exec(i);if(!(!u||!u[1]&&!u[2]&&!u[3]&&!u[4]||u[4]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(u[1]||u[3])||!o||this.rules.inline.punctuation.exec(o))){let f=[...u[0]].length-1,h,m,g=f,y=0,v=u[0][0],w=o===v,T=v==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(T.lastIndex=0,c=c.slice(-1*i.length+f);(u=T.exec(c))!==null;){if(h=u[1]||u[2]||u[3]||u[4]||u[5]||u[6],!h)continue;if(m=[...h].length,u[3]||u[4]){g+=m;continue}else if(u[5]||u[6]){if(f%3&&!((f+m)%3)){y+=m;continue}if(w)break}if(g-=m,g>0)continue;m=Math.min(m,m+g+y);let j=[...u[0]][0].length,M=i.slice(0,f+u.index+j+m);if(Math.min(f,m)%2){let Q=M.slice(1,-1);return{type:"em",raw:M,text:Q,tokens:this.lexer.inlineTokens(Q)}}let S=M.slice(2,-2);return{type:"strong",raw:M,text:S,tokens:this.lexer.inlineTokens(S)}}}}codespan(i){let c=this.rules.inline.code.exec(i);if(c){let o=c[2].replace(this.rules.other.newLineCharGlobal," "),u=this.rules.other.nonSpaceChar.test(o),f=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return u&&f&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:c[0],text:o}}}br(i){let c=this.rules.inline.br.exec(i);if(c)return{type:"br",raw:c[0]}}del(i,c,o=""){let u=this.rules.inline.delLDelim.exec(i);if(u&&(!u[1]||!o||this.rules.inline.punctuation.exec(o))){let f=[...u[0]].length-1,h,m,g=f,y=this.rules.inline.delRDelim;for(y.lastIndex=0,c=c.slice(-1*i.length+f);(u=y.exec(c))!==null;){if(h=u[1]||u[2]||u[3]||u[4]||u[5]||u[6],!h||(m=[...h].length,m!==f))continue;if(u[3]||u[4]){g+=m;continue}if(g-=m,g>0)continue;m=Math.min(m,m+g);let v=[...u[0]][0].length,w=i.slice(0,f+u.index+v+m),T=w.slice(f,-f);return{type:"del",raw:w,text:T,tokens:this.lexer.inlineTokens(T)}}}}autolink(i){let c=this.rules.inline.autolink.exec(i);if(c){let o,u;return c[2]==="@"?(o=c[1],u="mailto:"+o):(o=c[1],u=o),{type:"link",raw:c[0],text:o,href:u,tokens:[{type:"text",raw:o,text:o}]}}}url(i){let c;if(c=this.rules.inline.url.exec(i)){let o,u;if(c[2]==="@")o=c[0],u="mailto:"+o;else{let f;do f=c[0],c[0]=this.rules.inline._backpedal.exec(c[0])?.[0]??"";while(f!==c[0]);o=c[0],c[1]==="www."?u="http://"+c[0]:u=c[0]}return{type:"link",raw:c[0],text:o,href:u,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(i){let c=this.rules.inline.text.exec(i);if(c){let o=this.lexer.state.inRawBlock;return{type:"text",raw:c[0],text:c[0],escaped:o}}}},_n=class po{tokens;options;state;inlineQueue;tokenizer;constructor(c){this.tokens=[],this.tokens.links=Object.create(null),this.options=c||ya,this.options.tokenizer=this.options.tokenizer||new Qc,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(c,o){return new po(o).lex(c)}static lexInline(c,o){return new po(o).inlineTokens(c)}lex(c){c=c.replace(Ot.carriageReturn,`
42
+ `),this.blockTokens(c,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let u=this.inlineQueue[o];this.inlineTokens(u.src,u.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(c,o=[],u=!1){this.tokenizer.lexer=this,this.options.pedantic&&(c=c.replace(Ot.tabCharGlobal," ").replace(Ot.spaceLine,""));let f=1/0;for(;c;){if(c.length<f)f=c.length;else{this.infiniteLoopError(c.charCodeAt(0));break}let h;if(this.options.extensions?.block?.some(g=>(h=g.call({lexer:this},c,o))?(c=c.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(c)){c=c.substring(h.raw.length);let g=o.at(-1);h.raw.length===1&&g!==void 0?g.raw+=`
43
+ `:o.push(h);continue}if(h=this.tokenizer.code(c)){c=c.substring(h.raw.length);let g=o.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
44
+ `)?"":`
45
+ `)+h.raw,g.text+=`
46
+ `+h.text,this.inlineQueue.at(-1).src=g.text):o.push(h);continue}if(h=this.tokenizer.fences(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(c)){c=c.substring(h.raw.length);let g=o.at(-1);g?.type==="paragraph"||g?.type==="text"?(g.raw+=(g.raw.endsWith(`
47
+ `)?"":`
48
+ `)+h.raw,g.text+=`
49
+ `+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(c)){c=c.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(c)){c=c.substring(h.raw.length),o.push(h);continue}let m=c;if(this.options.extensions?.startBlock){let g=1/0,y=c.slice(1),v;this.options.extensions.startBlock.forEach(w=>{v=w.call({lexer:this},y),typeof v=="number"&&v>=0&&(g=Math.min(g,v))}),g<1/0&&g>=0&&(m=c.substring(0,g+1))}if(this.state.top&&(h=this.tokenizer.paragraph(m))){let g=o.at(-1);u&&g?.type==="paragraph"?(g.raw+=(g.raw.endsWith(`
50
+ `)?"":`
51
+ `)+h.raw,g.text+=`
52
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):o.push(h),u=m.length!==c.length,c=c.substring(h.raw.length);continue}if(h=this.tokenizer.text(c)){c=c.substring(h.raw.length);let g=o.at(-1);g?.type==="text"?(g.raw+=(g.raw.endsWith(`
53
+ `)?"":`
54
+ `)+h.raw,g.text+=`
55
+ `+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=g.text):o.push(h);continue}if(c){this.infiniteLoopError(c.charCodeAt(0));break}}return this.state.top=!0,o}inline(c,o=[]){return this.inlineQueue.push({src:c,tokens:o}),o}linkInText(c){if(!c.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let u of c.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(u[0])&&c.charAt(u.index-1)!=="!")return!0;for(let u of c.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let f=u[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(c,o=[]){this.tokenizer.lexer=this;let u=c;if(this.tokens.links&&c.includes("[")){let g=this.tokenizer.rules.inline.reflinkSearch,y=v=>{let w=v.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,v.slice(w+1,-1)))return v;if(w>1&&v.charAt(0)!=="!"){let T=v.slice(1,w-1);if(this.linkInText(T))return"["+T.replace(g,y)+"]["+"a".repeat(v.length-w-2)+"]"}return"["+"a".repeat(v.length-2)+"]"};u=u.replace(g,y)}u=u.replace(this.tokenizer.rules.inline.anyPunctuation,g=>"+".repeat(g.length)),u=u.replace(this.tokenizer.rules.inline.blockSkip,(g,y,v)=>{let w=v?v.length:0;return g.slice(0,w)+"["+"a".repeat(g.length-w-2)+"]"}),u=this.options.hooks?.emStrongMask?.call({lexer:this},u)??u;let f=!1,h="",m=1/0;for(;c;){if(c.length<m)m=c.length;else{this.infiniteLoopError(c.charCodeAt(0));break}f||(h=""),f=!1;let g;if(this.options.extensions?.inline?.some(v=>(g=v.call({lexer:this},c,o))?(c=c.substring(g.raw.length),o.push(g),!0):!1))continue;if(g=this.tokenizer.escape(c)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.tag(c)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.link(c)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.reflink(c,this.tokens.links)){c=c.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(c,u,h)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.codespan(c)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.br(c)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.del(c,u,h)){c=c.substring(g.raw.length),o.push(g);continue}if(g=this.tokenizer.autolink(c)){c=c.substring(g.raw.length),o.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(c))){c=c.substring(g.raw.length),o.push(g);continue}let y=c;if(this.options.extensions?.startInline){let v=1/0,w=c.slice(1),T;this.options.extensions.startInline.forEach(j=>{T=j.call({lexer:this},w),typeof T=="number"&&T>=0&&(v=Math.min(v,T))}),v<1/0&&v>=0&&(y=c.substring(0,v+1))}if(g=this.tokenizer.inlineText(y)){c=c.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(c){this.infiniteLoopError(c.charCodeAt(0));break}}return o}infiniteLoopError(c){let o="Infinite loop on byte: "+c;if(this.options.silent)console.error(o);else throw new Error(o)}},Zc=class{options;parser;constructor(i){this.options=i||ya}space(i){return""}code({text:i,lang:c,escaped:o}){let u=(c||"").match(Ot.notSpaceStart)?.[0],f=i.replace(Ot.endingNewline,"")+`
56
+ `;return u?'<pre><code class="language-'+Bn(u)+'">'+(o?f:Bn(f,!0))+`</code></pre>
57
+ `:"<pre><code>"+(o?f:Bn(f,!0))+`</code></pre>
58
+ `}blockquote({tokens:i}){return`<blockquote>
59
+ ${this.parser.parse(i)}</blockquote>
60
+ `}html({text:i}){return i}def(i){return""}heading({tokens:i,depth:c}){return`<h${c}>${this.parser.parseInline(i)}</h${c}>
61
+ `}hr(i){return`<hr>
62
+ `}list(i){let c=i.ordered,o=i.start,u="";for(let m=0;m<i.items.length;m++){let g=i.items[m];u+=this.listitem(g)}let f=c?"ol":"ul",h=c&&o!==1?' start="'+o+'"':"";return"<"+f+h+`>
63
+ `+u+"</"+f+`>
64
+ `}listitem(i){return`<li>${this.parser.parse(i.tokens)}</li>
65
+ `}checkbox({checked:i}){return"<input "+(i?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:i}){return`<p>${this.parser.parseInline(i)}</p>
66
+ `}table(i){let c="",o="";for(let f=0;f<i.header.length;f++)o+=this.tablecell(i.header[f]);c+=this.tablerow({text:o});let u="";for(let f=0;f<i.rows.length;f++){let h=i.rows[f];o="";for(let m=0;m<h.length;m++)o+=this.tablecell(h[m]);u+=this.tablerow({text:o})}return u&&(u=`<tbody>${u}</tbody>`),`<table>
67
+ <thead>
68
+ `+c+`</thead>
69
+ `+u+`</table>
70
+ `}tablerow({text:i}){return`<tr>
71
+ ${i}</tr>
72
+ `}tablecell(i){let c=this.parser.parseInline(i.tokens),o=i.header?"th":"td";return(i.align?`<${o} align="${i.align}">`:`<${o}>`)+c+`</${o}>
73
+ `}strong({tokens:i}){return`<strong>${this.parser.parseInline(i)}</strong>`}em({tokens:i}){return`<em>${this.parser.parseInline(i)}</em>`}codespan({text:i}){return`<code>${Bn(i,!0)}</code>`}br(i){return"<br>"}del({tokens:i}){return`<del>${this.parser.parseInline(i)}</del>`}link({href:i,title:c,tokens:o}){let u=this.parser.parseInline(o),f=Tm(i);if(f===null)return u;i=f;let h='<a href="'+i+'"';return c&&(h+=' title="'+Bn(c)+'"'),h+=">"+u+"</a>",h}image({href:i,title:c,text:o,tokens:u}){u&&(o=this.parser.parseInline(u,this.parser.textRenderer));let f=Tm(i);if(f===null)return Bn(o);i=f;let h=`<img src="${i}" alt="${Bn(o)}"`;return c&&(h+=` title="${Bn(c)}"`),h+=">",h}text(i){return"tokens"in i&&i.tokens?this.parser.parseInline(i.tokens):"escaped"in i&&i.escaped?i.text:Bn(i.text)}},zo=class{strong({text:i}){return i}em({text:i}){return i}codespan({text:i}){return i}del({text:i}){return i}html({text:i}){return i}text({text:i}){return i}link({text:i}){return""+i}image({text:i}){return""+i}br(){return""}checkbox({raw:i}){return i}},An=class go{options;renderer;textRenderer;constructor(c){this.options=c||ya,this.options.renderer=this.options.renderer||new Zc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new zo}static parse(c,o){return new go(o).parse(c)}static parseInline(c,o){return new go(o).parseInline(c)}parse(c){this.renderer.parser=this;let o="";for(let u=0;u<c.length;u++){let f=c[u];if(this.options.extensions?.renderers?.[f.type]){let m=f,g=this.options.extensions.renderers[m.type].call({parser:this},m);if(g!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(m.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 m='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return o}parseInline(c,o=this.renderer){this.renderer.parser=this;let u="";for(let f=0;f<c.length;f++){let h=c[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)){u+=g||"";continue}}let m=h;switch(m.type){case"escape":{u+=o.text(m);break}case"html":{u+=o.html(m);break}case"link":{u+=o.link(m);break}case"image":{u+=o.image(m);break}case"checkbox":{u+=o.checkbox(m);break}case"strong":{u+=o.strong(m);break}case"em":{u+=o.em(m);break}case"codespan":{u+=o.codespan(m);break}case"br":{u+=o.br(m);break}case"del":{u+=o.del(m);break}case"text":{u+=o.text(m);break}default:{let g='Token with "'+m.type+'" type was not found.';if(this.options.silent)return console.error(g),"";throw new Error(g)}}}return u}},gi=class{options;block;constructor(i){this.options=i||ya}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}emStrongMask(i){return i}provideLexer(i=this.block){return i?_n.lex:_n.lexInline}provideParser(i=this.block){return i?An.parse:An.parseInline}},Bv=class{defaults=ko();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=An;Renderer=Zc;TextRenderer=zo;Lexer=_n;Tokenizer=Qc;Hooks=gi;constructor(...i){this.use(...i)}walkTokens(i,c){let o=[];for(let u of i)switch(o=o.concat(c.call(this,u)),u.type){case"table":{let f=u;for(let h of f.header)o=o.concat(this.walkTokens(h.tokens,c));for(let h of f.rows)for(let m of h)o=o.concat(this.walkTokens(m.tokens,c));break}case"list":{let f=u;o=o.concat(this.walkTokens(f.items,c));break}default:{let f=u;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let m=f[h].flat(1/0);o=o.concat(this.walkTokens(m,c))}):f.tokens&&(o=o.concat(this.walkTokens(f.tokens,c)))}}return o}use(...i){let c=this.defaults.extensions||{renderers:{},childTokens:{}};return i.forEach(o=>{let u={...o};if(u.async=this.defaults.async||u.async||!1,o.extensions&&(o.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let h=c.renderers[f.name];h?c.renderers[f.name]=function(...m){let g=f.renderer.apply(this,m);return g===!1&&(g=h.apply(this,m)),g}:c.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=c[f.level];h?h.unshift(f.tokenizer):c[f.level]=[f.tokenizer],f.start&&(f.level==="block"?c.startBlock?c.startBlock.push(f.start):c.startBlock=[f.start]:f.level==="inline"&&(c.startInline?c.startInline.push(f.start):c.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(c.childTokens[f.name]=f.childTokens)}),u.extensions=c),o.renderer){let f=this.defaults.renderer||new Zc(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 m=h,g=o.renderer[m],y=f[m];f[m]=(...v)=>{let w=g.apply(f,v);return w===!1&&(w=y.apply(f,v)),w||""}}u.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new Qc(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 m=h,g=o.tokenizer[m],y=f[m];f[m]=(...v)=>{let w=g.apply(f,v);return w===!1&&(w=y.apply(f,v)),w}}u.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 m=h,g=o.hooks[m],y=f[m];gi.passThroughHooks.has(h)?f[m]=v=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(h))return(async()=>{let T=await g.call(f,v);return y.call(f,T)})();let w=g.call(f,v);return y.call(f,w)}:f[m]=(...v)=>{if(this.defaults.async)return(async()=>{let T=await g.apply(f,v);return T===!1&&(T=await y.apply(f,v)),T})();let w=g.apply(f,v);return w===!1&&(w=y.apply(f,v)),w}}u.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;u.walkTokens=function(m){let g=[];return g.push(h.call(this,m)),f&&(g=g.concat(f.call(this,m))),g}}this.defaults={...this.defaults,...u}}),this}setOptions(i){return this.defaults={...this.defaults,...i},this}lexer(i,c){return _n.lex(i,c??this.defaults)}parser(i,c){return An.parse(i,c??this.defaults)}parseMarkdown(i){return(c,o)=>{let u={...o},f={...this.defaults,...u},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&u.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 c>"u"||c===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof c!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(c)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=i),f.async)return(async()=>{let m=f.hooks?await f.hooks.preprocess(c):c,g=await(f.hooks?await f.hooks.provideLexer(i):i?_n.lex:_n.lexInline)(m,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(i):i?An.parse:An.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(v):v})().catch(h);try{f.hooks&&(c=f.hooks.preprocess(c));let m=(f.hooks?f.hooks.provideLexer(i):i?_n.lex:_n.lexInline)(c,f);f.hooks&&(m=f.hooks.processAllTokens(m)),f.walkTokens&&this.walkTokens(m,f.walkTokens);let g=(f.hooks?f.hooks.provideParser(i):i?An.parse:An.parseInline)(m,f);return f.hooks&&(g=f.hooks.postprocess(g)),g}catch(m){return h(m)}}}onError(i,c){return o=>{if(o.message+=`
74
+ Please report this to https://github.com/markedjs/marked.`,i){let u="<p>An error occurred:</p><pre>"+Bn(o.message+"",!0)+"</pre>";return c?Promise.resolve(u):u}if(c)return Promise.reject(o);throw o}}},xa=new Bv;function ze(i,c){return xa.parse(i,c)}ze.options=ze.setOptions=function(i){return xa.setOptions(i),ze.defaults=xa.defaults,lp(ze.defaults),ze};ze.getDefaults=ko;ze.defaults=ya;function qv(...i){return xa.use(...i),ze.defaults=xa.defaults,lp(ze.defaults),ze}ze.use=qv;ze.walkTokens=function(i,c){return xa.walkTokens(i,c)};ze.parseInline=xa.parseInline;ze.Parser=An;ze.parser=An.parse;ze.Renderer=Zc;ze.TextRenderer=zo;ze.Lexer=_n;ze.lexer=_n.lex;ze.Tokenizer=Qc;ze.Hooks=gi;ze.parse=ze;ze.options;ze.setOptions;ze.walkTokens;ze.parseInline;An.parse;_n.lex;function Rm(i,c){(c==null||c>i.length)&&(c=i.length);for(var o=0,u=Array(c);o<c;o++)u[o]=i[o];return u}function $v(i){if(Array.isArray(i))return i}function Gv(i,c){var o=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(o!=null){var u,f,h,m,g=[],y=!0,v=!1;try{if(h=(o=o.call(i)).next,c!==0)for(;!(y=(u=h.call(o)).done)&&(g.push(u.value),g.length!==c);y=!0);}catch(w){v=!0,f=w}finally{try{if(!y&&o.return!=null&&(m=o.return(),Object(m)!==m))return}finally{if(v)throw f}}return g}}function Yv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
75
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xv(i,c){return $v(i)||Gv(i,c)||Qv(i,c)||Yv()}function Qv(i,c){if(i){if(typeof i=="string")return Rm(i,c);var o={}.toString.call(i).slice(8,-1);return o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set"?Array.from(i):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Rm(i,c):void 0}}const hp=Object.entries,Cm=Object.setPrototypeOf,Zv=Object.isFrozen,Vv=Object.getPrototypeOf,Kv=Object.getOwnPropertyDescriptor;let vt=Object.freeze,jt=Object.seal,is=Object.create,mp=typeof Reflect<"u"&&Reflect,xo=mp.apply,vo=mp.construct;vt||(vt=function(c){return c});jt||(jt=function(c){return c});xo||(xo=function(c,o){for(var u=arguments.length,f=new Array(u>2?u-2:0),h=2;h<u;h++)f[h-2]=arguments[h];return c.apply(o,f)});vo||(vo=function(c){for(var o=arguments.length,u=new Array(o>1?o-1:0),f=1;f<o;f++)u[f-1]=arguments[f];return new c(...u)});const ma=ht(Array.prototype.forEach),Jv=ht(Array.prototype.lastIndexOf),zm=ht(Array.prototype.pop),hi=ht(Array.prototype.push),Iv=ht(Array.prototype.splice),cs=Array.isArray,xi=ht(String.prototype.toLowerCase),lo=ht(String.prototype.toString),Om=ht(String.prototype.match),mi=ht(String.prototype.replace),Dm=ht(String.prototype.indexOf),Fv=ht(String.prototype.trim),Wv=ht(Number.prototype.toString),Pv=ht(Boolean.prototype.toString),Mm=typeof BigInt>"u"?null:ht(BigInt.prototype.toString),Um=typeof Symbol>"u"?null:ht(Symbol.prototype.toString),Gt=ht(Object.prototype.hasOwnProperty),pi=ht(Object.prototype.toString),zt=ht(RegExp.prototype.test),ha=ey(TypeError);function ht(i){return function(c){c instanceof RegExp&&(c.lastIndex=0);for(var o=arguments.length,u=new Array(o>1?o-1:0),f=1;f<o;f++)u[f-1]=arguments[f];return xo(i,c,u)}}function ey(i){return function(){for(var c=arguments.length,o=new Array(c),u=0;u<c;u++)o[u]=arguments[u];return vo(i,o)}}function De(i,c){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi;if(Cm&&Cm(i,null),!cs(c))return i;let u=c.length;for(;u--;){let f=c[u];if(typeof f=="string"){const h=o(f);h!==f&&(Zv(c)||(c[u]=h),f=h)}i[f]=!0}return i}function ty(i){for(let c=0;c<i.length;c++)Gt(i,c)||(i[c]=null);return i}function en(i){const c=is(null);for(const u of hp(i)){var o=Xv(u,2);const f=o[0],h=o[1];Gt(i,f)&&(cs(h)?c[f]=ty(h):h&&typeof h=="object"&&h.constructor===Object?c[f]=en(h):c[f]=h)}return c}function ny(i){switch(typeof i){case"string":return i;case"number":return Wv(i);case"boolean":return Pv(i);case"bigint":return Mm?Mm(i):"0";case"symbol":return Um?Um(i):"Symbol()";case"undefined":return pi(i);case"function":case"object":{if(i===null)return pi(i);const c=i,o=Tn(c,"toString");if(typeof o=="function"){const u=o(c);return typeof u=="string"?u:pi(u)}return pi(i)}default:return pi(i)}}function Tn(i,c){for(;i!==null;){const u=Kv(i,c);if(u){if(u.get)return ht(u.get);if(typeof u.value=="function")return ht(u.value)}i=Vv(i)}function o(){return null}return o}function ly(i){try{return zt(i,""),!0}catch{return!1}}const Lm=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"]),ao=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"]),so=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"]),ay=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"]),io=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"]),sy=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Hm=vt(["#text"]),Bm=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"]),co=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"]),qm=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"]),iy=jt(/{{[\w\W]*|^[\w\W]*}}/g),cy=jt(/<%[\w\W]*|^[\w\W]*%>/g),ry=jt(/\${[\w\W]*/g),uy=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),oy=jt(/^aria-[\-\w]+$/),$m=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),fy=jt(/^(?:\w+script|data):/i),dy=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),hy=jt(/^html$/i),my=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Gm=jt(/<[/\w!]/g),Ym=jt(/<[/\w]/g),py=jt(/<\/no(script|embed|frames)/i),gy=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},pp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],xy=vt(De({},pp)),vy=(function(){const i={};return ma(pp,c=>{i[c]=jt(new RegExp("</"+c+"(?=[\\t\\n\\f\\r />])","i"))}),vt(i)})(),yy=function(){return typeof window>"u"?null:window},by=function(c,o){if(typeof c!="object"||typeof c.createPolicy!="function")return null;let u=null;const f="data-tt-policy-suffix";o&&o.hasAttribute(f)&&(u=o.getAttribute(f));const h="dompurify"+(u?"#"+u:"");try{return c.createPolicy(h,{createHTML(m){return m},createScriptURL(m){return m}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},Xm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Yl=function(c,o,u,f){return Gt(c,o)&&cs(c[o])?De(f.base?en(f.base):{},c[o],f.transform):u},ro=function(c,o,u){const f=Gt(c,o)?c[o]:void 0;return f&&typeof f=="object"?en(f):u()};function gp(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yy();const c=Z=>gp(Z);if(c.version="3.4.14",c.removed=[],!i||!i.document||i.document.nodeType!==Pt.document||!i.Element)return c.isSupported=!1,c;let o=i.document;const u=o,f=u.currentScript;i.DocumentFragment;const h=i.HTMLTemplateElement,m=i.Node,g=i.Element,y=i.NodeFilter,v=i.NamedNodeMap;v===void 0&&(i.NamedNodeMap||i.MozNamedAttrMap),i.HTMLFormElement;const w=i.DOMParser,T=i.trustedTypes,j=g.prototype,M=Tn(j,"cloneNode"),S=Tn(j,"remove"),Q=Tn(j,"nextSibling"),G=Tn(j,"childNodes"),A=Tn(j,"parentNode"),ce=Tn(j,"shadowRoot"),fe=Tn(j,"attributes"),P=m&&m.prototype?Tn(m.prototype,"nodeType"):null,F=m&&m.prototype?Tn(m.prototype,"nodeName"):null,Y=m&&m.prototype?Tn(m.prototype,"ownerDocument"):null,J=function(x){return P?P(x):x.nodeType},ee=function(x){return F?F(x):x.nodeName};if(typeof h=="function"){const Z=o.createElement("template");Z.content&&Z.content.ownerDocument&&(o=Z.content.ownerDocument)}let le,je="",be,te=!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.')},lt=function(x){Je(),ve++;try{return le.createHTML(x)}finally{ve--}},U=function(x){Je(),ve++;try{return le.createScriptURL(x)}finally{ve--}},I=function(){return te||(be=by(T,f),te=!0),be},re=o,Re=re.implementation,ye=re.createNodeIterator,k=re.createDocumentFragment,q=re.getElementsByTagName,W=u.importNode;let V=Xm();c.isSupported=typeof hp=="function"&&typeof A=="function"&&Re&&Re.createHTMLDocument!==void 0;const he=iy,pe=cy,_e=ry,mt=uy,B=oy,Ce=fy,Ge=dy,We=my;let tn=$m,Oe=null;const Xl=De({},[...Lm,...ao,...so,...io,...Hm]);let Ye=null;const os=De({},[...Bm,...co,...qm,...$c]);let Yt=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}})),$n=null,ba=null;const nn=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,At=!1,Ni=!0,vn=!1,Rn=!0,ln=!1,ds=!1,Ql=null,ja=null,hs=!1,an=!1,yt=!1,Xt=!1,Rt=!0,Si=!1;const wi="user-content-";let ms=!0,ol=!1,yn={},bn=null;const Cn=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 Zl=null;const fl=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"]),dl="http://www.w3.org/1998/Math/MathML",zn="http://www.w3.org/2000/svg",sn="http://www.w3.org/1999/xhtml";let Gn=sn,Na=!1,Sa=null;const gs=De({},[dl,zn,sn],lo),wa=vt(["mi","mo","mn","ms","mtext"]);let ka=De({},wa);const xs=vt(["annotation-xml"]);let cn=De({},xs);const pt=De({},["title","style","font","a","script"]);let it=null;const hl=["application/xhtml+xml","text/html"],vs="text/html";let et=null,ml=null;const Ti=o.createElement("form"),pl=function(x){return x instanceof RegExp||x instanceof Function},Vl=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ml&&ml===x)return;(!x||typeof x!="object")&&(x={}),x=en(x),it=hl.indexOf(x.PARSER_MEDIA_TYPE)===-1?vs:x.PARSER_MEDIA_TYPE,et=it==="application/xhtml+xml"?lo:xi,Oe=Yl(x,"ALLOWED_TAGS",Xl,{transform:et}),Ye=Yl(x,"ALLOWED_ATTR",os,{transform:et}),Sa=Yl(x,"ALLOWED_NAMESPACES",gs,{transform:lo}),ki=Yl(x,"ADD_URI_SAFE_ATTR",ps,{transform:et,base:ps}),Zl=Yl(x,"ADD_DATA_URI_TAGS",fl,{transform:et,base:fl}),bn=Yl(x,"FORBID_CONTENTS",Cn,{transform:et}),$n=Yl(x,"FORBID_TAGS",en({}),{transform:et}),ba=Yl(x,"FORBID_ATTR",en({}),{transform:et}),yn=Gt(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?en(x.USE_PROFILES):x.USE_PROFILES:!1,ji=x.ALLOW_ARIA_ATTR!==!1,fs=x.ALLOW_DATA_ATTR!==!1,At=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Ni=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,vn=x.SAFE_FOR_TEMPLATES||!1,Rn=x.SAFE_FOR_XML!==!1,ln=x.WHOLE_DOCUMENT||!1,an=x.RETURN_DOM||!1,yt=x.RETURN_DOM_FRAGMENT||!1,Xt=x.RETURN_TRUSTED_TYPE||!1,hs=x.FORCE_BODY||!1,Rt=x.SANITIZE_DOM!==!1,Si=x.SANITIZE_NAMED_PROPS||!1,ms=x.KEEP_CONTENT!==!1,ol=x.IN_PLACE||!1,tn=ly(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:$m,Gn=typeof x.NAMESPACE=="string"?x.NAMESPACE:sn,ka=ro(x,"MATHML_TEXT_INTEGRATION_POINTS",()=>De({},wa)),cn=ro(x,"HTML_INTEGRATION_POINTS",()=>De({},xs));const E=ro(x,"CUSTOM_ELEMENT_HANDLING",()=>is(null));if(Yt=is(null),Gt(E,"tagNameCheck")&&pl(E.tagNameCheck)&&(Yt.tagNameCheck=E.tagNameCheck),Gt(E,"attributeNameCheck")&&pl(E.attributeNameCheck)&&(Yt.attributeNameCheck=E.attributeNameCheck),Gt(E,"allowCustomizedBuiltInElements")&&typeof E.allowCustomizedBuiltInElements=="boolean"&&(Yt.allowCustomizedBuiltInElements=E.allowCustomizedBuiltInElements),jt(Yt),vn&&(fs=!1),yt&&(an=!0),yn&&(Oe=De({},Hm),Ye=is(null),yn.html===!0&&(De(Oe,Lm),De(Ye,Bm)),yn.svg===!0&&(De(Oe,ao),De(Ye,co),De(Ye,$c)),yn.svgFilters===!0&&(De(Oe,so),De(Ye,co),De(Ye,$c)),yn.mathMl===!0&&(De(Oe,io),De(Ye,qm),De(Ye,$c))),nn.tagCheck=null,nn.attributeCheck=null,Gt(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?nn.tagCheck=x.ADD_TAGS:cs(x.ADD_TAGS)&&(Oe===Xl&&(Oe=en(Oe)),De(Oe,x.ADD_TAGS,et))),Gt(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?nn.attributeCheck=x.ADD_ATTR:cs(x.ADD_ATTR)&&(Ye===os&&(Ye=en(Ye)),De(Ye,x.ADD_ATTR,et))),Gt(x,"ADD_FORBID_CONTENTS")&&cs(x.ADD_FORBID_CONTENTS)&&(bn===Cn&&(bn=en(bn)),De(bn,x.ADD_FORBID_CONTENTS,et)),ms&&(Oe["#text"]=!0),ln&&De(Oe,["html","head","body"]),Oe.table&&(De(Oe,["tbody"]),delete $n.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 X=le;le=x.TRUSTED_TYPES_POLICY;try{je=lt("")}catch(ne){throw le=X,ne}}else x.TRUSTED_TYPES_POLICY===null?(le=void 0,je=""):(le===void 0&&(le=I()),le&&typeof je=="string"&&(je=lt("")));vt&&vt(x),ml=x},Yn=De({},[...ao,...so,...ay]),Xn=De({},[...io,...sy]),Kl=function(x,E,X){return E.namespaceURI===sn?x==="svg":E.namespaceURI===dl?x==="svg"&&(X==="annotation-xml"||ka[X]):!!Yn[x]},gl=function(x,E,X){return E.namespaceURI===sn?x==="math":E.namespaceURI===zn?x==="math"&&cn[X]:!!Xn[x]},ct=function(x,E,X){return E.namespaceURI===zn&&!cn[X]||E.namespaceURI===dl&&!ka[X]?!1:!Xn[x]&&(pt[x]||!Yn[x])},Ei=function(x){let E=A(x);(!E||!E.tagName)&&(E={namespaceURI:Gn,tagName:"template"});const X=xi(x.tagName),ne=xi(E.tagName);return Sa[x.namespaceURI]?x.namespaceURI===zn?Kl(X,E,ne):x.namespaceURI===dl?gl(X,E,ne):x.namespaceURI===sn?ct(X,E,ne):!!(it==="application/xhtml+xml"&&Sa[x.namespaceURI]):!1},jn=function(x){hi(c.removed,{element:x});try{A(x).removeChild(x)}catch{if(S(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")}},On=function(x,E,X){try{x.removeAttributeNode(E)}catch{try{x.removeAttribute(X)}catch{}}},Nn=function(x){Jl(x);const E=G(x);if(E){const ne=[];ma(E,ae=>{hi(ne,ae)}),ma(ne,ae=>{try{S(ae)}catch{}})}const X=fe(x);if(X)for(let ne=X.length-1;ne>=0;--ne){const ae=X[ne],oe=ae&&ae.name;typeof oe=="string"&&On(x,ae,oe)}},Qn=function(x,E,X){if(!X)try{X=E.getAttributeNode(x)}catch{X=null}hi(c.removed,{attribute:X||null,from:E});try{X?E.removeAttributeNode(X):E.removeAttribute(x)}catch{try{E.removeAttribute(x)}catch{}}if(x==="is")if(an||yt)try{jn(E)}catch{}else try{E.setAttribute(x,"")}catch{}},_i=function(x){const E=fe(x);if(E)for(let X=E.length-1;X>=0;--X){const ne=E[X],ae=ne&&ne.name;typeof ae!="string"||Ye[et(ae)]||On(x,ne,ae)}},Jl=function(x){const E=[x];for(;E.length>0;){const X=E.pop();J(X)===Pt.element&&_i(X);const ae=G(X);if(ae)for(let oe=ae.length-1;oe>=0;--oe)E.push(ae[oe])}},Ai=function(x,E){return Rn?x==="patchsrc"?!0:x==="for"&&E!=="label"&&E!=="output":!1},Ta=function(x){if(!Rn)return;const E=[x];for(;E.length>0;){const X=E.pop(),ne=J(X);if(ne===Pt.processingInstruction||ne===Pt.comment&&zt(Ym,X.data)){try{S(X)}catch{}continue}if(ne===Pt.element){const oe=X,He=et(ee(X));try{oe.hasAttribute&&oe.hasAttribute("patchsrc")&&oe.removeAttribute("patchsrc"),oe.hasAttribute&&oe.hasAttribute("for")&&Ai("for",He)&&oe.removeAttribute("for")}catch{}}const ae=G(X);if(ae)for(let oe=ae.length-1;oe>=0;--oe)E.push(ae[oe])}},Il=function(x){let E=null,X=null;if(hs)x="<remove></remove>"+x;else{const oe=Om(x,/^[\r\n\t ]+/);X=oe&&oe[0]}it==="application/xhtml+xml"&&Gn===sn&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");const ne=le?lt(x):x;if(Gn===sn)try{E=new w().parseFromString(ne,it)}catch{}if(!E||!E.documentElement){E=Re.createDocument(Gn,"template",null);try{E.documentElement.innerHTML=Na?je:ne}catch{}}const ae=E.body||E.documentElement;return x&&X&&ae.insertBefore(o.createTextNode(X),ae.childNodes[0]||null),Gn===sn?q.call(E,ln?"html":"body")[0]:ln?E.documentElement:ae},rn=function(x){const E=Y?Y(x):x.ownerDocument;return ye.call(E||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,_e," "),x},Ea=function(x){var E;x.normalize();const X=Y?Y(x):x.ownerDocument,ne=ye.call(X||x,x,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ae=ne.nextNode();for(;ae;)ae.data=Nt(ae.data),ae=ne.nextNode();const oe=(E=x.querySelectorAll)===null||E===void 0?void 0:E.call(x,"template");oe&&ma(oe,He=>{Dn(He.content)&&Ea(He.content)})},_a=function(x){const E=F?F(x):null;return typeof E!="string"||et(E)!=="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!==P(x)||x.childNodes!==G(x)},Dn=function(x){if(!P||typeof x!="object"||x===null)return!1;try{return P(x)===Pt.documentFragment}catch{return!1}},xl=function(x){if(!P||typeof x!="object"||x===null)return!1;try{return typeof P(x)=="number"}catch{return!1}};function Dt(Z,x,E){Z.length!==0&&ma(Z,X=>{X.call(c,x,E,ml)})}const Ic=function(x,E){return!!(Rn&&x.hasChildNodes()&&!xl(x.firstElementChild)&&zt(Gm,x.textContent)&&zt(Gm,x.innerHTML)||Rn&&x.namespaceURI===sn&&xy[E]&&(xl(x.firstElementChild)||typeof x.textContent=="string"&&zt(vy[E],x.textContent))||x.nodeType===Pt.processingInstruction||Rn&&x.nodeType===Pt.comment&&zt(Ym,x.data))},St=function(x,E){if(x instanceof RegExp)return zt(x,E);if(x instanceof Function){for(var X=arguments.length,ne=new Array(X>2?X-2:0),ae=2;ae<X;ae++)ne[ae-2]=arguments[ae];return!!x(E,...ne)}return!1},ys=function(x,E,X){if(!$n[E]&&Vn(E)&&St(Yt.tagNameCheck,E))return!1;if(ms&&!bn[E]){const ne=A(x),ae=G(x);if(ae&&ne){const oe=ae.length;for(let He=oe-1;He>=0;--He){const Ve=x===X?M(ae[He],!0):ae[He];ne.insertBefore(Ve,Q(x))}}}return jn(x),!0},bs=function(x,E,X,ne){return x.length===0?E:E===X||E===ne?en(E):E},Aa=function(x,E){return x===E||A(x)!==null?!1:(ol&&Jl(x),!0)},Zn=function(x,E){if(Dt(V.beforeSanitizeElements,x,null),Aa(x,E))return!0;if(_a(x))return jn(x),!0;const X=et(ee(x));if(Oe=bs(V.uponSanitizeElement,Oe,Xl,Ql),Dt(V.uponSanitizeElement,x,{tagName:X,allowedTags:Oe}),Aa(x,E))return!0;if(Ic(x,X))return jn(x),!0;if($n[X]||!(nn.tagCheck instanceof Function&&nn.tagCheck(X))&&!Oe[X]){const ae=ys(x,X,E);return ae===!1&&Dt(V.afterSanitizeElements,x,null),ae}if(J(x)===Pt.element&&!Ei(x)||(X==="noscript"||X==="noembed"||X==="noframes")&&zt(py,x.innerHTML))return jn(x),!0;if(vn&&x.nodeType===Pt.text){const ae=Nt(x.textContent);x.textContent!==ae&&(hi(c.removed,{element:x.cloneNode()}),x.textContent=ae)}return Dt(V.afterSanitizeElements,x,null),!1},js=function(x,E,X){if(ba[E]||Ai(E,x)||Rt&&(E==="id"||E==="name")&&(X in o||X in Ti))return!1;const ne=Ye[E]||nn.attributeCheck instanceof Function&&nn.attributeCheck(E,x);return fs&&zt(mt,E)||ji&&zt(B,E)?!0:ne?ki[E]||zt(tn,mi(X,Ge,""))||(E==="src"||E==="xlink:href"||E==="href")&&x!=="script"&&Dm(X,"data:")===0&&Zl[x]||At&&!zt(Ce,mi(X,Ge,""))?!0:!X:Vn(x)&&St(Yt.tagNameCheck,x)&&St(Yt.attributeNameCheck,E,x)||E==="is"&&Yt.allowCustomizedBuiltInElements&&St(Yt.tagNameCheck,X)},Ri=De({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Vn=function(x){return!Ri[xi(x)]&&zt(We,x)},Fc=function(x,E,X,ne){if(le&&typeof T=="object"&&typeof T.getAttributeType=="function"&&!X)switch(T.getAttributeType(x,E)){case"TrustedHTML":return lt(ne);case"TrustedScriptURL":return U(ne)}return ne},Ci=function(x,E,X,ne){try{X?x.setAttributeNS(X,E,ne):x.setAttribute(E,ne),_a(x)?jn(x):zm(c.removed)}catch{Qn(E,x)}},Ns=function(x){Dt(V.beforeSanitizeAttributes,x,null);const E=x.attributes;if(!E||_a(x))return;Ye=bs(V.uponSanitizeAttribute,Ye,os,ja);const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ye,forceKeepAttr:void 0};let ne=E.length;const ae=et(x.nodeName);for(;ne--;){const oe=E[ne],He=oe.name,Ve=oe.namespaceURI,wt=oe.value,rt=et(He),Qt=wt;let gt=He==="value"?Qt:Fv(Qt);if(X.attrName=rt,X.attrValue=gt,X.keepAttr=!0,X.forceKeepAttr=void 0,Dt(V.uponSanitizeAttribute,x,X),gt=X.attrValue,Si&&(rt==="id"||rt==="name")&&Dm(gt,wi)!==0&&(Qn(He,x,oe),gt=wi+gt),Rn&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){Qn(He,x,oe);continue}if(rt==="attributename"&&Om(gt,"href")){Qn(He,x,oe);continue}if(!X.forceKeepAttr){if(!X.keepAttr){Qn(He,x,oe);continue}if(!Ni&&zt(gy,gt)){Qn(He,x,oe);continue}if(vn&&(gt=Nt(gt)),!js(ae,rt,gt)){Qn(He,x,oe);continue}gt=Fc(ae,rt,Ve,gt),gt!==Qt&&Ci(x,He,Ve,gt)}}Dt(V.afterSanitizeAttributes,x,null)},vl=function(x){let E=null;const X=rn(x);for(Dt(V.beforeSanitizeShadowDOM,x,null);E=X.nextNode();)if(Dt(V.uponSanitizeShadowNode,E,null),Zn(E,x),Ns(E),Dn(E.content)&&vl(E.content),J(E)===Pt.element){const ne=ce(E);Dn(ne)&&(Ss(ne),vl(ne))}Dt(V.afterSanitizeShadowDOM,x,null)},Ss=function(x){const E=[{node:x,shadow:null}];for(;E.length>0;){const X=E.pop();if(X.shadow){vl(X.shadow);continue}const ne=X.node,oe=J(ne)===Pt.element,He=G(ne);if(He)for(let Ve=He.length-1;Ve>=0;--Ve)E.push({node:He[Ve],shadow:null});if(oe){const Ve=F?F(ne):null;if(typeof Ve=="string"&&et(Ve)==="template"){const wt=ne.content;Dn(wt)&&E.push({node:wt,shadow:null})}}if(oe){const Ve=ce(ne);Dn(Ve)&&E.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return c.sanitize=function(Z){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,X=null,ne=null,ae=null;if(Na=!Z,Na&&(Z="<!-->"),typeof Z!="string"&&!xl(Z)&&(Z=ny(Z),typeof Z!="string"))throw ha("dirty is not a string, aborting");if(!c.isSupported)return Z;ds?(Oe=Ql,Ye=ja):Vl(x),(V.uponSanitizeElement.length>0||V.uponSanitizeAttribute.length>0)&&(Oe=en(Oe)),V.uponSanitizeAttribute.length>0&&(Ye=en(Ye)),c.removed=[];const oe=ol&&typeof Z!="string"&&xl(Z);if(oe){Ta(Z);const wt=ee(Z);if(typeof wt=="string"){const rt=et(wt);if(!Oe[rt]||$n[rt])throw Nn(Z),ha("root node is forbidden and cannot be sanitized in-place")}if(_a(Z))throw Nn(Z),ha("root node is clobbered and cannot be sanitized in-place");try{Ss(Z)}catch(rt){throw Nn(Z),rt}}else if(xl(Z))E=Il("<!---->"),X=E.ownerDocument.importNode(Z,!0),X.nodeType===Pt.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?E=X:E.appendChild(X),Ss(X);else{if(!an&&!vn&&!ln&&Z.indexOf("<")===-1)return le&&Xt?lt(Z):Z;if(E=Il(Z),!E)return an?null:Xt?je:""}E&&hs&&jn(E.firstChild);const He=oe?Z:E;try{const wt=rn(He);for(;ne=wt.nextNode();)Zn(ne,He),Ns(ne),Dn(ne.content)&&vl(ne.content)}catch(wt){throw oe&&(Nn(Z),ma(c.removed,rt=>{rt.element&&Jl(rt.element)})),wt}if(oe)return ma(c.removed,wt=>{wt.element&&Jl(wt.element)}),vn&&Ea(Z),Z;if(an){if(vn&&Ea(E),yt)for(ae=k.call(E.ownerDocument);E.firstChild;)ae.appendChild(E.firstChild);else ae=E;return(Ye.shadowroot||Ye.shadowrootmode)&&(ae=W.call(u,ae,!0)),ae}let Ve=ln?E.outerHTML:E.innerHTML;return ln&&Oe["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&zt(hy,E.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
76
+ `+Ve),vn&&(Ve=Nt(Ve)),le&&Xt?lt(Ve):Ve},c.setConfig=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Vl(Z),ds=!0,Ql=Oe,ja=Ye},c.clearConfig=function(){ml=null,ds=!1,Ql=null,ja=null,le=be,je=""},c.isValidAttribute=function(Z,x,E){ml||Vl({});const X=et(Z),ne=et(x);return js(X,ne,E)},c.addHook=function(Z,x){typeof x=="function"&&Gt(V,Z)&&hi(V[Z],x)},c.removeHook=function(Z,x){if(Gt(V,Z)){if(x!==void 0){const E=Jv(V[Z],x);return E===-1?void 0:Iv(V[Z],E,1)[0]}return zm(V[Z])}},c.removeHooks=function(Z){Gt(V,Z)&&(V[Z]=[])},c.removeAllHooks=function(){V=Xm()},c}var va=gp();const jy=[{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 us(i,c){const u=await(await fetch("/api/chats",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:i,scope:c})})).json();u.id&&xn(u.scope?.kind==="team"?`/agents/${encodeURIComponent(u.scope.member)}/chat/${u.id}`:`/agents/chats/${u.id}`)}function Ny(){const[i,c]=C.useState("claude"),[o,u]=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:jy.map(m=>a.jsxs("button",{className:`agent-pick-btn ${i===m.id?"active":""}`,onClick:()=>c(m.id),children:[a.jsx("b",{children:m.label}),a.jsx("span",{children:m.hint})]},m.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:m=>u(m.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 us(i,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function Qm({id:i,agentName:c,agentDescription:o}){const[u,f]=C.useState(null),[h,m]=C.useState([]),[g,y]=C.useState(!1);C.useEffect(()=>{let T=!0,j=null;return fetch(`/api/chats/${i}`).then(M=>M.ok?M.json():Promise.reject()).then(M=>{if(!T)return;f(M.meta),m(M.events);const S=M.events[M.events.length-1]?.seq??0;j=new EventSource(`/api/chats/${i}/events?after=${S}`),j.onmessage=Q=>{const G=JSON.parse(Q.data);m(A=>A.some(ce=>ce.seq===G.seq)?A:[...A,G])}}).catch(()=>T&&y(!0)),()=>{T=!1,j?.close()}},[i]);const v=C.useMemo(()=>{for(let T=h.length-1;T>=0;T--){const j=h[T].type;if(j==="user_message")return!0;if(j==="turn_end"||j==="error")return!1}return!1},[h]),w=C.useMemo(()=>{if(u?.title)return u.title;const T=h.find(j=>j.type==="user_message");return T&&T.type==="user_message"?T.text.replace(/\s+/g," ").trim().slice(0,80):""},[u,h]);return C.useEffect(()=>{if(!u)return;const T=c??(u.scope.kind==="team"?u.scope.member:u.agent);return Nm([T,o,w||"new chat"].filter(Boolean).join(" · ")),()=>Nm("")},[u,w,c,o]),g?a.jsx("div",{className:"empty",children:"chat not found"}):u?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:w||"new chat"}),a.jsx("span",{className:"chip agent",children:u.agent}),u.scope.kind==="run"&&a.jsx(Ee,{href:`/runs/${u.scope.runId}`,className:"chip",children:u.scope.runId}),u.scope.kind==="kraftwerk"&&a.jsx("span",{className:"chip",children:"kraftwerk-aware"}),u.scope.kind==="knowledge"&&a.jsxs(Ee,{href:u.scope.bundle?`/knowledge/${encodeURIComponent(u.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",u.scope.bundle?`:${u.scope.bundle}`:""]}),u.scope.kind==="team"&&a.jsxs(Ee,{href:`/agents/${encodeURIComponent(u.scope.member)}/info`,className:"chip",children:["agent:",u.scope.member]}),a.jsx("span",{className:"rid",title:u.cwd,children:u.cwd})]}),a.jsx(wy,{id:i,events:h,busy:v}),a.jsx(_y,{id:i,busy:v,scope:u.scope})]}):a.jsx("div",{className:"empty",children:"loading…"})}function Sy(i){const c=[],o=new Map,u=new Map;for(const f of i){const h=c[c.length-1];switch(f.type){case"user_message":c.push({kind:"user",text:f.text,key:`e${f.seq}`});break;case"text":h?.kind==="agent"?h.text+=f.text:c.push({kind:"agent",text:f.text,key:`e${f.seq}`});break;case"thought":h?.kind==="thought"?h.text+=f.text:c.push({kind:"thought",text:f.text,key:`e${f.seq}`});break;case"tool_call":o.set(f.callId,c.length),c.push({kind:"tool",callId:f.callId,title:f.title,toolKind:f.kind,status:f.status,key:`e${f.seq}`});break;case"tool_update":{const m=o.get(f.callId);if(m!=null){const g=c[m];f.title&&(g.title=f.title),f.status&&(g.status=f.status)}break}case"permission_request":u.set(f.requestId,c.length),c.push({kind:"permission",requestId:f.requestId,title:f.title,options:f.options,resolved:void 0,key:`e${f.seq}`});break;case"permission_resolved":{const m=u.get(f.requestId);m!=null&&(c[m].resolved=f.optionId);break}case"error":c.push({kind:"error",text:f.message,key:`e${f.seq}`});break}}return c}function wy({id:i,events:c,busy:o}){const u=qn(),f=C.useMemo(()=>{const g=Sy(c);return u?g:g.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[c,u]),h=C.useRef(null),m=C.useRef(!0);return C.useEffect(()=>{const g=h.current;g&&m.current&&(g.scrollTop=g.scrollHeight)},[f,o]),a.jsxs("div",{className:"chat-scroll",ref:h,onScroll:g=>{const y=g.currentTarget;m.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(Ty,{b:g,chatId:i},g.key)),o&&a.jsxs("div",{className:"chat-working",children:[a.jsx("span",{className:"lamp running"})," working…"]})]})}function ky({text:i}){const c=C.useMemo(()=>va.sanitize(ze.parse(i,{async:!1})),[i]);return a.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:c}})}function Ty({b:i,chatId:c}){switch(i.kind){case"user":return a.jsx("div",{className:"msg user",children:i.text});case"agent":return a.jsx(ky,{text:i.text});case"thought":return a.jsxs("details",{className:"msg thought",children:[a.jsx("summary",{children:"thinking"}),a.jsx("div",{children:i.text})]});case"tool":return a.jsxs("div",{className:`tool-card ${i.status??""}`,children:[a.jsx("span",{className:`lamp ${i.status==="completed"?"ok":i.status==="failed"?"failed":"running"}`}),i.toolKind&&a.jsx("span",{className:"chip tool-kind",children:i.toolKind}),a.jsx("span",{className:"tool-title",children:i.title})]});case"permission":return a.jsx(Ey,{b:i,chatId:c});case"error":return a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",i.text]})}}function Ey({b:i,chatId:c}){const[o,u]=C.useState(!1),f=i.resolved===void 0;async function h(m){u(!0),await fetch(`/api/chats/${c}/permission`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:i.requestId,optionId:m})}).catch(()=>{}),u(!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"})," ",i.title]}),f?a.jsx("div",{className:"perm-actions",children:i.options.map(m=>a.jsx("button",{className:`perm-btn ${m.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(m.optionId),children:m.name},m.optionId))}):a.jsx("div",{className:"perm-resolved",children:i.resolved?`→ ${i.options.find(m=>m.optionId===i.resolved)?.name??i.resolved}`:"→ dismissed"})]})}function _y({id:i,busy:c,scope:o}){const[u,f]=C.useState(""),[h,m]=C.useState([]),[g,y]=C.useState(0),[v,w]=C.useState(!1);C.useEffect(()=>{let A=!0;return(async()=>{try{let fe=(await fetch("/api/skills").then(P=>P.json())).skills??[];if(o?.kind==="team"){const[P,F]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(ee=>ee.ok?ee.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(ee=>ee.ok?ee.json():null).catch(()=>null)]);if(P&&Array.isArray(P.skills)){const ee=new Set(P.skills.map(le=>le.toLowerCase()));fe=fe.filter(le=>ee.has(le.name.toLowerCase()))}const Y=F?.skills??[],J=new Set(Y.map(ee=>ee.name.toLowerCase()));fe=[...Y,...fe.filter(ee=>!J.has(ee.name.toLowerCase()))]}A&&m(fe)}catch{}})(),()=>{A=!1}},[i]);const T=/^\/([\w-]*)$/.exec(u)?.[1],j=T!==void 0&&!v?h.filter(A=>A.name.toLowerCase().startsWith(T.toLowerCase())):[],M=j.length>0,S=Math.min(g,j.length-1);function Q(A){f(`/${A.name} `),y(0)}async function G(){const A=u.trim();!A||c||(f(""),await fetch(`/api/chats/${i}/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:j.map((A,ce)=>a.jsxs("button",{className:ce===S?"active":"",onMouseDown:fe=>{fe.preventDefault(),Q(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:u,placeholder:c?"agent is working…":"message · Enter to send, Shift+Enter for newline, / for skills",rows:Math.min(6,Math.max(1,u.split(`
77
+ `).length)),onChange:A=>{f(A.target.value),y(0),w(!1)},onKeyDown:A=>{if(M){if(A.key==="ArrowDown")return A.preventDefault(),y((S+1)%j.length);if(A.key==="ArrowUp")return A.preventDefault(),y((S-1+j.length)%j.length);if(A.key==="Tab"||A.key==="Enter")return A.preventDefault(),Q(j[S]);if(A.key==="Escape")return A.preventDefault(),w(!0)}A.key==="Enter"&&!A.shiftKey&&(A.preventDefault(),G())}}),c?a.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${i}/cancel`,{method:"POST"}).catch(()=>{}),children:[a.jsx(K,{name:"stop",className:"ms-sm"})," stop"]}):a.jsxs("button",{className:"run-btn",disabled:!u.trim(),onClick:G,children:[a.jsx(K,{name:"send",className:"ms-sm"})," send"]})]})}function Ay({id:i}){const c=$e("/api/runs",!0),o=c?.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(u=>a.jsx(Ry,{r:u,active:u.id===i},u.id)),c&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),a.jsx("div",{className:"runs-main",children:a.jsx(Cy,{id:i},i)})]})}function Ry({r:i,active:c}){return a.jsxs(Ee,{href:`/runs/${i.id}`,className:`side-row ${c?"active":""}`,children:[a.jsx(Kc,{status:i.status}),a.jsxs("div",{className:"side-row-body",children:[a.jsxs("div",{className:"side-row-top",children:[a.jsx("span",{className:"side-wf",children:i.workflow??"unknown"}),a.jsx("span",{className:"side-when num",children:ga(i.startedAt)})]}),a.jsxs("div",{className:"side-row-sub",children:[a.jsx("span",{className:"side-req",title:i.request,children:i.status==="running"&&i.currentPhase?`${i.currentPhase}`:i.request??""}),a.jsx("span",{className:"side-meta num",children:i.status==="running"?a.jsx(wo,{since:i.startedAt}):vi(i.durationMs)})]})]})]})}function Cy({id:i}){const c=$e(`/api/runs/${i}`,!0),o=c?.status==="running",[u,f]=C.useState(null),[h,m]=C.useState(!1),g=qn();if(!c)return a.jsx("div",{className:"empty",children:"loading…"});const y=c.files.some(j=>j.name==="runner.json"),v=u??(o?"run":"artifacts"),w=g?c.files.length:c.files.filter(j=>!Vc(j.name)).length;async function T(){m(!0),await fetch(`/api/runs/${i}/stop`,{method:"POST"}).catch(()=>{})}return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"detail-head",children:[a.jsx(Kc,{status:c.status}),a.jsx("h1",{children:c.workflow?a.jsx(Ee,{href:`/workflows/${encodeURIComponent(c.workflow)}`,title:"open workflow",children:c.workflow}):"unknown workflow"}),a.jsx(Yx,{status:c.status}),y&&a.jsxs("span",{className:"chip sandbox-chip",children:[a.jsx(K,{name:"science",className:"ms-sm"})," sandbox"]}),a.jsx("span",{className:"rid",children:i.replace(/^run-/,"")}),o&&y&&a.jsx("button",{className:"stop-btn",onClick:T,disabled:h,children:h?"stopping…":a.jsxs(a.Fragment,{children:[a.jsx(K,{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:()=>{us("claude",{kind:"run",runId:i})},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:["(",w,")"]})]})]})]}),c.request&&a.jsx("p",{className:"detail-req",children:c.request}),v==="run"?a.jsx(zy,{run:c,live:o}):a.jsx(Uy,{id:i,files:c.files,live:o})]})}function zy({run:i,live:c}){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:[i.phasesDone,i.phasesTotal!=null?` / ${i.phasesTotal}`:""]})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"duration"}),a.jsx("div",{className:"v num",children:c?a.jsx(wo,{since:i.startedAt}):vi(i.durationMs)})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"cost"}),a.jsx("div",{className:"v num",children:No(i.costUsd??Oy(i.phases))})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"tokens in / out"}),a.jsxs("div",{className:"v num",children:[Yc(Zm(i.phases,"tokensIn"))," / ",Yc(Zm(i.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"}),c&&a.jsxs("span",{className:"live-note",children:[a.jsx("span",{className:"lamp running"})," live · polling"]})]}),a.jsx("div",{className:"phases",children:i.phases.map(o=>a.jsx(Dy,{p:o},o.phase))})]})]})}function Zm(i,c){return i.reduce((o,u)=>o+(u[c]??0),0)}function Oy(i){return i.reduce((c,o)=>c+(o.costUsd??0),0)}function Dy({p:i}){const c=i.gates.filter(o=>!o.passed);return a.jsxs("div",{className:"phase-row",children:[a.jsx(Kc,{status:i.status}),a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:i.phase}),i.kind==="agent"?a.jsxs("span",{className:"chip agent",children:[i.agent,i.model?` · ${i.model}`:""]}):a.jsx("span",{className:"chip",children:"script"}),a.jsxs("span",{className:"right num",children:[i.attempts>1&&a.jsxs("span",{children:["att ",i.attempts]}),i.status==="running"?a.jsx(wo,{since:i.startedAt}):i.durationMs!=null&&a.jsx("span",{children:vi(i.durationMs)}),i.kind==="agent"&&i.tokensIn!=null&&a.jsxs("span",{children:[Yc(i.tokensIn)," / ",Yc(i.tokensOut)]}),i.costUsd!=null&&i.costUsd>0&&a.jsx("span",{children:No(i.costUsd)})]})]}),i.status==="running"&&i.lastActivity&&a.jsx("div",{className:"phase-activity",children:i.lastActivity}),i.summary&&i.status!=="running"&&a.jsx("div",{className:"phase-sub",children:i.summary}),i.gates.length>0&&a.jsx("div",{className:"gate-line",children:i.gates.map(o=>a.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[a.jsx(K,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),c.map(o=>a.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const xp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Vc(i){return i==="runner.json"||i.endsWith(".jsonl")||i.endsWith(".log")}function My(i){const o=["report.html","recommendation.md"].find(h=>i.some(m=>m.name===h));if(o)return o;const u=h=>{const m=h.split(".").pop()?.toLowerCase()??"";return["html","md","markdown","pdf"].includes(m)||xp.has(m)?0:Vc(h)?2:1};let f=null;for(const h of i)(!f||u(h.name)<u(f.name))&&(f=h);return f?.name??null}function Uy({id:i,files:c,live:o}){const[u,f]=C.useState(null),h=qn(),m=C.useMemo(()=>h?c:c.filter(g=>!Vc(g.name)),[c,h]);return C.useEffect(()=>{!h&&u&&Vc(u)&&f(null)},[h,u]),C.useEffect(()=>{u||m.length===0||f(My(m))},[m,u]),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:["(",m.length,")"]})]})}),a.jsxs("div",{className:"file-list",children:[m.map(g=>a.jsxs("button",{className:`file-row ${u===g.name?"active":""}`,onClick:()=>f(g.name),children:[a.jsx("span",{className:"fname",children:g.name}),a.jsx("span",{className:"fsize num",children:So(g.size)})]},g.name)),m.length===0&&a.jsx("div",{className:"viewer-note",children:c.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:u??"viewer"}),a.jsx("span",{className:"spacer"}),u&&a.jsx("a",{className:"open-raw",href:`/api/runs/${i}/file?name=${encodeURIComponent(u)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),u?a.jsx(Ly,{id:i,name:u,live:o}):a.jsx("div",{className:"empty",children:"select a file"})]})]})}function Ly({id:i,name:c,live:o}){const u=c.split(".").pop()?.toLowerCase()??"",f=`/api/runs/${i}/file?name=${encodeURIComponent(c)}&raw=1`;return u==="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:c})})}):u==="pdf"?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("iframe",{src:f,title:c})})}):xp.has(u)?a.jsx("div",{className:"viewer",children:a.jsx("div",{className:"viewer-body",children:a.jsx("img",{src:f,alt:c})})}):u==="md"||u==="markdown"?a.jsx(Hy,{id:i,name:c,live:o}):a.jsx(By,{id:i,name:c,live:o})}function Hy({id:i,name:c,live:o}){const[u,f]=C.useState("rendered"),h=$e(`/api/runs/${i}/file?name=${encodeURIComponent(c)}`,o),m=C.useMemo(()=>h?va.sanitize(ze.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:u==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),a.jsx("button",{className:u==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&a.jsxs("span",{children:["large file — showing the last ",So(4e5)]})]}),a.jsx("div",{className:"viewer-body",children:h?u==="rendered"?a.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:m}}):a.jsx("pre",{children:h.content||"(empty)"}):a.jsx("pre",{children:"loading…"})})]})}function By({id:i,name:c,live:o}){const u=$e(`/api/runs/${i}/file?name=${encodeURIComponent(c)}`,o);return a.jsxs("div",{className:"viewer",children:[u?.truncated&&a.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",So(4e5)]}),a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:u?u.content||"(empty)":"loading…"})})]})}function qy(){const i=$e("/api/workflows",!1),c=i?.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:[c.length," discovered"]}),i?.root&&a.jsx("span",{className:"count mono",children:i.root})]}),i&&c.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:c.map(o=>a.jsxs(Ee,{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 $y({slug:i}){const c=$e(`/api/workflows/${encodeURIComponent(i)}`,!1),o=$e("/api/runs",!1);if(!c)return a.jsx("div",{className:"empty",children:"loading…"});if(c.error)return a.jsxs(a.Fragment,{children:[a.jsx(Vm,{slug:c.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:c.error})]})]});const u=new Map(c.agents.map((h,m)=>[h.id,m%4])),f=(o?.runs??[]).filter(h=>h.workflow===c.name).slice(0,8);return a.jsxs(a.Fragment,{children:[a.jsx(Vm,{slug:c.slug}),a.jsxs("div",{className:"detail-head",children:[a.jsx("h1",{children:c.name??c.slug}),a.jsx("span",{className:"rid mono",children:c.dir})]}),c.description&&a.jsx("p",{className:"detail-req",children:c.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:c.agents.length})]}),a.jsxs("div",{className:"stat",children:[a.jsx("div",{className:"microlabel",children:"steps"}),a.jsxs("div",{className:"v num",children:[c.steps.length," ",a.jsxs("span",{style:{color:"var(--muted)",fontWeight:400},children:["(",c.steps.filter(h=>h.kind==="agent").length," agent ·"," ",c.steps.filter(h=>h.kind==="script").length," script)"]})]})]}),c.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:c.workspace})]})]}),a.jsx(Gy,{slug:c.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:[c.agents.map(h=>a.jsx(Yy,{a:h,idx:u.get(h.id)??0},h.id)),c.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:c.steps.map((h,m)=>a.jsx(Xy,{s:h,i:m,idx:h.agent?u.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:["(",c.files.length," files)"]})]})}),a.jsx("div",{className:"file-list",children:c.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(Ee,{href:`/runs/${h.id}`,className:"file-row",children:[a.jsx(Kc,{status:h.status}),a.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),a.jsxs("span",{className:"fsize num",children:[vi(h.durationMs)," · ",No(h.costUsd)," · ",ga(h.startedAt)]})]},h.id)),f.length===0&&a.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function Gy({slug:i,lastRequest:c}){const[o,u]=C.useState(""),[f,h]=C.useState(!0),[m,g]=C.useState(!1),[y,v]=C.useState(!1),[w,T]=C.useState(null),j=$e(`/api/workflows/${encodeURIComponent(i)}/run`,!1);C.useEffect(()=>{!o&&c&&u(c)},[c]);const M=j?.available&&j?.image,S=j?j.available?j.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function Q(){if(!(!o.trim()||y)){v(!0),T(null);try{const G=await fetch(`/api/workflows/${encodeURIComponent(i)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:m})}),A=await G.json();if(!G.ok)throw new Error(A.error??`HTTP ${G.status}`);xn(`/runs/${A.runId}`)}catch(G){T(G.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:G=>u(G.target.value),onKeyDown:G=>G.key==="Enter"&&Q()}),a.jsx("button",{className:"run-btn",onClick:Q,disabled:y||!o.trim()||f&&!M,children:y?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(K,{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:G=>h(G.target.checked)}),"docker sandbox ",S&&a.jsxs("span",{className:"opt-hint",children:["— ",S]})]}),a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:m,onChange:G=>g(G.target.checked),disabled:!f}),"forward SSH agent"]})]}),w&&a.jsx("div",{className:"gate-fail-msg",children:w})]})}function Vm({slug:i}){return a.jsxs("nav",{className:"crumbs",children:[a.jsx(Ee,{href:"/workflows",children:"workflows"}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{className:"mono",children:i})]})}function Yy({a:i,idx:c}){return a.jsxs("div",{className:`agent-card aid-${c}`,children:[a.jsxs("div",{className:"agent-head",children:[a.jsx("span",{className:"agent-dot"}),a.jsx("b",{children:i.name??i.id}),a.jsxs("code",{className:"agent-id",children:["[",i.id,"]"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"chip",children:[i.model??"default",i.effort?` · ${i.effort}`:""]})]}),i.tools.length>0&&a.jsx("div",{className:"agent-tools",children:i.tools.map(o=>a.jsx("span",{className:"tool-chip",children:o},o))}),i.persona&&a.jsx("p",{className:"agent-persona",children:i.persona})]})}function Xy({s:i,i:c,idx:o}){const u=i.kind==="script"?i.script:i.prompt;return a.jsxs("div",{className:"step-node",children:[a.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:c+1}),a.jsxs("div",{className:"step-body",children:[a.jsxs("div",{className:"phase-top",children:[a.jsx("span",{className:"phase-name",children:i.name}),i.kind==="agent"?a.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",i.agent]}):a.jsxs("span",{className:"chip",children:["script",i.sourceRef?` · ${i.sourceRef}`:""]})]}),u&&a.jsxs("details",{className:"step-source",children:[a.jsx("summary",{children:i.kind==="agent"?"prompt":"script"}),a.jsx("pre",{children:u})]}),i.gates.length>0&&a.jsx("div",{className:"gate-line",children:i.gates.map(f=>a.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const Qy=i=>i==="ok"?"ok":i==="running"?"running":i==="aborted"?"aborted":"failed",Zy=i=>i==="ok"?"done":i==="running"?"working":i==="aborted"?"stopped":"failed";function Vy(i){return i.scope.kind==="team"?`/agents/${i.scope.member}/chat/${i.id}`:`/agents/chats/${i.id}`}function Km(i){switch(i.scope.kind){case"team":return i.scope.member;case"run":return i.scope.runId;case"knowledge":return i.scope.bundle?`knowledge:${i.scope.bundle}`:"knowledge";case"kraftwerk":return"kraftwerk-aware";default:return"general"}}function Jm(i){return i.length>64?`${i.slice(0,46)}…${i.slice(-14)}`:i}function Ky(){const i=$e("/api/runs",!1),c=$e("/api/chats",!1),o=$e("/api/knowledge",!1),u=$e("/api/team",!1),f=$e("/api/workflows",!1),h=$e("/api/skills",!1),m=$e("/api/meta",!1),[g,y]=C.useState("all"),v=i?.runs??[],w=c?.chats??[],T=o?.bundles??[],j=(h?.skills??[]).filter(Q=>Q.source==="workspace"),M=[[f?.workflows.length,"workflows","/workflows"],[i?v.length:void 0,"runs","/runs"],[o?T.length:void 0,"bundles","/knowledge"],[h?j.length:void 0,"skills","/skills"],[c?w.length:void 0,"chats","/agents/chats"]],S=v.filter(Q=>Q.status==="failed"&&Date.now()-Date.parse(Q.updatedAt)<24*36e5);return a.jsxs("div",{className:"dash",children:[a.jsxs("div",{className:"page-head",children:[a.jsxs("h1",{children:[m?.projectIcon?`${m.projectIcon} `:"",m?.projectName||"workspace"]}),a.jsx("span",{className:"spacer"}),a.jsx("span",{className:"dash-mini",children:M.map(([Q,G,A])=>a.jsxs(Ee,{href:A,children:[a.jsx("b",{className:"num",children:Q??"…"})," ",G]},G))}),a.jsx(Jy,{workflows:f?.workflows??[]})]}),a.jsx(Iy,{members:u?.members.filter(Q=>!Q.archived),chats:w}),S.length>0&&g!=="failed"&&a.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",S.length," run",S.length===1?"":"s"," failed in the last 24 h — review"]}),a.jsx(Py,{runs:v,chats:w,bundles:T,members:u?.members??[],workflows:f?.workflows??[],filter:g,setFilter:y})]})}function Jy({workflows:i}){const[c,o]=C.useState(!1);return C.useEffect(()=>{if(!c)return;const u=f=>{f.target.closest(".wf-pick-wrap")||o(!1)};return window.addEventListener("mousedown",u),()=>window.removeEventListener("mousedown",u)},[c]),a.jsxs("div",{className:"dash-actions",children:[a.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>xn("/agents/chats"),children:[a.jsx(K,{name:"forum"})," new chat"]}),a.jsxs("span",{className:"wf-pick-wrap",children:[a.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":c,onClick:()=>o(u=>!u),children:[a.jsx(K,{name:"play_arrow"})," run workflow"]}),c&&a.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[i.length===0&&a.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),i.map(u=>a.jsxs(Ee,{href:`/workflows/${encodeURIComponent(u.slug)}`,className:"wf-pick-item",role:"menuitem",children:[a.jsx("span",{className:"wf-pick-name",children:u.name??u.slug}),u.description&&a.jsx("span",{className:"wf-pick-desc",children:u.description})]},u.slug))]})]})]})}function Iy({members:i,chats:c}){const o=qn();return i&&i.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(Ee,{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:(i??[]).map(u=>{const h=c.filter(g=>g.scope.kind==="team"&&g.scope.member===u.slug).find(g=>g.busy),m=()=>xn(`/agents/${encodeURIComponent(u.slug)}`);return a.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:m,onKeyDown:g=>{g.key==="Enter"&&m()},children:[a.jsxs("div",{className:"dash-member-id",children:[a.jsxs("span",{className:"agent-avatar lg",children:[a.jsx("span",{"aria-hidden":!0,children:u.emoji}),a.jsx("span",{className:`lamp ${h?"running":"idle"}`})]}),a.jsx("span",{className:"dash-member-name",children:u.name}),u.description&&a.jsx("span",{className:"dash-member-desc",children:u.description})]}),a.jsxs("div",{className:"dash-member-foot",children:[a.jsx("span",{className:"dash-member-state",children:h&&a.jsx(Ee,{href:`/agents/${encodeURIComponent(u.slug)}/chat/${h.id}`,onClick:g=>g.stopPropagation(),children:"working…"})}),a.jsxs("button",{className:"run-btn dash-chat-btn",onClick:g=>{g.stopPropagation(),us("claude",{kind:"team",member:u.slug})},children:[a.jsx(K,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},u.slug)})})}function Fy(i){if(i.lamp==="running")return"now";const c=new Date(i.at),o=new Date;if(c.toDateString()===o.toDateString())return"today";const u=new Date(o);return u.setDate(u.getDate()-1),c.toDateString()===u.toDateString()?"yesterday":"earlier"}const Wy=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function Py({runs:i,chats:c,bundles:o,members:u,workflows:f,filter:h,setFilter:m}){const g=qn(),y=C.useMemo(()=>{const w=[],T=M=>M?f.find(S=>S.slug===M)?.name??M:void 0;for(const M of i)w.push({at:M.updatedAt,kind:"run",emoji:"⚙️",title:T(M.workflow)??M.id,sub:M.request??"",href:`/runs/${M.id}`,lamp:Qy(M.status),status:Zy(M.status)});for(const M of c){const S=M.scope.kind==="team"?u.find(Q=>M.scope.kind==="team"&&Q.slug===M.scope.member):void 0;w.push({at:M.updatedAt,kind:"session",emoji:S?S.emoji||"🤖":"💬",title:S?S.name:M.title||"new chat",sub:S?`${M.title||"new chat"}${g?` · ${M.agent}`:""}`:g?`${M.agent} · ${Km(M)}`:Km(M),href:Vy(M),lamp:M.busy?"running":"ok",status:M.busy?"working":void 0})}for(const M of o)M.updatedAt&&w.push({at:M.updatedAt,kind:"knowledge",emoji:"📚",title:M.name,sub:`${M.concepts} concepts`,href:`/knowledge/${encodeURIComponent(M.name)}`,lamp:"ok"});return(h==="all"?w:h==="failed"?w.filter(M=>M.kind==="run"&&M.lamp==="failed"):w.filter(M=>M.kind===h)).sort((M,S)=>{const Q=+(S.lamp==="running")-+(M.lamp==="running");return Q!==0?Q:S.at.localeCompare(M.at)}).slice(0,15)},[i,c,o,u,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:[Wy.map(([w,T])=>a.jsx("button",{className:`feed-chip ${h===w?"on":""}`,onClick:()=>m(w),children:T},w)),h==="failed"&&a.jsxs("button",{className:"feed-chip on failed",onClick:()=>m("all"),children:["failed ",a.jsx(K,{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(w=>{const T=Fy(w),j=T!==v?T:null;return v=T,a.jsxs("div",{className:"feed-group",children:[j&&a.jsx("div",{className:"feed-day microlabel",children:j}),a.jsxs(Ee,{href:w.href,className:"m3-row m3-link",children:[a.jsxs("span",{className:"agent-avatar",children:[a.jsx("span",{"aria-hidden":!0,children:w.emoji}),w.lamp==="running"&&a.jsx("span",{className:"lamp running"})]}),a.jsx("span",{className:`chip dash-kind ${w.kind}`,children:w.kind==="session"?"chat":w.kind}),a.jsxs("span",{className:"m3-body",children:[a.jsx("span",{className:"m3-head",children:Jm(w.title)}),w.sub&&a.jsx("span",{className:"m3-sub",children:Jm(w.sub)})]}),w.status&&a.jsx("span",{className:`chip status ${w.lamp}`,children:w.status}),a.jsx("span",{className:"side-when num",title:new Date(w.at).toLocaleString(),children:Gc(w.at)}),a.jsx("span",{className:"m3-chev",children:a.jsx(K,{name:"chevron_right"})})]})]},`${w.kind}:${w.href}:${w.at}`)})})]})}async function Oo(i,c){const o=window.open("","_blank");if(!o)return;const u=c?`${i}/${c}`:i;o.document.write(`<title>${En(u)}</title><body style="font-family:system-ui;padding:40px;color:#555">preparing ${En(u)}…</body>`);const f=S=>`/api/knowledge/${encodeURIComponent(i)}/concept?id=${encodeURIComponent(S)}`;let h,m="";try{const[S,Q]=await Promise.all([c?Promise.resolve([c]):fetch(`/api/knowledge/${encodeURIComponent(i)}`).then(G=>G.json()).then(G=>G.concepts.map(A=>A.id)),fetch("/api/meta").then(G=>G.json()).catch(()=>({}))]);if(m=Q.projectName??"",h=await Promise.all(S.map(G=>fetch(f(G)).then(A=>A.json()))),h.some(G=>typeof G?.id!="string"))throw new Error("missing concept")}catch{o.document.body.textContent=`could not load "${u}"`;return}const g=[],y=h.map(S=>{const Q=[S.type,S.generated?.at?`updated ${S.generated.at.slice(0,10)}`:"",S.trustTier==="human-reviewed"?"human-reviewed":"",(S.tags??[]).map(Y=>`#${Y}`).join(" ")].filter(Boolean).join(" · "),{md:G,notes:A}=eb(vp(S.body??"",null)),ce=!S.title||S.title===S.id||S.title===S.id.split("/").pop(),{html:fe,title:P}=tb(va.sanitize(ze.parse(G,{async:!1})),{title:S.title||S.id,meta:Q,titleIsFallback:ce});g.push(P);const F=A.length?`<ol class="notes">${A.map(Y=>`<li id="fn-${En(Y.id)}">${va.sanitize(ze.parseInline(Y.text,{async:!1}))}</li>`).join("")}</ol>`:"";return`<article>
78
+ ${fe}
79
+ ${F}
80
+ </article>`}).join(`
81
+ `),v=new Date().toISOString().slice(0,10),w=m?`${En(m)} · ${En(i)}`:En(i),T=c?g[0]||u:i,j=c?"":`<h1 class="cover">${En(i)}</h1>
82
+ <div class="cover-sub">${m?`${En(m)} · `:""}knowledge bundle · ${h.length} concept${h.length===1?"":"s"} · exported ${v}</div>`,M=`<!doctype html>
83
+ <html>
84
+ <head>
85
+ <meta charset="utf-8">
86
+ <title>${En(T)}</title>
87
+ <style>
88
+ :root { color-scheme: light; }
89
+ /* Page margins live in the sheet itself (repeating thead/tfoot cells +
90
+ cell padding), not in @page — print dialogs that override or drop CSS
91
+ page margins (macOS system dialog, "Margins: None") then still print
92
+ the intended layout. Top 14mm, right 48mm (notes), bottom 16mm, left 20mm. */
93
+ @page { size: A4; margin: 0; }
94
+ * { box-sizing: border-box; }
95
+ body {
96
+ margin: 0; background: #e9e5df;
97
+ font: 10pt/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; color: #1c1b19;
98
+ font-feature-settings: "kern", "liga", "tnum";
99
+ -webkit-print-color-adjust: exact; print-color-adjust: exact;
100
+ }
101
+ .no-print {
102
+ position: sticky; top: 0; z-index: 1; display: flex; gap: 12px; align-items: center;
103
+ padding: 10px 24px; background: #f4efea; border-bottom: 1px solid #ded6cb; font-size: 13px;
104
+ }
105
+ .no-print button {
106
+ font: inherit; font-weight: 600; padding: 6px 16px; cursor: pointer;
107
+ background: #191919; color: #fff; border: none; border-radius: 999px;
108
+ }
109
+ /* Screen preview mimics the printed page incl. the note gutter. */
110
+ .sheet {
111
+ width: 210mm; margin: 24px auto; background: #fff;
112
+ border-collapse: separate; border-spacing: 0; box-shadow: 0 2px 12px rgba(0,0,0,.12);
113
+ }
114
+ .sheet > thead > tr > td { padding: 14mm 48mm 0 20mm; vertical-align: top; }
115
+ .sheet > tbody > tr > td { padding: 0 48mm 0 20mm; vertical-align: top; }
116
+ .sheet > tfoot > tr > td { padding: 16mm 0 0; }
117
+
118
+ /* Running header */
119
+ .runhead {
120
+ display: flex; justify-content: space-between; gap: 16px;
121
+ font-size: 7.5pt; line-height: 1; color: #6b6660; letter-spacing: 0.08em; text-transform: uppercase;
122
+ padding-bottom: 6px; border-bottom: 0.5pt solid #1c1b19; margin-bottom: 30px;
123
+ }
124
+
125
+ /* Cover */
126
+ .cover { margin: 0 0 3px; font-size: 22pt; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
127
+ .cover-sub { color: #6b6660; font-size: 8.5pt; margin-bottom: 26px; }
128
+
129
+ /* Concept */
130
+ article { margin-top: 36px; }
131
+ article:first-of-type { margin-top: 0; }
132
+ article header { break-inside: avoid; break-after: avoid; margin-bottom: 12px; }
133
+ article h1 { font-size: 16pt; font-weight: 700; margin: 0 0 3px; letter-spacing: -0.015em; line-height: 1.2; }
134
+ article .meta { color: #6b6660; font-size: 8pt; letter-spacing: 0.01em; }
135
+
136
+ /* Type scale for body headings (concept body starts at h2 after demotion) */
137
+ h2 { font-size: 13pt; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; margin: 22px 0 6px; break-after: avoid; }
138
+ h3 { font-size: 11pt; font-weight: 650; line-height: 1.3; margin: 18px 0 4px; break-after: avoid; }
139
+ h4 { font-size: 9.5pt; font-weight: 650; color: #3d3a36; margin: 14px 0 2px; break-after: avoid; }
140
+ h5, h6 { font-size: 10pt; font-weight: 650; margin: 12px 0 2px; }
141
+ h2 + h3, h3 + h4 { margin-top: 6px; }
142
+ .keep { break-inside: avoid; }
143
+
144
+ /* Copy */
145
+ p, ul, ol { margin: 0 0 8px; orphans: 3; widows: 3; }
146
+ ul, ol { padding-left: 16px; }
147
+ li { margin: 0 0 3px; padding-left: 2px; }
148
+ li > p { margin: 0; }
149
+ li::marker { color: #8a857e; }
150
+ ul ul, ol ol, ul ol, ol ul { margin: 2px 0 0; }
151
+ strong { font-weight: 650; }
152
+ em { font-style: italic; }
153
+ a { color: inherit; text-decoration-color: #b8b2aa; text-decoration-thickness: 0.5pt; text-underline-offset: 2px; }
154
+ hr { border: 0; border-top: 0.5pt solid #ded6cb; margin: 14px 0; }
155
+ code { font: 8.5pt/1.4 ui-monospace, "SF Mono", Menlo, monospace; background: #f2ede7; padding: 0 3px; border-radius: 3px; }
156
+ pre { background: #f2ede7; padding: 8px 10px; border-radius: 4px; overflow-x: auto; white-space: pre-wrap; margin: 4px 0 10px; }
157
+ pre code { background: none; padding: 0; }
158
+ blockquote { margin: 6px 0 10px; padding: 1px 0 1px 12px; border-left: 2px solid #c9c2b8; color: #4d4944; }
159
+ img { max-width: 100%; }
160
+ li:has(> input[type="checkbox"]) { list-style: none; margin-left: -16px; }
161
+ input[type="checkbox"] { width: 9px; height: 9px; margin: 0 6px 0 0; vertical-align: -0.5px; }
162
+ pre, blockquote, table, img { break-inside: avoid; }
163
+
164
+ /* Tables: hairline rules, tabular figures, tight leading */
165
+ table.md { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 8.75pt; line-height: 1.35; }
166
+ table.md th, table.md td { padding: 4px 10px 4px 0; text-align: left; vertical-align: top; border-bottom: 0.5pt solid #ded6cb; }
167
+ table.md th:last-child, table.md td:last-child { padding-right: 0; }
168
+ table.md th { font-weight: 650; padding-bottom: 5px; border-top: 0.5pt solid #1c1b19; border-bottom: 0.5pt solid #1c1b19; color: #1c1b19; }
169
+ table.md tr:last-child td { border-bottom: 0.5pt solid #1c1b19; }
170
+ table.md .nw { white-space: nowrap; }
171
+
172
+ /* Footnotes */
173
+ .fnref { font-size: 6.5pt; line-height: 0; margin-left: 1px; color: #6b6660; }
174
+ .fnref + .fnref::before { content: ","; }
175
+ .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; }
176
+ .notes li { margin: 0 0 2px; }
177
+ @media print {
178
+ body { background: #fff; }
179
+ .no-print { display: none; }
180
+ .sheet { width: 100%; margin: 0; box-shadow: none; }
181
+ .runhead { margin-bottom: 24px; }
182
+ }
183
+ </style>
184
+ </head>
185
+ <body>
186
+ <div class="no-print">
187
+ <span>Use “Save as PDF” in the print dialog.</span>
188
+ <button onclick="window.print()">print / save as PDF</button>
189
+ </div>
190
+ <table class="sheet">
191
+ <thead><tr><td>
192
+ <div class="runhead"><span>${w}</span><span>${v}</span></div>
193
+ </td></tr></thead>
194
+ <tbody><tr><td>
195
+ ${j}
196
+ ${y}
197
+ </td></tr></tbody>
198
+ <tfoot><tr><td></td></tr></tfoot>
199
+ </table>
200
+ <script>setTimeout(() => window.print(), 400);<\/script>
201
+ </body>
202
+ </html>`;o.location.href=URL.createObjectURL(new Blob([M],{type:"text/html"}))}function vp(i,c){return i.split(/(```[\s\S]*?```|`[^`]*`)/).map((o,u)=>u%2===1?o:o.replace(/\[\[([^\]|]+)(?:\|([^\]]+))?\]\]/g,(f,h,m)=>{const g=h.trim().replace(/\.md$/,""),y=(m??g).trim();return c===null?y:`[${y}](#/knowledge/${encodeURIComponent(c)}/${g})`})).join("")}function eb(i){const c=[];return{md:i.replace(/^\[\^([^\]]+)\]:[ \t]*(.+)$/gm,(u,f,h)=>(c.push({id:f,text:h.trim()}),"")).replace(/\[\^([^\]]+)\]/g,(u,f)=>{const h=c.findIndex(m=>m.id===f);return h>=0?`<sup class="fnref">${h+1}</sup>`:""}),notes:c}}function tb(i,c){const o=new DOMParser().parseFromString(i,"text/html");let u=c.title;const f=o.body.firstElementChild;c.titleIsFallback&&f?.tagName==="H1"&&(u=f.textContent?.trim()||u,f.remove());const h=o.createElement("header");h.innerHTML=`<h1>${En(u)}</h1><div class="meta">${En(c.meta)}</div>`,o.body.prepend(h);for(const m of o.querySelectorAll("table")){m.classList.add("md");for(const g of m.querySelectorAll("th, td"))(g.textContent??"").trim().length<=14&&g.classList.add("nw")}for(const m of[5,4,3,2,1])for(const g of Array.from(o.body.querySelectorAll(`:scope > h${m}`))){const y=o.createElement(`h${m+1}`);y.innerHTML=g.innerHTML,g.replaceWith(y)}for(const m of Array.from(o.body.querySelectorAll(":scope > header, :scope > h2, :scope > h3, :scope > h4"))){const g=m.nextElementSibling;if(!g||/^H[1-6]$/.test(g.tagName))continue;const y=o.createElement("div");y.className="keep",m.replaceWith(y),y.append(m,g)}return{html:o.body.innerHTML,title:u}}function En(i){return i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function yp(i,c){return`/edit/${encodeURIComponent(i)}/${c.split("/").map(encodeURIComponent).join("/")}`}function nb({bundle:i,conceptId:c}){const o=$e("/api/knowledge",!1),u=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(Ee,{href:"/knowledge",className:"open-raw",children:[a.jsx(K,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[u.map(f=>a.jsxs(Ee,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===i?"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&&u.length===0&&a.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),a.jsx("div",{className:"runs-main",children:i?a.jsx(ab,{name:i,conceptId:c},i):a.jsx(lb,{root:o?.root})})]})}function lb({root:i}){const[c,o]=C.useState(""),[u,f]=C.useState(""),[h,m]=C.useState(!1);async function g(){const y=c.trim();if(!y)return;m(!0),f("");const w=await(await fetch("/api/knowledge",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:y})})).json();m(!1),w.error?f(w.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",i?a.jsxs(a.Fragment,{children:[" under ",a.jsx("code",{children:i})]}):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:c,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:!c.trim()||h,onClick:g,children:h?"creating…":"create"})]}),u&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",u]})]})]})}function Im({tier:i}){return a.jsx("span",{className:`chip trust ${i}`,children:i})}const Fm="@activity";function ab({name:i,conceptId:c}){const o=$e(`/api/knowledge/${encodeURIComponent(i)}`,!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 u=c===Fm?"activity":"pages",f=o.concepts,h=u==="pages"?c&&f.some(g=>g.id===c)?c:f[0]?.id:void 0,m=`/knowledge/${encodeURIComponent(i)}`;return a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"page-head",children:[a.jsx("h1",{children:i}),a.jsxs("span",{className:"count",children:[f.length," pages"]}),a.jsxs("div",{className:"tabs",children:[a.jsx(Ee,{href:m,className:u==="pages"?"active":"",children:"pages"}),a.jsx(Ee,{href:`${m}/${Fm}`,className:u==="activity"?"active":"",children:"activity"})]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{Oo(i)},children:[a.jsx(K,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),a.jsx("button",{className:"run-btn",onClick:()=>{us("claude",{kind:"knowledge",bundle:i})},children:"curate in chat"})]}),u==="activity"?o.log?a.jsx(rb,{name:i,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 ",i,"/<path>"]}),"."]})}):a.jsxs("div",{className:"wiki",children:[a.jsx("aside",{className:"wiki-side",children:ub(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(Ee,{href:`${m}/${v.id}`,className:`wiki-page ${v.id===h?"active":""}`,title:`${v.id}.md`,children:[a.jsx(K,{name:sb(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(ob,{bundle:i,conceptId:h},h)})]})]})}function sb(i){switch((i??"").toLowerCase()){case"reference":return"article";case"policy":return"gavel";case"guide":case"howto":return"route";case"decision":return"balance";default:return"menu_book"}}function ib(i){const c=[];for(const o of i.split(`
203
+ `)){const u=o.match(/^##\s+(\d{4}-\d{2}-\d{2})/);if(u){c.push({date:u[1],entries:[]});continue}const f=o.match(/^[*-]\s+\*\*([^*]+)\*\*:\s*(.*)$/);f&&c.length>0&&c[c.length-1].entries.push({kind:f[1].toLowerCase(),text:f[2]})}return c.filter(o=>o.entries.length>0)}function cb(i,c){const o=[],u=/\[([^\]]+)\]\(\/?([^)]+?)\.md\)/g;let f=0,h;for(;h=u.exec(c);)h.index>f&&o.push(c.slice(f,h.index)),o.push(a.jsx(Ee,{href:`/knowledge/${encodeURIComponent(i)}/${h[2].replace(/^\//,"")}`,children:h[1]},h.index)),f=h.index+h[0].length;return f<c.length&&o.push(c.slice(f)),o}function rb({name:i,log:c}){const o=ib(c),[u,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(!u),children:u?"timeline":"raw log"})]}),u||o.length===0?a.jsx("div",{className:"viewer-body",children:a.jsx("pre",{children:c})}):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((m,g)=>a.jsxs("div",{className:"know-log-row",children:[a.jsx("span",{className:`chip log-kind log-${m.kind}`,children:m.kind}),a.jsx("span",{className:"know-log-text",children:cb(i,m.text)})]},g))]},h.date))})]})}function ub(i){const c=new Map;for(const o of i){const u=o.id.includes("/")?o.id.slice(0,o.id.lastIndexOf("/")):"";(c.get(u)??c.set(u,[]).get(u)).push(o)}return[...c.keys()].sort((o,u)=>o===""?-1:u===""?1:o.localeCompare(u)).map(o=>({folder:o,concepts:c.get(o)}))}function ob({bundle:i,conceptId:c}){const[o,u]=C.useState(null),[f,h]=C.useState(!1),[m,g]=C.useState(!1),[y,v]=C.useState(!1),[w,T]=C.useState(""),[j,M]=C.useState(!1),[S,Q]=C.useState(""),[G,A]=C.useState("rendered"),ce=C.useMemo(()=>o?va.sanitize(ze.parse(vp(o.body,i),{async:!1})):"",[o?.body,i]),fe=()=>{fetch(`/api/knowledge/${encodeURIComponent(i)}/concept?id=${encodeURIComponent(c)}`).then(Y=>Y.ok?Y.json():Promise.reject()).then(u).catch(()=>h(!0))};C.useEffect(()=>{if(y)return;let Y=!0,J;const ee=async()=>{try{const le=await fetch(`/api/knowledge/${encodeURIComponent(i)}/concept?id=${encodeURIComponent(c)}`,{cache:"no-store"});if(le.ok){const je=await le.json();Y&&(h(!1),u(be=>JSON.stringify(be)===JSON.stringify(je)?be:je))}else le.status===404&&Y&&h(!0)}catch{}Y&&(J=setTimeout(ee,6e3))};return ee(),()=>{Y=!1,clearTimeout(J)}},[i,c,y]);async function P(){g(!0),await fetch(`/api/knowledge/${encodeURIComponent(i)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:c})}).catch(()=>{}),g(!1),fe()}async function F(){M(!0),Q("");const Y=await fetch(`/api/knowledge/${encodeURIComponent(i)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:c,content:w})}).then(J=>J.json()).catch(()=>({error:"save failed"}));M(!1),Y.error?Q(Y.error):(u(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(Im,{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(Ee,{href:yp(i,o.id),className:"open-raw",title:"Full-screen document editor with autosave",children:[a.jsx(K,{name:"edit_document",className:"ms-sm"})," open in editor"]}),a.jsxs("button",{className:"open-raw",onClick:()=>{Oo(i,o.id)},children:[a.jsx(K,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),a.jsx("button",{className:"run-btn",disabled:m,onClick:P,children:m?"verifying…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{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:[i,"/",o.id,".md"]}),y?a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"open-raw",onClick:()=>{v(!1),Q("")},children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:j,onClick:F,children:j?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"check",className:"ms-sm"})," save"]})})]}):a.jsxs("button",{className:"open-raw",onClick:()=>{T(o.raw),v(!0),Q("")},children:[a.jsx(K,{name:"edit",className:"ms-sm"})," edit"]})]}),y?a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"concept-edit",value:w,rows:Math.min(40,Math.max(18,w.split(`
204
+ `).length+2)),onChange:Y=>T(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:G==="rendered"?"active":"",onClick:()=>A("rendered"),children:"rendered"}),a.jsx("button",{className:G==="source"?"active":"",onClick:()=>A("source"),children:"source"})]})}),a.jsx("div",{className:"viewer-body",children:G==="rendered"?a.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:ce}}):a.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),S&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",S]})]}),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(Im,{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,J)=>a.jsxs("span",{className:"v",children:[Y.by??"?"," · ",(Y.at??"?").slice(0,10)]},J))]}),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,J)=>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(" · ")})]},J))})]})]})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const fb={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function bp(i){return a.jsx("span",{className:`chip skill-src ${i}`,children:fb[i]})}function db({name:i}){const c=$e("/api/skills",!1),o=c?.skills??[],u=o.filter(m=>m.source==="workspace"),f=o.filter(m=>m.source!=="workspace"),h=m=>a.jsxs(Ee,{href:`/skills/${encodeURIComponent(m.name)}`,className:`side-row ${m.name===i?"active":""}`,children:[a.jsx("span",{className:`lamp ${m.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:["/",m.name]}),m.source!=="workspace"&&bp(m.source)]}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-req",children:m.description||"no description"})})]})]},`${m.source}:${m.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:[u.map(h),c&&u.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:i?a.jsx(mb,{name:i},i):a.jsx(hb,{root:c?.root,workspace:u})})]})}function hb({root:i,workspace:c}){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:[c.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"}),i?a.jsxs(a.Fragment,{children:[" live under ",a.jsx("code",{children:i})]}):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:[i?`${i}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",a.jsx("code",{children:"/"})," menu."]})]})]})}function mb({name:i}){const[c,o]=C.useState(null),[u,f]=C.useState(!1),[h,m]=C.useState("rendered"),g=C.useMemo(()=>c?c.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[c?.content]),y=C.useMemo(()=>c?va.sanitize(ze.parse(g,{async:!1})):"",[g]);return C.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(i)}`).then(v=>v.ok?v.json():Promise.reject()).then(o).catch(()=>f(!0))},[i]),u?a.jsx("div",{className:"empty",children:"skill not found"}):c?a.jsxs("div",{className:"member-view",children:[a.jsxs("div",{className:"detail-head",children:[a.jsxs("h1",{children:["/",c.name]}),bp(c.source)]}),c.description&&a.jsx("div",{className:"know-intro skill-desc",children:c.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:()=>m("rendered"),children:"rendered"}),a.jsx("button",{className:h==="source"?"active":"",onClick:()=>m("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:c.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:c.source==="workspace"?"workspace — git-tracked, shared with the team":c.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:c.path,children:c.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:["/",c.name]})," in any session"]})]}),c.files.length>0&&a.jsxs("div",{className:"rail-kv",children:[a.jsx("span",{className:"microlabel",children:"bundled files"}),c.files.map(v=>a.jsx("span",{className:"v mono",children:v},v))]})]})]})})]})]}):a.jsx("div",{className:"empty",children:"loading…"})}const pb=["","low","medium","high","xhigh","max"],gb=["🤖","🧑‍💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function Wm({seg:i}){const c=i[0]&&i[0]!=="new"&&i[0]!=="chats"?decodeURIComponent(i[0]):void 0,o=i[0]==="new"?"new":i[0]==="chats"?"chats":i[1]==="edit"?"edit":i[1]==="info"?"info":i[1]==="chat"?"chat":c?"member":"home",u=o==="chat"?i[2]:o==="chats"?i[1]:void 0,f=$e("/api/team",!1),h=qn(),[m,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),[w,T]=C.useState(""),[j,M]=C.useState(null),[S,Q]=C.useState(""),[G,A]=C.useState(null),[ce,fe]=C.useState(null),[P,F]=C.useState({}),Y=(f?.members??[]).map(B=>P[B.slug]!==void 0?{...B,group:P[B.slug]||void 0}:B);C.useEffect(()=>{F(B=>{const Ce={...B};let Ge=!1;for(const We of f?.members??[])Ce[We.slug]!==void 0&&(We.group??"")===Ce[We.slug]&&(delete Ce[We.slug],Ge=!0);return Ge?Ce:B})},[f]);const J=Y.filter(B=>!B.archived),ee=Y.filter(B=>B.archived),[le,je]=C.useState(!1),be=[...new Set([...J.map(B=>B.group??"").filter(Boolean),...m])].sort((B,Ce)=>B.localeCompare(Ce)),te=J.filter(B=>!B.group);function ve(B){g(B);try{localStorage.setItem("kw-agent-groups",JSON.stringify(B))}catch{}}function Je(){const B=w.trim();v(!1),T(""),B&&!be.includes(B)&&ve([...m,B])}function lt(B,Ce){M(null);const Ge=Ce.trim();if(!(!Ge||Ge===B)){for(const We of Y.filter(tn=>tn.group===B))U(We.slug,Ge);m.includes(B)&&ve([...new Set(m.map(We=>We===B?Ge:We))])}}async function U(B,Ce){if((Y.find(We=>We.slug===B)?.group??"")!==Ce){F(We=>({...We,[B]:Ce}));try{const We=await fetch(`/api/team/${encodeURIComponent(B)}`);if(!We.ok)throw new Error;const tn=await We.json();if(!(await fetch(`/api/team/${encodeURIComponent(B)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...tn,group:Ce||void 0})})).ok)throw new Error}catch{F(We=>{const tn={...We};return delete tn[B],tn})}}}const I=B=>h?{onDragOver:Ce=>{G!=null&&(Ce.preventDefault(),Ce.dataTransfer.dropEffect="move",ce!==B&&fe(B))},onDrop:Ce=>{Ce.preventDefault();const Ge=Ce.dataTransfer.getData("text/plain")||G;Ge&&U(Ge,B),A(null),fe(null)}}:{},re=B=>a.jsxs(Ee,{href:`/agents/${encodeURIComponent(B.slug)}`,className:`side-row ${B.slug===c?"active":""} ${G===B.slug?"dragging":""}`,draggable:h,onDragStart:Ce=>{Ce.dataTransfer.setData("text/plain",B.slug),Ce.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),Re=B=>a.jsxs(Ee,{href:`/agents/${encodeURIComponent(B.slug)}/info`,className:`side-row archived-row ${B.slug===c?"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(ep,{},"new"):o==="edit"&&c?ye=a.jsx(ep,{slug:c},c):o==="chat"&&c&&u?ye=a.jsx("div",{className:"chat-main",children:a.jsx(Qm,{id:u,agentName:Y.find(B=>B.slug===c)?.name??c,agentDescription:Y.find(B=>B.slug===c)?.description},u)}):o==="chats"?ye=u?a.jsx("div",{className:"chat-main",children:a.jsx(Qm,{id:u},u)}):a.jsx(Ny,{}):o==="info"&&c?ye=a.jsx(jp,{slug:c},c):c?ye=a.jsx(vb,{slug:c},c):ye=a.jsx(jb,{hasMembers:J.length>0,root:f?.root});const k=(o==="member"||o==="info"||o==="chat")&&c?Y.find(B=>B.slug===c)?.knowledge??[]:[],[q,W]=C.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[V,he]=C.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),pe=k.length>0&&q;function _e(B){W(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 ${c||o==="chats"?"has-sessions":""} ${pe?"has-knowledge":""}`,style:pe?{"--kside-w":`${V}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(Ee,{href:"/agents/new",className:"open-raw",children:[a.jsx(K,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[a.jsxs(Ee,{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 ${G&&ce===""?"drop-over":""}`,...I(""),children:[te.map(re),G!=null&&te.length===0&&a.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),be.map(B=>{const Ce=J.filter(Ge=>Ge.group===B);return a.jsxs("div",{className:`side-group ${G&&ce===B?"drop-over":""}`,...I(B),children:[a.jsxs("div",{className:"side-group-head",children:[j===B?a.jsx("input",{className:"side-group-rename",autoFocus:!0,value:S,onChange:Ge=>Q(Ge.target.value),onKeyDown:Ge=>{Ge.key==="Enter"&&lt(B,S),Ge.key==="Escape"&&M(null)},onBlur:()=>lt(B,S)}):a.jsx("span",{className:"microlabel",children:B}),a.jsx("span",{className:"side-group-count num",children:Ce.length}),a.jsx("span",{className:"spacer"}),h&&j!==B&&a.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{M(B),Q(B)},children:a.jsx(K,{name:"edit",className:"ms-sm"})}),h&&Ce.length===0&&m.includes(B)&&a.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ve(m.filter(Ge=>Ge!==B)),children:a.jsx(K,{name:"close",className:"ms-sm"})})]}),Ce.map(re),Ce.length===0&&a.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},B)}),ee.length>0&&a.jsxs("div",{className:"side-group side-archived",children:[a.jsxs("button",{className:"side-archived-toggle","aria-expanded":le,onClick:()=>je(B=>!B),children:[a.jsx("span",{className:"microlabel",children:"archived"}),a.jsx("span",{className:"side-group-count num",children:ee.length}),a.jsx("span",{className:"spacer"}),a.jsx(K,{name:le?"expand_less":"expand_more",className:"ms-sm"})]}),le&&ee.map(Re)]}),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:w,placeholder:"group name, e.g. Team Content",onChange:B=>T(B.target.value),onKeyDown:B=>{B.key==="Enter"&&Je(),B.key==="Escape"&&(v(!1),T(""))},onBlur:Je})}):a.jsxs("button",{className:"side-group-add",onClick:()=>v(!0),children:[a.jsx(K,{name:"add",className:"ms-sm"})," group"]}))]})]}),c&&a.jsx(yb,{slug:c,chatId:u}),o==="chats"&&a.jsx(bb,{chatId:u}),a.jsx("div",{className:"runs-main",children:ye}),pe&&a.jsx(xb,{bundles:k,onHide:()=>_e(!1),onResize:mt}),k.length>0&&!q&&a.jsxs("button",{className:"kside-reopen",onClick:()=>_e(!0),title:"Show knowledge sidebar",children:[a.jsx(K,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function xb({bundles:i,onHide:c,onResize:o}){const[u,f]=C.useState({}),[h,m]=C.useState(null),[g,y]=C.useState({}),[v,w]=C.useState({}),[T,j]=C.useState(null),[M,S]=C.useState(""),[Q,G]=C.useState(!1),[A,ce]=C.useState("");C.useEffect(()=>{f({});let F=!0,Y;const J=async()=>{await Promise.all(i.map(async ee=>{try{const le=await fetch(`/api/knowledge/${encodeURIComponent(ee)}`,{cache:"no-store"}),je=le.ok?await le.json():null;F&&f(be=>JSON.stringify(be[ee])===JSON.stringify(je)?be:{...be,[ee]:je})}catch{F&&f(le=>ee in le?le:{...le,[ee]:null})}})),F&&(Y=setTimeout(J,6e3))};return J(),()=>{F=!1,clearTimeout(Y)}},[i.join(",")]),C.useEffect(()=>{if(!h||T===h)return;const F=h.indexOf("::"),Y=h.slice(0,F),J=h.slice(F+2);let ee=!0,le;const je=async()=>{try{const be=await fetch(`/api/knowledge/${encodeURIComponent(Y)}/concept?id=${encodeURIComponent(J)}`,{cache:"no-store"}),te=be.ok?await be.json():null;ee&&y(ve=>JSON.stringify(ve[h])===JSON.stringify(te)?ve:{...ve,[h]:te})}catch{ee&&y(be=>h in be?be:{...be,[h]:null})}ee&&(le=setTimeout(je,6e3))};return je(),()=>{ee=!1,clearTimeout(le)}},[h,T]);function fe(F,Y){const J=`${F}::${Y}`;m(h===J?null:J)}async function P(F,Y){const J=`${F}::${Y}`;G(!0),ce("");try{const le=await(await fetch(`/api/knowledge/${encodeURIComponent(F)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:Y,content:M})})).json();le.error?ce(le.error):(y(je=>({...je,[J]:le})),j(null))}catch(ee){ce(ee.message)}G(!1)}return a.jsxs("aside",{className:"runs-side knowledge-side",children:[a.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:F=>{F.preventDefault();const Y=F.clientX,J=F.currentTarget.parentElement.offsetWidth,ee=je=>o(Math.min(900,Math.max(280,J+(Y-je.clientX)))),le=()=>{window.removeEventListener("mousemove",ee),window.removeEventListener("mouseup",le)};window.addEventListener("mousemove",ee),window.addEventListener("mouseup",le)}}),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:c,title:"Hide knowledge sidebar",children:["hide ",a.jsx(K,{name:"close",className:"ms-sm"})]})]}),a.jsx("div",{className:"side-list",children:i.map(F=>{const Y=u[F],J=v[F]===!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":!J,onClick:()=>w({...v,[F]:!J}),children:[a.jsx("span",{className:`kside-chev ${J?"":"open"}`,"aria-hidden":!0,children:a.jsx(K,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-bundle-name",children:F}),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:()=>{Oo(F)},children:a.jsx(K,{name:"picture_as_pdf",className:"ms-sm"})}),a.jsx(Ee,{href:`/knowledge/${encodeURIComponent(F)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!J&&Y===null&&a.jsx("div",{className:"viewer-note",children:"bundle not found"}),!J&&Y?.concepts.map(ee=>{const le=`${F}::${ee.id}`,je=h===le,be=`/knowledge/${encodeURIComponent(F)}/${ee.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:ee.description||void 0,onClick:()=>fe(F,ee.id),children:[a.jsx("span",{className:`kside-chev ${je?"open":""}`,"aria-hidden":!0,children:a.jsx(K,{name:"chevron_right",className:"ms-sm"})}),a.jsx("span",{className:"kside-title",children:ee.title||ee.id}),ee.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:te=>te?.scrollIntoView({block:"nearest"}),children:g[le]===void 0?a.jsx("div",{className:"viewer-note",children:"loading…"}):g[le]===null?a.jsx("div",{className:"viewer-note",children:"could not load concept"}):T===le?a.jsxs("div",{className:"kside-edit",children:[a.jsx("textarea",{className:"concept-edit",value:M,rows:Math.min(28,Math.max(10,M.split(`
205
+ `).length+2)),onChange:te=>S(te.target.value),spellCheck:!1}),a.jsxs("div",{className:"kside-actions",children:[a.jsx("button",{className:"open-raw",disabled:Q,onClick:()=>j(null),children:"cancel"}),a.jsx("button",{className:"open-raw",disabled:Q,onClick:()=>P(F,ee.id),children:Q?"saving…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"check",className:"ms-sm"})," save"]})})]}),A&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",A]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"kside-card-bar",children:[ee.type&&a.jsx("span",{className:"kside-type",children:ee.type}),Pm(ee)&&a.jsxs("span",{className:"kside-updated num",children:["updated ",ga(Pm(ee))]}),a.jsx("span",{className:"spacer"}),a.jsxs("button",{className:"open-raw",onClick:()=>{S(g[le].raw),j(le),ce("")},children:[a.jsx(K,{name:"edit",className:"ms-sm"})," edit"]}),a.jsxs(Ee,{href:yp(F,ee.id),className:"open-raw",title:"Full-screen document editor with autosave",children:[a.jsx(K,{name:"edit_document",className:"ms-sm"})," editor"]}),a.jsx(Ee,{href:be,className:"open-raw",children:"open ↗"})]}),a.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:va.sanitize(ze.parse(g[le].body??"",{async:!1}))}})]})})]},ee.id)}),!J&&Y&&Y.concepts.length===0&&a.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},F)})})]})}function Pm(i){return[i.generated?.at,...i.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function vb({slug:i}){const[c,o]=C.useState(!1);return C.useEffect(()=>{let u=!0;return o(!1),fetch("/api/chats").then(f=>f.json()).then(f=>{if(!u)return;const h=f.chats.find(m=>m.scope.kind==="team"&&m.scope.member===i);h?xn(`/agents/${encodeURIComponent(i)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>u&&o(!0)),()=>{u=!1}},[i]),c?a.jsx(jp,{slug:i}):a.jsx("div",{className:"empty",children:"loading…"})}function yb({slug:i,chatId:c}){const o=$e("/api/chats",!1),u=(o?.chats??[]).filter(m=>m.scope.kind==="team"&&m.scope.member===i),[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(Ee,{href:`/agents/${encodeURIComponent(i)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),a.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await us("claude",{kind:"team",member:i}),h(!1)},children:f?"…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"add",className:"ms-sm"})," new"]})})]}),a.jsxs("div",{className:"side-list",children:[u.map(m=>a.jsxs(Ee,{href:`/agents/${encodeURIComponent(i)}/chat/${m.id}`,className:`side-row ${m.id===c?"active":""}`,children:[a.jsx("span",{className:`lamp ${m.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:m.title||"new session"})}),a.jsx("div",{className:"side-row-sub",children:a.jsx("span",{className:"side-when num",children:ga(m.updatedAt)})})]}),a.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async g=>{g.preventDefault(),g.stopPropagation(),window.confirm(`Delete session "${m.title||m.id}"?`)&&(await fetch(`/api/chats/${m.id}`,{method:"DELETE"}).catch(()=>{}),m.id===c&&xn(`/agents/${encodeURIComponent(i)}`))},children:a.jsx(K,{name:"close",className:"ms-sm"})})]},m.id)),o&&u.length===0&&a.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function bb({chatId:i}){const c=$e("/api/chats",!1),o=(c?.chats??[]).filter(u=>u.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(Ee,{href:"/agents/chats",className:"open-raw",children:[a.jsx(K,{name:"add",className:"ms-sm"})," new"]})]}),a.jsxs("div",{className:"side-list",children:[o.map(u=>a.jsxs(Ee,{href:`/agents/chats/${u.id}`,className:`side-row ${u.id===i?"active":""}`,children:[a.jsx("span",{className:`lamp ${u.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:u.title||"new chat"})}),a.jsxs("div",{className:"side-row-sub",children:[a.jsxs("span",{className:"side-req",children:[u.agent,u.scope.kind==="run"?` · ${u.scope.runId}`:u.scope.kind==="kraftwerk"?" · kraftwerk":u.scope.kind==="knowledge"?` · knowledge${u.scope.bundle?`:${u.scope.bundle}`:""}`:""]}),a.jsx("span",{className:"side-when num",children:ga(u.updatedAt)})]})]}),a.jsx("button",{type:"button",className:"row-x",title:"delete chat",onClick:async f=>{f.preventDefault(),f.stopPropagation(),window.confirm(`Delete chat "${u.title||u.id}"?`)&&(await fetch(`/api/chats/${u.id}`,{method:"DELETE"}).catch(()=>{}),u.id===i&&xn("/agents/chats"))},children:a.jsx(K,{name:"close",className:"ms-sm"})})]},u.id)),c&&o.length===0&&a.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function jb({hasMembers:i,root:c}){const o=qn();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:c?`${c}/<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:()=>xn("/agents/new"),children:a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"add",className:"ms-sm"})," ",i?"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 jp({slug:i}){const[c,o]=C.useState(null),[u,f]=C.useState(!1),[h,m]=C.useState(!1),[g,y]=C.useState(!1),[v,w]=C.useState(""),[T,j]=C.useState(""),[M,S]=C.useState([]),[Q,G]=C.useState(!0),[A,ce]=C.useState(!1),[fe,P]=C.useState(""),F=$e("/api/workflows",!1),Y=$e("/api/knowledge",!1),J=$e("/api/skills",!1);C.useEffect(()=>{let te=!0;return fetch(`/api/team/${encodeURIComponent(i)}`).then(ve=>ve.ok?ve.json():Promise.reject()).then(ve=>te&&o(ve)).catch(()=>te&&f(!0)),()=>{te=!1}},[i]);async function ee(te){if(c){ce(!0),P("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(i)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:c.name,emoji:c.emoji,description:c.description,harness:c.harness,model:c.model,effort:c.effort,group:c.group,system:c.system,workflows:c.workflows,knowledge:c.knowledge,skills:c.skills,...te})})).json();Je.error?P(Je.error):(o(Je),w(""))}catch(ve){P(ve.message)}ce(!1)}}function le(te,ve){S(ve?[...M,te]:M.filter(Je=>Je!==te))}async function je(te){ce(!0),P("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(i)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({archived:te})})).json();Je.error?P(Je.error):o(Je)}catch(ve){P(ve.message)}ce(!1)}if(u)return a.jsx("div",{className:"empty",children:"agent not found"});if(!c)return a.jsx("div",{className:"empty",children:"loading…"});const be=te=>a.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[a.jsx("button",{className:"run-btn",disabled:A,onClick:()=>{ee(te)},children:A?"saving…":"save"}),a.jsx("button",{className:"open-raw",disabled:A,onClick:()=>(w(""),P("")),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:c.emoji})}),a.jsx("h1",{children:c.name}),a.jsx("span",{className:"chip agent",children:c.harness}),c.model&&a.jsx("span",{className:"chip",children:c.model}),c.effort&&a.jsxs("span",{className:"chip",children:["effort: ",c.effort]}),c.archived&&a.jsxs("span",{className:"chip archived-chip",children:[a.jsx(K,{name:"inventory_2",className:"ms-sm"})," archived"]}),a.jsx("span",{className:"spacer"}),a.jsx(Ee,{href:`/agents/${encodeURIComponent(i)}/edit`,className:"open-raw",children:"edit"}),c.archived?a.jsxs("button",{className:"run-btn tonal",disabled:A,onClick:()=>{je(!1)},children:[a.jsx(K,{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(K,{name:"archive",className:"ms-sm"})," archive"]}),a.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{m(!0),await us("claude",{kind:"team",member:i}),m(!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(K,{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:(c.system||"").trim().split(`
206
+ `)[0]||"empty — expand to give this agent a role"})]}),a.jsx("span",{className:`m3-chev ${g?"open":""}`,children:a.jsx(K,{name:"expand_more",className:"ms-sm"})})]}),g&&v!=="role"&&a.jsxs("div",{className:"m3-expand",children:[a.jsx("pre",{children:c.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:()=>{j(c.system),w("role"),P("")},children:[a.jsx(K,{name:"edit",className:"ms-sm"})," edit role"]}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"m3-sub",children:["agents/",c.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,T.split(`
207
+ `).length+2)),value:T,placeholder:"You are the ... for this project. Your job is ...",onChange:te=>j(te.target.value),spellCheck:!1}),be({system:T})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(K,{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:[(F?.workflows??[]).map(te=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(te.slug),onChange:ve=>le(te.slug,ve.target.checked)}),a.jsx("b",{children:te.slug}),te.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",te.description]})]},te.slug)),(F?.workflows??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),be({workflows:M})]}):c.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:c.workflows.map(te=>a.jsx(Ee,{href:`/workflows/${encodeURIComponent(te)}`,className:"chip",children:te},te))})]}),v!=="workflows"&&a.jsx("button",{className:"open-raw",onClick:()=>{S(c.workflows),w("workflows"),P("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(K,{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(te=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(te.name),onChange:ve=>le(te.name,ve.target.checked)}),a.jsx("b",{children:te.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",te.concepts," concepts"]})]},te.name)),(Y?.bundles??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),be({knowledge:M})]}):c.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:c.knowledge.map(te=>a.jsx(Ee,{href:`/knowledge/${encodeURIComponent(te)}`,className:"chip",children:te},te))})]}),v!=="knowledge"&&a.jsx("button",{className:"open-raw",onClick:()=>{S(c.knowledge),w("knowledge"),P("")},children:"edit"})]}),a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(K,{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:Q,onChange:te=>G(te.target.checked)}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!Q&&(J?.skills??[]).map(te=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:M.includes(te.name),onChange:ve=>le(te.name,ve.target.checked)}),a.jsxs("b",{children:["/",te.name]}),te.description&&a.jsxs("span",{className:"opt-hint",children:[" — ",te.description]})]},te.name)),!Q&&(J?.skills??[]).length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),be({skills:Q?void 0:M})]}):c.skills===void 0?a.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):c.skills.length===0?a.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):a.jsx("span",{className:"m3-chips",children:c.skills.map(te=>a.jsxs("span",{className:"chip",children:["/",te]},te))})]}),v!=="skills"&&a.jsx("button",{className:"open-raw",onClick:()=>{G(c.skills===void 0),S(c.skills??[]),w("skills"),P("")},children:"edit"})]})]}),fe&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",fe]})]}),a.jsx(Sb,{slug:i}),a.jsx(wb,{slug:i})]})}const Nb=`---
208
+ description: What this skill is for (one line)
209
+ ---
210
+
211
+ Instructions this agent follows when the skill applies or is invoked with /<name>.
212
+ `;function Sb({slug:i}){const o=$e(`/api/team/${encodeURIComponent(i)}/skills`,!1)?.skills??[],[u,f]=C.useState(null),[h,m]=C.useState(!1),[g,y]=C.useState("");async function v(j){y("");const M=await fetch(`/api/team/${encodeURIComponent(i)}/skills/${encodeURIComponent(j)}`),S=await M.json().catch(()=>null);if(!M.ok||!S||S.error)return void y(S?.error??"could not load skill");f({name:j,content:S.content??"",isNew:!1})}async function w(){if(!u)return;m(!0),y("");const M=await(await fetch(`/api/team/${encodeURIComponent(i)}/skills`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:u.name,content:u.content})})).json().catch(()=>({error:"save failed"}));m(!1),M.error?y(M.error):f(null)}async function T(j){window.confirm(`Delete skill "/${j}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(i)}/skills/${encodeURIComponent(j)}`,{method:"DELETE"}).catch(()=>{}),u?.name===j&&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"}),!u&&a.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:Nb,isNew:!0}),y("")},children:[a.jsx(K,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!u&&a.jsxs("div",{className:"viewer-note",children:["none — skills in ",a.jsxs("code",{children:["agents/",i,"/skills/"]})," are private to this agent; skills for every agent live in the workspace skills folder."]}),o.length>0&&!u&&a.jsx("div",{className:"m3-list",children:o.map(j=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(K,{name:"extension"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:["/",j.name]}),a.jsx("span",{className:"m3-sub",children:j.description||a.jsx("code",{children:"SKILL.md"})})]}),a.jsxs("button",{className:"open-raw",onClick:()=>{v(j.name)},children:[a.jsx(K,{name:"edit",className:"ms-sm"})," edit"]}),a.jsx("button",{className:"open-raw",onClick:()=>{T(j.name)},children:a.jsx(K,{name:"close",className:"ms-sm"})})]},j.name))}),u&&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:u.name,placeholder:"e.g. report-html",disabled:!u.isNew,onChange:j=>f({...u,name:j.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,u.content.split(`
213
+ `).length+2)),value:u.content,spellCheck:!1,onChange:j=>f({...u,content:j.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:h||!u.name.trim(),onClick:()=>{w()},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(K,{name:"error",className:"ms-sm"})," ",g]})]})}function wb({slug:i}){const o=$e(`/api/team/${encodeURIComponent(i)}/routines`,!1)?.routines??[],[u,f]=C.useState(null),[h,m]=C.useState(""),[g,y]=C.useState("");async function v(j){m("");const S=await(await fetch(`/api/team/${encodeURIComponent(i)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(j)})).json();return S.error?(m(S.error),!1):!0}async function w(j){y(j),m("");const S=await(await fetch(`/api/team/${encodeURIComponent(i)}/routines/${encodeURIComponent(j)}/run`,{method:"POST"})).json();y(""),S.error?m(S.error):S.chatId&&xn(`/agents/${encodeURIComponent(i)}/chat/${S.chatId}`)}async function T(j){window.confirm(`Delete routine "${j}"?`)&&await fetch(`/api/team/${encodeURIComponent(i)}/routines/${encodeURIComponent(j)}`,{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"}),!u&&a.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[a.jsx(K,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!u&&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(j=>a.jsxs("div",{className:"m3-row",children:[a.jsx("span",{className:"m3-ico",children:a.jsx(K,{name:"schedule"})}),a.jsxs("span",{className:"m3-body",children:[a.jsxs("span",{className:"m3-head",children:[j.name,j.lastError&&a.jsx("span",{className:"chip stale",title:j.lastError,children:"error"})]}),a.jsxs("span",{className:"m3-sub",children:[a.jsx("code",{children:j.schedule}),j.enabled?j.nextRunAt?` · next ${ga(j.nextRunAt)}`:"":" · paused"," · ",j.lastChatId?a.jsxs(Ee,{href:`/agents/${encodeURIComponent(i)}/chat/${j.lastChatId}`,children:["last run ",ga(j.lastRunAt)]}):"never ran"]})]}),a.jsx("button",{className:"open-raw",disabled:g===j.id,onClick:()=>w(j.id),children:g===j.id?"starting…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"play_arrow",className:"ms-sm"})," run"]})}),a.jsx("button",{className:"open-raw",onClick:()=>f({id:j.id,name:j.name,schedule:j.schedule,prompt:j.prompt,enabled:j.enabled}),children:"edit"}),a.jsx("button",{className:"open-raw",onClick:()=>{T(j.id)},children:"delete"}),a.jsxs("label",{className:"m3-switch",title:j.enabled?"enabled — click to pause":"paused — click to enable",children:[a.jsx("input",{type:"checkbox",checked:j.enabled,onChange:()=>{v({id:j.id,name:j.name,schedule:j.schedule,prompt:j.prompt,enabled:!j.enabled})}}),a.jsx("span",{className:"m3-switch-track"})]})]},j.id))}),u&&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:u.name,placeholder:"e.g. Morning report",onChange:j=>f({...u,name:j.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",a.jsx("input",{value:u.schedule,placeholder:"0 9 * * 1-5",onChange:j=>f({...u,schedule:j.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:u.enabled,onChange:j=>f({...u,enabled:j.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:u.prompt,placeholder:"Check ... and summarize what changed.",onChange:j=>f({...u,prompt:j.target.value})})]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!u.name.trim()||!u.prompt.trim(),onClick:async()=>{await v(u)&&f(null)},children:u.id?"save routine":"create routine"}),a.jsx("button",{className:"open-raw",onClick:()=>(f(null),m("")),children:"cancel"})]})]}),h&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",h]})]})}function ep({slug:i}){const[c,o]=C.useState(i?null:M()),[u,f]=C.useState(""),[h,m]=C.useState(!1),y=$e("/api/workflows",!1)?.workflows??[],w=$e("/api/knowledge",!1)?.bundles??[],j=$e("/api/skills",!1)?.skills??[];C.useEffect(()=>{i&&fetch(`/api/team/${encodeURIComponent(i)}`).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"))},[i]);function M(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function S(){if(!c)return;m(!0),f("");const ce=await(await fetch(i?`/api/team/${encodeURIComponent(i)}`:"/api/team",{method:i?"PUT":"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...c,skills:c.skillsAll?void 0:c.skills})})).json();m(!1),ce.error?f(ce.error):xn(`/agents/${encodeURIComponent(ce.slug)}/info`)}async function Q(){!i||!window.confirm(`Delete agent "${i}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(i)}`,{method:"DELETE"}).catch(()=>{}),xn("/agents"))}if(!c)return a.jsx("div",{className:"empty",children:u||"loading…"});const G=A=>o({...c,...A});return a.jsxs("div",{className:"new-chat",children:[a.jsx("div",{className:"page-head",children:a.jsx("h1",{children:i?`edit ${i}`:"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:c.name,placeholder:"e.g. Max",onChange:A=>G({name:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",a.jsx("input",{value:c.emoji,onChange:A=>G({emoji:A.target.value})})]})]}),a.jsx("div",{className:"emoji-pick",children:gb.map(A=>a.jsx("button",{type:"button",className:c.emoji===A?"active":"",onClick:()=>G({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:c.description,placeholder:"one line: what this agent is for",onChange:A=>G({description:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:180},children:["group",a.jsx("input",{value:c.group,placeholder:"none",onChange:A=>G({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:c.harness,onChange:A=>G({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:c.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:A=>G({model:A.target.value})})]}),a.jsxs("label",{className:"team-field",style:{width:140},children:["effort",a.jsx("select",{value:c.effort,onChange:A=>G({effort:A.target.value}),children:pb.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:c.system,placeholder:"You are the ... for this project. Your job is ...",onChange:A=>G({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:c.workflows.includes(A.slug),onChange:ce=>G({workflows:ce.target.checked?[...c.workflows,A.slug]:c.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:[w.map(A=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:c.knowledge.includes(A.name),onChange:ce=>G({knowledge:ce.target.checked?[...c.knowledge,A.name]:c.knowledge.filter(fe=>fe!==A.name)})}),a.jsx("b",{children:A.name}),a.jsxs("span",{className:"opt-hint",children:[" — ",A.concepts," concepts"]})]},A.name)),w.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:c.skillsAll,onChange:A=>G({skillsAll:A.target.checked})}),a.jsx("b",{children:"all skills"}),a.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!c.skillsAll&&j.map(A=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:c.skills.includes(A.name),onChange:ce=>G({skills:ce.target.checked?[...c.skills,A.name]:c.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)),!c.skillsAll&&j.length===0&&a.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),u&&a.jsxs("div",{className:"msg error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",u]}),a.jsxs("div",{className:"team-form-row",children:[a.jsx("button",{className:"run-btn",disabled:!c.name.trim()||h,onClick:S,children:h?"saving…":i?"save":"create"}),a.jsx("span",{className:"spacer"}),i&&a.jsx("button",{className:"stop-btn",onClick:Q,children:"delete agent"})]})]})})]})}function kb(){const[i,c]=C.useState(null),[o,u]=C.useState(""),[f,h]=C.useState(""),[m,g]=C.useState([]),[y,v]=C.useState(!1),[w,T]=C.useState(!1),[j,M]=C.useState(!1),[S,Q]=C.useState("");C.useEffect(()=>{fetch("/api/settings").then(P=>P.json()).then(P=>{c(P),u(P.config.name??""),h(P.config.icon??""),g(P.config.switcher??[])}).catch(()=>Q("could not load settings"))},[]);const G=()=>{v(!0),M(!1),Q("")};async function A(){T(!0),Q("");try{const P=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:m})}),F=await P.json();if(!P.ok)throw new Error(F.error||"save failed");c(F),g(F.config.switcher??[]),v(!1),M(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(P){Q(P.message)}finally{T(!1)}}const ce=(P,F)=>{g(Y=>Y.map((J,ee)=>ee===P?{...J,...F}:J)),G()};if(!i)return a.jsx("div",{className:"empty",children:S||"loading…"});const fe=[["port",String(i.resolved.port),"kraftwerk ui listens here (CLI --port wins)"],["workflows",i.resolved.workflowsRoot??"— none found","workflow definitions"],["output",i.resolved.outputDir,"run artifacts"],["knowledge",i.config.knowledge??"knowledge","OKF knowledge bundles"],["agents",i.config.agents??"agents","team agent definitions"],["skills",i.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(K,{name:"settings",className:"ms-lg"})," Settings"]}),a.jsx("span",{className:"spacer"}),S&&a.jsx("span",{className:"settings-err",children:S}),j&&!y&&a.jsxs("span",{className:"settings-saved",children:[a.jsx(K,{name:"check",className:"ms-sm"})," saved"]}),a.jsx("button",{className:"run-btn",disabled:w||!y,onClick:()=>{A()},children:w?"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:P=>{h(P.target.value),G()}})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:o,placeholder:"my workspace",onChange:P=>{u(P.target.value),G()}})]})]}),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(P=>[...P,{name:"",url:"http://localhost:"}]),G()},children:[a.jsx(K,{name:"add",className:"ms-sm"})," add entry"]})]}),a.jsxs("div",{className:"team-form",children:[m.length===0&&a.jsx("div",{className:"settings-note",children:"No manual entries."}),m.map((P,F)=>a.jsxs("div",{className:"team-form-row",children:[a.jsxs("label",{className:"team-field",style:{width:70},children:["icon",a.jsx("input",{value:P.icon??"",placeholder:"•",onChange:Y=>ce(F,{icon:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1},children:["name",a.jsx("input",{value:P.name,placeholder:"other workspace",onChange:Y=>ce(F,{name:Y.target.value})})]}),a.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",a.jsx("input",{value:P.url,placeholder:"http://localhost:1982",onChange:Y=>ce(F,{url:Y.target.value})})]}),a.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{g(Y=>Y.filter((J,ee)=>ee!==F)),G()},children:a.jsx(K,{name:"close",className:"ms-sm"})})]},F)),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:i.configPath,children:i.exists?i.configPath:`${i.configPath} (not created yet)`})]}),a.jsx("div",{className:"settings-kv-list",children:fe.map(([P,F,Y])=>a.jsxs("div",{className:"settings-kv",children:[a.jsx("span",{className:"microlabel",children:P}),a.jsx("code",{children:F}),a.jsx("span",{className:"settings-kv-hint",children:Y})]},P))}),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."]})]})]})}const uo={running:{label:"running"},stopped:{label:"stopped"},died:{label:"died",note:"was killed or crashed"},missing:{label:"missing",note:"folder is gone"},orphaned:{label:"orphaned",note:"no kraftwerk.yml any more"}};async function Tb(i,c){const o=await fetch(i,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(c)}),u=await o.json().catch(()=>({}));return!o.ok&&!u.error&&(u.error=`HTTP ${o.status}`),u}function Eb(){const[i,c]=C.useState(null),[o,u]=C.useState(""),[f,h]=C.useState({}),[m,g]=C.useState({}),[y,v]=C.useState(null),w=C.useCallback(async()=>{try{const S=await fetch("/api/projects",{cache:"no-store"});if(S.ok){c(await S.json()),u("");return}u(S.status===404?"This workspace runs a kraftwerk without the projects API. Update it and restart its UI.":`Could not load the project registry (HTTP ${S.status}).`)}catch(S){u(S.message||"Could not reach this workspace's server.")}},[]);C.useEffect(()=>{let S=!0,Q;const G=async()=>{await w(),S&&(Q=setTimeout(G,6e3))};return G(),()=>{S=!1,clearTimeout(Q)}},[w]);const T=S=>S.root??S.url,j=async(S,Q)=>{const G=T(S);h(A=>({...A,[G]:Q})),g(A=>({...A,[G]:""})),v(null);try{const A=Q==="stop"?{root:S.root,url:S.url}:{root:S.root},ce=await Tb(`/api/projects/${Q}`,A);if(!ce.ok)throw new Error(ce.error||"failed");window.dispatchEvent(new Event("kw-meta-refresh"))}catch(A){g(ce=>({...ce,[G]:A.message}))}finally{h(A=>{const ce={...A};return delete ce[G],ce}),w()}},M=i?.filter(S=>S.live).length??0;return a.jsxs("div",{className:"settings-screen ws-screen",children:[a.jsxs("div",{className:"settings-head",children:[a.jsxs("h1",{children:[a.jsx(K,{name:"hub",className:"ms-lg"})," Workspaces"]}),a.jsx("span",{className:"spacer"}),i&&a.jsxs("span",{className:"settings-note",children:[i.length," known · ",M," running"]}),i&&o&&a.jsx("span",{className:"settings-err",children:o})]}),a.jsxs("section",{className:"panel",children:[a.jsxs("div",{className:"panel-head",children:[a.jsx("span",{className:"microlabel",children:"projects on this machine"}),a.jsx("span",{className:"spacer"}),a.jsxs("span",{className:"settings-note",children:["registry: ",a.jsx("code",{children:"~/.kraftwerk/projects"})]})]}),!i&&!o&&a.jsx("div",{className:"ws-empty",children:"loading…"}),!i&&o&&a.jsxs("div",{className:"ws-empty ws-load-error",children:[a.jsx(K,{name:"error",className:"ms-sm"})," ",o]}),i&&i.length===0&&a.jsx("div",{className:"ws-empty",children:"No workspaces known yet."}),i?.map(S=>{const Q=T(S),G=f[Q],A=!S.live&&!!S.root&&(S.exists===!1||S.hasConfig===!1);return a.jsxs("div",{className:`ws-row state-${S.state} ${S.current?"current":""}`,children:[a.jsx("span",{className:"switcher-icon ws-icon",children:S.icon||"•"}),a.jsxs("div",{className:"ws-main",children:[a.jsxs("div",{className:"ws-title",children:[S.live&&!S.current?a.jsx("a",{href:S.url,className:"ws-name",children:S.name}):a.jsx("span",{className:"ws-name",children:S.name}),S.current&&a.jsx("span",{className:"switcher-hint",children:"current"}),a.jsxs("span",{className:`ws-state ws-state-${S.state}`,children:[S.live&&a.jsx("span",{className:"live-dot"}),uo[S.state].label]}),uo[S.state].note&&a.jsx("span",{className:"ws-note",children:uo[S.state].note})]}),a.jsx("div",{className:"ws-root",title:S.root,children:S.rootLabel??a.jsx("span",{className:"ws-dim",children:"no root recorded (started by an older version)"})}),a.jsxs("div",{className:"ws-meta",children:[S.state!=="missing"&&S.state!=="orphaned"&&a.jsx("span",{children:S.url.replace(/^https?:\/\//,"")}),S.counts&&a.jsxs(a.Fragment,{children:[a.jsxs("span",{children:[S.counts.agents," agents"]}),a.jsxs("span",{children:[S.counts.workflows," workflows"]}),a.jsxs("span",{children:[S.counts.runs," runs"]}),a.jsxs("span",{children:[S.counts.chats," chats"]})]}),S.lastStarted&&a.jsxs("span",{title:S.lastStarted,children:["started ",Gc(S.lastStarted)]}),!S.live&&S.lastStopped&&a.jsxs("span",{title:S.lastStopped,children:["stopped ",Gc(S.lastStopped)]}),S.startCount!=null&&a.jsxs("span",{children:[S.startCount,"× launched"]}),S.firstSeen&&a.jsxs("span",{title:S.firstSeen,children:["first seen ",Gc(S.firstSeen)]})]}),m[Q]&&a.jsx("div",{className:"settings-err",children:m[Q]})]}),a.jsxs("div",{className:"ws-actions",children:[S.live&&!S.current&&a.jsxs("a",{className:"ws-btn",href:S.url,title:"Open this workspace",children:[a.jsx(K,{name:"open_in_new",className:"ms-sm"})," open"]}),!S.live&&S.root&&S.exists!==!1&&!S.dirGone&&a.jsxs("button",{className:"ws-btn primary",disabled:!!G,onClick:()=>{j(S,"start")},children:[a.jsx(K,{name:G==="start"?"progress_activity":"play_arrow",className:"ms-sm"}),G==="start"?"starting…":"start"]}),S.live&&!S.current&&a.jsxs("button",{className:"ws-btn danger",disabled:!!G,onClick:()=>{j(S,"stop")},children:[a.jsx(K,{name:G==="stop"?"progress_activity":"stop",className:"ms-sm"}),G==="stop"?"stopping…":"stop"]}),A&&y!==Q&&a.jsxs("button",{className:"ws-btn",disabled:!!G,title:"Drop this project from the registry (files untouched)",onClick:()=>v(Q),children:[a.jsx(K,{name:"delete",className:"ms-sm"})," remove"]}),A&&y===Q&&a.jsxs(a.Fragment,{children:[a.jsxs("button",{className:"ws-btn danger",onClick:()=>{j(S,"forget")},children:[a.jsx(K,{name:"delete",className:"ms-sm"})," confirm remove"]}),a.jsx("button",{className:"ws-btn",onClick:()=>v(null),children:"cancel"})]})]})]},Q)})]}),a.jsxs("p",{className:"settings-note",children:["Start launches ",a.jsx("code",{children:"kraftwerk ui"})," detached in the project root (log in ",a.jsx("code",{children:"~/.kraftwerk/logs"}),"). Stop sends SIGTERM to the running server. Remove is offered only for records whose root no longer holds a ",a.jsx("code",{children:"kraftwerk.yml"})," — the same from the terminal:"," ",a.jsx("code",{children:"kraftwerk projects"}),"."]})]})}const _b=C.lazy(()=>Bx(()=>import("./editor-CXrDJOv_.js").then(i=>i.w),__vite__mapDeps([0,1])).then(i=>({default:i.EditorScreen})));function Ab(){const c=qx().split("/").filter(Boolean),[o,u]=C.useState(""),[f,h]=C.useState(""),[m,g]=C.useState(""),[y,v]=C.useState([]);C.useEffect(()=>{let T=!0,j;const M=async()=>{try{const Q=await fetch("/api/meta",{cache:"no-store"}).then(G=>G.json());if(!T)return;u(Q.projectName??""),h(Q.projectIcon??""),g(Q.projectRootLabel??""),v(Array.isArray(Q.switcher)?Q.switcher:[])}catch{}T&&(j=setTimeout(M,3e4))};M();const S=()=>{clearTimeout(j),M()};return window.addEventListener("kw-meta-refresh",S),()=>{T=!1,clearTimeout(j),window.removeEventListener("kw-meta-refresh",S)}},[]),C.useEffect(()=>{if($x(o?`${o} — kraftwerk`:"kraftwerk inspector"),!f)return;const T=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${f}</text></svg>`;let j=document.querySelector('link[rel="icon"]');j||(j=document.createElement("link"),j.rel="icon",document.head.appendChild(j)),j.href=`data:image/svg+xml,${encodeURIComponent(T)}`},[o,f]);let w;return c[0]==="runs"&&c[1]?w=a.jsx(Ay,{id:c[1]}):c[0]==="runs"?w=a.jsx(zb,{}):c[0]==="workflows"&&c[1]?w=a.jsx($y,{slug:decodeURIComponent(c[1])}):c[0]==="workflows"?w=a.jsx(qy,{}):c[0]==="chats"?w=a.jsx(Wm,{seg:c}):c[0]==="skills"?w=a.jsx(db,{name:c[1]?decodeURIComponent(c[1]):void 0}):c[0]==="settings"?w=a.jsx(kb,{}):c[0]==="workspaces"?w=a.jsx(Eb,{}):c[0]==="agents"||c[0]==="team"?w=a.jsx(Wm,{seg:c.slice(1)}):c[0]==="knowledge"?w=a.jsx(nb,{bundle:c[1]?decodeURIComponent(c[1]):void 0,conceptId:c.length>2?c.slice(2).map(decodeURIComponent).join("/"):void 0}):w=a.jsx(Ky,{}),c[0]==="edit"&&c[1]&&c.length>2?a.jsx(C.Suspense,{fallback:a.jsx("div",{className:"empty",children:"loading editor…"}),children:a.jsx(_b,{bundle:decodeURIComponent(c[1]),conceptId:c.slice(2).map(decodeURIComponent).join("/")},c.slice(1).join("/"))}):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(K,{name:"home"})}),o&&a.jsx(Cb,{name:o,icon:f,root:m,entries:y})]}),a.jsxs("nav",{children:[a.jsxs("a",{href:"#/agents",children:[a.jsx(K,{name:"groups"})," agents"]}),a.jsxs("a",{href:"#/knowledge",children:[a.jsx(K,{name:"menu_book"})," context & knowledge"]}),a.jsxs("a",{href:"#/workflows",children:[a.jsx(K,{name:"account_tree"})," workflows"]}),a.jsxs("a",{href:"#/runs",children:[a.jsx(K,{name:"history"})," workflow runs"]}),a.jsxs("a",{href:"#/skills",children:[a.jsx(K,{name:"extension"})," skills"]})]}),a.jsx("span",{className:"spacer"}),a.jsx(Ob,{}),a.jsx(Db,{}),a.jsx(Mb,{})]}),a.jsx("main",{className:"shell",children:w})]})}function yo({label:i}){return!qn()||!i?null:a.jsx("span",{className:"switcher-root",title:i,children:a.jsx("span",{dir:"ltr",children:i})})}function Rb({entry:i}){const[c,o]=C.useState("idle"),[u,f]=C.useState(""),h=i.exists===!1,m=async()=>{o("starting"),f("");try{const g=await fetch("/api/projects/start",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({root:i.root})}),y=await g.json();if(!y.ok)throw new Error(y.error||`HTTP ${g.status}`);if(window.dispatchEvent(new Event("kw-meta-refresh")),y.live&&y.url){window.location.assign(y.url);return}for(let v=0;v<12;v++){await new Promise(w=>setTimeout(w,1e3));try{const T=(await fetch("/api/meta",{cache:"no-store"}).then(j=>j.json())).switcher?.find(j=>j.root===i.root&&j.live);if(T){window.location.assign(T.url);return}}catch{}}throw new Error("started, but the UI did not answer yet — see ~/.kraftwerk/logs")}catch(g){o("error"),f(g.message)}};return a.jsxs("span",{className:`switcher-item stopped ${h?"missing":""}`,role:"menuitem",children:[a.jsx("span",{className:"switcher-icon",children:i.icon||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:i.name}),a.jsx(yo,{label:i.rootLabel}),a.jsx("span",{className:"switcher-sub",children:c==="error"?a.jsx("span",{className:"switcher-err",title:u,children:u}):h?"folder missing":`stopped · ${i.url.replace(/^https?:\/\//,"")}`})]}),a.jsxs("button",{className:"switcher-start",disabled:h||c==="starting",title:h?"The project folder no longer exists":"Start the UI for this project",onClick:g=>{g.stopPropagation(),m()},children:[c==="starting"?a.jsx(K,{name:"progress_activity"}):a.jsx(K,{name:"play_arrow"}),c==="starting"?"starting":"start"]})]})}function Cb({name:i,icon:c,root:o,entries:u}){const[f,h]=C.useState(!1),m=qn();return C.useEffect(()=>{if(!f)return;const g=y=>{y.target.closest(".switcher-wrap")||h(!1)};return window.addEventListener("mousedown",g),()=>window.removeEventListener("mousedown",g)},[f]),u.length===0?a.jsx("span",{className:"env-name",title:o||"Project (kraftwerk.yml: name)",children:i}):a.jsxs("span",{className:"switcher-wrap",children:[a.jsxs("button",{className:"env-name env-switch",title:o?`${o} — switch workspace`:"Switch workspace","aria-haspopup":"menu","aria-expanded":f,onClick:()=>h(g=>!g),children:[i,a.jsx(K,{name:"expand_more"})]}),f&&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:c||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:i}),m&&o?a.jsx(yo,{label:o}):a.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),a.jsx("span",{className:"switcher-hint",children:"current"})]}),u.map(g=>g.live===!1&&g.root?a.jsx(Rb,{entry:g},g.root):a.jsxs("a",{className:"switcher-item",role:"menuitem",href:g.url,children:[a.jsx("span",{className:"switcher-icon",children:g.icon||"•"}),a.jsxs("span",{className:"switcher-text",children:[a.jsx("span",{className:"switcher-name",children:g.name}),a.jsx(yo,{label:g.rootLabel}),a.jsxs("span",{className:"switcher-sub",children:[g.live&&a.jsx("span",{className:"live-dot",title:"running"}),g.url.replace(/^https?:\/\//,"")]})]})]},g.root??g.url)),m&&a.jsxs("a",{className:"switcher-foot",href:"#/workspaces",role:"menuitem",onClick:()=>h(!1),children:[a.jsx(K,{name:"hub"})," manage workspaces"]})]})]})}function zb(){const[i,c]=C.useState(null);return C.useEffect(()=>{let o=!0;return fetch("/api/runs").then(u=>u.json()).then(u=>{o&&(u.runs.length>0?xn(`/runs/${u.runs[0].id}`,{replace:!0}):c({outputDir:u.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),i?a.jsxs("div",{className:"empty",children:["No runs found in ",a.jsx("code",{children:i.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 Ob(){const[i,c]=C.useState(null),[o,u]=C.useState(!1);C.useEffect(()=>{let m=!0,g;const y=async()=>{try{const v=await fetch("/api/meta",{cache:"no-store"}).then(w=>w.json());m&&c(v)}catch{}m&&(g=setTimeout(y,3e4))};return y(),()=>{m=!1,clearTimeout(g)}},[]);const f=i?.restartable&&i.diskVersion&&i.diskVersion!==i.version?i.diskVersion:null;async function h(){if(f){u(!0),await fetch("/api/restart",{method:"POST"}).catch(()=>{});for(let m=0;m<60;m++){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${i?.version}. Click to relaunch with the new version.`,onClick:()=>{h()},children:o?"relaunching…":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function Db(){const i=qn();return a.jsxs("button",{className:`expert-toggle ${i?"on":""}`,title:i?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":i,onClick:()=>Gx(!i),children:[a.jsx("span",{className:"expert-track",children:a.jsx("span",{className:"expert-knob"})}),"expert"]})}function Mb(){const[i,c]=C.useState(!1),[o,u]=C.useState(null),[f,h]=C.useState(null),[m,g]=C.useState("");C.useEffect(()=>{if(!i)return;fetch("/api/runs").then(w=>w.json()).then(u).catch(()=>{}),fetch("/api/workflows").then(w=>w.json()).then(h).catch(()=>{}),fetch("/api/meta").then(w=>w.json()).then(w=>g(w.version)).catch(()=>{});const v=w=>{w.target.closest(".info-wrap")||c(!1)};return window.addEventListener("mousedown",v),()=>window.removeEventListener("mousedown",v)},[i]);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:()=>c(v=>!v),children:a.jsx(K,{name:"info"})}),i&&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:()=>c(!1),children:[a.jsx(K,{name:"settings",className:"ms-sm"})," settings"]})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Theme"}),a.jsx(Hb,{})]}),a.jsxs("div",{className:"info-row info-actions",children:[a.jsx("span",{className:"microlabel",children:"Version"}),a.jsx("span",{className:"info-v mono",children:m?`kraftwerk ${m}`:"…"}),a.jsx(Lb,{})]})]})]})}function Ub(i,c){const o=i.split(".").map(Number),u=c.split(".").map(Number);for(let f=0;f<3;f++)if((o[f]??0)!==(u[f]??0))return(o[f]??0)<(u[f]??0);return!1}function Lb(){const[i,c]=C.useState("idle"),[o,u]=C.useState(null);async function f(){c("busy");try{const h=await fetch("/api/update-check",{cache:"no-store"}),m=await h.json();if(!h.ok||!m.latest)throw new Error;u(m),c("done")}catch{c("err")}}return i==="done"&&o?Ub(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(K,{name:"check",className:"ms-sm"})," up to date"]}):a.jsx("button",{className:"update-btn",disabled:i==="busy",onClick:()=>{f()},children:i==="busy"?"checking…":i==="err"?"npm unreachable — retry":a.jsxs(a.Fragment,{children:[a.jsx(K,{name:"sync",className:"ms-sm"})," check for updates"]})})}function Hb(){return a.jsx("button",{className:"theme-btn",onClick:()=>{const i=document.documentElement,c=i.dataset.theme==="light"?"dark":"light";i.dataset.theme=c;try{localStorage.setItem("kw-theme",c)}catch{}},children:"day / night"})}Ux.createRoot(document.getElementById("root")).render(a.jsx(C.StrictMode,{children:a.jsx(Ab,{})}));export{K as I,Ax as R,Bx as _,Ox as a,Bb as b,kx as g,a as j,xn as n,C as r,Nm as s};