@netnodeag/kraftwerk 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))r(f);new MutationObserver(f=>{for(const h of f)if(h.type==="childList")for(const p of h.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&r(p)}).observe(document,{childList:!0,subtree:!0});function o(f){const h={};return f.integrity&&(h.integrity=f.integrity),f.referrerPolicy&&(h.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?h.credentials="include":f.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(f){if(f.ep)return;f.ep=!0;const h=o(f);fetch(f.href,h)}})();var Ir={exports:{}},oi={};var im;function hx(){if(im)return oi;im=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(r,f,h){var p=null;if(h!==void 0&&(p=""+h),f.key!==void 0&&(p=""+f.key),"key"in f){h={};for(var x in f)x!=="key"&&(h[x]=f[x])}else h=f;return f=h.ref,{$$typeof:u,type:r,key:p,ref:f!==void 0?f:null,props:h}}return oi.Fragment=i,oi.jsx=o,oi.jsxs=o,oi}var cm;function mx(){return cm||(cm=1,Ir.exports=hx()),Ir.exports}var n=mx(),Fr={exports:{}},me={};var um;function px(){if(um)return me;um=1;var u=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),p=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),T=Symbol.iterator;function U(N){return N===null||typeof N!="object"?null:(N=T&&N[T]||N["@@iterator"],typeof N=="function"?N:null)}var Y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ee=Object.assign,V={};function z(N,H,J){this.props=N,this.context=H,this.refs=V,this.updater=J||Y}z.prototype.isReactComponent={},z.prototype.setState=function(N,H){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,H,"setState")},z.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function de(){}de.prototype=z.prototype;function fe(N,H,J){this.props=N,this.context=H,this.refs=V,this.updater=J||Y}var te=fe.prototype=new de;te.constructor=fe,ee(te,z.prototype),te.isPureReactComponent=!0;var F=Array.isArray;function $(){}var Z={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function ae(N,H,J){var Q=J.ref;return{$$typeof:u,type:N,key:H,ref:Q!==void 0?Q:null,props:J}}function je(N,H){return ae(N.type,H,N.props)}function be(N){return typeof N=="object"&&N!==null&&N.$$typeof===u}function W(N){var H={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(J){return H[J]})}var ve=/\/+/g;function Je(N,H){return typeof N=="object"&&N!==null&&N.key!=null?W(""+N.key):H.toString(36)}function at(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then($,$):(N.status="pending",N.then(function(H){N.status==="pending"&&(N.status="fulfilled",N.value=H)},function(H){N.status==="pending"&&(N.status="rejected",N.reason=H)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function D(N,H,J,Q,he){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Ee=!1;if(N===null)Ee=!0;else switch(pe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(N.$$typeof){case u:case i:Ee=!0;break;case S:return Ee=N._init,D(Ee(N._payload),H,J,Q,he)}}if(Ee)return he=he(N),Ee=Q===""?"."+Je(N,0):Q,F(he)?(J="",Ee!=null&&(J=Ee.replace(ve,"$&/")+"/"),D(he,H,J,"",function(Re){return Re})):he!=null&&(be(he)&&(he=je(he,J+(he.key==null||N&&N.key===he.key?"":(""+he.key).replace(ve,"$&/")+"/")+Ee)),H.push(he)),1;Ee=0;var mt=Q===""?".":Q+":";if(F(N))for(var q=0;q<N.length;q++)Q=N[q],pe=mt+Je(Q,q),Ee+=D(Q,H,J,pe,he);else if(q=U(N),typeof q=="function")for(N=q.call(N),q=0;!(Q=N.next()).done;)Q=Q.value,pe=mt+Je(Q,q++),Ee+=D(Q,H,J,pe,he);else if(pe==="object"){if(typeof N.then=="function")return D(at(N),H,J,Q,he);throw H=String(N),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function K(N,H,J){if(N==null)return N;var Q=[],he=0;return D(N,Q,"","",function(pe){return H.call(J,pe,he++)}),Q}function ce(N){if(N._status===-1){var H=N._result;H=H(),H.then(function(J){(N._status===0||N._status===-1)&&(N._status=1,N._result=J)},function(J){(N._status===0||N._status===-1)&&(N._status=2,N._result=J)}),N._status===-1&&(N._status=0,N._result=H)}if(N._status===1)return N._result.default;throw N._result}var _e=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},ye={map:K,forEach:function(N,H,J){K(N,function(){H.apply(this,arguments)},J)},count:function(N){var H=0;return K(N,function(){H++}),H},toArray:function(N){return K(N,function(H){return H})||[]},only:function(N){if(!be(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return me.Activity=_,me.Children=ye,me.Component=z,me.Fragment=o,me.Profiler=f,me.PureComponent=fe,me.StrictMode=r,me.Suspense=y,me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Z,me.__COMPILER_RUNTIME={__proto__:null,c:function(N){return Z.H.useMemoCache(N)}},me.cache=function(N){return function(){return N.apply(null,arguments)}},me.cacheSignal=function(){return null},me.cloneElement=function(N,H,J){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var Q=ee({},N.props),he=N.key;if(H!=null)for(pe in H.key!==void 0&&(he=""+H.key),H)!le.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(Q[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)Q.children=J;else if(1<pe){for(var Ee=Array(pe),mt=0;mt<pe;mt++)Ee[mt]=arguments[mt+2];Q.children=Ee}return ae(N.type,he,Q)},me.createContext=function(N){return N={$$typeof:p,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:h,_context:N},N},me.createElement=function(N,H,J){var Q,he={},pe=null;if(H!=null)for(Q in H.key!==void 0&&(pe=""+H.key),H)le.call(H,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(he[Q]=H[Q]);var Ee=arguments.length-2;if(Ee===1)he.children=J;else if(1<Ee){for(var mt=Array(Ee),q=0;q<Ee;q++)mt[q]=arguments[q+2];he.children=mt}if(N&&N.defaultProps)for(Q in Ee=N.defaultProps,Ee)he[Q]===void 0&&(he[Q]=Ee[Q]);return ae(N,pe,he)},me.createRef=function(){return{current:null}},me.forwardRef=function(N){return{$$typeof:x,render:N}},me.isValidElement=be,me.lazy=function(N){return{$$typeof:S,_payload:{_status:-1,_result:N},_init:ce}},me.memo=function(N,H){return{$$typeof:v,type:N,compare:H===void 0?null:H}},me.startTransition=function(N){var H=Z.T,J={};Z.T=J;try{var Q=N(),he=Z.S;he!==null&&he(J,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then($,_e)}catch(pe){_e(pe)}finally{H!==null&&J.types!==null&&(H.types=J.types),Z.T=H}},me.unstable_useCacheRefresh=function(){return Z.H.useCacheRefresh()},me.use=function(N){return Z.H.use(N)},me.useActionState=function(N,H,J){return Z.H.useActionState(N,H,J)},me.useCallback=function(N,H){return Z.H.useCallback(N,H)},me.useContext=function(N){return Z.H.useContext(N)},me.useDebugValue=function(){},me.useDeferredValue=function(N,H){return Z.H.useDeferredValue(N,H)},me.useEffect=function(N,H){return Z.H.useEffect(N,H)},me.useEffectEvent=function(N){return Z.H.useEffectEvent(N)},me.useId=function(){return Z.H.useId()},me.useImperativeHandle=function(N,H,J){return Z.H.useImperativeHandle(N,H,J)},me.useInsertionEffect=function(N,H){return Z.H.useInsertionEffect(N,H)},me.useLayoutEffect=function(N,H){return Z.H.useLayoutEffect(N,H)},me.useMemo=function(N,H){return Z.H.useMemo(N,H)},me.useOptimistic=function(N,H){return Z.H.useOptimistic(N,H)},me.useReducer=function(N,H,J){return Z.H.useReducer(N,H,J)},me.useRef=function(N){return Z.H.useRef(N)},me.useState=function(N){return Z.H.useState(N)},me.useSyncExternalStore=function(N,H,J){return Z.H.useSyncExternalStore(N,H,J)},me.useTransition=function(){return Z.H.useTransition()},me.version="19.2.8",me}var rm;function go(){return rm||(rm=1,Fr.exports=px()),Fr.exports}var C=go(),Wr={exports:{}},fi={},Pr={exports:{}},eo={};var om;function gx(){return om||(om=1,(function(u){function i(D,K){var ce=D.length;D.push(K);e:for(;0<ce;){var _e=ce-1>>>1,ye=D[_e];if(0<f(ye,K))D[_e]=K,D[ce]=ye,ce=_e;else break e}}function o(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var K=D[0],ce=D.pop();if(ce!==K){D[0]=ce;e:for(var _e=0,ye=D.length,N=ye>>>1;_e<N;){var H=2*(_e+1)-1,J=D[H],Q=H+1,he=D[Q];if(0>f(J,ce))Q<ye&&0>f(he,J)?(D[_e]=he,D[Q]=ce,_e=Q):(D[_e]=J,D[H]=ce,_e=H);else if(Q<ye&&0>f(he,ce))D[_e]=he,D[Q]=ce,_e=Q;else break e}}return K}function f(D,K){var ce=D.sortIndex-K.sortIndex;return ce!==0?ce:D.id-K.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;u.unstable_now=function(){return h.now()}}else{var p=Date,x=p.now();u.unstable_now=function(){return p.now()-x}}var y=[],v=[],S=1,_=null,T=3,U=!1,Y=!1,ee=!1,V=!1,z=typeof setTimeout=="function"?setTimeout:null,de=typeof clearTimeout=="function"?clearTimeout:null,fe=typeof setImmediate<"u"?setImmediate:null;function te(D){for(var K=o(v);K!==null;){if(K.callback===null)r(v);else if(K.startTime<=D)r(v),K.sortIndex=K.expirationTime,i(y,K);else break;K=o(v)}}function F(D){if(ee=!1,te(D),!Y)if(o(y)!==null)Y=!0,$||($=!0,W());else{var K=o(v);K!==null&&at(F,K.startTime-D)}}var $=!1,Z=-1,le=5,ae=-1;function je(){return V?!0:!(u.unstable_now()-ae<le)}function be(){if(V=!1,$){var D=u.unstable_now();ae=D;var K=!0;try{e:{Y=!1,ee&&(ee=!1,de(Z),Z=-1),U=!0;var ce=T;try{t:{for(te(D),_=o(y);_!==null&&!(_.expirationTime>D&&je());){var _e=_.callback;if(typeof _e=="function"){_.callback=null,T=_.priorityLevel;var ye=_e(_.expirationTime<=D);if(D=u.unstable_now(),typeof ye=="function"){_.callback=ye,te(D),K=!0;break t}_===o(y)&&r(y),te(D)}else r(y);_=o(y)}if(_!==null)K=!0;else{var N=o(v);N!==null&&at(F,N.startTime-D),K=!1}}break e}finally{_=null,T=ce,U=!1}K=void 0}}finally{K?W():$=!1}}}var W;if(typeof fe=="function")W=function(){fe(be)};else if(typeof MessageChannel<"u"){var ve=new MessageChannel,Je=ve.port2;ve.port1.onmessage=be,W=function(){Je.postMessage(null)}}else W=function(){z(be,0)};function at(D,K){Z=z(function(){D(u.unstable_now())},K)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return T},u.unstable_next=function(D){switch(T){case 1:case 2:case 3:var K=3;break;default:K=T}var ce=T;T=K;try{return D()}finally{T=ce}},u.unstable_requestPaint=function(){V=!0},u.unstable_runWithPriority=function(D,K){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var ce=T;T=D;try{return K()}finally{T=ce}},u.unstable_scheduleCallback=function(D,K,ce){var _e=u.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?_e+ce:_e):ce=_e,D){case 1:var ye=-1;break;case 2:ye=250;break;case 5:ye=1073741823;break;case 4:ye=1e4;break;default:ye=5e3}return ye=ce+ye,D={id:S++,callback:K,priorityLevel:D,startTime:ce,expirationTime:ye,sortIndex:-1},ce>_e?(D.sortIndex=ce,i(v,D),o(y)===null&&D===o(v)&&(ee?(de(Z),Z=-1):ee=!0,at(F,ce-_e))):(D.sortIndex=ye,i(y,D),Y||U||(Y=!0,$||($=!0,W()))),D},u.unstable_shouldYield=je,u.unstable_wrapCallback=function(D){var K=T;return function(){var ce=T;T=K;try{return D.apply(this,arguments)}finally{T=ce}}}})(eo)),eo}var fm;function xx(){return fm||(fm=1,Pr.exports=gx()),Pr.exports}var to={exports:{}},zt={};var dm;function vx(){if(dm)return zt;dm=1;var u=go();function i(y){var v="https://react.dev/errors/"+y;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)v+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+y+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var r={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},f=Symbol.for("react.portal");function h(y,v,S){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:_==null?null:""+_,children:y,containerInfo:v,implementation:S}}var p=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function x(y,v){if(y==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,zt.createPortal=function(y,v){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(i(299));return h(y,v,null,S)},zt.flushSync=function(y){var v=p.T,S=r.p;try{if(p.T=null,r.p=2,y)return y()}finally{p.T=v,r.p=S,r.d.f()}},zt.preconnect=function(y,v){typeof y=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,r.d.C(y,v))},zt.prefetchDNS=function(y){typeof y=="string"&&r.d.D(y)},zt.preinit=function(y,v){if(typeof y=="string"&&v&&typeof v.as=="string"){var S=v.as,_=x(S,v.crossOrigin),T=typeof v.integrity=="string"?v.integrity:void 0,U=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;S==="style"?r.d.S(y,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:_,integrity:T,fetchPriority:U}):S==="script"&&r.d.X(y,{crossOrigin:_,integrity:T,fetchPriority:U,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},zt.preinitModule=function(y,v){if(typeof y=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var S=x(v.as,v.crossOrigin);r.d.M(y,{crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&r.d.M(y)},zt.preload=function(y,v){if(typeof y=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var S=v.as,_=x(S,v.crossOrigin);r.d.L(y,S,{crossOrigin:_,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})}},zt.preloadModule=function(y,v){if(typeof y=="string")if(v){var S=x(v.as,v.crossOrigin);r.d.m(y,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:S,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else r.d.m(y)},zt.requestFormReset=function(y){r.d.r(y)},zt.unstable_batchedUpdates=function(y,v){return y(v)},zt.useFormState=function(y,v,S){return p.H.useFormState(y,v,S)},zt.useFormStatus=function(){return p.H.useHostTransitionStatus()},zt.version="19.2.8",zt}var hm;function yx(){if(hm)return to.exports;hm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),to.exports=vx(),to.exports}var mm;function bx(){if(mm)return fi;mm=1;var u=xx(),i=go(),o=yx();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function x(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(h(e)!==e)throw Error(r(188))}function v(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(r(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var c=s.alternate;if(c===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===c.child){for(c=s.child;c;){if(c===l)return y(s),e;if(c===a)return y(s),t;c=c.sibling}throw Error(r(188))}if(l.return!==a.return)l=s,a=c;else{for(var d=!1,m=s.child;m;){if(m===l){d=!0,l=s,a=c;break}if(m===a){d=!0,a=s,l=c;break}m=m.sibling}if(!d){for(m=c.child;m;){if(m===l){d=!0,l=c,a=s;break}if(m===a){d=!0,a=c,l=s;break}m=m.sibling}if(!d)throw Error(r(189))}}if(l.alternate!==a)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var _=Object.assign,T=Symbol.for("react.element"),U=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),de=Symbol.for("react.consumer"),fe=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),Z=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),be=Symbol.iterator;function W(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 ee:return"Fragment";case z:return"Profiler";case V:return"StrictMode";case F:return"Suspense";case $:return"SuspenseList";case ae:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Y:return"Portal";case fe:return e.displayName||"Context";case de:return(e._context.displayName||"Context")+".Consumer";case te:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Z:return t=e.displayName||null,t!==null?t:Je(e.type)||"Memo";case le:t=e._payload,e=e._init;try{return Je(e(t))}catch{}}return null}var at=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},_e=[],ye=-1;function N(e){return{current:e}}function H(e){0>ye||(e.current=_e[ye],_e[ye]=null,ye--)}function J(e,t){ye++,_e[ye]=e.current,e.current=t}var Q=N(null),he=N(null),pe=N(null),Ee=N(null);function mt(e,t){switch(J(pe,t),J(he,e),J(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_h(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_h(t),e=Rh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(Q),J(Q,e)}function q(){H(Q),H(he),H(pe)}function Re(e){e.memoizedState!==null&&J(Ee,e);var t=Q.current,l=Rh(t,e.type);t!==l&&(J(he,e),J(Q,l))}function Ye(e){he.current===e&&(H(Q),H(he)),Ee.current===e&&(H(Ee),ii._currentValue=ce)}var We,tl;function ze(e){if(We===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);We=t&&t[1]||"",tl=-1<l.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+We+e+tl}var Ya=!1;function $e(e,t){if(!e||Ya)return"";Ya=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(O){var R=O}Reflect.construct(e,[],B)}else{try{B.call()}catch(O){R=O}e.call(B.prototype)}}else{try{throw Error()}catch(O){R=O}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(O){if(O&&R&&typeof O.stack=="string")return[O.stack,R.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),d=c[0],m=c[1];if(d&&m){var b=d.split(`
|
|
4
|
-
`),A=m.split(`
|
|
5
|
-
`);for(s=a=0;a<b.length&&!b[a].includes("DetermineComponentFrameRoot");)a++;for(;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;if(a===b.length||s===A.length)for(a=b.length-1,s=A.length-1;1<=a&&0<=s&&b[a]!==A[s];)s--;for(;1<=a&&0<=s;a--,s--)if(b[a]!==A[s]){if(a!==1||s!==1)do if(a--,s--,0>s||b[a]!==A[s]){var M=`
|
|
6
|
-
`+b[a].replace(" at new "," at ");return e.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",e.displayName)),M}while(1<=a&&0<=s);break}}}finally{Ya=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ze(l):""}function os(e,t){switch(e.tag){case 26:case 27:case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return e.child!==t&&t!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return $e(e.type,!1);case 11:return $e(e.type.render,!1);case 1:return $e(e.type,!0);case 31:return ze("Activity");default:return""}}function $t(e){try{var t="",l=null;do t+=os(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
-
Error generating stack: `+a.message+`
|
|
8
|
-
`+a.stack}}var Hl=Object.prototype.hasOwnProperty,yn=u.unstable_scheduleCallback,ll=u.unstable_cancelCallback,ji=u.unstable_shouldYield,fs=u.unstable_requestPaint,_t=u.unstable_now,Ni=u.unstable_getCurrentPriorityLevel,xl=u.unstable_ImmediatePriority,Al=u.unstable_UserBlockingPriority,al=u.unstable_NormalPriority,ds=u.unstable_LowPriority,$a=u.unstable_IdlePriority,bn=u.log,hs=u.unstable_setDisableYieldValue,nl=null,yt=null;function Xt(e){if(typeof bn=="function"&&hs(e),yt&&typeof yt.setStrictMode=="function")try{yt.setStrictMode(nl,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 ca=256,vl=262144,yl=4194304;function _l(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 Xa(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var m=a&134217727;return m!==0?(a=m&~c,a!==0?s=_l(a):(d&=m,d!==0?s=_l(d):l||(l=m&~e,l!==0&&(s=_l(l))))):(m=a&~c,m!==0?s=_l(m):d!==0?s=_l(d):l||(l=a&~e,l!==0&&(s=_l(l)))),s===0?0:t!==0&&t!==s&&(t&c)===0&&(c=s&-s,l=t&-t,c>=l||c===32&&(l&4194048)!==0)?t:s}function ua(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ki(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ps(){var e=yl;return yl<<=1,(yl&62914560)===0&&(yl=4194304),e}function ra(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Rl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sl(e,t,l,a,s,c){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var m=e.entanglements,b=e.expirationTimes,A=e.hiddenUpdates;for(l=d&~l;0<l;){var M=31-Rt(l),B=1<<M;m[M]=0,b[M]=-1;var R=A[M];if(R!==null)for(A[M]=null,M=0;M<R.length;M++){var O=R[M];O!==null&&(O.lane&=-536870913)}l&=~B}a!==0&&Bl(e,a,0),c!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=c&~(d&~t))}function Bl(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Rt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function jn(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-Rt(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function Nn(e,t){var l=t&-t;return l=(l&42)!==0?1:gs(l),(l&(e.suspendedLanes|t))!==0?0:l}function gs(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Sn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function wn(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Ph(e.type))}function xs(e,t){var l=K.p;try{return K.p=e,t()}finally{K.p=l}}var il=Math.random().toString(36).slice(2),pt="__reactFiber$"+il,it="__reactProps$"+il,oa="__reactContainer$"+il,vs="__reactEvents$"+il,et="__reactListeners$"+il,fa="__reactHandles$"+il,Ti="__reactResources$"+il,da="__reactMarker$"+il;function Qa(e){delete e[pt],delete e[it],delete e[vs],delete e[et],delete e[fa]}function ql(e){var t=e[pt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[oa]||l[pt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Lh(e);e!==null;){if(l=e[pt])return l;e=Lh(e)}return t}e=l,l=e.parentNode}return null}function Gl(e){if(e=e[pt]||e[oa]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Za(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function ha(e){var t=e[Ti];return t||(t=e[Ti]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[da]=!0}var Ei=new Set,bl={};function zl(e,t){jl(e,t),jl(e+"Capture",t)}function jl(e,t){for(bl[e]=t,e=0;e<t.length;e++)Ei.add(t[e])}var Yl=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ai={},Va={};function _i(e){return Hl.call(Va,e)?!0:Hl.call(Ai,e)?!1:Yl.test(e)?Va[e]=!0:(Ai[e]=!0,!1)}function kn(e,t,l){if(_i(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Ka(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function cl(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}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 Tn(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function En(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,c=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(d){l=""+d,c.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Cl(e){if(!e._valueTracker){var t=Tn(e)?"checked":"value";e._valueTracker=En(e,t,""+e[t])}}function ma(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=Tn(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Dt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Jc=/[\n"\\]/g;function St(e){return e.replace(Jc,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ys(e,t,l,a,s,c,d,m){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Nt(t)):e.value!==""+Nt(t)&&(e.value=""+Nt(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?An(e,d,Nt(t)):l!=null?An(e,d,Nt(l)):a!=null&&e.removeAttribute("value"),s==null&&c!=null&&(e.defaultChecked=!!c),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Nt(m):e.removeAttribute("name")}function bs(e,t,l,a,s,c,d,m){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||l!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){Cl(e);return}l=l!=null?""+Nt(l):"",t=t!=null?""+Nt(t):l,m||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=m?e.checked:!!a,e.defaultChecked=!!a,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),Cl(e)}function An(e,t,l){t==="number"&&Dt(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function $l(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+Nt(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function js(e,t,l){if(t!=null&&(t=""+Nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+Nt(l):""}function Ri(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(r(92));if(at(a)){if(1<a.length)throw Error(r(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=Nt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Cl(e)}function Xl(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ic=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function zi(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Ic.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ns(e,t,l){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&zi(e,s,a)}else for(var c in t)t.hasOwnProperty(c)&&zi(e,c,t[c])}function pa(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"]]),X=/^[\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 g(e){return X.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function w(){}var G=null;function P(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ne=null,re=null;function He(e){var t=Gl(e);if(t&&(e=t.stateNode)){var l=e[it]||null;e:switch(e=t.stateNode,t.type){case"input":if(ys(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[it]||null;if(!s)throw Error(r(90));ys(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&ma(a)}break e;case"textarea":js(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&$l(e,!!l.multiple,t,!1)}}}var Ve=!1;function wt(e,t,l){if(Ve)return e(t,l);Ve=!0;try{var a=e(t);return a}finally{if(Ve=!1,(ne!==null||re!==null)&&(vc(),ne&&(t=ne,e=re,re=ne=null,He(t),e)))for(t=0;t<e.length;t++)He(e[t])}}function ut(e,t){var l=e.stateNode;if(l===null)return null;var a=l[it]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,t,typeof l));return l}var Qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gt=!1;if(Qt)try{var ws={};Object.defineProperty(ws,"passive",{get:function(){gt=!0}}),window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{gt=!1}var ga=null,Fc=null,Ci=null;function _o(){if(Ci)return Ci;var e,t=Fc,l=t.length,a,s="value"in ga?ga.value:ga.textContent,c=s.length;for(e=0;e<l&&t[e]===s[e];e++);var d=l-e;for(a=1;a<=d&&t[l-a]===s[c-a];a++);return Ci=s.slice(e,1<a?1-a: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 Ro(){return!1}function Ut(e){function t(l,a,s,c,d){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=c,this.target=d,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(l=e[m],this[m]=l?l(c):c[m]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?Di:Ro,this.isPropagationStopped=Ro,this}return _(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Ja={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mi=Ut(Ja),ks=_({},Ja,{view:0,detail:0}),fp=Ut(ks),Wc,Pc,Ts,Ui=_({},ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ts&&(Ts&&e.type==="mousemove"?(Wc=e.screenX-Ts.screenX,Pc=e.screenY-Ts.screenY):Pc=Wc=0,Ts=e),Wc)},movementY:function(e){return"movementY"in e?e.movementY:Pc}}),zo=Ut(Ui),dp=_({},Ui,{dataTransfer:0}),hp=Ut(dp),mp=_({},ks,{relatedTarget:0}),eu=Ut(mp),pp=_({},Ja,{animationName:0,elapsedTime:0,pseudoElement:0}),gp=Ut(pp),xp=_({},Ja,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vp=Ut(xp),yp=_({},Ja,{data:0}),Co=Ut(yp),bp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jp={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"},Np={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Np[e])?!!t[e]:!1}function tu(){return Sp}var wp=_({},ks,{key:function(e){if(e.key){var t=bp[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"?jp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tu,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kp=Ut(wp),Tp=_({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Oo=Ut(Tp),Ep=_({},ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tu}),Ap=Ut(Ep),_p=_({},Ja,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rp=Ut(_p),zp=_({},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}),Cp=Ut(zp),Op=_({},Ja,{newState:0,oldState:0}),Dp=Ut(Op),Mp=[9,13,27,32],lu=Qt&&"CompositionEvent"in window,Es=null;Qt&&"documentMode"in document&&(Es=document.documentMode);var Up=Qt&&"TextEvent"in window&&!Es,Do=Qt&&(!lu||Es&&8<Es&&11>=Es),Mo=" ",Uo=!1;function Lo(e,t){switch(e){case"keyup":return Mp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ho(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function Lp(e,t){switch(e){case"compositionend":return Ho(t);case"keypress":return t.which!==32?null:(Uo=!0,Mo);case"textInput":return e=t.data,e===Mo&&Uo?null:e;default:return null}}function Hp(e,t){if(_n)return e==="compositionend"||!lu&&Lo(e,t)?(e=_o(),Ci=Fc=ga=null,_n=!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 Do&&t.locale!=="ko"?null:t.data;default:return null}}var Bp={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 Bo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bp[e.type]:t==="textarea"}function qo(e,t,l,a){ne?re?re.push(a):re=[a]:ne=a,t=kc(t,"onChange"),0<t.length&&(l=new Mi("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var As=null,_s=null;function qp(e){Sh(e,0)}function Li(e){var t=Za(e);if(ma(t))return e}function Go(e,t){if(e==="change")return t}var Yo=!1;if(Qt){var au;if(Qt){var nu="oninput"in document;if(!nu){var $o=document.createElement("div");$o.setAttribute("oninput","return;"),nu=typeof $o.oninput=="function"}au=nu}else au=!1;Yo=au&&(!document.documentMode||9<document.documentMode)}function Xo(){As&&(As.detachEvent("onpropertychange",Qo),_s=As=null)}function Qo(e){if(e.propertyName==="value"&&Li(_s)){var t=[];qo(t,_s,e,P(e)),wt(qp,t)}}function Gp(e,t,l){e==="focusin"?(Xo(),As=t,_s=l,As.attachEvent("onpropertychange",Qo)):e==="focusout"&&Xo()}function Yp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Li(_s)}function $p(e,t){if(e==="click")return Li(t)}function Xp(e,t){if(e==="input"||e==="change")return Li(t)}function Qp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:Qp;function Rs(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!Hl.call(t,s)||!Zt(e[s],t[s]))return!1}return!0}function Zo(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vo(e,t){var l=Zo(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Zo(l)}}function Ko(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ko(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Jo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Dt(e.document)}return t}function su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Zp=Qt&&"documentMode"in document&&11>=document.documentMode,Rn=null,iu=null,zs=null,cu=!1;function Io(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;cu||Rn==null||Rn!==Dt(a)||(a=Rn,"selectionStart"in a&&su(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),zs&&Rs(zs,a)||(zs=a,a=kc(iu,"onSelect"),0<a.length&&(t=new Mi("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Rn)))}function Ia(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var zn={animationend:Ia("Animation","AnimationEnd"),animationiteration:Ia("Animation","AnimationIteration"),animationstart:Ia("Animation","AnimationStart"),transitionrun:Ia("Transition","TransitionRun"),transitionstart:Ia("Transition","TransitionStart"),transitioncancel:Ia("Transition","TransitionCancel"),transitionend:Ia("Transition","TransitionEnd")},uu={},Fo={};Qt&&(Fo=document.createElement("div").style,"AnimationEvent"in window||(delete zn.animationend.animation,delete zn.animationiteration.animation,delete zn.animationstart.animation),"TransitionEvent"in window||delete zn.transitionend.transition);function Fa(e){if(uu[e])return uu[e];if(!zn[e])return e;var t=zn[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Fo)return uu[e]=t[l];return e}var Wo=Fa("animationend"),Po=Fa("animationiteration"),ef=Fa("animationstart"),Vp=Fa("transitionrun"),Kp=Fa("transitionstart"),Jp=Fa("transitioncancel"),tf=Fa("transitionend"),lf=new Map,ru="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ru.push("scrollEnd");function Nl(e,t){lf.set(e,t),zl(t,[e])}var Hi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ul=[],Cn=0,ou=0;function Bi(){for(var e=Cn,t=ou=Cn=0;t<e;){var l=ul[t];ul[t++]=null;var a=ul[t];ul[t++]=null;var s=ul[t];ul[t++]=null;var c=ul[t];if(ul[t++]=null,a!==null&&s!==null){var d=a.pending;d===null?s.next=s:(s.next=d.next,d.next=s),a.pending=s}c!==0&&af(l,s,c)}}function qi(e,t,l,a){ul[Cn++]=e,ul[Cn++]=t,ul[Cn++]=l,ul[Cn++]=a,ou|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function fu(e,t,l,a){return qi(e,t,l,a),Gi(e)}function Wa(e,t){return qi(e,null,null,t),Gi(e)}function af(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,c=e.return;c!==null;)c.childLanes|=l,a=c.alternate,a!==null&&(a.childLanes|=l),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(s=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,s&&t!==null&&(s=31-Rt(l),e=c.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),c):null}function Gi(e){if(50<Ps)throw Ps=0,br=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var On={};function Ip(e,t,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,l,a){return new Ip(e,t,l,a)}function du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ql(e,t){var l=e.alternate;return l===null?(l=Vt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function nf(e,t){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yi(e,t,l,a,s,c){var d=0;if(a=e,typeof e=="function")du(e)&&(d=1);else if(typeof e=="string")d=tx(e,l,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ae:return e=Vt(31,l,t,s),e.elementType=ae,e.lanes=c,e;case ee:return Pa(l.children,s,c,t);case V:d=8,s|=24;break;case z:return e=Vt(12,l,t,s|2),e.elementType=z,e.lanes=c,e;case F:return e=Vt(13,l,t,s),e.elementType=F,e.lanes=c,e;case $:return e=Vt(19,l,t,s),e.elementType=$,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case fe:d=10;break e;case de:d=9;break e;case te:d=11;break e;case Z:d=14;break e;case le:d=16,a=null;break e}d=29,l=Error(r(130,e===null?"null":typeof e,"")),a=null}return t=Vt(d,l,t,s),t.elementType=e,t.type=a,t.lanes=c,t}function Pa(e,t,l,a){return e=Vt(7,e,a,t),e.lanes=l,e}function hu(e,t,l){return e=Vt(6,e,null,t),e.lanes=l,e}function sf(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function mu(e,t,l){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var cf=new WeakMap;function rl(e,t){if(typeof e=="object"&&e!==null){var l=cf.get(e);return l!==void 0?l:(t={value:e,source:t,stack:$t(t)},cf.set(e,t),t)}return{value:e,source:t,stack:$t(t)}}var Dn=[],Mn=0,$i=null,Cs=0,ol=[],fl=0,xa=null,Ol=1,Dl="";function Zl(e,t){Dn[Mn++]=Cs,Dn[Mn++]=$i,$i=e,Cs=t}function uf(e,t,l){ol[fl++]=Ol,ol[fl++]=Dl,ol[fl++]=xa,xa=e;var a=Ol;e=Dl;var s=32-Rt(a)-1;a&=~(1<<s),l+=1;var c=32-Rt(t)+s;if(30<c){var d=s-s%5;c=(a&(1<<d)-1).toString(32),a>>=d,s-=d,Ol=1<<32-Rt(t)+s|l<<s|a,Dl=c+e}else Ol=1<<c|l<<s|a,Dl=e}function pu(e){e.return!==null&&(Zl(e,1),uf(e,1,0))}function gu(e){for(;e===$i;)$i=Dn[--Mn],Dn[Mn]=null,Cs=Dn[--Mn],Dn[Mn]=null;for(;e===xa;)xa=ol[--fl],ol[fl]=null,Dl=ol[--fl],ol[fl]=null,Ol=ol[--fl],ol[fl]=null}function rf(e,t){ol[fl++]=Ol,ol[fl++]=Dl,ol[fl++]=xa,Ol=t.id,Dl=t.overflow,xa=e}var kt=null,Ie=null,Ae=!1,va=null,dl=!1,xu=Error(r(519));function ya(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(rl(t,e)),xu}function of(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[pt]=e,t[it]=a,l){case"dialog":Se("cancel",t),Se("close",t);break;case"iframe":case"object":case"embed":Se("load",t);break;case"video":case"audio":for(l=0;l<ti.length;l++)Se(ti[l],t);break;case"source":Se("error",t);break;case"img":case"image":case"link":Se("error",t),Se("load",t);break;case"details":Se("toggle",t);break;case"input":Se("invalid",t),bs(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Se("invalid",t);break;case"textarea":Se("invalid",t),Ri(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Eh(t.textContent,l)?(a.popover!=null&&(Se("beforetoggle",t),Se("toggle",t)),a.onScroll!=null&&Se("scroll",t),a.onScrollEnd!=null&&Se("scrollend",t),a.onClick!=null&&(t.onclick=w),t=!0):t=!1,t||ya(e,!0)}function ff(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:dl=!1;return;case 27:case 3:dl=!0;return;default:kt=kt.return}}function Un(e){if(e!==kt)return!1;if(!Ae)return ff(e),Ae=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Mr(e.type,e.memoizedProps)),l=!l),l&&Ie&&ya(e),ff(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Uh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ie=Uh(e)}else t===27?(t=Ie,Oa(e.type)?(e=qr,qr=null,Ie=e):Ie=t):Ie=kt?ml(e.stateNode.nextSibling):null;return!0}function en(){Ie=kt=null,Ae=!1}function vu(){var e=va;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),va=null),e}function Os(e){va===null?va=[e]:va.push(e)}var yu=N(null),tn=null,Vl=null;function ba(e,t,l){J(yu,t._currentValue),t._currentValue=l}function Kl(e){e._currentValue=yu.current,H(yu)}function bu(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function ju(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var c=s.dependencies;if(c!==null){var d=s.child;c=c.firstContext;e:for(;c!==null;){var m=c;c=s;for(var b=0;b<t.length;b++)if(m.context===t[b]){c.lanes|=l,m=c.alternate,m!==null&&(m.lanes|=l),bu(c.return,l,e),a||(d=null);break e}c=m.next}}else if(s.tag===18){if(d=s.return,d===null)throw Error(r(341));d.lanes|=l,c=d.alternate,c!==null&&(c.lanes|=l),bu(d,l,e),d=null}else d=s.child;if(d!==null)d.return=s;else for(d=s;d!==null;){if(d===e){d=null;break}if(s=d.sibling,s!==null){s.return=d.return,d=s;break}d=d.return}s=d}}function Ln(e,t,l,a){e=null;for(var s=t,c=!1;s!==null;){if(!c){if((s.flags&524288)!==0)c=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var d=s.alternate;if(d===null)throw Error(r(387));if(d=d.memoizedProps,d!==null){var m=s.type;Zt(s.pendingProps.value,d.value)||(e!==null?e.push(m):e=[m])}}else if(s===Ee.current){if(d=s.alternate,d===null)throw Error(r(387));d.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}s=s.return}e!==null&&ju(t,e,l,a),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 ln(e){tn=e,Vl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return df(tn,e)}function Qi(e,t){return tn===null&&ln(e),df(e,t)}function df(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Vl===null){if(e===null)throw Error(r(308));Vl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Vl=Vl.next=t;return l}var Fp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Wp=u.unstable_scheduleCallback,Pp=u.unstable_NormalPriority,rt={$$typeof:fe,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Nu(){return{controller:new Fp,data:new Map,refCount:0}}function Ds(e){e.refCount--,e.refCount===0&&Wp(Pp,function(){e.controller.abort()})}var Ms=null,Su=0,Hn=0,Bn=null;function eg(e,t){if(Ms===null){var l=Ms=[];Su=0,Hn=Tr(),Bn={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Su++,t.then(hf,hf),t}function hf(){if(--Su===0&&Ms!==null){Bn!==null&&(Bn.status="fulfilled");var e=Ms;Ms=null,Hn=0,Bn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function tg(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var mf=D.S;D.S=function(e,t){Fd=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&eg(e,t),mf!==null&&mf(e,t)};var an=N(null);function wu(){var e=an.current;return e!==null?e:Ke.pooledCache}function Zi(e,t){t===null?J(an,an.current):J(an,t.pool)}function pf(){var e=wu();return e===null?null:{parent:rt._currentValue,pool:e}}var qn=Error(r(460)),ku=Error(r(474)),Vi=Error(r(542)),Ki={then:function(){}};function gf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(w,w),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yf(e),e;default:if(typeof t.status=="string")t.then(w,w);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yf(e),e}throw sn=t,qn}}function nn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(sn=l,qn):l}}var sn=null;function vf(){if(sn===null)throw Error(r(459));var e=sn;return sn=null,e}function yf(e){if(e===qn||e===Vi)throw Error(r(483))}var Gn=null,Us=0;function Ji(e){var t=Us;return Us+=1,Gn===null&&(Gn=[]),xf(Gn,e,t)}function Ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ii(e,t){throw t.$$typeof===T?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bf(e){function t(k,j){if(e){var E=k.deletions;E===null?(k.deletions=[j],k.flags|=16):E.push(j)}}function l(k,j){if(!e)return null;for(;j!==null;)t(k,j),j=j.sibling;return null}function a(k){for(var j=new Map;k!==null;)k.key!==null?j.set(k.key,k):j.set(k.index,k),k=k.sibling;return j}function s(k,j){return k=Ql(k,j),k.index=0,k.sibling=null,k}function c(k,j,E){return k.index=E,e?(E=k.alternate,E!==null?(E=E.index,E<j?(k.flags|=67108866,j):E):(k.flags|=67108866,j)):(k.flags|=1048576,j)}function d(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function m(k,j,E,L){return j===null||j.tag!==6?(j=hu(E,k.mode,L),j.return=k,j):(j=s(j,E),j.return=k,j)}function b(k,j,E,L){var ue=E.type;return ue===ee?M(k,j,E.props.children,L,E.key):j!==null&&(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&nn(ue)===j.type)?(j=s(j,E.props),Ls(j,E),j.return=k,j):(j=Yi(E.type,E.key,E.props,null,k.mode,L),Ls(j,E),j.return=k,j)}function A(k,j,E,L){return j===null||j.tag!==4||j.stateNode.containerInfo!==E.containerInfo||j.stateNode.implementation!==E.implementation?(j=mu(E,k.mode,L),j.return=k,j):(j=s(j,E.children||[]),j.return=k,j)}function M(k,j,E,L,ue){return j===null||j.tag!==7?(j=Pa(E,k.mode,L,ue),j.return=k,j):(j=s(j,E),j.return=k,j)}function B(k,j,E){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=hu(""+j,k.mode,E),j.return=k,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case U:return E=Yi(j.type,j.key,j.props,null,k.mode,E),Ls(E,j),E.return=k,E;case Y:return j=mu(j,k.mode,E),j.return=k,j;case le:return j=nn(j),B(k,j,E)}if(at(j)||W(j))return j=Pa(j,k.mode,E,null),j.return=k,j;if(typeof j.then=="function")return B(k,Ji(j),E);if(j.$$typeof===fe)return B(k,Qi(k,j),E);Ii(k,j)}return null}function R(k,j,E,L){var ue=j!==null?j.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return ue!==null?null:m(k,j,""+E,L);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case U:return E.key===ue?b(k,j,E,L):null;case Y:return E.key===ue?A(k,j,E,L):null;case le:return E=nn(E),R(k,j,E,L)}if(at(E)||W(E))return ue!==null?null:M(k,j,E,L,null);if(typeof E.then=="function")return R(k,j,Ji(E),L);if(E.$$typeof===fe)return R(k,j,Qi(k,E),L);Ii(k,E)}return null}function O(k,j,E,L,ue){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return k=k.get(E)||null,m(j,k,""+L,ue);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case U:return k=k.get(L.key===null?E:L.key)||null,b(j,k,L,ue);case Y:return k=k.get(L.key===null?E:L.key)||null,A(j,k,L,ue);case le:return L=nn(L),O(k,j,E,L,ue)}if(at(L)||W(L))return k=k.get(E)||null,M(j,k,L,ue,null);if(typeof L.then=="function")return O(k,j,E,Ji(L),ue);if(L.$$typeof===fe)return O(k,j,E,Qi(j,L),ue);Ii(j,L)}return null}function se(k,j,E,L){for(var ue=null,De=null,ie=j,xe=j=0,Te=null;ie!==null&&xe<E.length;xe++){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Me=R(k,ie,E[xe],L);if(Me===null){ie===null&&(ie=Te);break}e&&ie&&Me.alternate===null&&t(k,ie),j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me,ie=Te}if(xe===E.length)return l(k,ie),Ae&&Zl(k,xe),ue;if(ie===null){for(;xe<E.length;xe++)ie=B(k,E[xe],L),ie!==null&&(j=c(ie,j,xe),De===null?ue=ie:De.sibling=ie,De=ie);return Ae&&Zl(k,xe),ue}for(ie=a(ie);xe<E.length;xe++)Te=O(ie,k,xe,E[xe],L),Te!==null&&(e&&Te.alternate!==null&&ie.delete(Te.key===null?xe:Te.key),j=c(Te,j,xe),De===null?ue=Te:De.sibling=Te,De=Te);return e&&ie.forEach(function(Ha){return t(k,Ha)}),Ae&&Zl(k,xe),ue}function oe(k,j,E,L){if(E==null)throw Error(r(151));for(var ue=null,De=null,ie=j,xe=j=0,Te=null,Me=E.next();ie!==null&&!Me.done;xe++,Me=E.next()){ie.index>xe?(Te=ie,ie=null):Te=ie.sibling;var Ha=R(k,ie,Me.value,L);if(Ha===null){ie===null&&(ie=Te);break}e&&ie&&Ha.alternate===null&&t(k,ie),j=c(Ha,j,xe),De===null?ue=Ha:De.sibling=Ha,De=Ha,ie=Te}if(Me.done)return l(k,ie),Ae&&Zl(k,xe),ue;if(ie===null){for(;!Me.done;xe++,Me=E.next())Me=B(k,Me.value,L),Me!==null&&(j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return Ae&&Zl(k,xe),ue}for(ie=a(ie);!Me.done;xe++,Me=E.next())Me=O(ie,k,xe,Me.value,L),Me!==null&&(e&&Me.alternate!==null&&ie.delete(Me.key===null?xe:Me.key),j=c(Me,j,xe),De===null?ue=Me:De.sibling=Me,De=Me);return e&&ie.forEach(function(dx){return t(k,dx)}),Ae&&Zl(k,xe),ue}function Ze(k,j,E,L){if(typeof E=="object"&&E!==null&&E.type===ee&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case U:e:{for(var ue=E.key;j!==null;){if(j.key===ue){if(ue=E.type,ue===ee){if(j.tag===7){l(k,j.sibling),L=s(j,E.props.children),L.return=k,k=L;break e}}else if(j.elementType===ue||typeof ue=="object"&&ue!==null&&ue.$$typeof===le&&nn(ue)===j.type){l(k,j.sibling),L=s(j,E.props),Ls(L,E),L.return=k,k=L;break e}l(k,j);break}else t(k,j);j=j.sibling}E.type===ee?(L=Pa(E.props.children,k.mode,L,E.key),L.return=k,k=L):(L=Yi(E.type,E.key,E.props,null,k.mode,L),Ls(L,E),L.return=k,k=L)}return d(k);case Y:e:{for(ue=E.key;j!==null;){if(j.key===ue)if(j.tag===4&&j.stateNode.containerInfo===E.containerInfo&&j.stateNode.implementation===E.implementation){l(k,j.sibling),L=s(j,E.children||[]),L.return=k,k=L;break e}else{l(k,j);break}else t(k,j);j=j.sibling}L=mu(E,k.mode,L),L.return=k,k=L}return d(k);case le:return E=nn(E),Ze(k,j,E,L)}if(at(E))return se(k,j,E,L);if(W(E)){if(ue=W(E),typeof ue!="function")throw Error(r(150));return E=ue.call(E),oe(k,j,E,L)}if(typeof E.then=="function")return Ze(k,j,Ji(E),L);if(E.$$typeof===fe)return Ze(k,j,Qi(k,E),L);Ii(k,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,j!==null&&j.tag===6?(l(k,j.sibling),L=s(j,E),L.return=k,k=L):(l(k,j),L=hu(E,k.mode,L),L.return=k,k=L),d(k)):l(k,j)}return function(k,j,E,L){try{Us=0;var ue=Ze(k,j,E,L);return Gn=null,ue}catch(ie){if(ie===qn||ie===Vi)throw ie;var De=Vt(29,ie,null,k.mode);return De.lanes=L,De.return=k,De}}}var cn=bf(!0),jf=bf(!1),ja=!1;function Tu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Eu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sa(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Le&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Gi(e),af(e,null,l),t}return qi(e,a,t,l),Gi(e)}function Hs(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,jn(e,l)}}function Au(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,c=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};c===null?s=c=d:c=c.next=d,l=l.next}while(l!==null);c===null?s=c=t:c=c.next=t}else s=c=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:c,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var _u=!1;function Bs(){if(_u){var e=Bn;if(e!==null)throw e}}function qs(e,t,l,a){_u=!1;var s=e.updateQueue;ja=!1;var c=s.firstBaseUpdate,d=s.lastBaseUpdate,m=s.shared.pending;if(m!==null){s.shared.pending=null;var b=m,A=b.next;b.next=null,d===null?c=A:d.next=A,d=b;var M=e.alternate;M!==null&&(M=M.updateQueue,m=M.lastBaseUpdate,m!==d&&(m===null?M.firstBaseUpdate=A:m.next=A,M.lastBaseUpdate=b))}if(c!==null){var B=s.baseState;d=0,M=A=b=null,m=c;do{var R=m.lane&-536870913,O=R!==m.lane;if(O?(ke&R)===R:(a&R)===R){R!==0&&R===Hn&&(_u=!0),M!==null&&(M=M.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var se=e,oe=m;R=t;var Ze=l;switch(oe.tag){case 1:if(se=oe.payload,typeof se=="function"){B=se.call(Ze,B,R);break e}B=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,R=typeof se=="function"?se.call(Ze,B,R):se,R==null)break e;B=_({},B,R);break e;case 2:ja=!0}}R=m.callback,R!==null&&(e.flags|=64,O&&(e.flags|=8192),O=s.callbacks,O===null?s.callbacks=[R]:O.push(R))}else O={lane:R,tag:m.tag,payload:m.payload,callback:m.callback,next:null},M===null?(A=M=O,b=B):M=M.next=O,d|=R;if(m=m.next,m===null){if(m=s.shared.pending,m===null)break;O=m,m=O.next,O.next=null,s.lastBaseUpdate=O,s.shared.pending=null}}while(!0);M===null&&(b=B),s.baseState=b,s.firstBaseUpdate=A,s.lastBaseUpdate=M,c===null&&(s.shared.lanes=0),Aa|=d,e.lanes=d,e.memoizedState=B}}function Nf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function Sf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Nf(l[e],t)}var Yn=N(null),Fi=N(0);function wf(e,t){e=aa,J(Fi,e),J(Yn,t),aa=e|t.baseLanes}function Ru(){J(Fi,aa),J(Yn,Yn.current)}function zu(){aa=Fi.current,H(Yn),H(Fi)}var Kt=N(null),hl=null;function wa(e){var t=e.alternate;J(nt,nt.current&1),J(Kt,e),hl===null&&(t===null||Yn.current!==null||t.memoizedState!==null)&&(hl=e)}function Cu(e){J(nt,nt.current),J(Kt,e),hl===null&&(hl=e)}function kf(e){e.tag===22?(J(nt,nt.current),J(Kt,e),hl===null&&(hl=e)):ka()}function ka(){J(nt,nt.current),J(Kt,Kt.current)}function Jt(e){H(Kt),hl===e&&(hl=null),H(nt)}var nt=N(0);function Wi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Hr(l)||Br(l)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jl=0,ge=null,Xe=null,ot=null,Pi=!1,$n=!1,un=!1,ec=0,Gs=0,Xn=null,lg=0;function tt(){throw Error(r(321))}function Ou(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Zt(e[l],t[l]))return!1;return!0}function Du(e,t,l,a,s,c){return Jl=c,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?ud:Ju,un=!1,c=l(a,s),un=!1,$n&&(c=Ef(t,l,a,s)),Tf(e),c}function Tf(e){D.H=Xs;var t=Xe!==null&&Xe.next!==null;if(Jl=0,ot=Xe=ge=null,Pi=!1,Gs=0,Xn=null,t)throw Error(r(300));e===null||ft||(e=e.dependencies,e!==null&&Xi(e)&&(ft=!0))}function Ef(e,t,l,a){ge=e;var s=0;do{if($n&&(Xn=null),Gs=0,$n=!1,25<=s)throw Error(r(301));if(s+=1,ot=Xe=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}D.H=rd,c=t(l,a)}while($n);return c}function ag(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Ys(t):t,e=e.useState()[0],(Xe!==null?Xe.memoizedState:null)!==e&&(ge.flags|=1024),t}function Mu(){var e=ec!==0;return ec=0,e}function Uu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Lu(e){if(Pi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Pi=!1}Jl=0,ot=Xe=ge=null,$n=!1,Gs=ec=0,Xn=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?ge.memoizedState=ot=e:ot=ot.next=e,ot}function st(){if(Xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Xe.next;var t=ot===null?ge.memoizedState:ot.next;if(t!==null)ot=t,Xe=e;else{if(e===null)throw ge.alternate===null?Error(r(467)):Error(r(310));Xe=e,e={memoizedState:Xe.memoizedState,baseState:Xe.baseState,baseQueue:Xe.baseQueue,queue:Xe.queue,next:null},ot===null?ge.memoizedState=ot=e:ot=ot.next=e}return ot}function tc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ys(e){var t=Gs;return Gs+=1,Xn===null&&(Xn=[]),e=xf(Xn,e,t),t=ge,(ot===null?t.memoizedState:ot.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?ud:Ju),e}function lc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ys(e);if(e.$$typeof===fe)return Tt(e)}throw Error(r(438,String(e)))}function Hu(e){var t=null,l=ge.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=ge.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=tc(),ge.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=je;return t.index++,l}function Il(e,t){return typeof t=="function"?t(e):t}function ac(e){var t=st();return Bu(t,Xe,e)}function Bu(e,t,l){var a=e.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=l;var s=e.baseQueue,c=a.pending;if(c!==null){if(s!==null){var d=s.next;s.next=c.next,c.next=d}t.baseQueue=s=c,a.pending=null}if(c=e.baseState,s===null)e.memoizedState=c;else{t=s.next;var m=d=null,b=null,A=t,M=!1;do{var B=A.lane&-536870913;if(B!==A.lane?(ke&B)===B:(Jl&B)===B){var R=A.revertLane;if(R===0)b!==null&&(b=b.next={lane:0,revertLane:0,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null}),B===Hn&&(M=!0);else if((Jl&R)===R){A=A.next,R===Hn&&(M=!0);continue}else B={lane:0,revertLane:A.revertLane,gesture:null,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=B,d=c):b=b.next=B,ge.lanes|=R,Aa|=R;B=A.action,un&&l(c,B),c=A.hasEagerState?A.eagerState:l(c,B)}else R={lane:B,revertLane:A.revertLane,gesture:A.gesture,action:A.action,hasEagerState:A.hasEagerState,eagerState:A.eagerState,next:null},b===null?(m=b=R,d=c):b=b.next=R,ge.lanes|=B,Aa|=B;A=A.next}while(A!==null&&A!==t);if(b===null?d=c:b.next=m,!Zt(c,e.memoizedState)&&(ft=!0,M&&(l=Bn,l!==null)))throw l;e.memoizedState=c,e.baseState=d,e.baseQueue=b,a.lastRenderedState=c}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qu(e){var t=st(),l=t.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,c=t.memoizedState;if(s!==null){l.pending=null;var d=s=s.next;do c=e(c,d.action),d=d.next;while(d!==s);Zt(c,t.memoizedState)||(ft=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),l.lastRenderedState=c}return[c,a]}function Af(e,t,l){var a=ge,s=st(),c=Ae;if(c){if(l===void 0)throw Error(r(407));l=l()}else l=t();var d=!Zt((Xe||s).memoizedState,l);if(d&&(s.memoizedState=l,ft=!0),s=s.queue,$u(zf.bind(null,a,s,e),[e]),s.getSnapshot!==t||d||ot!==null&&ot.memoizedState.tag&1){if(a.flags|=2048,Qn(9,{destroy:void 0},Rf.bind(null,a,s,l,t),null),Ke===null)throw Error(r(349));c||(Jl&127)!==0||_f(a,t,l)}return l}function _f(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=ge.updateQueue,t===null?(t=tc(),ge.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Rf(e,t,l,a){t.value=l,t.getSnapshot=a,Cf(t)&&Of(e)}function zf(e,t,l){return l(function(){Cf(t)&&Of(e)})}function Cf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Zt(e,l)}catch{return!0}}function Of(e){var t=Wa(e,2);t!==null&&Gt(t,e,2)}function Gu(e){var t=Mt();if(typeof e=="function"){var l=e;if(e=l(),un){Xt(!0);try{l()}finally{Xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:e},t}function Df(e,t,l,a){return e.baseState=l,Bu(e,Xe,typeof a=="function"?a:Il)}function ng(e,t,l,a,s){if(ic(e))throw Error(r(485));if(e=t.action,e!==null){var c={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){c.listeners.push(d)}};D.T!==null?l(!0):c.isTransition=!1,a(c),l=t.pending,l===null?(c.next=t.pending=c,Mf(t,c)):(c.next=l.next,t.pending=l.next=c)}}function Mf(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var c=D.T,d={};D.T=d;try{var m=l(s,a),b=D.S;b!==null&&b(d,m),Uf(e,t,m)}catch(A){Yu(e,t,A)}finally{c!==null&&d.types!==null&&(c.types=d.types),D.T=c}}else try{c=l(s,a),Uf(e,t,c)}catch(A){Yu(e,t,A)}}function Uf(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Lf(e,t,a)},function(a){return Yu(e,t,a)}):Lf(e,t,l)}function Lf(e,t,l){t.status="fulfilled",t.value=l,Hf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Mf(e,l)))}function Yu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Hf(t),t=t.next;while(t!==a)}e.action=null}function Hf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bf(e,t){return t}function qf(e,t){if(Ae){var l=Ke.formState;if(l!==null){e:{var a=ge;if(Ae){if(Ie){t:{for(var s=Ie,c=dl;s.nodeType!==8;){if(!c){s=null;break t}if(s=ml(s.nextSibling),s===null){s=null;break t}}c=s.data,s=c==="F!"||c==="F"?s:null}if(s){Ie=ml(s.nextSibling),a=s.data==="F!";break e}}ya(a)}a=!1}a&&(t=l[0])}}return l=Mt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bf,lastRenderedState:t},l.queue=a,l=sd.bind(null,ge,a),a.dispatch=l,a=Gu(!1),c=Ku.bind(null,ge,!1,a.queue),a=Mt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=ng.bind(null,ge,s,c,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function Gf(e){var t=st();return Yf(t,Xe,e)}function Yf(e,t,l){if(t=Bu(e,t,Bf)[0],e=ac(Il)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ys(t)}catch(d){throw d===qn?Vi:d}else a=t;t=st();var s=t.queue,c=s.dispatch;return l!==t.memoizedState&&(ge.flags|=2048,Qn(9,{destroy:void 0},sg.bind(null,s,l),null)),[a,c,e]}function sg(e,t){e.action=t}function $f(e){var t=st(),l=Xe;if(l!==null)return Yf(t,l,e);st(),t=t.memoizedState,l=st();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Qn(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=ge.updateQueue,t===null&&(t=tc(),ge.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Xf(){return st().memoizedState}function nc(e,t,l,a){var s=Mt();ge.flags|=e,s.memoizedState=Qn(1|t,{destroy:void 0},l,a===void 0?null:a)}function sc(e,t,l,a){var s=st();a=a===void 0?null:a;var c=s.memoizedState.inst;Xe!==null&&a!==null&&Ou(a,Xe.memoizedState.deps)?s.memoizedState=Qn(t,c,l,a):(ge.flags|=e,s.memoizedState=Qn(1|t,c,l,a))}function Qf(e,t){nc(8390656,8,e,t)}function $u(e,t){sc(2048,8,e,t)}function ig(e){ge.flags|=4;var t=ge.updateQueue;if(t===null)t=tc(),ge.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Zf(e){var t=st().memoizedState;return ig({ref:t,nextImpl:e}),function(){if((Le&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function Vf(e,t){return sc(4,2,e,t)}function Kf(e,t){return sc(4,4,e,t)}function Jf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function If(e,t,l){l=l!=null?l.concat([e]):null,sc(4,4,Jf.bind(null,t,e),l)}function Xu(){}function Ff(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ou(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Wf(e,t){var l=st();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ou(t,a[1]))return a[0];if(a=e(),un){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[a,t],a}function Qu(e,t,l){return l===void 0||(Jl&1073741824)!==0&&(ke&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Pd(),ge.lanes|=e,Aa|=e,l)}function Pf(e,t,l,a){return Zt(l,t)?l:Yn.current!==null?(e=Qu(e,l,a),Zt(e,t)||(ft=!0),e):(Jl&42)===0||(Jl&1073741824)!==0&&(ke&261930)===0?(ft=!0,e.memoizedState=l):(e=Pd(),ge.lanes|=e,Aa|=e,t)}function ed(e,t,l,a,s){var c=K.p;K.p=c!==0&&8>c?c:8;var d=D.T,m={};D.T=m,Ku(e,!1,t,l);try{var b=s(),A=D.S;if(A!==null&&A(m,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var M=tg(b,a);$s(e,t,M,Wt(e))}else $s(e,t,a,Wt(e))}catch(B){$s(e,t,{then:function(){},status:"rejected",reason:B},Wt())}finally{K.p=c,d!==null&&m.types!==null&&(d.types=m.types),D.T=d}}function cg(){}function Zu(e,t,l,a){if(e.tag!==5)throw Error(r(476));var s=td(e).queue;ed(e,s,t,ce,l===null?cg:function(){return ld(e),l(a)})}function td(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:ce},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Il,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ld(e){var t=td(e);t.next===null&&(t=e.alternate.memoizedState),$s(e,t.next.queue,{},Wt())}function Vu(){return Tt(ii)}function ad(){return st().memoizedState}function nd(){return st().memoizedState}function ug(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=Na(l);var a=Sa(t,e,l);a!==null&&(Gt(a,t,l),Hs(a,t,l)),t={cache:Nu()},e.payload=t;return}t=t.return}}function rg(e,t,l){var a=Wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ic(e)?id(t,l):(l=fu(e,t,l,a),l!==null&&(Gt(l,e,a),cd(l,t,a)))}function sd(e,t,l){var a=Wt();$s(e,t,l,a)}function $s(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ic(e))id(t,s);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var d=t.lastRenderedState,m=c(d,l);if(s.hasEagerState=!0,s.eagerState=m,Zt(m,d))return qi(e,t,s,0),Ke===null&&Bi(),!1}catch{}if(l=fu(e,t,s,a),l!==null)return Gt(l,e,a),cd(l,t,a),!0}return!1}function Ku(e,t,l,a){if(a={lane:2,revertLane:Tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(r(479))}else t=fu(e,l,a,2),t!==null&&Gt(t,e,2)}function ic(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function id(e,t){$n=Pi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function cd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,jn(e,l)}}var Xs={readContext:Tt,use:lc,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Xs.useEffectEvent=tt;var ud={readContext:Tt,use:lc,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Qf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,nc(4194308,4,Jf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return nc(4194308,4,e,t)},useInsertionEffect:function(e,t){nc(4,2,e,t)},useMemo:function(e,t){var l=Mt();t=t===void 0?null:t;var a=e();if(un){Xt(!0);try{e()}finally{Xt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Mt();if(l!==void 0){var s=l(t);if(un){Xt(!0);try{l(t)}finally{Xt(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=rg.bind(null,ge,e),[a.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Gu(e);var t=e.queue,l=sd.bind(null,ge,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Xu,useDeferredValue:function(e,t){var l=Mt();return Qu(l,e,t)},useTransition:function(){var e=Gu(!1);return e=ed.bind(null,ge,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=ge,s=Mt();if(Ae){if(l===void 0)throw Error(r(407));l=l()}else{if(l=t(),Ke===null)throw Error(r(349));(ke&127)!==0||_f(a,t,l)}s.memoizedState=l;var c={value:l,getSnapshot:t};return s.queue=c,Qf(zf.bind(null,a,c,e),[e]),a.flags|=2048,Qn(9,{destroy:void 0},Rf.bind(null,a,c,l,t),null),l},useId:function(){var e=Mt(),t=Ke.identifierPrefix;if(Ae){var l=Dl,a=Ol;l=(a&~(1<<32-Rt(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=ec++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=lg++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vu,useFormState:qf,useActionState:qf,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ku.bind(null,ge,!0,l),l.dispatch=t,[e,t]},useMemoCache:Hu,useCacheRefresh:function(){return Mt().memoizedState=ug.bind(null,ge)},useEffectEvent:function(e){var t=Mt(),l={impl:e};return t.memoizedState=l,function(){if((Le&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Ju={readContext:Tt,use:lc,useCallback:Ff,useContext:Tt,useEffect:$u,useImperativeHandle:If,useInsertionEffect:Vf,useLayoutEffect:Kf,useMemo:Wf,useReducer:ac,useRef:Xf,useState:function(){return ac(Il)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return Pf(l,Xe.memoizedState,e,t)},useTransition:function(){var e=ac(Il)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Af,useId:ad,useHostTransitionStatus:Vu,useFormState:Gf,useActionState:Gf,useOptimistic:function(e,t){var l=st();return Df(l,Xe,e,t)},useMemoCache:Hu,useCacheRefresh:nd};Ju.useEffectEvent=Zf;var rd={readContext:Tt,use:lc,useCallback:Ff,useContext:Tt,useEffect:$u,useImperativeHandle:If,useInsertionEffect:Vf,useLayoutEffect:Kf,useMemo:Wf,useReducer:qu,useRef:Xf,useState:function(){return qu(Il)},useDebugValue:Xu,useDeferredValue:function(e,t){var l=st();return Xe===null?Qu(l,e,t):Pf(l,Xe.memoizedState,e,t)},useTransition:function(){var e=qu(Il)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ys(e),t]},useSyncExternalStore:Af,useId:ad,useHostTransitionStatus:Vu,useFormState:$f,useActionState:$f,useOptimistic:function(e,t){var l=st();return Xe!==null?Df(l,Xe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Hu,useCacheRefresh:nd};rd.useEffectEvent=Zf;function Iu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:_({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fu={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=Na(a);s.payload=t,l!=null&&(s.callback=l),t=Sa(e,s,a),t!==null&&(Gt(t,e,a),Hs(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=Na(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=Sa(e,s,a),t!==null&&(Gt(t,e,a),Hs(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),a=Na(l);a.tag=2,t!=null&&(a.callback=t),t=Sa(e,a,l),t!==null&&(Gt(t,e,l),Hs(t,e,l))}};function od(e,t,l,a,s,c,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,c,d):t.prototype&&t.prototype.isPureReactComponent?!Rs(l,a)||!Rs(s,c):!0}function fd(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&Fu.enqueueReplaceState(t,t.state,null)}function rn(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=_({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function dd(e){Hi(e)}function hd(e){console.error(e)}function md(e){Hi(e)}function cc(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function pd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Wu(e,t,l){return l=Na(l),l.tag=3,l.payload={element:null},l.callback=function(){cc(e,t)},l}function gd(e){return e=Na(e),e.tag=3,e}function xd(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var c=a.value;e.payload=function(){return s(c)},e.callback=function(){pd(t,l,a)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){pd(t,l,a),typeof s!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var m=a.stack;this.componentDidCatch(a.value,{componentStack:m!==null?m:""})})}function og(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Ln(t,l,s,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return hl===null?yc():l.alternate===null&<===0&&(lt=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Ki?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Sr(e,a,s)),!1;case 22:return l.flags|=65536,a===Ki?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Sr(e,a,s)),!1}throw Error(r(435,l.tag))}return Sr(e,a,s),yc(),!1}if(Ae)return t=Kt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==xu&&(e=Error(r(422),{cause:a}),Os(rl(e,l)))):(a!==xu&&(t=Error(r(423),{cause:a}),Os(rl(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=rl(a,l),s=Wu(e.stateNode,a,s),Au(e,s),lt!==4&&(lt=2)),!1;var c=Error(r(520),{cause:a});if(c=rl(c,l),Ws===null?Ws=[c]:Ws.push(c),lt!==4&&(lt=2),t===null)return!0;a=rl(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=Wu(l.stateNode,a,e),Au(l,e),!1;case 1:if(t=l.type,c=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(_a===null||!_a.has(c))))return l.flags|=65536,s&=-s,l.lanes|=s,s=gd(s),xd(s,e,l,a),Au(l,s),!1}l=l.return}while(l!==null);return!1}var Pu=Error(r(461)),ft=!1;function Et(e,t,l,a){t.child=e===null?jf(t,null,l,a):cn(t,e.child,l,a)}function vd(e,t,l,a,s){l=l.render;var c=t.ref;if("ref"in a){var d={};for(var m in a)m!=="ref"&&(d[m]=a[m])}else d=a;return ln(t),a=Du(e,t,l,d,c,s),m=Mu(),e!==null&&!ft?(Uu(e,t,s),Fl(e,t,s)):(Ae&&m&&pu(t),t.flags|=1,Et(e,t,a,s),t.child)}function yd(e,t,l,a,s){if(e===null){var c=l.type;return typeof c=="function"&&!du(c)&&c.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=c,bd(e,t,c,a,s)):(e=Yi(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!cr(e,s)){var d=c.memoizedProps;if(l=l.compare,l=l!==null?l:Rs,l(d,a)&&e.ref===t.ref)return Fl(e,t,s)}return t.flags|=1,e=Ql(c,a),e.ref=t.ref,e.return=t,t.child=e}function bd(e,t,l,a,s){if(e!==null){var c=e.memoizedProps;if(Rs(c,a)&&e.ref===t.ref)if(ft=!1,t.pendingProps=a=c,cr(e,s))(e.flags&131072)!==0&&(ft=!0);else return t.lanes=e.lanes,Fl(e,t,s)}return er(e,t,l,a,s)}function jd(e,t,l,a){var s=a.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~c}else a=0,t.child=null;return Nd(e,t,c,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zi(t,c!==null?c.cachePool:null),c!==null?wf(t,c):Ru(),kf(t);else return a=t.lanes=536870912,Nd(e,t,c!==null?c.baseLanes|l:l,l,a)}else c!==null?(Zi(t,c.cachePool),wf(t,c),ka(),t.memoizedState=null):(e!==null&&Zi(t,null),Ru(),ka());return Et(e,t,s,l),t.child}function Qs(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Nd(e,t,l,a,s){var c=wu();return c=c===null?null:{parent:rt._currentValue,pool:c},t.memoizedState={baseLanes:l,cachePool:c},e!==null&&Zi(t,null),Ru(),kf(t),e!==null&&Ln(e,t,a,!0),t.childLanes=s,null}function uc(e,t){return t=oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sd(e,t,l){return cn(t,e.child,null,l),e=uc(t,t.pendingProps),e.flags|=2,Jt(t),t.memoizedState=null,e}function fg(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(a.mode==="hidden")return e=uc(t,a),t.lanes=536870912,Qs(null,e);if(Cu(t),(e=Ie)?(e=Mh(e,dl),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Ol,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=sf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return uc(t,a)}var c=e.memoizedState;if(c!==null){var d=c.dehydrated;if(Cu(t),s)if(t.flags&256)t.flags&=-257,t=Sd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ft||Ln(e,t,l,!1),s=(l&e.childLanes)!==0,ft||s){if(a=Ke,a!==null&&(d=Nn(a,l),d!==0&&d!==c.retryLane))throw c.retryLane=d,Wa(e,d),Gt(a,e,d),Pu;yc(),t=Sd(e,t,l)}else e=c.treeContext,Ie=ml(d.nextSibling),kt=t,Ae=!0,va=null,dl=!1,e!==null&&rf(t,e),t=uc(t,a),t.flags|=4096;return t}return e=Ql(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function rc(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function er(e,t,l,a,s){return ln(t),l=Du(e,t,l,a,void 0,s),a=Mu(),e!==null&&!ft?(Uu(e,t,s),Fl(e,t,s)):(Ae&&a&&pu(t),t.flags|=1,Et(e,t,l,s),t.child)}function wd(e,t,l,a,s,c){return ln(t),t.updateQueue=null,l=Ef(t,a,l,s),Tf(e),a=Mu(),e!==null&&!ft?(Uu(e,t,c),Fl(e,t,c)):(Ae&&a&&pu(t),t.flags|=1,Et(e,t,l,c),t.child)}function kd(e,t,l,a,s){if(ln(t),t.stateNode===null){var c=On,d=l.contextType;typeof d=="object"&&d!==null&&(c=Tt(d)),c=new l(a,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Fu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=a,c.state=t.memoizedState,c.refs={},Tu(t),d=l.contextType,c.context=typeof d=="object"&&d!==null?Tt(d):On,c.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(Iu(t,l,d,a),c.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(d=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),d!==c.state&&Fu.enqueueReplaceState(c,c.state,null),qs(t,a,c,s),Bs(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){c=t.stateNode;var m=t.memoizedProps,b=rn(l,m);c.props=b;var A=c.context,M=l.contextType;d=On,typeof M=="object"&&M!==null&&(d=Tt(M));var B=l.getDerivedStateFromProps;M=typeof B=="function"||typeof c.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,M||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(m||A!==d)&&fd(t,c,a,d),ja=!1;var R=t.memoizedState;c.state=R,qs(t,a,c,s),Bs(),A=t.memoizedState,m||R!==A||ja?(typeof B=="function"&&(Iu(t,l,B,a),A=t.memoizedState),(b=ja||od(t,l,b,a,R,A,d))?(M||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=A),c.props=a,c.state=A,c.context=d,a=b):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{c=t.stateNode,Eu(e,t),d=t.memoizedProps,M=rn(l,d),c.props=M,B=t.pendingProps,R=c.context,A=l.contextType,b=On,typeof A=="object"&&A!==null&&(b=Tt(A)),m=l.getDerivedStateFromProps,(A=typeof m=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(d!==B||R!==b)&&fd(t,c,a,b),ja=!1,R=t.memoizedState,c.state=R,qs(t,a,c,s),Bs();var O=t.memoizedState;d!==B||R!==O||ja||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof m=="function"&&(Iu(t,l,m,a),O=t.memoizedState),(M=ja||od(t,l,M,a,R,O,b)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(A||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(a,O,b),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(a,O,b)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),c.props=a,c.state=O,c.context=b,a=M):(typeof c.componentDidUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&R===e.memoizedState||(t.flags|=1024),a=!1)}return c=a,rc(e,t),a=(t.flags&128)!==0,c||a?(c=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&a?(t.child=cn(t,e.child,null,s),t.child=cn(t,null,l,s)):Et(e,t,l,s),t.memoizedState=c.state,e=t.child):e=Fl(e,t,s),e}function Td(e,t,l,a){return en(),t.flags|=256,Et(e,t,l,a),t.child}var tr={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lr(e){return{baseLanes:e,cachePool:pf()}}function ar(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Ft),e}function Ed(e,t,l){var a=t.pendingProps,s=!1,c=(t.flags&128)!==0,d;if((d=c)||(d=e!==null&&e.memoizedState===null?!1:(nt.current&2)!==0),d&&(s=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(s?wa(t):ka(),(e=Ie)?(e=Mh(e,dl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Ol,overflow:Dl}:null,retryLane:536870912,hydrationErrors:null},l=sf(e),l.return=t,t.child=l,kt=t,Ie=null)):e=null,e===null)throw ya(t);return Br(e)?t.lanes=32:t.lanes=536870912,null}var m=a.children;return a=a.fallback,s?(ka(),s=t.mode,m=oc({mode:"hidden",children:m},s),a=Pa(a,s,l,null),m.return=t,a.return=t,m.sibling=a,t.child=m,a=t.child,a.memoizedState=lr(l),a.childLanes=ar(e,d,l),t.memoizedState=tr,Qs(null,a)):(wa(t),nr(t,m))}var b=e.memoizedState;if(b!==null&&(m=b.dehydrated,m!==null)){if(c)t.flags&256?(wa(t),t.flags&=-257,t=sr(e,t,l)):t.memoizedState!==null?(ka(),t.child=e.child,t.flags|=128,t=null):(ka(),m=a.fallback,s=t.mode,a=oc({mode:"visible",children:a.children},s),m=Pa(m,s,l,null),m.flags|=2,a.return=t,m.return=t,a.sibling=m,t.child=a,cn(t,e.child,null,l),a=t.child,a.memoizedState=lr(l),a.childLanes=ar(e,d,l),t.memoizedState=tr,t=Qs(null,a));else if(wa(t),Br(m)){if(d=m.nextSibling&&m.nextSibling.dataset,d)var A=d.dgst;d=A,a=Error(r(419)),a.stack="",a.digest=d,Os({value:a,source:null,stack:null}),t=sr(e,t,l)}else if(ft||Ln(e,t,l,!1),d=(l&e.childLanes)!==0,ft||d){if(d=Ke,d!==null&&(a=Nn(d,l),a!==0&&a!==b.retryLane))throw b.retryLane=a,Wa(e,a),Gt(d,e,a),Pu;Hr(m)||yc(),t=sr(e,t,l)}else Hr(m)?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,Ie=ml(m.nextSibling),kt=t,Ae=!0,va=null,dl=!1,e!==null&&rf(t,e),t=nr(t,a.children),t.flags|=4096);return t}return s?(ka(),m=a.fallback,s=t.mode,b=e.child,A=b.sibling,a=Ql(b,{mode:"hidden",children:a.children}),a.subtreeFlags=b.subtreeFlags&65011712,A!==null?m=Ql(A,m):(m=Pa(m,s,l,null),m.flags|=2),m.return=t,a.return=t,a.sibling=m,t.child=a,Qs(null,a),a=t.child,m=e.child.memoizedState,m===null?m=lr(l):(s=m.cachePool,s!==null?(b=rt._currentValue,s=s.parent!==b?{parent:b,pool:b}:s):s=pf(),m={baseLanes:m.baseLanes|l,cachePool:s}),a.memoizedState=m,a.childLanes=ar(e,d,l),t.memoizedState=tr,Qs(e.child,a)):(wa(t),l=e.child,e=l.sibling,l=Ql(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function nr(e,t){return t=oc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function oc(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function sr(e,t,l){return cn(t,e.child,null,l),e=nr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ad(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bu(e.return,t,l)}function ir(e,t,l,a,s,c){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:c}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=a,d.tail=l,d.tailMode=s,d.treeForkCount=c)}function _d(e,t,l){var a=t.pendingProps,s=a.revealOrder,c=a.tail;a=a.children;var d=nt.current,m=(d&2)!==0;if(m?(d=d&1|2,t.flags|=128):d&=1,J(nt,d),Et(e,t,a,l),a=Ae?Cs:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ad(e,l,t);else if(e.tag===19)Ad(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&Wi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),ir(t,!1,s,l,c,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Wi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}ir(t,!0,l,null,c,a);break;case"together":ir(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Fl(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Aa|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Ln(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,l=Ql(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Ql(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function cr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xi(e)))}function dg(e,t,l){switch(t.tag){case 3:mt(t,t.stateNode.containerInfo),ba(t,rt,e.memoizedState.cache),en();break;case 27:case 5:Re(t);break;case 4:mt(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cu(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wa(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Ed(e,t,l):(wa(t),e=Fl(e,t,l),e!==null?e.sibling:null);wa(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Ln(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return _d(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(nt,nt.current),a)break;return null;case 22:return t.lanes=0,jd(e,t,l,t.pendingProps);case 24:ba(t,rt,e.memoizedState.cache)}return Fl(e,t,l)}function Rd(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!cr(e,l)&&(t.flags&128)===0)return ft=!1,dg(e,t,l);ft=(e.flags&131072)!==0}else ft=!1,Ae&&(t.flags&1048576)!==0&&uf(t,Cs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=nn(t.elementType),t.type=e,typeof e=="function")du(e)?(a=rn(e,a),t.tag=1,t=kd(null,t,e,a,l)):(t.tag=0,t=er(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===te){t.tag=11,t=vd(null,t,e,a,l);break e}else if(s===Z){t.tag=14,t=yd(null,t,e,a,l);break e}}throw t=Je(e)||e,Error(r(306,t,""))}}return t;case 0:return er(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=rn(a,t.pendingProps),kd(e,t,a,s,l);case 3:e:{if(mt(t,t.stateNode.containerInfo),e===null)throw Error(r(387));a=t.pendingProps;var c=t.memoizedState;s=c.element,Eu(e,t),qs(t,a,null,l);var d=t.memoizedState;if(a=d.cache,ba(t,rt,a),a!==c.cache&&ju(t,[rt],l,!0),Bs(),a=d.element,c.isDehydrated)if(c={element:a,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Td(e,t,a,l);break e}else if(a!==s){s=rl(Error(r(424)),t),Os(s),t=Td(e,t,a,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ie=ml(e.firstChild),kt=t,Ae=!0,va=null,dl=!0,l=jf(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(en(),a===s){t=Fl(e,t,l);break e}Et(e,t,a,l)}t=t.child}return t;case 26:return rc(e,t),e===null?(l=Gh(t.type,null,t.pendingProps,null))?t.memoizedState=l:Ae||(l=t.type,e=t.pendingProps,a=Tc(pe.current).createElement(l),a[pt]=t,a[it]=e,At(a,l,e),ct(a),t.stateNode=a):t.memoizedState=Gh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Re(t),e===null&&Ae&&(a=t.stateNode=Hh(t.type,t.pendingProps,pe.current),kt=t,dl=!0,s=Ie,Oa(t.type)?(qr=s,Ie=ml(a.firstChild)):Ie=s),Et(e,t,t.pendingProps.children,l),rc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((s=a=Ie)&&(a=Yg(a,t.type,t.pendingProps,dl),a!==null?(t.stateNode=a,kt=t,Ie=ml(a.firstChild),dl=!1,s=!0):s=!1),s||ya(t)),Re(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,a=c.children,Mr(s,c)?a=null:d!==null&&Mr(s,d)&&(t.flags|=32),t.memoizedState!==null&&(s=Du(e,t,ag,null,null,l),ii._currentValue=s),rc(e,t),Et(e,t,a,l),t.child;case 6:return e===null&&Ae&&((e=l=Ie)&&(l=$g(l,t.pendingProps,dl),l!==null?(t.stateNode=l,kt=t,Ie=null,e=!0):e=!1),e||ya(t)),null;case 13:return Ed(e,t,l);case 4:return mt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=cn(t,null,a,l):Et(e,t,a,l),t.child;case 11:return vd(e,t,t.type,t.pendingProps,l);case 7:return Et(e,t,t.pendingProps,l),t.child;case 8:return Et(e,t,t.pendingProps.children,l),t.child;case 12:return Et(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ba(t,t.type,a.value),Et(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,ln(t),s=Tt(s),a=a(s),t.flags|=1,Et(e,t,a,l),t.child;case 14:return yd(e,t,t.type,t.pendingProps,l);case 15:return bd(e,t,t.type,t.pendingProps,l);case 19:return _d(e,t,l);case 31:return fg(e,t,l);case 22:return jd(e,t,l,t.pendingProps);case 24:return ln(t),a=Tt(rt),e===null?(s=wu(),s===null&&(s=Ke,c=Nu(),s.pooledCache=c,c.refCount++,c!==null&&(s.pooledCacheLanes|=l),s=c),t.memoizedState={parent:a,cache:s},Tu(t),ba(t,rt,s)):((e.lanes&l)!==0&&(Eu(e,t),qs(t,null,null,l),Bs()),s=e.memoizedState,c=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ba(t,rt,a)):(a=c.cache,ba(t,rt,a),a!==s.cache&&ju(t,[rt],l,!0))),Et(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Wl(e){e.flags|=4}function ur(e,t,l,a,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(ah())e.flags|=8192;else throw sn=Ki,ku}else e.flags&=-16777217}function zd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Zh(t))if(ah())e.flags|=8192;else throw sn=Ki,ku}function fc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ps():536870912,e.lanes|=t,Jn|=t)}function Zs(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function hg(e,t,l){var a=t.pendingProps;switch(gu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Kl(rt),q(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Un(t)?Wl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vu())),Fe(t),null;case 26:var s=t.type,c=t.memoizedState;return e===null?(Wl(t),c!==null?(Fe(t),zd(t,c)):(Fe(t),ur(t,s,null,a,l))):c?c!==e.memoizedState?(Wl(t),Fe(t),zd(t,c)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Wl(t),Fe(t),ur(t,s,e,a,l)),null;case 27:if(Ye(t),l=pe.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}e=Q.current,Un(t)?of(t):(e=Hh(s,a,l),t.stateNode=e,Wl(t))}return Fe(t),null;case 5:if(Ye(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(!a){if(t.stateNode===null)throw Error(r(166));return Fe(t),null}if(c=Q.current,Un(t))of(t);else{var d=Tc(pe.current);switch(c){case 1:c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":c=d.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":c=d.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":c=d.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof a.is=="string"?d.createElement("select",{is:a.is}):d.createElement("select"),a.multiple?c.multiple=!0:a.size&&(c.size=a.size);break;default:c=typeof a.is=="string"?d.createElement(s,{is:a.is}):d.createElement(s)}}c[pt]=t,c[it]=a;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)c.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=c;e:switch(At(c,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Wl(t)}}return Fe(t),ur(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Wl(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(r(166));if(e=pe.current,Un(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=kt,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[pt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Eh(e.nodeValue,l)),e||ya(t,!0)}else e=Tc(e).createTextNode(a),e[pt]=t,t.stateNode=e}return Fe(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Un(t),l!==null){if(e===null){if(!a)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[pt]=t}else en(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else l=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Jt(t),t):(Jt(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Fe(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Un(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));s[pt]=t}else en(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=vu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Jt(t),t):(Jt(t),null)}return Jt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),fc(t,t.updateQueue),Fe(t),null);case 4:return q(),e===null&&Rr(t.stateNode.containerInfo),Fe(t),null;case 10:return Kl(t.type),Fe(t),null;case 19:if(H(nt),a=t.memoizedState,a===null)return Fe(t),null;if(s=(t.flags&128)!==0,c=a.rendering,c===null)if(s)Zs(a,!1);else{if(lt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Wi(e),c!==null){for(t.flags|=128,Zs(a,!1),e=c.updateQueue,t.updateQueue=e,fc(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)nf(l,e),l=l.sibling;return J(nt,nt.current&1|2),Ae&&Zl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_t()>gc&&(t.flags|=128,s=!0,Zs(a,!1),t.lanes=4194304)}else{if(!s)if(e=Wi(c),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,fc(t,e),Zs(a,!0),a.tail===null&&a.tailMode==="hidden"&&!c.alternate&&!Ae)return Fe(t),null}else 2*_t()-a.renderingStartTime>gc&&l!==536870912&&(t.flags|=128,s=!0,Zs(a,!1),t.lanes=4194304);a.isBackwards?(c.sibling=t.child,t.child=c):(e=a.last,e!==null?e.sibling=c:t.child=c,a.last=c)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=_t(),e.sibling=null,l=nt.current,J(nt,s?l&1|2:l&1),Ae&&Zl(t,a.treeForkCount),e):(Fe(t),null);case 22:case 23:return Jt(t),zu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),l=t.updateQueue,l!==null&&fc(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&H(an),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Kl(rt),Fe(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function mg(e,t){switch(gu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Kl(rt),q(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ye(t),null;case 31:if(t.memoizedState!==null){if(Jt(t),t.alternate===null)throw Error(r(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Jt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));en()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(nt),null;case 4:return q(),null;case 10:return Kl(t.type),null;case 22:case 23:return Jt(t),zu(),e!==null&&H(an),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Kl(rt),null;case 25:return null;default:return null}}function Cd(e,t){switch(gu(t),t.tag){case 3:Kl(rt),q();break;case 26:case 27:case 5:Ye(t);break;case 4:q();break;case 31:t.memoizedState!==null&&Jt(t);break;case 13:Jt(t);break;case 19:H(nt);break;case 10:Kl(t.type);break;case 22:case 23:Jt(t),zu(),e!==null&&H(an);break;case 24:Kl(rt)}}function Vs(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var c=l.create,d=l.inst;a=c(),d.destroy=a}l=l.next}while(l!==s)}}catch(m){qe(t,t.return,m)}}function Ta(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){var d=a.inst,m=d.destroy;if(m!==void 0){d.destroy=void 0,s=t;var b=l,A=m;try{A()}catch(M){qe(s,b,M)}}}a=a.next}while(a!==c)}}catch(M){qe(t,t.return,M)}}function Od(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Sf(t,l)}catch(a){qe(e,e.return,a)}}}function Dd(e,t,l){l.props=rn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){qe(e,t,a)}}function Ks(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){qe(e,t,s)}}function Ml(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){qe(e,t,s)}else l.current=null}function Md(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){qe(e,e.return,s)}}function rr(e,t,l){try{var a=e.stateNode;Ug(a,e.type,l,t),a[it]=t}catch(s){qe(e,e.return,s)}}function Ud(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oa(e.type)||e.tag===4}function or(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ud(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&&Oa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fr(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=w));else if(a!==4&&(a===27&&Oa(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(fr(e,t,l),e=e.sibling;e!==null;)fr(e,t,l),e=e.sibling}function dc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Oa(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(dc(e,t,l),e=e.sibling;e!==null;)dc(e,t,l),e=e.sibling}function Ld(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);At(t,a,l),t[pt]=e,t[it]=l}catch(c){qe(e,e.return,c)}}var Pl=!1,dt=!1,dr=!1,Hd=typeof WeakSet=="function"?WeakSet:Set,bt=null;function pg(e,t){if(e=e.containerInfo,Or=Oc,e=Jo(e),su(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,c=a.focusNode;a=a.focusOffset;try{l.nodeType,c.nodeType}catch{l=null;break e}var d=0,m=-1,b=-1,A=0,M=0,B=e,R=null;t:for(;;){for(var O;B!==l||s!==0&&B.nodeType!==3||(m=d+s),B!==c||a!==0&&B.nodeType!==3||(b=d+a),B.nodeType===3&&(d+=B.nodeValue.length),(O=B.firstChild)!==null;)R=B,B=O;for(;;){if(B===e)break t;if(R===l&&++A===s&&(m=d),R===c&&++M===a&&(b=d),(O=B.nextSibling)!==null)break;B=R,R=B.parentNode}B=O}l=m===-1||b===-1?null:{start:m,end:b}}else l=null}l=l||{start:0,end:0}}else l=null;for(Dr={focusedElem:e,selectionRange:l},Oc=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,l=t,s=c.memoizedProps,c=c.memoizedState,a=l.stateNode;try{var se=rn(l.type,s);e=a.getSnapshotBeforeUpdate(se,c),a.__reactInternalSnapshotBeforeUpdate=e}catch(oe){qe(l,l.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Lr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lr(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function Bd(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:ta(e,l),a&4&&Vs(5,l);break;case 1:if(ta(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){qe(l,l.return,d)}else{var s=rn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){qe(l,l.return,d)}}a&64&&Od(l),a&512&&Ks(l,l.return);break;case 3:if(ta(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Sf(e,t)}catch(d){qe(l,l.return,d)}}break;case 27:t===null&&a&4&&Ld(l);case 26:case 5:ta(e,l),t===null&&a&4&&Md(l),a&512&&Ks(l,l.return);break;case 12:ta(e,l);break;case 31:ta(e,l),a&4&&Yd(e,l);break;case 13:ta(e,l),a&4&&$d(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=wg.bind(null,l),Xg(e,l))));break;case 22:if(a=l.memoizedState!==null||Pl,!a){t=t!==null&&t.memoizedState!==null||dt,s=Pl;var c=dt;Pl=a,(dt=t)&&!c?la(e,l,(l.subtreeFlags&8772)!==0):ta(e,l),Pl=s,dt=c}break;case 30:break;default:ta(e,l)}}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&&Qa(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 ea(e,t,l){for(l=l.child;l!==null;)Gd(e,t,l),l=l.sibling}function Gd(e,t,l){if(yt&&typeof yt.onCommitFiberUnmount=="function")try{yt.onCommitFiberUnmount(nl,l)}catch{}switch(l.tag){case 26:dt||Ml(l,t),ea(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:dt||Ml(l,t);var a=Pe,s=Lt;Oa(l.type)&&(Pe=l.stateNode,Lt=!1),ea(e,t,l),ai(l.stateNode),Pe=a,Lt=s;break;case 5:dt||Ml(l,t);case 6:if(a=Pe,s=Lt,Pe=null,ea(e,t,l),Pe=a,Lt=s,Pe!==null)if(Lt)try{(Pe.nodeType===9?Pe.body:Pe.nodeName==="HTML"?Pe.ownerDocument.body:Pe).removeChild(l.stateNode)}catch(c){qe(l,t,c)}else try{Pe.removeChild(l.stateNode)}catch(c){qe(l,t,c)}break;case 18:Pe!==null&&(Lt?(e=Pe,Oh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),as(e)):Oh(Pe,l.stateNode));break;case 4:a=Pe,s=Lt,Pe=l.stateNode.containerInfo,Lt=!0,ea(e,t,l),Pe=a,Lt=s;break;case 0:case 11:case 14:case 15:Ta(2,l,t),dt||Ta(4,l,t),ea(e,t,l);break;case 1:dt||(Ml(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Dd(l,t,a)),ea(e,t,l);break;case 21:ea(e,t,l);break;case 22:dt=(a=dt)||l.memoizedState!==null,ea(e,t,l),dt=a;break;default:ea(e,t,l)}}function Yd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{as(e)}catch(l){qe(t,t.return,l)}}}function $d(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{as(e)}catch(l){qe(t,t.return,l)}}function gg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hd),t;default:throw Error(r(435,e.tag))}}function hc(e,t){var l=gg(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=kg.bind(null,e,a);a.then(s,s)}})}function Ht(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],c=e,d=t,m=d;e:for(;m!==null;){switch(m.tag){case 27:if(Oa(m.type)){Pe=m.stateNode,Lt=!1;break e}break;case 5:Pe=m.stateNode,Lt=!1;break e;case 3:case 4:Pe=m.stateNode.containerInfo,Lt=!0;break e}m=m.return}if(Pe===null)throw Error(r(160));Gd(c,d,s),Pe=null,Lt=!1,c=s.alternate,c!==null&&(c.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xd(t,e),t=t.sibling}var Sl=null;function Xd(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Bt(e),a&4&&(Ta(3,e,e.return),Vs(3,e),Ta(5,e,e.return));break;case 1:Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),a&64&&Pl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=Sl;if(Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),a&4){var c=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":c=s.getElementsByTagName("title")[0],(!c||c[da]||c[pt]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=s.createElement(a),s.head.insertBefore(c,s.querySelector("head > title"))),At(c,a,l),c[pt]=e,ct(c),a=c;break e;case"link":var d=Xh("link","href",s).get(a+(l.href||""));if(d){for(var m=0;m<d.length;m++)if(c=d[m],c.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&c.getAttribute("rel")===(l.rel==null?null:l.rel)&&c.getAttribute("title")===(l.title==null?null:l.title)&&c.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(m,1);break t}}c=s.createElement(a),At(c,a,l),s.head.appendChild(c);break;case"meta":if(d=Xh("meta","content",s).get(a+(l.content||""))){for(m=0;m<d.length;m++)if(c=d[m],c.getAttribute("content")===(l.content==null?null:""+l.content)&&c.getAttribute("name")===(l.name==null?null:l.name)&&c.getAttribute("property")===(l.property==null?null:l.property)&&c.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&c.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(m,1);break t}}c=s.createElement(a),At(c,a,l),s.head.appendChild(c);break;default:throw Error(r(468,a))}c[pt]=e,ct(c),a=c}e.stateNode=a}else Qh(s,e.type,e.stateNode);else e.stateNode=$h(s,a,e.memoizedProps);else c!==a?(c===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):c.count--,a===null?Qh(s,e.type,e.stateNode):$h(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rr(e,e.memoizedProps,l.memoizedProps)}break;case 27:Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),l!==null&&a&4&&rr(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Ht(t,e),Bt(e),a&512&&(dt||l===null||Ml(l,l.return)),e.flags&32){s=e.stateNode;try{Xl(s,"")}catch(se){qe(e,e.return,se)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,rr(e,s,l!==null?l.memoizedProps:s)),a&1024&&(dr=!0);break;case 6:if(Ht(t,e),Bt(e),a&4){if(e.stateNode===null)throw Error(r(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(se){qe(e,e.return,se)}}break;case 3:if(_c=null,s=Sl,Sl=Ec(t.containerInfo),Ht(t,e),Sl=s,Bt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{as(t.containerInfo)}catch(se){qe(e,e.return,se)}dr&&(dr=!1,Qd(e));break;case 4:a=Sl,Sl=Ec(e.stateNode.containerInfo),Ht(t,e),Bt(e),Sl=a;break;case 12:Ht(t,e),Bt(e);break;case 31:Ht(t,e),Bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 13:Ht(t,e),Bt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(pc=_t()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 22:s=e.memoizedState!==null;var b=l!==null&&l.memoizedState!==null,A=Pl,M=dt;if(Pl=A||s,dt=M||b,Ht(t,e),dt=M,Pl=A,Bt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||b||Pl||dt||on(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){b=l=t;try{if(c=b.stateNode,s)d=c.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{m=b.stateNode;var B=b.memoizedProps.style,R=B!=null&&B.hasOwnProperty("display")?B.display:null;m.style.display=R==null||typeof R=="boolean"?"":(""+R).trim()}}catch(se){qe(b,b.return,se)}}}else if(t.tag===6){if(l===null){b=t;try{b.stateNode.nodeValue=s?"":b.memoizedProps}catch(se){qe(b,b.return,se)}}}else if(t.tag===18){if(l===null){b=t;try{var O=b.stateNode;s?Dh(O,!0):Dh(b.stateNode,!1)}catch(se){qe(b,b.return,se)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,hc(e,l))));break;case 19:Ht(t,e),Bt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,hc(e,a)));break;case 30:break;case 21:break;default:Ht(t,e),Bt(e)}}function Bt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Ud(a)){l=a;break}a=a.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var s=l.stateNode,c=or(e);dc(e,c,s);break;case 5:var d=l.stateNode;l.flags&32&&(Xl(d,""),l.flags&=-33);var m=or(e);dc(e,m,d);break;case 3:case 4:var b=l.stateNode.containerInfo,A=or(e);fr(e,A,b);break;default:throw Error(r(161))}}catch(M){qe(e,e.return,M)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bd(e,t.alternate,t),t=t.sibling}function on(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),on(t);break;case 1:Ml(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Dd(t,t.return,l),on(t);break;case 27:ai(t.stateNode);case 26:case 5:Ml(t,t.return),on(t);break;case 22:t.memoizedState===null&&on(t);break;case 30:on(t);break;default:on(t)}e=e.sibling}}function la(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,c=t,d=c.flags;switch(c.tag){case 0:case 11:case 15:la(s,c,l),Vs(4,c);break;case 1:if(la(s,c,l),a=c,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(A){qe(a,a.return,A)}if(a=c,s=a.updateQueue,s!==null){var m=a.stateNode;try{var b=s.shared.hiddenCallbacks;if(b!==null)for(s.shared.hiddenCallbacks=null,s=0;s<b.length;s++)Nf(b[s],m)}catch(A){qe(a,a.return,A)}}l&&d&64&&Od(c),Ks(c,c.return);break;case 27:Ld(c);case 26:case 5:la(s,c,l),l&&a===null&&d&4&&Md(c),Ks(c,c.return);break;case 12:la(s,c,l);break;case 31:la(s,c,l),l&&d&4&&Yd(s,c);break;case 13:la(s,c,l),l&&d&4&&$d(s,c);break;case 22:c.memoizedState===null&&la(s,c,l),Ks(c,c.return);break;case 30:break;default:la(s,c,l)}t=t.sibling}}function hr(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ds(l))}function mr(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e))}function wl(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zd(e,t,l,a),t=t.sibling}function Zd(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:wl(e,t,l,a),s&2048&&Vs(9,t);break;case 1:wl(e,t,l,a);break;case 3:wl(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ds(e)));break;case 12:if(s&2048){wl(e,t,l,a),e=t.stateNode;try{var c=t.memoizedProps,d=c.id,m=c.onPostCommit;typeof m=="function"&&m(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){qe(t,t.return,b)}}else wl(e,t,l,a);break;case 31:wl(e,t,l,a);break;case 13:wl(e,t,l,a);break;case 23:break;case 22:c=t.stateNode,d=t.alternate,t.memoizedState!==null?c._visibility&2?wl(e,t,l,a):Js(e,t):c._visibility&2?wl(e,t,l,a):(c._visibility|=2,Zn(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&hr(d,t);break;case 24:wl(e,t,l,a),s&2048&&mr(t.alternate,t);break;default:wl(e,t,l,a)}}function Zn(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,d=t,m=l,b=a,A=d.flags;switch(d.tag){case 0:case 11:case 15:Zn(c,d,m,b,s),Vs(8,d);break;case 23:break;case 22:var M=d.stateNode;d.memoizedState!==null?M._visibility&2?Zn(c,d,m,b,s):Js(c,d):(M._visibility|=2,Zn(c,d,m,b,s)),s&&A&2048&&hr(d.alternate,d);break;case 24:Zn(c,d,m,b,s),s&&A&2048&&mr(d.alternate,d);break;default:Zn(c,d,m,b,s)}t=t.sibling}}function Js(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:Js(l,a),s&2048&&hr(a.alternate,a);break;case 24:Js(l,a),s&2048&&mr(a.alternate,a);break;default:Js(l,a)}t=t.sibling}}var Is=8192;function Vn(e,t,l){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)Vd(e,t,l),e=e.sibling}function Vd(e,t,l){switch(e.tag){case 26:Vn(e,t,l),e.flags&Is&&e.memoizedState!==null&&lx(l,Sl,e.memoizedState,e.memoizedProps);break;case 5:Vn(e,t,l);break;case 3:case 4:var a=Sl;Sl=Ec(e.stateNode.containerInfo),Vn(e,t,l),Sl=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Is,Is=16777216,Vn(e,t,l),Is=a):Vn(e,t,l));break;default:Vn(e,t,l)}}function Kd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];bt=a,Id(a,e)}Kd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jd(e),e=e.sibling}function Jd(e){switch(e.tag){case 0:case 11:case 15:Fs(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Fs(e);break;case 12:Fs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mc(e)):Fs(e);break;default:Fs(e)}}function mc(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];bt=a,Id(a,e)}Kd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),mc(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,mc(t));break;default:mc(t)}e=e.sibling}}function Id(e,t){for(;bt!==null;){var l=bt;switch(l.tag){case 0:case 11:case 15:Ta(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ds(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,bt=a;else e:for(l=e;bt!==null;){a=bt;var s=a.sibling,c=a.return;if(qd(a),a===l){bt=null;break e}if(s!==null){s.return=c,bt=s;break e}bt=c}}}var xg={getCacheForType:function(e){var t=Tt(rt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Tt(rt).controller.signal}},vg=typeof WeakMap=="function"?WeakMap:Map,Le=0,Ke=null,Ne=null,ke=0,Be=0,It=null,Ea=!1,Kn=!1,pr=!1,aa=0,lt=0,Aa=0,fn=0,gr=0,Ft=0,Jn=0,Ws=null,qt=null,xr=!1,pc=0,Fd=0,gc=1/0,xc=null,_a=null,xt=0,Ra=null,In=null,na=0,vr=0,yr=null,Wd=null,Ps=0,br=null;function Wt(){return(Le&2)!==0&&ke!==0?ke&-ke:D.T!==null?Tr():wn()}function Pd(){if(Ft===0)if((ke&536870912)===0||Ae){var e=vl;vl<<=1,(vl&3932160)===0&&(vl=262144),Ft=e}else Ft=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Ft}function Gt(e,t,l){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Fn(e,0),za(e,ke,Ft,!1)),Rl(e,l),((Le&2)===0||e!==Ke)&&(e===Ke&&((Le&2)===0&&(fn|=l),lt===4&&za(e,ke,Ft,!1)),Ul(e))}function eh(e,t,l){if((Le&6)!==0)throw Error(r(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||ua(e,t),s=a?jg(e,t):Nr(e,t,!0),c=a;do{if(s===0){Kn&&!a&&za(e,t,0,!1);break}else{if(l=e.current.alternate,c&&!yg(l)){s=Nr(e,t,!1),c=!1;continue}if(s===2){if(c=t,e.errorRecoveryDisabledLanes&c)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var m=e;s=Ws;var b=m.current.memoizedState.isDehydrated;if(b&&(Fn(m,d).flags|=256),d=Nr(m,d,!1),d!==2){if(pr&&!b){m.errorRecoveryDisabledLanes|=c,fn|=c,s=4;break e}c=qt,qt=s,c!==null&&(qt===null?qt=c:qt.push.apply(qt,c))}s=d}if(c=!1,s!==2)continue}}if(s===1){Fn(e,0),za(e,t,0,!0);break}e:{switch(a=e,c=s,c){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:za(a,t,Ft,!Ea);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(s=pc+300-_t(),10<s)){if(za(a,t,Ft,!Ea),Xa(a,0,!0)!==0)break e;na=t,a.timeoutHandle=zh(th.bind(null,a,l,qt,xc,xr,t,Ft,fn,Jn,Ea,c,"Throttled",-0,0),s);break e}th(a,l,qt,xc,xr,t,Ft,fn,Jn,Ea,c,null,-0,0)}}break}while(!0);Ul(e)}function th(e,t,l,a,s,c,d,m,b,A,M,B,R,O){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:w},Vd(t,c,B);var se=(c&62914560)===c?pc-_t():(c&4194048)===c?Fd-_t():0;if(se=ax(B,se),se!==null){na=c,e.cancelPendingCommit=se(rh.bind(null,e,t,c,l,a,s,d,m,b,M,B,null,R,O)),za(e,c,d,!A);return}}rh(e,t,c,l,a,s,d,m,b)}function yg(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],c=s.getSnapshot;s=s.value;try{if(!Zt(c(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function za(e,t,l,a){t&=~gr,t&=~fn,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var c=31-Rt(s),d=1<<c;a[c]=-1,s&=~d}l!==0&&Bl(e,l,t)}function vc(){return(Le&6)===0?(ei(0),!1):!0}function jr(){if(Ne!==null){if(Be===0)var e=Ne.return;else e=Ne,Vl=tn=null,Lu(e),Gn=null,Us=0,e=Ne;for(;e!==null;)Cd(e.alternate,e),e=e.return;Ne=null}}function Fn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Bg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),na=0,jr(),Ke=e,Ne=l=Ql(e.current,null),ke=t,Be=0,It=null,Ea=!1,Kn=ua(e,t),pr=!1,Jn=Ft=gr=fn=Aa=lt=0,qt=Ws=null,xr=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-Rt(a),c=1<<s;t|=e[s],a&=~c}return aa=t,Bi(),l}function lh(e,t){ge=null,D.H=Xs,t===qn||t===Vi?(t=vf(),Be=3):t===ku?(t=vf(),Be=4):Be=t===Pu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,It=t,Ne===null&&(lt=1,cc(e,rl(t,e.current)))}function ah(){var e=Kt.current;return e===null?!0:(ke&4194048)===ke?hl===null:(ke&62914560)===ke||(ke&536870912)!==0?e===hl:!1}function nh(){var e=D.H;return D.H=Xs,e===null?Xs:e}function sh(){var e=D.A;return D.A=xg,e}function yc(){lt=4,Ea||(ke&4194048)!==ke&&Kt.current!==null||(Kn=!0),(Aa&134217727)===0&&(fn&134217727)===0||Ke===null||za(Ke,ke,Ft,!1)}function Nr(e,t,l){var a=Le;Le|=2;var s=nh(),c=sh();(Ke!==e||ke!==t)&&(xc=null,Fn(e,t)),t=!1;var d=lt;e:do try{if(Be!==0&&Ne!==null){var m=Ne,b=It;switch(Be){case 8:jr(),d=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(t=!0);var A=Be;if(Be=0,It=null,Wn(e,m,b,A),l&&Kn){d=0;break e}break;default:A=Be,Be=0,It=null,Wn(e,m,b,A)}}bg(),d=lt;break}catch(M){lh(e,M)}while(!0);return t&&e.shellSuspendCounter++,Vl=tn=null,Le=a,D.H=s,D.A=c,Ne===null&&(Ke=null,ke=0,Bi()),d}function bg(){for(;Ne!==null;)ih(Ne)}function jg(e,t){var l=Le;Le|=2;var a=nh(),s=sh();Ke!==e||ke!==t?(xc=null,gc=_t()+500,Fn(e,t)):Kn=ua(e,t);e:do try{if(Be!==0&&Ne!==null){t=Ne;var c=It;t:switch(Be){case 1:Be=0,It=null,Wn(e,t,c,1);break;case 2:case 9:if(gf(c)){Be=0,It=null,ch(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),Ul(e)},c.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:gf(c)?(Be=0,It=null,ch(t)):(Be=0,It=null,Wn(e,t,c,7));break;case 5:var d=null;switch(Ne.tag){case 26:d=Ne.memoizedState;case 5:case 27:var m=Ne;if(d?Zh(d):m.stateNode.complete){Be=0,It=null;var b=m.sibling;if(b!==null)Ne=b;else{var A=m.return;A!==null?(Ne=A,bc(A)):Ne=null}break t}}Be=0,It=null,Wn(e,t,c,5);break;case 6:Be=0,It=null,Wn(e,t,c,6);break;case 8:jr(),lt=6;break e;default:throw Error(r(462))}}Ng();break}catch(M){lh(e,M)}while(!0);return Vl=tn=null,D.H=a,D.A=s,Le=l,Ne!==null?0:(Ke=null,ke=0,Bi(),lt)}function Ng(){for(;Ne!==null&&!ji();)ih(Ne)}function ih(e){var t=Rd(e.alternate,e,aa);e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function ch(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=wd(l,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=wd(l,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Lu(t);default:Cd(l,t),t=Ne=nf(t,aa),t=Rd(l,t,aa)}e.memoizedProps=e.pendingProps,t===null?bc(e):Ne=t}function Wn(e,t,l,a){Vl=tn=null,Lu(t),Gn=null,Us=0;var s=t.return;try{if(og(e,s,t,l,ke)){lt=1,cc(e,rl(l,e.current)),Ne=null;return}}catch(c){if(s!==null)throw Ne=s,c;lt=1,cc(e,rl(l,e.current)),Ne=null;return}t.flags&32768?(Ae||a===1?e=!0:Kn||(ke&536870912)!==0?e=!1:(Ea=e=!0,(a===2||a===9||a===3||a===6)&&(a=Kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),uh(t,e)):bc(t)}function bc(e){var t=e;do{if((t.flags&32768)!==0){uh(t,Ea);return}e=t.return;var l=hg(t.alternate,t,aa);if(l!==null){Ne=l;return}if(t=t.sibling,t!==null){Ne=t;return}Ne=t=e}while(t!==null);lt===0&&(lt=5)}function uh(e,t){do{var l=mg(e.alternate,e);if(l!==null){l.flags&=32767,Ne=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Ne=e;return}Ne=e=l}while(e!==null);lt=6,Ne=null}function rh(e,t,l,a,s,c,d,m,b){e.cancelPendingCommit=null;do jc();while(xt!==0);if((Le&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(c=t.lanes|t.childLanes,c|=ou,sl(e,l,c,d,m,b),e===Ke&&(Ne=Ke=null,ke=0),In=t,Ra=e,na=l,vr=c,yr=s,Wd=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tg(al,function(){return mh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,s=K.p,K.p=2,d=Le,Le|=4;try{pg(e,t,l)}finally{Le=d,K.p=s,D.T=a}}xt=1,oh(),fh(),dh()}}function oh(){if(xt===1){xt=0;var e=Ra,t=In,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var s=Le;Le|=4;try{Xd(t,e);var c=Dr,d=Jo(e.containerInfo),m=c.focusedElem,b=c.selectionRange;if(d!==m&&m&&m.ownerDocument&&Ko(m.ownerDocument.documentElement,m)){if(b!==null&&su(m)){var A=b.start,M=b.end;if(M===void 0&&(M=A),"selectionStart"in m)m.selectionStart=A,m.selectionEnd=Math.min(M,m.value.length);else{var B=m.ownerDocument||document,R=B&&B.defaultView||window;if(R.getSelection){var O=R.getSelection(),se=m.textContent.length,oe=Math.min(b.start,se),Ze=b.end===void 0?oe:Math.min(b.end,se);!O.extend&&oe>Ze&&(d=Ze,Ze=oe,oe=d);var k=Vo(m,oe),j=Vo(m,Ze);if(k&&j&&(O.rangeCount!==1||O.anchorNode!==k.node||O.anchorOffset!==k.offset||O.focusNode!==j.node||O.focusOffset!==j.offset)){var E=B.createRange();E.setStart(k.node,k.offset),O.removeAllRanges(),oe>Ze?(O.addRange(E),O.extend(j.node,j.offset)):(E.setEnd(j.node,j.offset),O.addRange(E))}}}}for(B=[],O=m;O=O.parentNode;)O.nodeType===1&&B.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<B.length;m++){var L=B[m];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}Oc=!!Or,Dr=Or=null}finally{Le=s,K.p=a,D.T=l}}e.current=t,xt=2}}function fh(){if(xt===2){xt=0;var e=Ra,t=In,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=K.p;K.p=2;var s=Le;Le|=4;try{Bd(e,t.alternate,t)}finally{Le=s,K.p=a,D.T=l}}xt=3}}function dh(){if(xt===4||xt===3){xt=0,fs();var e=Ra,t=In,l=na,a=Wd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?xt=5:(xt=0,In=Ra=null,hh(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(_a=null),Sn(l),t=t.stateNode,yt&&typeof yt.onCommitFiberRoot=="function")try{yt.onCommitFiberRoot(nl,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=D.T,s=K.p,K.p=2,D.T=null;try{for(var c=e.onRecoverableError,d=0;d<a.length;d++){var m=a[d];c(m.value,{componentStack:m.stack})}}finally{D.T=t,K.p=s}}(na&3)!==0&&jc(),Ul(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===br?Ps++:(Ps=0,br=e):Ps=0,ei(0)}}function hh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ds(t)))}function jc(){return oh(),fh(),dh(),mh()}function mh(){if(xt!==5)return!1;var e=Ra,t=vr;vr=0;var l=Sn(na),a=D.T,s=K.p;try{K.p=32>l?32:l,D.T=null,l=yr,yr=null;var c=Ra,d=na;if(xt=0,In=Ra=null,na=0,(Le&6)!==0)throw Error(r(331));var m=Le;if(Le|=4,Jd(c.current),Zd(c,c.current,d,l),Le=m,ei(0,!1),yt&&typeof yt.onPostCommitFiberRoot=="function")try{yt.onPostCommitFiberRoot(nl,c)}catch{}return!0}finally{K.p=s,D.T=a,hh(e,t)}}function ph(e,t,l){t=rl(l,t),t=Wu(e.stateNode,t,2),e=Sa(e,t,2),e!==null&&(Rl(e,2),Ul(e))}function qe(e,t,l){if(e.tag===3)ph(e,e,l);else for(;t!==null;){if(t.tag===3){ph(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_a===null||!_a.has(a))){e=rl(l,e),l=gd(2),a=Sa(t,l,2),a!==null&&(xd(l,a,t,e),Rl(a,2),Ul(a));break}}t=t.return}}function Sr(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new vg;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(pr=!0,s.add(l),e=Sg.bind(null,e,t,l),t.then(e,e))}function Sg(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Ke===e&&(ke&l)===l&&(lt===4||lt===3&&(ke&62914560)===ke&&300>_t()-pc?(Le&2)===0&&Fn(e,0):gr|=l,Jn===ke&&(Jn=0)),Ul(e)}function gh(e,t){t===0&&(t=ps()),e=Wa(e,t),e!==null&&(Rl(e,t),Ul(e))}function wg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),gh(e,l)}function kg(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(r(314))}a!==null&&a.delete(t),gh(e,l)}function Tg(e,t){return yn(e,t)}var Nc=null,Pn=null,wr=!1,Sc=!1,kr=!1,Ca=0;function Ul(e){e!==Pn&&e.next===null&&(Pn===null?Nc=Pn=e:Pn=Pn.next=e),Sc=!0,wr||(wr=!0,Ag())}function ei(e,t){if(!kr&&Sc){kr=!0;do for(var l=!1,a=Nc;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var c=0;else{var d=a.suspendedLanes,m=a.pingedLanes;c=(1<<31-Rt(42|e)+1)-1,c&=s&~(d&~m),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(l=!0,bh(a,c))}else c=ke,c=Xa(a,a===Ke?c:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(c&3)===0||ua(a,c)||(l=!0,bh(a,c));a=a.next}while(l);kr=!1}}function Eg(){xh()}function xh(){Sc=wr=!1;var e=0;Ca!==0&&Hg()&&(e=Ca);for(var t=_t(),l=null,a=Nc;a!==null;){var s=a.next,c=vh(a,t);c===0?(a.next=null,l===null?Nc=s:l.next=s,s===null&&(Pn=l)):(l=a,(e!==0||(c&3)!==0)&&(Sc=!0)),a=s}xt!==0&&xt!==5||ei(e),Ca!==0&&(Ca=0)}function vh(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var d=31-Rt(c),m=1<<d,b=s[d];b===-1?((m&l)===0||(m&a)!==0)&&(s[d]=ki(m,t)):b<=t&&(e.expiredLanes|=m),c&=~m}if(t=Ke,l=ke,l=Xa(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ll(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ua(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&ll(a),Sn(l)){case 2:case 8:l=Al;break;case 32:l=al;break;case 268435456:l=$a;break;default:l=al}return a=yh.bind(null,e),l=yn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&ll(a),e.callbackPriority=2,e.callbackNode=null,2}function yh(e,t){if(xt!==0&&xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(jc()&&e.callbackNode!==l)return null;var a=ke;return a=Xa(e,e===Ke?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(eh(e,a,t),vh(e,_t()),e.callbackNode!=null&&e.callbackNode===l?yh.bind(null,e):null)}function bh(e,t){if(jc())return null;eh(e,t,!0)}function Ag(){qg(function(){(Le&6)!==0?yn(xl,Eg):xh()})}function Tr(){if(Ca===0){var e=Hn;e===0&&(e=ca,ca<<=1,(ca&261888)===0&&(ca=256)),Ca=e}return Ca}function jh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:g(""+e)}function Nh(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function _g(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var c=jh((s[it]||null).action),d=a.submitter;d&&(t=(t=d[it]||null)?jh(t.formAction):d.getAttribute("formAction"),t!==null&&(c=t,d=null));var m=new Mi("action","action",null,a,s);e.push({event:m,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ca!==0){var b=d?Nh(s,d):new FormData(s);Zu(l,{pending:!0,data:b,method:s.method,action:c},null,b)}}else typeof c=="function"&&(m.preventDefault(),b=d?Nh(s,d):new FormData(s),Zu(l,{pending:!0,data:b,method:s.method,action:c},c,b))},currentTarget:s}]})}}for(var Er=0;Er<ru.length;Er++){var Ar=ru[Er],Rg=Ar.toLowerCase(),zg=Ar[0].toUpperCase()+Ar.slice(1);Nl(Rg,"on"+zg)}Nl(Wo,"onAnimationEnd"),Nl(Po,"onAnimationIteration"),Nl(ef,"onAnimationStart"),Nl("dblclick","onDoubleClick"),Nl("focusin","onFocus"),Nl("focusout","onBlur"),Nl(Vp,"onTransitionRun"),Nl(Kp,"onTransitionStart"),Nl(Jp,"onTransitionCancel"),Nl(tf,"onTransitionEnd"),jl("onMouseEnter",["mouseout","mouseover"]),jl("onMouseLeave",["mouseout","mouseover"]),jl("onPointerEnter",["pointerout","pointerover"]),jl("onPointerLeave",["pointerout","pointerover"]),zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zl("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(" "),Cg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ti));function Sh(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var c=void 0;if(t)for(var d=a.length-1;0<=d;d--){var m=a[d],b=m.instance,A=m.currentTarget;if(m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=A;try{c(s)}catch(M){Hi(M)}s.currentTarget=null,c=b}else for(d=0;d<a.length;d++){if(m=a[d],b=m.instance,A=m.currentTarget,m=m.listener,b!==c&&s.isPropagationStopped())break e;c=m,s.currentTarget=A;try{c(s)}catch(M){Hi(M)}s.currentTarget=null,c=b}}}}function Se(e,t){var l=t[vs];l===void 0&&(l=t[vs]=new Set);var a=e+"__bubble";l.has(a)||(wh(t,e,2,!1),l.add(a))}function _r(e,t,l){var a=0;t&&(a|=4),wh(l,e,a,t)}var wc="_reactListening"+Math.random().toString(36).slice(2);function Rr(e){if(!e[wc]){e[wc]=!0,Ei.forEach(function(l){l!=="selectionchange"&&(Cg.has(l)||_r(l,!1,e),_r(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wc]||(t[wc]=!0,_r("selectionchange",!1,t))}}function wh(e,t,l,a){switch(Ph(t)){case 2:var s=ix;break;case 8:s=cx;break;default:s=Qr}l=s.bind(null,t,l,e),s=void 0,!gt||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function zr(e,t,l,a,s){var c=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var d=a.tag;if(d===3||d===4){var m=a.stateNode.containerInfo;if(m===s)break;if(d===4)for(d=a.return;d!==null;){var b=d.tag;if((b===3||b===4)&&d.stateNode.containerInfo===s)return;d=d.return}for(;m!==null;){if(d=ql(m),d===null)return;if(b=d.tag,b===5||b===6||b===26||b===27){a=c=d;continue e}m=m.parentNode}}a=a.return}wt(function(){var A=c,M=P(l),B=[];e:{var R=lf.get(e);if(R!==void 0){var O=Mi,se=e;switch(e){case"keypress":if(Oi(l)===0)break e;case"keydown":case"keyup":O=kp;break;case"focusin":se="focus",O=eu;break;case"focusout":se="blur",O=eu;break;case"beforeblur":case"afterblur":O=eu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=zo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=hp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=Ap;break;case Wo:case Po:case ef:O=gp;break;case tf:O=Rp;break;case"scroll":case"scrollend":O=fp;break;case"wheel":O=Cp;break;case"copy":case"cut":case"paste":O=vp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Oo;break;case"toggle":case"beforetoggle":O=Dp}var oe=(t&4)!==0,Ze=!oe&&(e==="scroll"||e==="scrollend"),k=oe?R!==null?R+"Capture":null:R;oe=[];for(var j=A,E;j!==null;){var L=j;if(E=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||E===null||k===null||(L=ut(j,k),L!=null&&oe.push(li(j,L,E))),Ze)break;j=j.return}0<oe.length&&(R=new O(R,se,null,l,M),B.push({event:R,listeners:oe}))}}if((t&7)===0){e:{if(R=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",R&&l!==G&&(se=l.relatedTarget||l.fromElement)&&(ql(se)||se[oa]))break e;if((O||R)&&(R=M.window===M?M:(R=M.ownerDocument)?R.defaultView||R.parentWindow:window,O?(se=l.relatedTarget||l.toElement,O=A,se=se?ql(se):null,se!==null&&(Ze=h(se),oe=se.tag,se!==Ze||oe!==5&&oe!==27&&oe!==6)&&(se=null)):(O=null,se=A),O!==se)){if(oe=zo,L="onMouseLeave",k="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(oe=Oo,L="onPointerLeave",k="onPointerEnter",j="pointer"),Ze=O==null?R:Za(O),E=se==null?R:Za(se),R=new oe(L,j+"leave",O,l,M),R.target=Ze,R.relatedTarget=E,L=null,ql(M)===A&&(oe=new oe(k,j+"enter",se,l,M),oe.target=E,oe.relatedTarget=Ze,L=oe),Ze=L,O&&se)t:{for(oe=Og,k=O,j=se,E=0,L=k;L;L=oe(L))E++;L=0;for(var ue=j;ue;ue=oe(ue))L++;for(;0<E-L;)k=oe(k),E--;for(;0<L-E;)j=oe(j),L--;for(;E--;){if(k===j||j!==null&&k===j.alternate){oe=k;break t}k=oe(k),j=oe(j)}oe=null}else oe=null;O!==null&&kh(B,R,O,oe,!1),se!==null&&Ze!==null&&kh(B,Ze,se,oe,!0)}}e:{if(R=A?Za(A):window,O=R.nodeName&&R.nodeName.toLowerCase(),O==="select"||O==="input"&&R.type==="file")var De=Go;else if(Bo(R))if(Yo)De=Xp;else{De=Yp;var ie=Gp}else O=R.nodeName,!O||O.toLowerCase()!=="input"||R.type!=="checkbox"&&R.type!=="radio"?A&&pa(A.elementType)&&(De=Go):De=$p;if(De&&(De=De(e,A))){qo(B,De,l,M);break e}ie&&ie(e,R,A),e==="focusout"&&A&&R.type==="number"&&A.memoizedProps.value!=null&&An(R,"number",R.value)}switch(ie=A?Za(A):window,e){case"focusin":(Bo(ie)||ie.contentEditable==="true")&&(Rn=ie,iu=A,zs=null);break;case"focusout":zs=iu=Rn=null;break;case"mousedown":cu=!0;break;case"contextmenu":case"mouseup":case"dragend":cu=!1,Io(B,l,M);break;case"selectionchange":if(Zp)break;case"keydown":case"keyup":Io(B,l,M)}var xe;if(lu)e:{switch(e){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else _n?Lo(e,l)&&(Te="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Te="onCompositionStart");Te&&(Do&&l.locale!=="ko"&&(_n||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&_n&&(xe=_o()):(ga=M,Fc="value"in ga?ga.value:ga.textContent,_n=!0)),ie=kc(A,Te),0<ie.length&&(Te=new Co(Te,e,null,l,M),B.push({event:Te,listeners:ie}),xe?Te.data=xe:(xe=Ho(l),xe!==null&&(Te.data=xe)))),(xe=Up?Lp(e,l):Hp(e,l))&&(Te=kc(A,"onBeforeInput"),0<Te.length&&(ie=new Co("onBeforeInput","beforeinput",null,l,M),B.push({event:ie,listeners:Te}),ie.data=xe)),_g(B,e,A,l,M)}Sh(B,t)})}function li(e,t,l){return{instance:e,listener:t,currentTarget:l}}function kc(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,c=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||c===null||(s=ut(e,l),s!=null&&a.unshift(li(e,s,c)),s=ut(e,t),s!=null&&a.push(li(e,s,c))),e.tag===3)return a;e=e.return}return[]}function Og(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kh(e,t,l,a,s){for(var c=t._reactName,d=[];l!==null&&l!==a;){var m=l,b=m.alternate,A=m.stateNode;if(m=m.tag,b!==null&&b===a)break;m!==5&&m!==26&&m!==27||A===null||(b=A,s?(A=ut(l,c),A!=null&&d.unshift(li(l,A,b))):s||(A=ut(l,c),A!=null&&d.push(li(l,A,b)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var Dg=/\r\n?/g,Mg=/\u0000|\uFFFD/g;function Th(e){return(typeof e=="string"?e:""+e).replace(Dg,`
|
|
9
|
-
`).replace(Mg,"")}function Eh(e,t){return t=Th(t),Th(e)===t}function Qe(e,t,l,a,s,c){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Xl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Xl(e,""+a);break;case"className":Ka(e,"class",a);break;case"tabIndex":Ka(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Ka(e,l,a);break;case"style":Ns(e,a,c);break;case"data":if(t!=="object"){Ka(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(l==="formAction"?(t!=="input"&&Qe(e,t,"name",s.name,s,null),Qe(e,t,"formEncType",s.formEncType,s,null),Qe(e,t,"formMethod",s.formMethod,s,null),Qe(e,t,"formTarget",s.formTarget,s,null)):(Qe(e,t,"encType",s.encType,s,null),Qe(e,t,"method",s.method,s,null),Qe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=g(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=w);break;case"onScroll":a!=null&&Se("scroll",e);break;case"onScrollEnd":a!=null&&Se("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=g(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":Se("beforetoggle",e),Se("toggle",e),kn(e,"popover",a);break;case"xlinkActuate":cl(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":cl(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":cl(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":cl(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":cl(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":cl(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":cl(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":cl(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":cl(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":kn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Ss.get(l)||l,kn(e,l,a))}}function Cr(e,t,l,a,s,c){switch(l){case"style":Ns(e,a,c);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(r(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Xl(e,a):(typeof a=="number"||typeof a=="bigint")&&Xl(e,""+a);break;case"onScroll":a!=null&&Se("scroll",e);break;case"onScrollEnd":a!=null&&Se("scrollend",e);break;case"onClick":a!=null&&(e.onclick=w);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!bl.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),c=e[it]||null,c=c!=null?c[l]:null,typeof c=="function"&&e.removeEventListener(t,c,s),typeof a=="function")){typeof c!="function"&&c!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):kn(e,l,a)}}}function At(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",e),Se("load",e);var a=!1,s=!1,c;for(c in l)if(l.hasOwnProperty(c)){var d=l[c];if(d!=null)switch(c){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,c,d,l,null)}}s&&Qe(e,t,"srcSet",l.srcSet,l,null),a&&Qe(e,t,"src",l.src,l,null);return;case"input":Se("invalid",e);var m=c=d=s=null,b=null,A=null;for(a in l)if(l.hasOwnProperty(a)){var M=l[a];if(M!=null)switch(a){case"name":s=M;break;case"type":d=M;break;case"checked":b=M;break;case"defaultChecked":A=M;break;case"value":c=M;break;case"defaultValue":m=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(137,t));break;default:Qe(e,t,a,M,l,null)}}bs(e,c,m,b,A,d,s,!1);return;case"select":Se("invalid",e),a=d=c=null;for(s in l)if(l.hasOwnProperty(s)&&(m=l[s],m!=null))switch(s){case"value":c=m;break;case"defaultValue":d=m;break;case"multiple":a=m;default:Qe(e,t,s,m,l,null)}t=c,l=d,e.multiple=!!a,t!=null?$l(e,!!a,t,!1):l!=null&&$l(e,!!a,l,!0);return;case"textarea":Se("invalid",e),c=s=a=null;for(d in l)if(l.hasOwnProperty(d)&&(m=l[d],m!=null))switch(d){case"value":a=m;break;case"defaultValue":s=m;break;case"children":c=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Qe(e,t,d,m,l,null)}Ri(e,a,s,c);return;case"option":for(b in l)l.hasOwnProperty(b)&&(a=l[b],a!=null)&&(b==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Qe(e,t,b,a,l,null));return;case"dialog":Se("beforetoggle",e),Se("toggle",e),Se("cancel",e),Se("close",e);break;case"iframe":case"object":Se("load",e);break;case"video":case"audio":for(a=0;a<ti.length;a++)Se(ti[a],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(A in l)if(l.hasOwnProperty(A)&&(a=l[A],a!=null))switch(A){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Qe(e,t,A,a,l,null)}return;default:if(pa(t)){for(M in l)l.hasOwnProperty(M)&&(a=l[M],a!==void 0&&Cr(e,t,M,a,l,void 0));return}}for(m in l)l.hasOwnProperty(m)&&(a=l[m],a!=null&&Qe(e,t,m,a,l,null))}function Ug(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,c=null,d=null,m=null,b=null,A=null,M=null;for(O in l){var B=l[O];if(l.hasOwnProperty(O)&&B!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":b=B;default:a.hasOwnProperty(O)||Qe(e,t,O,null,a,B)}}for(var R in a){var O=a[R];if(B=l[R],a.hasOwnProperty(R)&&(O!=null||B!=null))switch(R){case"type":c=O;break;case"name":s=O;break;case"checked":A=O;break;case"defaultChecked":M=O;break;case"value":d=O;break;case"defaultValue":m=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,t));break;default:O!==B&&Qe(e,t,R,O,a,B)}}ys(e,d,m,b,A,M,c,s);return;case"select":O=d=m=R=null;for(c in l)if(b=l[c],l.hasOwnProperty(c)&&b!=null)switch(c){case"value":break;case"multiple":O=b;default:a.hasOwnProperty(c)||Qe(e,t,c,null,a,b)}for(s in a)if(c=a[s],b=l[s],a.hasOwnProperty(s)&&(c!=null||b!=null))switch(s){case"value":R=c;break;case"defaultValue":m=c;break;case"multiple":d=c;default:c!==b&&Qe(e,t,s,c,a,b)}t=m,l=d,a=O,R!=null?$l(e,!!l,R,!1):!!a!=!!l&&(t!=null?$l(e,!!l,t,!0):$l(e,!!l,l?[]:"",!1));return;case"textarea":O=R=null;for(m in l)if(s=l[m],l.hasOwnProperty(m)&&s!=null&&!a.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Qe(e,t,m,null,a,s)}for(d in a)if(s=a[d],c=l[d],a.hasOwnProperty(d)&&(s!=null||c!=null))switch(d){case"value":R=s;break;case"defaultValue":O=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(r(91));break;default:s!==c&&Qe(e,t,d,s,a,c)}js(e,R,O);return;case"option":for(var se in l)R=l[se],l.hasOwnProperty(se)&&R!=null&&!a.hasOwnProperty(se)&&(se==="selected"?e.selected=!1:Qe(e,t,se,null,a,R));for(b in a)R=a[b],O=l[b],a.hasOwnProperty(b)&&R!==O&&(R!=null||O!=null)&&(b==="selected"?e.selected=R&&typeof R!="function"&&typeof R!="symbol":Qe(e,t,b,R,a,O));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in l)R=l[oe],l.hasOwnProperty(oe)&&R!=null&&!a.hasOwnProperty(oe)&&Qe(e,t,oe,null,a,R);for(A in a)if(R=a[A],O=l[A],a.hasOwnProperty(A)&&R!==O&&(R!=null||O!=null))switch(A){case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,t));break;default:Qe(e,t,A,R,a,O)}return;default:if(pa(t)){for(var Ze in l)R=l[Ze],l.hasOwnProperty(Ze)&&R!==void 0&&!a.hasOwnProperty(Ze)&&Cr(e,t,Ze,void 0,a,R);for(M in a)R=a[M],O=l[M],!a.hasOwnProperty(M)||R===O||R===void 0&&O===void 0||Cr(e,t,M,R,a,O);return}}for(var k in l)R=l[k],l.hasOwnProperty(k)&&R!=null&&!a.hasOwnProperty(k)&&Qe(e,t,k,null,a,R);for(B in a)R=a[B],O=l[B],!a.hasOwnProperty(B)||R===O||R==null&&O==null||Qe(e,t,B,R,a,O)}function Ah(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],c=s.transferSize,d=s.initiatorType,m=s.duration;if(c&&m&&Ah(d)){for(d=0,m=s.responseEnd,a+=1;a<l.length;a++){var b=l[a],A=b.startTime;if(A>m)break;var M=b.transferSize,B=b.initiatorType;M&&Ah(B)&&(b=b.responseEnd,d+=M*(b<m?1:(m-A)/(b-A)))}if(--a,t+=8*(c+d)/(s.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Or=null,Dr=null;function Tc(e){return e.nodeType===9?e:e.ownerDocument}function _h(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 Rh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Mr(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ur=null;function Hg(){var e=window.event;return e&&e.type==="popstate"?e===Ur?!1:(Ur=e,!0):(Ur=null,!1)}var zh=typeof setTimeout=="function"?setTimeout:void 0,Bg=typeof clearTimeout=="function"?clearTimeout:void 0,Ch=typeof Promise=="function"?Promise:void 0,qg=typeof queueMicrotask=="function"?queueMicrotask:typeof Ch<"u"?function(e){return Ch.resolve(null).then(e).catch(Gg)}:zh;function Gg(e){setTimeout(function(){throw e})}function Oa(e){return e==="head"}function Oh(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),as(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")ai(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,ai(l);for(var c=l.firstChild;c;){var d=c.nextSibling,m=c.nodeName;c[da]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&c.rel.toLowerCase()==="stylesheet"||l.removeChild(c),c=d}}else l==="body"&&ai(e.ownerDocument.body);l=s}while(l);as(t)}function Dh(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Lr(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Lr(l),Qa(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Yg(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=ml(e.nextSibling),e===null)break}return null}function $g(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=ml(e.nextSibling),e===null))return null;return e}function Mh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ml(e.nextSibling),e===null))return null;return e}function Hr(e){return e.data==="$?"||e.data==="$~"}function Br(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Xg(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function ml(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var qr=null;function Uh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return ml(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Hh(e,t,l){switch(t=Tc(l),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function ai(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Qa(e)}var pl=new Map,Bh=new Set;function Ec(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var sa=K.d;K.d={f:Qg,r:Zg,D:Vg,C:Kg,L:Jg,m:Ig,X:Wg,S:Fg,M:Pg};function Qg(){var e=sa.f(),t=vc();return e||t}function Zg(e){var t=Gl(e);t!==null&&t.tag===5&&t.type==="form"?ld(t):sa.r(e)}var es=typeof document>"u"?null:document;function qh(e,t,l){var a=es;if(a&&typeof t=="string"&&t){var s=St(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Bh.has(s)||(Bh.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),At(t,"link",e),ct(t),a.head.appendChild(t)))}}function Vg(e){sa.D(e),qh("dns-prefetch",e,null)}function Kg(e,t){sa.C(e,t),qh("preconnect",e,t)}function Jg(e,t,l){sa.L(e,t,l);var a=es;if(a&&e&&t){var s='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+St(l.imageSizes)+'"]')):s+='[href="'+St(e)+'"]';var c=s;switch(t){case"style":c=ts(e);break;case"script":c=ls(e)}pl.has(c)||(e=_({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),pl.set(c,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(ni(c))||t==="script"&&a.querySelector(si(c))||(t=a.createElement("link"),At(t,"link",e),ct(t),a.head.appendChild(t)))}}function Ig(e,t){sa.m(e,t);var l=es;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',c=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=ls(e)}if(!pl.has(c)&&(e=_({rel:"modulepreload",href:e},t),pl.set(c,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(si(c)))return}a=l.createElement("link"),At(a,"link",e),ct(a),l.head.appendChild(a)}}}function Fg(e,t,l){sa.S(e,t,l);var a=es;if(a&&e){var s=ha(a).hoistableStyles,c=ts(e);t=t||"default";var d=s.get(c);if(!d){var m={loading:0,preload:null};if(d=a.querySelector(ni(c)))m.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":t},l),(l=pl.get(c))&&Gr(e,l);var b=d=a.createElement("link");ct(b),At(b,"link",e),b._p=new Promise(function(A,M){b.onload=A,b.onerror=M}),b.addEventListener("load",function(){m.loading|=1}),b.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Ac(d,t,a)}d={type:"stylesheet",instance:d,count:1,state:m},s.set(c,d)}}}function Wg(e,t){sa.X(e,t);var l=es;if(l&&e){var a=ha(l).hoistableScripts,s=ls(e),c=a.get(s);c||(c=l.querySelector(si(s)),c||(e=_({src:e,async:!0},t),(t=pl.get(s))&&Yr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function Pg(e,t){sa.M(e,t);var l=es;if(l&&e){var a=ha(l).hoistableScripts,s=ls(e),c=a.get(s);c||(c=l.querySelector(si(s)),c||(e=_({src:e,async:!0,type:"module"},t),(t=pl.get(s))&&Yr(e,t),c=l.createElement("script"),ct(c),At(c,"link",e),l.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},a.set(s,c))}}function Gh(e,t,l,a){var s=(s=pe.current)?Ec(s):null;if(!s)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ts(l.href),l=ha(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ts(l.href);var c=ha(s).hoistableStyles,d=c.get(e);if(d||(s=s.ownerDocument||s,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,d),(c=s.querySelector(ni(e)))&&!c._p&&(d.instance=c,d.state.loading=5),pl.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pl.set(e,l),c||ex(s,e,l,d.state))),t&&a===null)throw Error(r(528,""));return d}if(t&&a!==null)throw Error(r(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ls(l),l=ha(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ts(e){return'href="'+St(e)+'"'}function ni(e){return'link[rel="stylesheet"]['+e+"]"}function Yh(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function ex(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),At(t,"link",l),ct(t),e.head.appendChild(t))}function ls(e){return'[src="'+St(e)+'"]'}function si(e){return"script[async]"+e}function $h(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,ct(a),a;var s=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ct(a),At(a,"style",s),Ac(a,l.precedence,e),t.instance=a;case"stylesheet":s=ts(l.href);var c=e.querySelector(ni(s));if(c)return t.state.loading|=4,t.instance=c,ct(c),c;a=Yh(l),(s=pl.get(s))&&Gr(a,s),c=(e.ownerDocument||e).createElement("link"),ct(c);var d=c;return d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",a),t.state.loading|=4,Ac(c,l.precedence,e),t.instance=c;case"script":return c=ls(l.src),(s=e.querySelector(si(c)))?(t.instance=s,ct(s),s):(a=l,(s=pl.get(c))&&(a=_({},l),Yr(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),ct(s),At(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Ac(a,l.precedence,e));return t.instance}function Ac(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,c=s,d=0;d<a.length;d++){var m=a[d];if(m.dataset.precedence===t)c=m;else if(c!==s)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Gr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var _c=null;function Xh(e,t,l){if(_c===null){var a=new Map,s=_c=new Map;s.set(l,a)}else s=_c,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var c=l[s];if(!(c[da]||c[pt]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var d=c.getAttribute(t)||"";d=e+d;var m=a.get(d);m?m.push(c):a.set(d,[c])}}return a}function Qh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function tx(e,t,l){if(l===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Zh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lx(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ts(a.href),c=t.querySelector(ni(s));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Rc.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=c,ct(c);return}c=t.ownerDocument||t,a=Yh(a),(s=pl.get(s))&&Gr(a,s),c=c.createElement("link"),ct(c);var d=c;d._p=new Promise(function(m,b){d.onload=m,d.onerror=b}),At(c,"link",a),l.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Rc.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var $r=0;function ax(e,t){return e.stylesheets&&e.count===0&&Cc(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&$r===0&&($r=62500*Lg());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>$r?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zc=null;function Cc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zc=new Map,t.forEach(nx,e),zc=null,Rc.call(e))}function nx(e,t){if(!(t.state.loading&4)){var l=zc.get(e);if(l)var a=l.get(null);else{l=new Map,zc.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<s.length;c++){var d=s[c];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),a=d)}a&&l.set(null,a)}s=t.instance,d=s.getAttribute("data-precedence"),c=l.get(d)||a,c===a&&l.set(null,s),l.set(d,s),this.count++,a=Rc.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),c?c.parentNode.insertBefore(s,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:fe,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function sx(e,t,l,a,s,c,d,m,b){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ra(0),this.hiddenUpdates=ra(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=c,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=b,this.incompleteTransitions=new Map}function Vh(e,t,l,a,s,c,d,m,b,A,M,B){return e=new sx(e,t,l,d,b,A,M,B,m),t=1,c===!0&&(t|=24),c=Vt(3,null,null,t),e.current=c,c.stateNode=e,t=Nu(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:a,isDehydrated:l,cache:t},Tu(c),e}function Kh(e){return e?(e=On,e):On}function Jh(e,t,l,a,s,c){s=Kh(s),a.context===null?a.context=s:a.pendingContext=s,a=Na(t),a.payload={element:l},c=c===void 0?null:c,c!==null&&(a.callback=c),l=Sa(e,a,t),l!==null&&(Gt(l,e,t),Hs(l,e,t))}function Ih(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Xr(e,t){Ih(e,t),(e=e.alternate)&&Ih(e,t)}function Fh(e){if(e.tag===13||e.tag===31){var t=Wa(e,67108864);t!==null&&Gt(t,e,67108864),Xr(e,67108864)}}function Wh(e){if(e.tag===13||e.tag===31){var t=Wt();t=gs(t);var l=Wa(e,t);l!==null&&Gt(l,e,t),Xr(e,t)}}var Oc=!0;function ix(e,t,l,a){var s=D.T;D.T=null;var c=K.p;try{K.p=2,Qr(e,t,l,a)}finally{K.p=c,D.T=s}}function cx(e,t,l,a){var s=D.T;D.T=null;var c=K.p;try{K.p=8,Qr(e,t,l,a)}finally{K.p=c,D.T=s}}function Qr(e,t,l,a){if(Oc){var s=Zr(a);if(s===null)zr(e,t,a,Dc,l),em(e,a);else if(rx(s,e,t,l,a))a.stopPropagation();else if(em(e,a),t&4&&-1<ux.indexOf(e)){for(;s!==null;){var c=Gl(s);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var d=_l(c.pendingLanes);if(d!==0){var m=c;for(m.pendingLanes|=2,m.entangledLanes|=2;d;){var b=1<<31-Rt(d);m.entanglements[1]|=b,d&=~b}Ul(c),(Le&6)===0&&(gc=_t()+500,ei(0))}}break;case 31:case 13:m=Wa(c,2),m!==null&&Gt(m,c,2),vc(),Xr(c,2)}if(c=Zr(a),c===null&&zr(e,t,a,Dc,l),c===s)break;s=c}s!==null&&a.stopPropagation()}else zr(e,t,a,null,l)}}function Zr(e){return e=P(e),Vr(e)}var Dc=null;function Vr(e){if(Dc=null,e=ql(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=p(t),e!==null)return e;e=null}else if(l===31){if(e=x(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dc=e,null}function Ph(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ni()){case xl:return 2;case Al:return 8;case al:case ds:return 32;case $a:return 268435456;default:return 32}default:return 32}}var Kr=!1,Da=null,Ma=null,Ua=null,ci=new Map,ui=new Map,La=[],ux="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 em(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":Ma=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":ci.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ui.delete(t.pointerId)}}function ri(e,t,l,a,s,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:c,targetContainers:[s]},t!==null&&(t=Gl(t),t!==null&&Fh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function rx(e,t,l,a,s){switch(t){case"focusin":return Da=ri(Da,e,t,l,a,s),!0;case"dragenter":return Ma=ri(Ma,e,t,l,a,s),!0;case"mouseover":return Ua=ri(Ua,e,t,l,a,s),!0;case"pointerover":var c=s.pointerId;return ci.set(c,ri(ci.get(c)||null,e,t,l,a,s)),!0;case"gotpointercapture":return c=s.pointerId,ui.set(c,ri(ui.get(c)||null,e,t,l,a,s)),!0}return!1}function tm(e){var t=ql(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=p(l),t!==null){e.blockedOn=t,xs(e.priority,function(){Wh(l)});return}}else if(t===31){if(t=x(l),t!==null){e.blockedOn=t,xs(e.priority,function(){Wh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Zr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);G=a,l.target.dispatchEvent(a),G=null}else return t=Gl(l),t!==null&&Fh(t),e.blockedOn=l,!1;t.shift()}return!0}function lm(e,t,l){Mc(e)&&l.delete(t)}function ox(){Kr=!1,Da!==null&&Mc(Da)&&(Da=null),Ma!==null&&Mc(Ma)&&(Ma=null),Ua!==null&&Mc(Ua)&&(Ua=null),ci.forEach(lm),ui.forEach(lm)}function Uc(e,t){e.blockedOn===t&&(e.blockedOn=null,Kr||(Kr=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,ox)))}var Lc=null;function am(e){Lc!==e&&(Lc=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){Lc===e&&(Lc=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(Vr(a||l)===null)continue;break}var c=Gl(l);c!==null&&(e.splice(t,3),t-=3,Zu(c,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function as(e){function t(b){return Uc(b,e)}Da!==null&&Uc(Da,e),Ma!==null&&Uc(Ma,e),Ua!==null&&Uc(Ua,e),ci.forEach(t),ui.forEach(t);for(var l=0;l<La.length;l++){var a=La[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<La.length&&(l=La[0],l.blockedOn===null);)tm(l),l.blockedOn===null&&La.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],c=l[a+1],d=s[it]||null;if(typeof c=="function")d||am(l);else if(d){var m=null;if(c&&c.hasAttribute("formAction")){if(s=c,d=c[it]||null)m=d.formAction;else if(Vr(s)!==null)continue}else m=d.action;typeof m=="function"?l[a+1]=m:(l.splice(a,3),a-=3),am(l)}}}function nm(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(d){return s=d})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Jr(e){this._internalRoot=e}Hc.prototype.render=Jr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var l=t.current,a=Wt();Jh(l,a,e,t,null,null)},Hc.prototype.unmount=Jr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Jh(e.current,2,null,e,null,null),vc(),t[oa]=null}};function Hc(e){this._internalRoot=e}Hc.prototype.unstable_scheduleHydration=function(e){if(e){var t=wn();e={blockedOn:null,target:e,priority:t};for(var l=0;l<La.length&&t!==0&&t<La[l].priority;l++);La.splice(l,0,e),l===0&&tm(e)}};var sm=i.version;if(sm!=="19.2.8")throw Error(r(527,sm,"19.2.8"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=v(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var fx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bc.isDisabled&&Bc.supportsFiber)try{nl=Bc.inject(fx),yt=Bc}catch{}}return fi.createRoot=function(e,t){if(!f(e))throw Error(r(299));var l=!1,a="",s=dd,c=hd,d=md;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=Vh(e,1,!1,null,null,l,a,null,s,c,d,nm),e[oa]=t.current,Rr(e),new Jr(t)},fi.hydrateRoot=function(e,t,l){if(!f(e))throw Error(r(299));var a=!1,s="",c=dd,d=hd,m=md,b=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(c=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(m=l.onRecoverableError),l.formState!==void 0&&(b=l.formState)),t=Vh(e,1,!0,t,l??null,a,s,b,c,d,m,nm),t.context=Kh(null),l=t.current,a=Wt(),a=gs(a),s=Na(a),s.callback=null,Sa(l,s,a),l=a,t.current.lanes=l,Rl(t,l),Ul(t),e[oa]=t.current,Rr(e),new Hc(t)},fi.version="19.2.8",fi}var pm;function jx(){if(pm)return Wr.exports;pm=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(i){console.error(i)}}return u(),Wr.exports=bx(),Wr.exports}var Nx=jx();function I({name:u,fill:i,className:o}){return n.jsx("span",{className:`ms material-symbols-rounded${i?" ms-fill":""}${o?` ${o}`:""}`,"aria-hidden":!0,children:u})}function Sx(){const[u,i]=C.useState(()=>window.location.hash.slice(1)||"/");return C.useEffect(()=>{const o=()=>i(window.location.hash.slice(1)||"/");return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[]),u}function gl(u,i){i?.replace?window.location.replace(`#${u}`):window.location.hash=u}function Ue({href:u,...i}){return n.jsx("a",{href:`#${u}`,...i})}const Zm="kw-expert";let xo=(()=>{try{return localStorage.getItem(Zm)!=="off"}catch{return!0}})();const uo=new Set;document.documentElement.dataset.expert=xo?"on":"off";function wx(u){xo=u,document.documentElement.dataset.expert=u?"on":"off";try{localStorage.setItem(Zm,u?"on":"off")}catch{}uo.forEach(i=>i())}function Ga(){return C.useSyncExternalStore(u=>(uo.add(u),()=>uo.delete(u)),()=>xo)}function Ge(u,i){const[o,r]=C.useState(null),f=C.useRef(u);return f.current=u,C.useEffect(()=>{let h=!0,p;const x=async()=>{try{const y=await fetch(f.current,{cache:"no-store"});y.ok&&h&&r(await y.json())}catch{}h&&(p=setTimeout(x,i?1500:6e3))};return x(),()=>{h=!1,clearTimeout(p)}},[u,i]),o}function vi(u){if(u==null)return"—";const i=Math.round(u/1e3);return i<60?`${i}s`:`${Math.floor(i/60)}m${String(i%60).padStart(2,"0")}s`}function vo(u){return u==null?"—":`$${u.toFixed(2)}`}function Yc(u){return u?u>=1e3?`${(u/1e3).toFixed(1)}k`:String(u):"0"}function yo(u){return u<1024?`${u} B`:u<1024*1024?`${(u/1024).toFixed(1)} K`:`${(u/1024/1024).toFixed(1)} M`}function pn(u){if(!u)return"—";const i=new Date(u),o=new Date,r=i.toDateString()===o.toDateString(),f=i.toTimeString().slice(0,5);return r?f:`${i.toISOString().slice(5,10)} ${f}`}function kx(u){if(!u)return"—";const i=Date.now()-Date.parse(u);if(i<6e4)return"just now";const o=Math.floor(i/6e4);if(o<60)return`${o}m ago`;const r=Math.floor(o/60);if(r<24)return`${r}h ago`;const f=Math.floor(r/24);return f<7?`${f}d ago`:new Date(u).toISOString().slice(5,10)}function bo({since:u}){const[,i]=C.useState(0);return C.useEffect(()=>{const o=setInterval(()=>i(r=>r+1),1e3);return()=>clearInterval(o)},[]),u?n.jsx("span",{className:"num",children:vi(Date.now()-Date.parse(u))}):null}function Vc({status:u}){return n.jsx("span",{className:`lamp ${u}`})}function Tx({status:u}){return n.jsx("span",{className:`status-word ${u}`,children:u})}function jo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var xn=jo();function Vm(u){xn=u}var mn={exec:()=>null};function ns(u){let i=[];return o=>{let r=Math.max(0,Math.min(3,o-1)),f=i[r];return f||(f=u(r),i[r]=f),f}}function we(u,i=""){let o=typeof u=="string"?u:u.source,r={replace:(f,h)=>{let p=typeof h=="string"?h:h.source;return p=p.replace(Ot.caret,"$1"),o=o.replace(f,p),r},getRegex:()=>new RegExp(o,i)};return r}var Ex=((u="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+u)}catch{return!1}})(),Ot={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ns(u=>new RegExp(`^ {0,${u}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ns(u=>new RegExp(`^ {0,${u}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ns(u=>new RegExp(`^ {0,${u}}(?:\`\`\`|~~~)`)),headingBeginRegex:ns(u=>new RegExp(`^ {0,${u}}#`)),htmlBeginRegex:ns(u=>new RegExp(`^ {0,${u}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ns(u=>new RegExp(`^ {0,${u}}>`))},Ax=/^(?:[ \t]*(?:\n|$))+/,_x=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rx=/^ {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+|$)/,zx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,No=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Km=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Jm=we(Km).replace(/bull/g,No).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(),Cx=we(Km).replace(/bull/g,No).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(),So=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ox=/^[^\n]+/,wo=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Dx=we(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mx=we(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,No).getRegex(),Kc="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ko=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ux=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",ko).replace("tag",Kc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Im=u=>we(So).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",u).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),Lx=Im(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Hx=Im(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Bx=we(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hx).getRegex(),To={blockquote:Bx,code:_x,def:Dx,fences:Rx,heading:zx,hr:yi,html:Ux,lheading:Jm,list:Mx,newline:Ax,paragraph:Lx,table:mn,text:Ox},gm=we("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex(),qx={...To,lheading:Cx,table:gm,paragraph:we(So).replace("hr",yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kc).getRegex()},Gx={...To,html:we(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ko).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:mn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:we(So).replace("hr",yi).replace("heading",` *#{1,6} *[^
|
|
10
|
-
]`).replace("lheading",Jm).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Yx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,$x=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Fm=/^( {2,}|\\)\n(?!\s*$)/,Xx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ia=/[\p{P}\p{S}]/u,us=/[\s\p{P}\p{S}]/u,bi=/[^\s\p{P}\p{S}]/u,Qx=we(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,us).getRegex(),Zx=/[\p{Pi}\p{Ps}"']/u,Wm=/(?!~)[\p{P}\p{S}]/u,Vx=/(?!~)[\s\p{P}\p{S}]/u,Kx=/(?:[^\s\p{P}\p{S}]|~)/u,Jx=we(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ex?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Pm=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Ix=we(Pm,"u").replace(/punct/g,ia).getRegex(),Fx=we(Pm,"u").replace(/punct/g,Wm).getRegex(),Wx=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Px=we(Wx,"u").replace(/openQuote/g,Zx).replace(/punct/g,ia).getRegex(),ep="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ev=we(ep,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),tv=we(ep,"gu").replace(/notPunctSpace/g,Kx).replace(/punctSpace/g,Vx).replace(/punct/g,Wm).getRegex(),lv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",av=we(lv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),nv=we("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),sv="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",iv=we(sv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),cv=we(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ia).getRegex(),uv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",rv=we(uv,"gu").replace(/notPunctSpace/g,bi).replace(/punctSpace/g,us).replace(/punct/g,ia).getRegex(),ov=we(/\\(punct)/,"gu").replace(/punct/g,ia).getRegex(),fv=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(),dv=we(ko).replace("(?:-->|$)","-->").getRegex(),hv=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",dv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$c=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,mv=we(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",$c).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tp=we(/^!?\[(label)\]\[(ref)\]/).replace("label",$c).replace("ref",wo).getRegex(),lp=we(/^!?\[(ref)\](?:\[\])?/).replace("ref",wo).getRegex(),pv=we("reflink|nolink(?!\\()","g").replace("reflink",tp).replace("nolink",lp).getRegex(),xm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Eo={_backpedal:mn,anyPunctuation:ov,autolink:fv,blockSkip:Jx,br:Fm,code:$x,del:mn,delLDelim:mn,delRDelim:mn,emStrongLDelim:Ix,emStrongRDelimAst:ev,emStrongRDelimUnd:nv,escape:Yx,link:mv,nolink:lp,punctuation:Qx,reflink:tp,reflinkSearch:pv,tag:hv,text:Xx,url:mn},gv={...Eo,emStrongLDelim:Px,emStrongRDelimAst:av,emStrongRDelimUnd:iv,link:we(/^!?\[(label)\]\((.*?)\)/).replace("label",$c).getRegex(),reflink:we(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$c).getRegex()},ro={...Eo,emStrongRDelimAst:tv,emStrongLDelim:Fx,delLDelim:cv,delRDelim:rv,url:we(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",xm).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",xm).getRegex()},xv={...ro,br:we(Fm).replace("{2,}","*").getRegex(),text:we(ro.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},qc={normal:To,gfm:qx,pedantic:Gx},di={normal:Eo,gfm:ro,breaks:xv,pedantic:gv},vv={"&":"&","<":"<",">":">",'"':""","'":"'"},vm=u=>vv[u];function Ll(u,i){if(i){if(Ot.escapeTest.test(u))return u.replace(Ot.escapeReplace,vm)}else if(Ot.escapeTestNoEncode.test(u))return u.replace(Ot.escapeReplaceNoEncode,vm);return u}function ym(u){try{u=encodeURI(u).replace(Ot.percentDecode,"%")}catch{return null}return u}function bm(u,i){let o=u.replace(Ot.findPipe,(h,p,x)=>{let y=!1,v=p;for(;--v>=0&&x[v]==="\\";)y=!y;return y?"|":" |"}),r=o.split(Ot.splitPipe),f=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),i)if(r.length>i)r.splice(i);else for(;r.length<i;)r.push("");for(;f<r.length;f++)r[f]=r[f].trim().replace(Ot.slashPipe,"|");return r}function Ba(u,i,o){let r=u.length;if(r===0)return"";let f=0;for(;f<r&&u.charAt(r-f-1)===i;)f++;return u.slice(0,r-f)}function jm(u){let i=u.split(`
|
|
11
|
-
`),o=i.length-1;for(;o>=0&&Ot.blankLine.test(i[o]);)o--;return i.length-o<=2?u:i.slice(0,o+1).join(`
|
|
12
|
-
`)}function yv(u,i){if(u.indexOf(i[1])===-1)return-1;let o=0;for(let r=0;r<u.length;r++)if(u[r]==="\\")r++;else if(u[r]===i[0])o++;else if(u[r]===i[1]&&(o--,o<0))return r;return o>0?-2:-1}function bv(u,i=0){let o=i,r="";for(let f of u)if(f===" "){let h=4-o%4;r+=" ".repeat(h),o+=h}else r+=f,o++;return r}function Nm(u,i,o,r,f){let h=i.href,p=i.title||null,x=u[1].replace(f.other.outputLinkReplace,"$1"),y=u[0].charAt(0)==="!";r.state.inLink=!0;let v=r.state.linkEmitted,S=r.state.inRawBlock;r.state.linkEmitted=!1;let _=r.inlineTokens(x),T=r.state.linkEmitted;if(r.state.linkEmitted=v,r.state.inLink=!1,!y){if(T){r.state.inRawBlock=S;return}r.state.linkEmitted=!0}return{type:y?"image":"link",raw:o,href:h,title:p,text:x,tokens:_}}function jv(u,i,o){let r=u.match(o.other.indentCodeCompensation);if(r===null)return i;let f=r[1];return i.split(`
|
|
13
|
-
`).map(h=>{let p=h.match(o.other.beginningSpace);if(p===null)return h;let[x]=p;return x.length>=f.length?h.slice(f.length):h}).join(`
|
|
14
|
-
`)}var Xc=class{options;rules;lexer;constructor(u){this.options=u||xn}space(u){let i=this.rules.block.newline.exec(u);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(u){let i=this.rules.block.code.exec(u);if(i){let o=this.options.pedantic?i[0]:jm(i[0]),r=o.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:o,codeBlockStyle:"indented",text:r}}}fences(u){let i=this.rules.block.fences.exec(u);if(i){let o=i[0],r=jv(o,i[3]||"",this.rules);return{type:"code",raw:o,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:r}}}heading(u){let i=this.rules.block.heading.exec(u);if(i){let o=i[2].trim();if(this.rules.other.endingHash.test(o)){let r=Ba(o,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(o=r.trim())}return{type:"heading",raw:Ba(i[0],`
|
|
15
|
-
`),depth:i[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(u){let i=this.rules.block.hr.exec(u);if(i)return{type:"hr",raw:Ba(i[0],`
|
|
16
|
-
`)}}blockquote(u){let i=this.rules.block.blockquote.exec(u);if(i){let o=Ba(i[0],`
|
|
17
|
-
`).split(`
|
|
18
|
-
`),r="",f="",h=[];for(;o.length>0;){let p=!1,x=[],y;for(y=0;y<o.length;y++)if(this.rules.other.blockquoteStart.test(o[y]))x.push(o[y]),p=!0;else if(!p)x.push(o[y]);else break;o=o.slice(y);let v=x.join(`
|
|
19
|
-
`),S=v.replace(this.rules.other.blockquoteSetextReplace,`
|
|
20
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
21
|
-
${v}`:v,f=f?`${f}
|
|
22
|
-
${S}`:S;let _=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,h,!0),this.lexer.state.top=_,o.length===0)break;let T=h.at(-1);if(T?.type==="code")break;if(T?.type==="blockquote"){let U=T,Y=o.join(`
|
|
23
|
-
`),ee=U.raw+`
|
|
24
|
-
`+Y.replace(this.rules.other.blockquoteSetextReplace2,""),V=this.blockquote(ee);h[h.length-1]=V,r=`${r}
|
|
25
|
-
${Y}`,f=f.substring(0,f.length-U.text.length)+V.text;break}else if(T?.type==="list"){let U=T,Y=U.raw+`
|
|
26
|
-
`+o.join(`
|
|
27
|
-
`),ee=this.list(Y);h[h.length-1]=ee,r=r.substring(0,r.length-T.raw.length)+ee.raw,f=f.substring(0,f.length-U.raw.length)+ee.raw,o=Y.substring(h.at(-1).raw.length).split(`
|
|
28
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:h,text:f}}}list(u){let i=this.rules.block.list.exec(u);if(i){let o=i[1].trim(),r=o.length>1,f={type:"list",raw:"",ordered:r,start:r?+o.slice(0,-1):"",loose:!1,items:[]};o=r?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=r?o:"[*+-]");let h=this.rules.other.listItemRegex(o),p=!1;for(;u;){let y=!1,v="",S="";if(!(i=h.exec(u))||this.rules.block.hr.test(u))break;v=i[0],u=u.substring(v.length);let _=bv(i[2].split(`
|
|
29
|
-
`,1)[0],i[1].length),T=u.split(`
|
|
30
|
-
`,1)[0],U=!_.trim(),Y=0;if(this.options.pedantic?(Y=2,S=_.trimStart()):U?Y=i[1].length+1:(Y=_.search(this.rules.other.nonSpaceChar),Y=Y>4?1:Y,S=_.slice(Y),Y+=i[1].length),U&&this.rules.other.blankLine.test(T)&&(v+=T+`
|
|
31
|
-
`,u=u.substring(T.length+1),y=!0),!y){let ee=this.rules.other.nextBulletRegex(Y),V=this.rules.other.hrRegex(Y),z=this.rules.other.fencesBeginRegex(Y),de=this.rules.other.headingBeginRegex(Y),fe=this.rules.other.htmlBeginRegex(Y),te=this.rules.other.blockquoteBeginRegex(Y);for(;u;){let F=u.split(`
|
|
32
|
-
`,1)[0],$;if(T=F,this.options.pedantic?(T=T.replace(this.rules.other.listReplaceNesting," "),$=T):$=T.replace(this.rules.other.tabCharGlobal," "),z.test(T)||de.test(T)||fe.test(T)||te.test(T)||ee.test(T)||V.test(T))break;if($.search(this.rules.other.nonSpaceChar)>=Y||!T.trim())S+=`
|
|
33
|
-
`+$.slice(Y);else{if(U||_.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||z.test(_)||de.test(_)||V.test(_))break;S+=`
|
|
34
|
-
`+T}U=!T.trim(),v+=F+`
|
|
35
|
-
`,u=u.substring(F.length+1),_=$.slice(Y)}}f.loose||(p?f.loose=!0:this.rules.other.doubleBlankLine.test(v)&&(p=!0)),f.items.push({type:"list_item",raw:v,task:!!this.options.gfm&&this.rules.other.listIsTask.test(S),loose:!1,text:S,tokens:[]}),f.raw+=v}let x=f.items.at(-1);if(x)x.raw=x.raw.trimEnd(),x.text=x.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(_=>_.type==="space"),S=v.length>0&&v.some(_=>this.rules.other.anyLine.test(_.raw));f.loose=S}for(let y of f.items){let v=y.tokens[0];if(y.task&&(v?.type==="text"||v?.type==="paragraph")){y.text=y.text.replace(this.rules.other.listReplaceTask,""),v.raw=v.raw.replace(this.rules.other.listReplaceTask,""),v.text=v.text.replace(this.rules.other.listReplaceTask,"");for(let _=this.lexer.inlineQueue.length-1;_>=0;_--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[_].src)){this.lexer.inlineQueue[_].src=this.lexer.inlineQueue[_].src.replace(this.rules.other.listReplaceTask,"");break}let S=this.rules.other.listTaskCheckbox.exec(y.raw);if(S){let _={type:"checkbox",raw:S[0]+" ",checked:S[0]!=="[ ]"};y.checked=_.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=_.raw+y.tokens[0].raw,y.tokens[0].text=_.raw+y.tokens[0].text,y.tokens[0].tokens.unshift(_)):y.tokens.unshift({type:"paragraph",raw:_.raw,text:_.raw,tokens:[_]}):y.tokens.unshift(_)}}else y.task&&(y.task=!1)}if(f.loose)for(let y of f.items){y.loose=!0;for(let v of y.tokens)v.type==="text"&&(v.type="paragraph")}return f}}html(u){let i=this.rules.block.html.exec(u);if(i){let o=jm(i[0]);return{type:"html",block:!0,raw:o,pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:o}}}def(u){let i=this.rules.block.def.exec(u);if(i){let o=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",f=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:o,raw:Ba(i[0],`
|
|
36
|
-
`),href:r,title:f}}}table(u){let i=this.rules.block.table.exec(u);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let o=bm(i[1]),r=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),f=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
37
|
-
`):[],h={type:"table",raw:Ba(i[0],`
|
|
38
|
-
`),header:[],align:[],rows:[]};if(o.length===r.length){for(let p of r)this.rules.other.tableAlignRight.test(p)?h.align.push("right"):this.rules.other.tableAlignCenter.test(p)?h.align.push("center"):this.rules.other.tableAlignLeft.test(p)?h.align.push("left"):h.align.push(null);for(let p=0;p<o.length;p++)h.header.push({text:o[p],tokens:this.lexer.inline(o[p]),header:!0,align:h.align[p]});for(let p of f)h.rows.push(bm(p,h.header.length).map((x,y)=>({text:x,tokens:this.lexer.inline(x),header:!1,align:h.align[y]})));return h}}lheading(u){let i=this.rules.block.lheading.exec(u);if(i){let o=i[1].trim();return{type:"heading",raw:Ba(i[0],`
|
|
39
|
-
`),depth:i[2].charAt(0)==="="?1:2,text:o,tokens:this.lexer.inline(o)}}}paragraph(u){let i=this.rules.block.paragraph.exec(u);if(i){let o=i[1].charAt(i[1].length-1)===`
|
|
40
|
-
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:o,tokens:this.lexer.inline(o)}}}text(u){let i=this.rules.block.text.exec(u);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(u){let i=this.rules.inline.escape.exec(u);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(u){let i=this.rules.inline.tag.exec(u);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(u){let i=this.rules.inline.link.exec(u);if(i){let o=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;let h=Ba(o.slice(0,-1),"\\");if((o.length-h.length)%2===0)return}else{let h=yv(i[2],"()");if(h===-2)return;if(h>-1){let p=(i[0].indexOf("!")===0?5:4)+i[1].length+h;i[2]=i[2].substring(0,h),i[0]=i[0].substring(0,p).trim(),i[3]=""}}let r=i[2],f="";if(this.options.pedantic){let h=this.rules.other.pedanticHrefTitle.exec(r);h&&(r=h[1],f=h[3])}else f=i[3]?i[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?r=r.slice(1):r=r.slice(1,-1)),Nm(i,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:f&&f.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(u,i){let o;if((o=this.rules.inline.reflink.exec(u))||(o=this.rules.inline.nolink.exec(u))){let r=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),f=i[r.toLowerCase()];if(!f){let h=o[0].charAt(0);return{type:"text",raw:h,text:h}}return Nm(o,f,o[0],this.lexer,this.rules)}}emStrong(u,i,o=""){let r=this.rules.inline.emStrongLDelim.exec(u);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&o.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,x=f,y=0,v=r[0][0],S=o===v,_=v==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(_.lastIndex=0,i=i.slice(-1*u.length+f);(r=_.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h)continue;if(p=[...h].length,r[3]||r[4]){x+=p;continue}else if(r[5]||r[6]){if(f%3&&!((f+p)%3)){y+=p;continue}if(S)break}if(x-=p,x>0)continue;p=Math.min(p,p+x+y);let T=[...r[0]][0].length,U=u.slice(0,f+r.index+T+p);if(Math.min(f,p)%2){let ee=U.slice(1,-1);return{type:"em",raw:U,text:ee,tokens:this.lexer.inlineTokens(ee)}}let Y=U.slice(2,-2);return{type:"strong",raw:U,text:Y,tokens:this.lexer.inlineTokens(Y)}}}}codespan(u){let i=this.rules.inline.code.exec(u);if(i){let o=i[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(o),f=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return r&&f&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:i[0],text:o}}}br(u){let i=this.rules.inline.br.exec(u);if(i)return{type:"br",raw:i[0]}}del(u,i,o=""){let r=this.rules.inline.delLDelim.exec(u);if(r&&(!r[1]||!o||this.rules.inline.punctuation.exec(o))){let f=[...r[0]].length-1,h,p,x=f,y=this.rules.inline.delRDelim;for(y.lastIndex=0,i=i.slice(-1*u.length+f);(r=y.exec(i))!==null;){if(h=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!h||(p=[...h].length,p!==f))continue;if(r[3]||r[4]){x+=p;continue}if(x-=p,x>0)continue;p=Math.min(p,p+x);let v=[...r[0]][0].length,S=u.slice(0,f+r.index+v+p),_=S.slice(f,-f);return{type:"del",raw:S,text:_,tokens:this.lexer.inlineTokens(_)}}}}autolink(u){let i=this.rules.inline.autolink.exec(u);if(i){let o,r;return i[2]==="@"?(o=i[1],r="mailto:"+o):(o=i[1],r=o),{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}url(u){let i;if(i=this.rules.inline.url.exec(u)){let o,r;if(i[2]==="@")o=i[0],r="mailto:"+o;else{let f;do f=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(f!==i[0]);o=i[0],i[1]==="www."?r="http://"+i[0]:r=i[0]}return{type:"link",raw:i[0],text:o,href:r,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(u){let i=this.rules.inline.text.exec(u);if(i){let o=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:o}}}},Tl=class oo{tokens;options;state;inlineQueue;tokenizer;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||xn,this.options.tokenizer=this.options.tokenizer||new Xc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let o={other:Ot,block:qc.normal,inline:di.normal};this.options.pedantic?(o.block=qc.pedantic,o.inline=di.pedantic):this.options.gfm&&(o.block=qc.gfm,this.options.breaks?o.inline=di.breaks:o.inline=di.gfm),this.tokenizer.rules=o}static get rules(){return{block:qc,inline:di}}static lex(i,o){return new oo(o).lex(i)}static lexInline(i,o){return new oo(o).inlineTokens(i)}lex(i){i=i.replace(Ot.carriageReturn,`
|
|
41
|
-
`),this.blockTokens(i,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){let r=this.inlineQueue[o];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,o=[],r=!1){this.tokenizer.lexer=this,this.options.pedantic&&(i=i.replace(Ot.tabCharGlobal," ").replace(Ot.spaceLine,""));let f=1/0;for(;i;){if(i.length<f)f=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}let h;if(this.options.extensions?.block?.some(x=>(h=x.call({lexer:this},i,o))?(i=i.substring(h.raw.length),o.push(h),!0):!1))continue;if(h=this.tokenizer.space(i)){i=i.substring(h.raw.length);let x=o.at(-1);h.raw.length===1&&x!==void 0?x.raw+=`
|
|
42
|
-
`:o.push(h);continue}if(h=this.tokenizer.code(i)){i=i.substring(h.raw.length);let x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
43
|
-
`)?"":`
|
|
44
|
-
`)+h.raw,x.text+=`
|
|
45
|
-
`+h.text,this.inlineQueue.at(-1).src=x.text):o.push(h);continue}if(h=this.tokenizer.fences(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.heading(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.hr(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.blockquote(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.list(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.html(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.def(i)){i=i.substring(h.raw.length);let x=o.at(-1);x?.type==="paragraph"||x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
46
|
-
`)?"":`
|
|
47
|
-
`)+h.raw,x.text+=`
|
|
48
|
-
`+h.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[h.tag]||(this.tokens.links[h.tag]={href:h.href,title:h.title},o.push(h));continue}if(h=this.tokenizer.table(i)){i=i.substring(h.raw.length),o.push(h);continue}if(h=this.tokenizer.lheading(i)){i=i.substring(h.raw.length),o.push(h);continue}let p=i;if(this.options.extensions?.startBlock){let x=1/0,y=i.slice(1),v;this.options.extensions.startBlock.forEach(S=>{v=S.call({lexer:this},y),typeof v=="number"&&v>=0&&(x=Math.min(x,v))}),x<1/0&&x>=0&&(p=i.substring(0,x+1))}if(this.state.top&&(h=this.tokenizer.paragraph(p))){let x=o.at(-1);r&&x?.type==="paragraph"?(x.raw+=(x.raw.endsWith(`
|
|
49
|
-
`)?"":`
|
|
50
|
-
`)+h.raw,x.text+=`
|
|
51
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):o.push(h),r=p.length!==i.length,i=i.substring(h.raw.length);continue}if(h=this.tokenizer.text(i)){i=i.substring(h.raw.length);let x=o.at(-1);x?.type==="text"?(x.raw+=(x.raw.endsWith(`
|
|
52
|
-
`)?"":`
|
|
53
|
-
`)+h.raw,x.text+=`
|
|
54
|
-
`+h.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):o.push(h);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return this.state.top=!0,o}inline(i,o=[]){return this.inlineQueue.push({src:i,tokens:o}),o}linkInText(i){if(!i.includes("["))return!1;let o=this.tokenizer.rules.inline.link;for(let r of i.matchAll(this.tokenizer.rules.inline.blockSkip))if(o.test(r[0])&&i.charAt(r.index-1)!=="!")return!0;for(let r of i.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let f=r[0],h=f.lastIndexOf("[");if(!(f.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,f.slice(h+1,-1)))&&!(h>1&&this.linkInText(f.slice(1,h-1))))return!0}return!1}inlineTokens(i,o=[]){this.tokenizer.lexer=this;let r=i;if(this.tokens.links&&i.includes("[")){let x=this.tokenizer.rules.inline.reflinkSearch,y=v=>{let S=v.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,v.slice(S+1,-1)))return v;if(S>1&&v.charAt(0)!=="!"){let _=v.slice(1,S-1);if(this.linkInText(_))return"["+_.replace(x,y)+"]["+"a".repeat(v.length-S-2)+"]"}return"["+"a".repeat(v.length-2)+"]"};r=r.replace(x,y)}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,x=>"+".repeat(x.length)),r=r.replace(this.tokenizer.rules.inline.blockSkip,(x,y,v)=>{let S=v?v.length:0;return x.slice(0,S)+"["+"a".repeat(x.length-S-2)+"]"}),r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let f=!1,h="",p=1/0;for(;i;){if(i.length<p)p=i.length;else{this.infiniteLoopError(i.charCodeAt(0));break}f||(h=""),f=!1;let x;if(this.options.extensions?.inline?.some(v=>(x=v.call({lexer:this},i,o))?(i=i.substring(x.raw.length),o.push(x),!0):!1))continue;if(x=this.tokenizer.escape(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.tag(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.link(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(x.raw.length);let v=o.at(-1);x.type==="text"&&v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);continue}if(x=this.tokenizer.emStrong(i,r,h)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.codespan(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.br(i)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.del(i,r,h)){i=i.substring(x.raw.length),o.push(x);continue}if(x=this.tokenizer.autolink(i)){i=i.substring(x.raw.length),o.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(i))){i=i.substring(x.raw.length),o.push(x);continue}let y=i;if(this.options.extensions?.startInline){let v=1/0,S=i.slice(1),_;this.options.extensions.startInline.forEach(T=>{_=T.call({lexer:this},S),typeof _=="number"&&_>=0&&(v=Math.min(v,_))}),v<1/0&&v>=0&&(y=i.substring(0,v+1))}if(x=this.tokenizer.inlineText(y)){i=i.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(h=x.raw.slice(-1)),f=!0;let v=o.at(-1);v?.type==="text"?(v.raw+=x.raw,v.text+=x.text):o.push(x);continue}if(i){this.infiniteLoopError(i.charCodeAt(0));break}}return o}infiniteLoopError(i){let o="Infinite loop on byte: "+i;if(this.options.silent)console.error(o);else throw new Error(o)}},Qc=class{options;parser;constructor(u){this.options=u||xn}space(u){return""}code({text:u,lang:i,escaped:o}){let r=(i||"").match(Ot.notSpaceStart)?.[0],f=u.replace(Ot.endingNewline,"")+`
|
|
55
|
-
`;return r?'<pre><code class="language-'+Ll(r)+'">'+(o?f:Ll(f,!0))+`</code></pre>
|
|
56
|
-
`:"<pre><code>"+(o?f:Ll(f,!0))+`</code></pre>
|
|
57
|
-
`}blockquote({tokens:u}){return`<blockquote>
|
|
58
|
-
${this.parser.parse(u)}</blockquote>
|
|
59
|
-
`}html({text:u}){return u}def(u){return""}heading({tokens:u,depth:i}){return`<h${i}>${this.parser.parseInline(u)}</h${i}>
|
|
60
|
-
`}hr(u){return`<hr>
|
|
61
|
-
`}list(u){let i=u.ordered,o=u.start,r="";for(let p=0;p<u.items.length;p++){let x=u.items[p];r+=this.listitem(x)}let f=i?"ol":"ul",h=i&&o!==1?' start="'+o+'"':"";return"<"+f+h+`>
|
|
62
|
-
`+r+"</"+f+`>
|
|
63
|
-
`}listitem(u){return`<li>${this.parser.parse(u.tokens)}</li>
|
|
64
|
-
`}checkbox({checked:u}){return"<input "+(u?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:u}){return`<p>${this.parser.parseInline(u)}</p>
|
|
65
|
-
`}table(u){let i="",o="";for(let f=0;f<u.header.length;f++)o+=this.tablecell(u.header[f]);i+=this.tablerow({text:o});let r="";for(let f=0;f<u.rows.length;f++){let h=u.rows[f];o="";for(let p=0;p<h.length;p++)o+=this.tablecell(h[p]);r+=this.tablerow({text:o})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
66
|
-
<thead>
|
|
67
|
-
`+i+`</thead>
|
|
68
|
-
`+r+`</table>
|
|
69
|
-
`}tablerow({text:u}){return`<tr>
|
|
70
|
-
${u}</tr>
|
|
71
|
-
`}tablecell(u){let i=this.parser.parseInline(u.tokens),o=u.header?"th":"td";return(u.align?`<${o} align="${u.align}">`:`<${o}>`)+i+`</${o}>
|
|
72
|
-
`}strong({tokens:u}){return`<strong>${this.parser.parseInline(u)}</strong>`}em({tokens:u}){return`<em>${this.parser.parseInline(u)}</em>`}codespan({text:u}){return`<code>${Ll(u,!0)}</code>`}br(u){return"<br>"}del({tokens:u}){return`<del>${this.parser.parseInline(u)}</del>`}link({href:u,title:i,tokens:o}){let r=this.parser.parseInline(o),f=ym(u);if(f===null)return r;u=f;let h='<a href="'+u+'"';return i&&(h+=' title="'+Ll(i)+'"'),h+=">"+r+"</a>",h}image({href:u,title:i,text:o,tokens:r}){r&&(o=this.parser.parseInline(r,this.parser.textRenderer));let f=ym(u);if(f===null)return Ll(o);u=f;let h=`<img src="${u}" alt="${Ll(o)}"`;return i&&(h+=` title="${Ll(i)}"`),h+=">",h}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:Ll(u.text)}},Ao=class{strong({text:u}){return u}em({text:u}){return u}codespan({text:u}){return u}del({text:u}){return u}html({text:u}){return u}text({text:u}){return u}link({text:u}){return""+u}image({text:u}){return""+u}br(){return""}checkbox({raw:u}){return u}},El=class fo{options;renderer;textRenderer;constructor(i){this.options=i||xn,this.options.renderer=this.options.renderer||new Qc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ao}static parse(i,o){return new fo(o).parse(i)}static parseInline(i,o){return new fo(o).parseInline(i)}parse(i){this.renderer.parser=this;let o="";for(let r=0;r<i.length;r++){let f=i[r];if(this.options.extensions?.renderers?.[f.type]){let p=f,x=this.options.extensions.renderers[p.type].call({parser:this},p);if(x!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(p.type)){o+=x||"";continue}}let h=f;switch(h.type){case"space":{o+=this.renderer.space(h);break}case"hr":{o+=this.renderer.hr(h);break}case"heading":{o+=this.renderer.heading(h);break}case"code":{o+=this.renderer.code(h);break}case"table":{o+=this.renderer.table(h);break}case"blockquote":{o+=this.renderer.blockquote(h);break}case"list":{o+=this.renderer.list(h);break}case"checkbox":{o+=this.renderer.checkbox(h);break}case"html":{o+=this.renderer.html(h);break}case"def":{o+=this.renderer.def(h);break}case"paragraph":{o+=this.renderer.paragraph(h);break}case"text":{o+=this.renderer.text(h);break}default:{let p='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return o}parseInline(i,o=this.renderer){this.renderer.parser=this;let r="";for(let f=0;f<i.length;f++){let h=i[f];if(this.options.extensions?.renderers?.[h.type]){let x=this.options.extensions.renderers[h.type].call({parser:this},h);if(x!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(h.type)){r+=x||"";continue}}let p=h;switch(p.type){case"escape":{r+=o.text(p);break}case"html":{r+=o.html(p);break}case"link":{r+=o.link(p);break}case"image":{r+=o.image(p);break}case"checkbox":{r+=o.checkbox(p);break}case"strong":{r+=o.strong(p);break}case"em":{r+=o.em(p);break}case"codespan":{r+=o.codespan(p);break}case"br":{r+=o.br(p);break}case"del":{r+=o.del(p);break}case"text":{r+=o.text(p);break}default:{let x='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return r}},gi=class{options;block;constructor(u){this.options=u||xn}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(u){return u}postprocess(u){return u}processAllTokens(u){return u}emStrongMask(u){return u}provideLexer(u=this.block){return u?Tl.lex:Tl.lexInline}provideParser(u=this.block){return u?El.parse:El.parseInline}},Nv=class{defaults=jo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=El;Renderer=Qc;TextRenderer=Ao;Lexer=Tl;Tokenizer=Xc;Hooks=gi;constructor(...u){this.use(...u)}walkTokens(u,i){let o=[];for(let r of u)switch(o=o.concat(i.call(this,r)),r.type){case"table":{let f=r;for(let h of f.header)o=o.concat(this.walkTokens(h.tokens,i));for(let h of f.rows)for(let p of h)o=o.concat(this.walkTokens(p.tokens,i));break}case"list":{let f=r;o=o.concat(this.walkTokens(f.items,i));break}default:{let f=r;this.defaults.extensions?.childTokens?.[f.type]?this.defaults.extensions.childTokens[f.type].forEach(h=>{let p=f[h].flat(1/0);o=o.concat(this.walkTokens(p,i))}):f.tokens&&(o=o.concat(this.walkTokens(f.tokens,i)))}}return o}use(...u){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return u.forEach(o=>{let r={...o};if(r.async=this.defaults.async||r.async||!1,o.extensions&&(o.extensions.forEach(f=>{if(!f.name)throw new Error("extension name required");if("renderer"in f){let h=i.renderers[f.name];h?i.renderers[f.name]=function(...p){let x=f.renderer.apply(this,p);return x===!1&&(x=h.apply(this,p)),x}:i.renderers[f.name]=f.renderer}if("tokenizer"in f){if(!f.level||f.level!=="block"&&f.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let h=i[f.level];h?h.unshift(f.tokenizer):i[f.level]=[f.tokenizer],f.start&&(f.level==="block"?i.startBlock?i.startBlock.push(f.start):i.startBlock=[f.start]:f.level==="inline"&&(i.startInline?i.startInline.push(f.start):i.startInline=[f.start]))}"childTokens"in f&&f.childTokens&&(i.childTokens[f.name]=f.childTokens)}),r.extensions=i),o.renderer){let f=this.defaults.renderer||new Qc(this.defaults);for(let h in o.renderer){if(!(h in f))throw new Error(`renderer '${h}' does not exist`);if(["options","parser"].includes(h))continue;let p=h,x=o.renderer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S||""}}r.renderer=f}if(o.tokenizer){let f=this.defaults.tokenizer||new Xc(this.defaults);for(let h in o.tokenizer){if(!(h in f))throw new Error(`tokenizer '${h}' does not exist`);if(["options","rules","lexer"].includes(h))continue;let p=h,x=o.tokenizer[p],y=f[p];f[p]=(...v)=>{let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.tokenizer=f}if(o.hooks){let f=this.defaults.hooks||new gi;for(let h in o.hooks){if(!(h in f))throw new Error(`hook '${h}' does not exist`);if(["options","block"].includes(h))continue;let p=h,x=o.hooks[p],y=f[p];gi.passThroughHooks.has(h)?f[p]=v=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(h))return(async()=>{let _=await x.call(f,v);return y.call(f,_)})();let S=x.call(f,v);return y.call(f,S)}:f[p]=(...v)=>{if(this.defaults.async)return(async()=>{let _=await x.apply(f,v);return _===!1&&(_=await y.apply(f,v)),_})();let S=x.apply(f,v);return S===!1&&(S=y.apply(f,v)),S}}r.hooks=f}if(o.walkTokens){let f=this.defaults.walkTokens,h=o.walkTokens;r.walkTokens=function(p){let x=[];return x.push(h.call(this,p)),f&&(x=x.concat(f.call(this,p))),x}}this.defaults={...this.defaults,...r}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,i){return Tl.lex(u,i??this.defaults)}parser(u,i){return El.parse(u,i??this.defaults)}parseMarkdown(u){return(i,o)=>{let r={...o},f={...this.defaults,...r},h=this.onError(!!f.silent,!!f.async);if(this.defaults.async===!0&&r.async===!1)return h(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof i>"u"||i===null)return h(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return h(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(f.hooks&&(f.hooks.options=f,f.hooks.block=u),f.async)return(async()=>{let p=f.hooks?await f.hooks.preprocess(i):i,x=await(f.hooks?await f.hooks.provideLexer(u):u?Tl.lex:Tl.lexInline)(p,f),y=f.hooks?await f.hooks.processAllTokens(x):x;f.walkTokens&&await Promise.all(this.walkTokens(y,f.walkTokens));let v=await(f.hooks?await f.hooks.provideParser(u):u?El.parse:El.parseInline)(y,f);return f.hooks?await f.hooks.postprocess(v):v})().catch(h);try{f.hooks&&(i=f.hooks.preprocess(i));let p=(f.hooks?f.hooks.provideLexer(u):u?Tl.lex:Tl.lexInline)(i,f);f.hooks&&(p=f.hooks.processAllTokens(p)),f.walkTokens&&this.walkTokens(p,f.walkTokens);let x=(f.hooks?f.hooks.provideParser(u):u?El.parse:El.parseInline)(p,f);return f.hooks&&(x=f.hooks.postprocess(x)),x}catch(p){return h(p)}}}onError(u,i){return o=>{if(o.message+=`
|
|
73
|
-
Please report this to https://github.com/markedjs/marked.`,u){let r="<p>An error occurred:</p><pre>"+Ll(o.message+"",!0)+"</pre>";return i?Promise.resolve(r):r}if(i)return Promise.reject(o);throw o}}},gn=new Nv;function Oe(u,i){return gn.parse(u,i)}Oe.options=Oe.setOptions=function(u){return gn.setOptions(u),Oe.defaults=gn.defaults,Vm(Oe.defaults),Oe};Oe.getDefaults=jo;Oe.defaults=xn;function Sv(...u){return gn.use(...u),Oe.defaults=gn.defaults,Vm(Oe.defaults),Oe}Oe.use=Sv;Oe.walkTokens=function(u,i){return gn.walkTokens(u,i)};Oe.parseInline=gn.parseInline;Oe.Parser=El;Oe.parser=El.parse;Oe.Renderer=Qc;Oe.TextRenderer=Ao;Oe.Lexer=Tl;Oe.lexer=Tl.lex;Oe.Tokenizer=Xc;Oe.Hooks=gi;Oe.parse=Oe;Oe.options;Oe.setOptions;Oe.walkTokens;Oe.parseInline;El.parse;Tl.lex;function Sm(u,i){(i==null||i>u.length)&&(i=u.length);for(var o=0,r=Array(i);o<i;o++)r[o]=u[o];return r}function wv(u){if(Array.isArray(u))return u}function kv(u,i){var o=u==null?null:typeof Symbol<"u"&&u[Symbol.iterator]||u["@@iterator"];if(o!=null){var r,f,h,p,x=[],y=!0,v=!1;try{if(h=(o=o.call(u)).next,i!==0)for(;!(y=(r=h.call(o)).done)&&(x.push(r.value),x.length!==i);y=!0);}catch(S){v=!0,f=S}finally{try{if(!y&&o.return!=null&&(p=o.return(),Object(p)!==p))return}finally{if(v)throw f}}return x}}function Tv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
74
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ev(u,i){return wv(u)||kv(u,i)||Av(u,i)||Tv()}function Av(u,i){if(u){if(typeof u=="string")return Sm(u,i);var o={}.toString.call(u).slice(8,-1);return o==="Object"&&u.constructor&&(o=u.constructor.name),o==="Map"||o==="Set"?Array.from(u):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Sm(u,i):void 0}}const ap=Object.entries,wm=Object.setPrototypeOf,_v=Object.isFrozen,Rv=Object.getPrototypeOf,zv=Object.getOwnPropertyDescriptor;let vt=Object.freeze,jt=Object.seal,is=Object.create,np=typeof Reflect<"u"&&Reflect,ho=np.apply,mo=np.construct;vt||(vt=function(i){return i});jt||(jt=function(i){return i});ho||(ho=function(i,o){for(var r=arguments.length,f=new Array(r>2?r-2:0),h=2;h<r;h++)f[h-2]=arguments[h];return i.apply(o,f)});mo||(mo=function(i){for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return new i(...r)});const hn=ht(Array.prototype.forEach),Cv=ht(Array.prototype.lastIndexOf),km=ht(Array.prototype.pop),hi=ht(Array.prototype.push),Ov=ht(Array.prototype.splice),cs=Array.isArray,xi=ht(String.prototype.toLowerCase),lo=ht(String.prototype.toString),Tm=ht(String.prototype.match),mi=ht(String.prototype.replace),Em=ht(String.prototype.indexOf),Dv=ht(String.prototype.trim),Mv=ht(Number.prototype.toString),Uv=ht(Boolean.prototype.toString),Am=typeof BigInt>"u"?null:ht(BigInt.prototype.toString),_m=typeof Symbol>"u"?null:ht(Symbol.prototype.toString),Yt=ht(Object.prototype.hasOwnProperty),pi=ht(Object.prototype.toString),Ct=ht(RegExp.prototype.test),dn=Lv(TypeError);function ht(u){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var o=arguments.length,r=new Array(o>1?o-1:0),f=1;f<o;f++)r[f-1]=arguments[f];return ho(u,i,r)}}function Lv(u){return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];return mo(u,o)}}function Ce(u,i){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xi;if(wm&&wm(u,null),!cs(i))return u;let r=i.length;for(;r--;){let f=i[r];if(typeof f=="string"){const h=o(f);h!==f&&(_v(i)||(i[r]=h),f=h)}u[f]=!0}return u}function Hv(u){for(let i=0;i<u.length;i++)Yt(u,i)||(u[i]=null);return u}function el(u){const i=is(null);for(const r of ap(u)){var o=Ev(r,2);const f=o[0],h=o[1];Yt(u,f)&&(cs(h)?i[f]=Hv(h):h&&typeof h=="object"&&h.constructor===Object?i[f]=el(h):i[f]=h)}return i}function Bv(u){switch(typeof u){case"string":return u;case"number":return Mv(u);case"boolean":return Uv(u);case"bigint":return Am?Am(u):"0";case"symbol":return _m?_m(u):"Symbol()";case"undefined":return pi(u);case"function":case"object":{if(u===null)return pi(u);const i=u,o=kl(i,"toString");if(typeof o=="function"){const r=o(i);return typeof r=="string"?r:pi(r)}return pi(u)}default:return pi(u)}}function kl(u,i){for(;u!==null;){const r=zv(u,i);if(r){if(r.get)return ht(r.get);if(typeof r.value=="function")return ht(r.value)}u=Rv(u)}function o(){return null}return o}function qv(u){try{return Ct(u,""),!0}catch{return!1}}const Rm=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"]),no=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"]),Gv=vt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),so=vt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Yv=vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),zm=vt(["#text"]),Cm=vt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),io=vt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Om=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"]),Gc=vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$v=jt(/{{[\w\W]*|^[\w\W]*}}/g),Xv=jt(/<%[\w\W]*|^[\w\W]*%>/g),Qv=jt(/\${[\w\W]*/g),Zv=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),Vv=jt(/^aria-[\-\w]+$/),Dm=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Kv=jt(/^(?:\w+script|data):/i),Jv=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Iv=jt(/^html$/i),Fv=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),Mm=jt(/<[/\w!]/g),Um=jt(/<[/\w]/g),Wv=jt(/<\/no(script|embed|frames)/i),Pv=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},sp=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],ey=vt(Ce({},sp)),ty=(function(){const u={};return hn(sp,i=>{u[i]=jt(new RegExp("</"+i+"(?=[\\t\\n\\f\\r />])","i"))}),vt(u)})(),ly=function(){return typeof window>"u"?null:window},ay=function(i,o){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let r=null;const f="data-tt-policy-suffix";o&&o.hasAttribute(f)&&(r=o.getAttribute(f));const h="dompurify"+(r?"#"+r:"");try{return i.createPolicy(h,{createHTML(p){return p},createScriptURL(p){return p}})}catch{return console.warn("TrustedTypes policy "+h+" could not be created."),null}},Lm=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},qa=function(i,o,r,f){return Yt(i,o)&&cs(i[o])?Ce(f.base?el(f.base):{},i[o],f.transform):r},co=function(i,o,r){const f=Yt(i,o)?i[o]:void 0;return f&&typeof f=="object"?el(f):r()};function ip(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ly();const i=X=>ip(X);if(i.version="3.4.14",i.removed=[],!u||!u.document||u.document.nodeType!==Pt.document||!u.Element)return i.isSupported=!1,i;let o=u.document;const r=o,f=r.currentScript;u.DocumentFragment;const h=u.HTMLTemplateElement,p=u.Node,x=u.Element,y=u.NodeFilter,v=u.NamedNodeMap;v===void 0&&(u.NamedNodeMap||u.MozNamedAttrMap),u.HTMLFormElement;const S=u.DOMParser,_=u.trustedTypes,T=x.prototype,U=kl(T,"cloneNode"),Y=kl(T,"remove"),ee=kl(T,"nextSibling"),V=kl(T,"childNodes"),z=kl(T,"parentNode"),de=kl(T,"shadowRoot"),fe=kl(T,"attributes"),te=p&&p.prototype?kl(p.prototype,"nodeType"):null,F=p&&p.prototype?kl(p.prototype,"nodeName"):null,$=p&&p.prototype?kl(p.prototype,"ownerDocument"):null,Z=function(g){return te?te(g):g.nodeType},le=function(g){return F?F(g):g.nodeName};if(typeof h=="function"){const X=o.createElement("template");X.content&&X.content.ownerDocument&&(o=X.content.ownerDocument)}let ae,je="",be,W=!1,ve=0;const Je=function(){if(ve>0)throw dn('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.')},at=function(g){Je(),ve++;try{return ae.createHTML(g)}finally{ve--}},D=function(g){Je(),ve++;try{return ae.createScriptURL(g)}finally{ve--}},K=function(){return W||(be=ay(_,f),W=!0),be},ce=o,_e=ce.implementation,ye=ce.createNodeIterator,N=ce.createDocumentFragment,H=ce.getElementsByTagName,J=r.importNode;let Q=Lm();i.isSupported=typeof ap=="function"&&typeof z=="function"&&_e&&_e.createHTMLDocument!==void 0;const he=$v,pe=Xv,Ee=Qv,mt=Zv,q=Vv,Re=Kv,Ye=Jv,We=Fv;let tl=Dm,ze=null;const Ya=Ce({},[...Rm,...ao,...no,...so,...zm]);let $e=null;const os=Ce({},[...Cm,...io,...Om,...Gc]);let $t=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}})),Hl=null,yn=null;const ll=Object.seal(is(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ji=!0,fs=!0,_t=!1,Ni=!0,xl=!1,Al=!0,al=!1,ds=!1,$a=null,bn=null,hs=!1,nl=!1,yt=!1,Xt=!1,Rt=!0,Si=!1;const wi="user-content-";let ms=!0,ca=!1,vl={},yl=null;const _l=Ce({},["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 Xa=null;const ua=Ce({},["audio","video","img","source","image","track"]);let ki=null;const ps=Ce({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ra="http://www.w3.org/1998/Math/MathML",Rl="http://www.w3.org/2000/svg",sl="http://www.w3.org/1999/xhtml";let Bl=sl,jn=!1,Nn=null;const gs=Ce({},[ra,Rl,sl],lo),Sn=vt(["mi","mo","mn","ms","mtext"]);let wn=Ce({},Sn);const xs=vt(["annotation-xml"]);let il=Ce({},xs);const pt=Ce({},["title","style","font","a","script"]);let it=null;const oa=["application/xhtml+xml","text/html"],vs="text/html";let et=null,fa=null;const Ti=o.createElement("form"),da=function(g){return g instanceof RegExp||g instanceof Function},Qa=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(fa&&fa===g)return;(!g||typeof g!="object")&&(g={}),g=el(g),it=oa.indexOf(g.PARSER_MEDIA_TYPE)===-1?vs:g.PARSER_MEDIA_TYPE,et=it==="application/xhtml+xml"?lo:xi,ze=qa(g,"ALLOWED_TAGS",Ya,{transform:et}),$e=qa(g,"ALLOWED_ATTR",os,{transform:et}),Nn=qa(g,"ALLOWED_NAMESPACES",gs,{transform:lo}),ki=qa(g,"ADD_URI_SAFE_ATTR",ps,{transform:et,base:ps}),Xa=qa(g,"ADD_DATA_URI_TAGS",ua,{transform:et,base:ua}),yl=qa(g,"FORBID_CONTENTS",_l,{transform:et}),Hl=qa(g,"FORBID_TAGS",el({}),{transform:et}),yn=qa(g,"FORBID_ATTR",el({}),{transform:et}),vl=Yt(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?el(g.USE_PROFILES):g.USE_PROFILES:!1,ji=g.ALLOW_ARIA_ATTR!==!1,fs=g.ALLOW_DATA_ATTR!==!1,_t=g.ALLOW_UNKNOWN_PROTOCOLS||!1,Ni=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xl=g.SAFE_FOR_TEMPLATES||!1,Al=g.SAFE_FOR_XML!==!1,al=g.WHOLE_DOCUMENT||!1,nl=g.RETURN_DOM||!1,yt=g.RETURN_DOM_FRAGMENT||!1,Xt=g.RETURN_TRUSTED_TYPE||!1,hs=g.FORCE_BODY||!1,Rt=g.SANITIZE_DOM!==!1,Si=g.SANITIZE_NAMED_PROPS||!1,ms=g.KEEP_CONTENT!==!1,ca=g.IN_PLACE||!1,tl=qv(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:Dm,Bl=typeof g.NAMESPACE=="string"?g.NAMESPACE:sl,wn=co(g,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ce({},Sn)),il=co(g,"HTML_INTEGRATION_POINTS",()=>Ce({},xs));const w=co(g,"CUSTOM_ELEMENT_HANDLING",()=>is(null));if($t=is(null),Yt(w,"tagNameCheck")&&da(w.tagNameCheck)&&($t.tagNameCheck=w.tagNameCheck),Yt(w,"attributeNameCheck")&&da(w.attributeNameCheck)&&($t.attributeNameCheck=w.attributeNameCheck),Yt(w,"allowCustomizedBuiltInElements")&&typeof w.allowCustomizedBuiltInElements=="boolean"&&($t.allowCustomizedBuiltInElements=w.allowCustomizedBuiltInElements),jt($t),xl&&(fs=!1),yt&&(nl=!0),vl&&(ze=Ce({},zm),$e=is(null),vl.html===!0&&(Ce(ze,Rm),Ce($e,Cm)),vl.svg===!0&&(Ce(ze,ao),Ce($e,io),Ce($e,Gc)),vl.svgFilters===!0&&(Ce(ze,no),Ce($e,io),Ce($e,Gc)),vl.mathMl===!0&&(Ce(ze,so),Ce($e,Om),Ce($e,Gc))),ll.tagCheck=null,ll.attributeCheck=null,Yt(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?ll.tagCheck=g.ADD_TAGS:cs(g.ADD_TAGS)&&(ze===Ya&&(ze=el(ze)),Ce(ze,g.ADD_TAGS,et))),Yt(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?ll.attributeCheck=g.ADD_ATTR:cs(g.ADD_ATTR)&&($e===os&&($e=el($e)),Ce($e,g.ADD_ATTR,et))),Yt(g,"ADD_FORBID_CONTENTS")&&cs(g.ADD_FORBID_CONTENTS)&&(yl===_l&&(yl=el(yl)),Ce(yl,g.ADD_FORBID_CONTENTS,et)),ms&&(ze["#text"]=!0),al&&Ce(ze,["html","head","body"]),ze.table&&(Ce(ze,["tbody"]),delete Hl.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const G=ae;ae=g.TRUSTED_TYPES_POLICY;try{je=at("")}catch(P){throw ae=G,P}}else g.TRUSTED_TYPES_POLICY===null?(ae=void 0,je=""):(ae===void 0&&(ae=K()),ae&&typeof je=="string"&&(je=at("")));vt&&vt(g),fa=g},ql=Ce({},[...ao,...no,...Gv]),Gl=Ce({},[...so,...Yv]),Za=function(g,w,G){return w.namespaceURI===sl?g==="svg":w.namespaceURI===ra?g==="svg"&&(G==="annotation-xml"||wn[G]):!!ql[g]},ha=function(g,w,G){return w.namespaceURI===sl?g==="math":w.namespaceURI===Rl?g==="math"&&il[G]:!!Gl[g]},ct=function(g,w,G){return w.namespaceURI===Rl&&!il[G]||w.namespaceURI===ra&&!wn[G]?!1:!Gl[g]&&(pt[g]||!ql[g])},Ei=function(g){let w=z(g);(!w||!w.tagName)&&(w={namespaceURI:Bl,tagName:"template"});const G=xi(g.tagName),P=xi(w.tagName);return Nn[g.namespaceURI]?g.namespaceURI===Rl?Za(G,w,P):g.namespaceURI===ra?ha(G,w,P):g.namespaceURI===sl?ct(G,w,P):!!(it==="application/xhtml+xml"&&Nn[g.namespaceURI]):!1},bl=function(g){hi(i.removed,{element:g});try{z(g).removeChild(g)}catch{if(Y(g),!z(g))throw dn("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},zl=function(g,w,G){try{g.removeAttributeNode(w)}catch{try{g.removeAttribute(G)}catch{}}},jl=function(g){Va(g);const w=V(g);if(w){const P=[];hn(w,ne=>{hi(P,ne)}),hn(P,ne=>{try{Y(ne)}catch{}})}const G=fe(g);if(G)for(let P=G.length-1;P>=0;--P){const ne=G[P],re=ne&&ne.name;typeof re=="string"&&zl(g,ne,re)}},Yl=function(g,w,G){if(!G)try{G=w.getAttributeNode(g)}catch{G=null}hi(i.removed,{attribute:G||null,from:w});try{G?w.removeAttributeNode(G):w.removeAttribute(g)}catch{try{w.removeAttribute(g)}catch{}}if(g==="is")if(nl||yt)try{bl(w)}catch{}else try{w.setAttribute(g,"")}catch{}},Ai=function(g){const w=fe(g);if(w)for(let G=w.length-1;G>=0;--G){const P=w[G],ne=P&&P.name;typeof ne!="string"||$e[et(ne)]||zl(g,P,ne)}},Va=function(g){const w=[g];for(;w.length>0;){const G=w.pop();Z(G)===Pt.element&&Ai(G);const ne=V(G);if(ne)for(let re=ne.length-1;re>=0;--re)w.push(ne[re])}},_i=function(g,w){return Al?g==="patchsrc"?!0:g==="for"&&w!=="label"&&w!=="output":!1},kn=function(g){if(!Al)return;const w=[g];for(;w.length>0;){const G=w.pop(),P=Z(G);if(P===Pt.processingInstruction||P===Pt.comment&&Ct(Um,G.data)){try{Y(G)}catch{}continue}if(P===Pt.element){const re=G,He=et(le(G));try{re.hasAttribute&&re.hasAttribute("patchsrc")&&re.removeAttribute("patchsrc"),re.hasAttribute&&re.hasAttribute("for")&&_i("for",He)&&re.removeAttribute("for")}catch{}}const ne=V(G);if(ne)for(let re=ne.length-1;re>=0;--re)w.push(ne[re])}},Ka=function(g){let w=null,G=null;if(hs)g="<remove></remove>"+g;else{const re=Tm(g,/^[\r\n\t ]+/);G=re&&re[0]}it==="application/xhtml+xml"&&Bl===sl&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");const P=ae?at(g):g;if(Bl===sl)try{w=new S().parseFromString(P,it)}catch{}if(!w||!w.documentElement){w=_e.createDocument(Bl,"template",null);try{w.documentElement.innerHTML=jn?je:P}catch{}}const ne=w.body||w.documentElement;return g&&G&&ne.insertBefore(o.createTextNode(G),ne.childNodes[0]||null),Bl===sl?H.call(w,al?"html":"body")[0]:al?w.documentElement:ne},cl=function(g){const w=$?$(g):g.ownerDocument;return ye.call(w||g,g,y.SHOW_ELEMENT|y.SHOW_COMMENT|y.SHOW_TEXT|y.SHOW_PROCESSING_INSTRUCTION|y.SHOW_CDATA_SECTION,null)},Nt=function(g){return g=mi(g,he," "),g=mi(g,pe," "),g=mi(g,Ee," "),g},Tn=function(g){var w;g.normalize();const G=$?$(g):g.ownerDocument,P=ye.call(G||g,g,y.SHOW_TEXT|y.SHOW_COMMENT|y.SHOW_CDATA_SECTION|y.SHOW_PROCESSING_INSTRUCTION,null);let ne=P.nextNode();for(;ne;)ne.data=Nt(ne.data),ne=P.nextNode();const re=(w=g.querySelectorAll)===null||w===void 0?void 0:w.call(g,"template");re&&hn(re,He=>{Cl(He.content)&&Tn(He.content)})},En=function(g){const w=F?F(g):null;return typeof w!="string"||et(w)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==fe(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==te(g)||g.childNodes!==V(g)},Cl=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return te(g)===Pt.documentFragment}catch{return!1}},ma=function(g){if(!te||typeof g!="object"||g===null)return!1;try{return typeof te(g)=="number"}catch{return!1}};function Dt(X,g,w){X.length!==0&&hn(X,G=>{G.call(i,g,w,fa)})}const Jc=function(g,w){return!!(Al&&g.hasChildNodes()&&!ma(g.firstElementChild)&&Ct(Mm,g.textContent)&&Ct(Mm,g.innerHTML)||Al&&g.namespaceURI===sl&&ey[w]&&(ma(g.firstElementChild)||typeof g.textContent=="string"&&Ct(ty[w],g.textContent))||g.nodeType===Pt.processingInstruction||Al&&g.nodeType===Pt.comment&&Ct(Um,g.data))},St=function(g,w){if(g instanceof RegExp)return Ct(g,w);if(g instanceof Function){for(var G=arguments.length,P=new Array(G>2?G-2:0),ne=2;ne<G;ne++)P[ne-2]=arguments[ne];return!!g(w,...P)}return!1},ys=function(g,w,G){if(!Hl[w]&&Xl(w)&&St($t.tagNameCheck,w))return!1;if(ms&&!yl[w]){const P=z(g),ne=V(g);if(ne&&P){const re=ne.length;for(let He=re-1;He>=0;--He){const Ve=g===G?U(ne[He],!0):ne[He];P.insertBefore(Ve,ee(g))}}}return bl(g),!0},bs=function(g,w,G,P){return g.length===0?w:w===G||w===P?el(w):w},An=function(g,w){return g===w||z(g)!==null?!1:(ca&&Va(g),!0)},$l=function(g,w){if(Dt(Q.beforeSanitizeElements,g,null),An(g,w))return!0;if(En(g))return bl(g),!0;const G=et(le(g));if(ze=bs(Q.uponSanitizeElement,ze,Ya,$a),Dt(Q.uponSanitizeElement,g,{tagName:G,allowedTags:ze}),An(g,w))return!0;if(Jc(g,G))return bl(g),!0;if(Hl[G]||!(ll.tagCheck instanceof Function&&ll.tagCheck(G))&&!ze[G]){const ne=ys(g,G,w);return ne===!1&&Dt(Q.afterSanitizeElements,g,null),ne}if(Z(g)===Pt.element&&!Ei(g)||(G==="noscript"||G==="noembed"||G==="noframes")&&Ct(Wv,g.innerHTML))return bl(g),!0;if(xl&&g.nodeType===Pt.text){const ne=Nt(g.textContent);g.textContent!==ne&&(hi(i.removed,{element:g.cloneNode()}),g.textContent=ne)}return Dt(Q.afterSanitizeElements,g,null),!1},js=function(g,w,G){if(yn[w]||_i(w,g)||Rt&&(w==="id"||w==="name")&&(G in o||G in Ti))return!1;const P=$e[w]||ll.attributeCheck instanceof Function&&ll.attributeCheck(w,g);return fs&&Ct(mt,w)||ji&&Ct(q,w)?!0:P?ki[w]||Ct(tl,mi(G,Ye,""))||(w==="src"||w==="xlink:href"||w==="href")&&g!=="script"&&Em(G,"data:")===0&&Xa[g]||_t&&!Ct(Re,mi(G,Ye,""))?!0:!G:Xl(g)&&St($t.tagNameCheck,g)&&St($t.attributeNameCheck,w,g)||w==="is"&&$t.allowCustomizedBuiltInElements&&St($t.tagNameCheck,G)},Ri=Ce({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Xl=function(g){return!Ri[xi(g)]&&Ct(We,g)},Ic=function(g,w,G,P){if(ae&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!G)switch(_.getAttributeType(g,w)){case"TrustedHTML":return at(P);case"TrustedScriptURL":return D(P)}return P},zi=function(g,w,G,P){try{G?g.setAttributeNS(G,w,P):g.setAttribute(w,P),En(g)?bl(g):km(i.removed)}catch{Yl(w,g)}},Ns=function(g){Dt(Q.beforeSanitizeAttributes,g,null);const w=g.attributes;if(!w||En(g))return;$e=bs(Q.uponSanitizeAttribute,$e,os,bn);const G={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$e,forceKeepAttr:void 0};let P=w.length;const ne=et(g.nodeName);for(;P--;){const re=w[P],He=re.name,Ve=re.namespaceURI,wt=re.value,ut=et(He),Qt=wt;let gt=He==="value"?Qt:Dv(Qt);if(G.attrName=ut,G.attrValue=gt,G.keepAttr=!0,G.forceKeepAttr=void 0,Dt(Q.uponSanitizeAttribute,g,G),gt=G.attrValue,Si&&(ut==="id"||ut==="name")&&Em(gt,wi)!==0&&(Yl(He,g,re),gt=wi+gt),Al&&Ct(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,gt)){Yl(He,g,re);continue}if(ut==="attributename"&&Tm(gt,"href")){Yl(He,g,re);continue}if(!G.forceKeepAttr){if(!G.keepAttr){Yl(He,g,re);continue}if(!Ni&&Ct(Pv,gt)){Yl(He,g,re);continue}if(xl&&(gt=Nt(gt)),!js(ne,ut,gt)){Yl(He,g,re);continue}gt=Ic(ne,ut,Ve,gt),gt!==Qt&&zi(g,He,Ve,gt)}}Dt(Q.afterSanitizeAttributes,g,null)},pa=function(g){let w=null;const G=cl(g);for(Dt(Q.beforeSanitizeShadowDOM,g,null);w=G.nextNode();)if(Dt(Q.uponSanitizeShadowNode,w,null),$l(w,g),Ns(w),Cl(w.content)&&pa(w.content),Z(w)===Pt.element){const P=de(w);Cl(P)&&(Ss(P),pa(P))}Dt(Q.afterSanitizeShadowDOM,g,null)},Ss=function(g){const w=[{node:g,shadow:null}];for(;w.length>0;){const G=w.pop();if(G.shadow){pa(G.shadow);continue}const P=G.node,re=Z(P)===Pt.element,He=V(P);if(He)for(let Ve=He.length-1;Ve>=0;--Ve)w.push({node:He[Ve],shadow:null});if(re){const Ve=F?F(P):null;if(typeof Ve=="string"&&et(Ve)==="template"){const wt=P.content;Cl(wt)&&w.push({node:wt,shadow:null})}}if(re){const Ve=de(P);Cl(Ve)&&w.push({node:null,shadow:Ve},{node:Ve,shadow:null})}}};return i.sanitize=function(X){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=null,G=null,P=null,ne=null;if(jn=!X,jn&&(X="<!-->"),typeof X!="string"&&!ma(X)&&(X=Bv(X),typeof X!="string"))throw dn("dirty is not a string, aborting");if(!i.isSupported)return X;ds?(ze=$a,$e=bn):Qa(g),(Q.uponSanitizeElement.length>0||Q.uponSanitizeAttribute.length>0)&&(ze=el(ze)),Q.uponSanitizeAttribute.length>0&&($e=el($e)),i.removed=[];const re=ca&&typeof X!="string"&&ma(X);if(re){kn(X);const wt=le(X);if(typeof wt=="string"){const ut=et(wt);if(!ze[ut]||Hl[ut])throw jl(X),dn("root node is forbidden and cannot be sanitized in-place")}if(En(X))throw jl(X),dn("root node is clobbered and cannot be sanitized in-place");try{Ss(X)}catch(ut){throw jl(X),ut}}else if(ma(X))w=Ka("<!---->"),G=w.ownerDocument.importNode(X,!0),G.nodeType===Pt.element&&G.nodeName==="BODY"||G.nodeName==="HTML"?w=G:w.appendChild(G),Ss(G);else{if(!nl&&!xl&&!al&&X.indexOf("<")===-1)return ae&&Xt?at(X):X;if(w=Ka(X),!w)return nl?null:Xt?je:""}w&&hs&&bl(w.firstChild);const He=re?X:w;try{const wt=cl(He);for(;P=wt.nextNode();)$l(P,He),Ns(P),Cl(P.content)&&pa(P.content)}catch(wt){throw re&&(jl(X),hn(i.removed,ut=>{ut.element&&Va(ut.element)})),wt}if(re)return hn(i.removed,wt=>{wt.element&&Va(wt.element)}),xl&&Tn(X),X;if(nl){if(xl&&Tn(w),yt)for(ne=N.call(w.ownerDocument);w.firstChild;)ne.appendChild(w.firstChild);else ne=w;return($e.shadowroot||$e.shadowrootmode)&&(ne=J.call(r,ne,!0)),ne}let Ve=al?w.outerHTML:w.innerHTML;return al&&ze["!doctype"]&&w.ownerDocument&&w.ownerDocument.doctype&&w.ownerDocument.doctype.name&&Ct(Iv,w.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+w.ownerDocument.doctype.name+`>
|
|
75
|
-
`+Ve),xl&&(Ve=Nt(Ve)),ae&&Xt?at(Ve):Ve},i.setConfig=function(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qa(X),ds=!0,$a=ze,bn=$e},i.clearConfig=function(){fa=null,ds=!1,$a=null,bn=null,ae=be,je=""},i.isValidAttribute=function(X,g,w){fa||Qa({});const G=et(X),P=et(g);return js(G,P,w)},i.addHook=function(X,g){typeof g=="function"&&Yt(Q,X)&&hi(Q[X],g)},i.removeHook=function(X,g){if(Yt(Q,X)){if(g!==void 0){const w=Cv(Q[X],g);return w===-1?void 0:Ov(Q[X],w,1)[0]}return km(Q[X])}},i.removeHooks=function(X){Yt(Q,X)&&(Q[X]=[])},i.removeAllHooks=function(){Q=Lm()},i}var rs=ip();const ny=[{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 vn(u,i){const r=await(await fetch("/api/chats",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({agent:u,scope:i})})).json();r.id&&gl(r.scope?.kind==="team"?`/agents/${encodeURIComponent(r.scope.member)}/chat/${r.id}`:`/agents/chats/${r.id}`)}function sy(){const[u,i]=C.useState("claude"),[o,r]=C.useState(!0),[f,h]=C.useState(!1);return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"new chat"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agent"})}),n.jsx("div",{className:"agent-pick",children:ny.map(p=>n.jsxs("button",{className:`agent-pick-btn ${u===p.id?"active":""}`,onClick:()=>i(p.id),children:[n.jsx("b",{children:p.label}),n.jsx("span",{children:p.hint})]},p.id))}),n.jsx("div",{className:"run-opts",style:{padding:"0 16px 14px"},children:n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:o,onChange:p=>r(p.target.checked)}),"kraftwerk-aware",n.jsx("span",{className:"opt-hint",children:"— agent gets workflows + recent runs as context"})]})}),n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",disabled:f,onClick:async()=>{h(!0),await vn(u,{kind:o?"kraftwerk":"general"}),h(!1)},children:f?"starting…":"start chat"})})]})]})}function Hm({id:u}){const[i,o]=C.useState(null),[r,f]=C.useState([]),[h,p]=C.useState(!1);C.useEffect(()=>{let y=!0,v=null;return fetch(`/api/chats/${u}`).then(S=>S.ok?S.json():Promise.reject()).then(S=>{if(!y)return;o(S.meta),f(S.events);const _=S.events[S.events.length-1]?.seq??0;v=new EventSource(`/api/chats/${u}/events?after=${_}`),v.onmessage=T=>{const U=JSON.parse(T.data);f(Y=>Y.some(ee=>ee.seq===U.seq)?Y:[...Y,U])}}).catch(()=>y&&p(!0)),()=>{y=!1,v?.close()}},[u]);const x=C.useMemo(()=>{for(let y=r.length-1;y>=0;y--){const v=r[y].type;if(v==="user_message")return!0;if(v==="turn_end"||v==="error")return!1}return!1},[r]);return h?n.jsx("div",{className:"empty",children:"chat not found"}):i?n.jsxs("div",{className:"chat-thread",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:`lamp ${x?"running":"ok"}`}),n.jsx("h1",{children:i.title||"new chat"}),n.jsx("span",{className:"chip agent",children:i.agent}),i.scope.kind==="run"&&n.jsx(Ue,{href:`/runs/${i.scope.runId}`,className:"chip",children:i.scope.runId}),i.scope.kind==="kraftwerk"&&n.jsx("span",{className:"chip",children:"kraftwerk-aware"}),i.scope.kind==="knowledge"&&n.jsxs(Ue,{href:i.scope.bundle?`/knowledge/${encodeURIComponent(i.scope.bundle)}`:"/knowledge",className:"chip",children:["knowledge",i.scope.bundle?`:${i.scope.bundle}`:""]}),i.scope.kind==="team"&&n.jsxs(Ue,{href:`/agents/${encodeURIComponent(i.scope.member)}/info`,className:"chip",children:["agent:",i.scope.member]}),n.jsx("span",{className:"rid",title:i.cwd,children:i.cwd})]}),n.jsx(cy,{id:u,events:r,busy:x}),n.jsx(fy,{id:u,busy:x,scope:i.scope})]}):n.jsx("div",{className:"empty",children:"loading…"})}function iy(u){const i=[],o=new Map,r=new Map;for(const f of u){const h=i[i.length-1];switch(f.type){case"user_message":i.push({kind:"user",text:f.text,key:`e${f.seq}`});break;case"text":h?.kind==="agent"?h.text+=f.text:i.push({kind:"agent",text:f.text,key:`e${f.seq}`});break;case"thought":h?.kind==="thought"?h.text+=f.text:i.push({kind:"thought",text:f.text,key:`e${f.seq}`});break;case"tool_call":o.set(f.callId,i.length),i.push({kind:"tool",callId:f.callId,title:f.title,toolKind:f.kind,status:f.status,key:`e${f.seq}`});break;case"tool_update":{const p=o.get(f.callId);if(p!=null){const x=i[p];f.title&&(x.title=f.title),f.status&&(x.status=f.status)}break}case"permission_request":r.set(f.requestId,i.length),i.push({kind:"permission",requestId:f.requestId,title:f.title,options:f.options,resolved:void 0,key:`e${f.seq}`});break;case"permission_resolved":{const p=r.get(f.requestId);p!=null&&(i[p].resolved=f.optionId);break}case"error":i.push({kind:"error",text:f.message,key:`e${f.seq}`});break}}return i}function cy({id:u,events:i,busy:o}){const r=Ga(),f=C.useMemo(()=>{const x=iy(i);return r?x:x.filter(y=>y.kind!=="tool"&&y.kind!=="thought")},[i,r]),h=C.useRef(null),p=C.useRef(!0);return C.useEffect(()=>{const x=h.current;x&&p.current&&(x.scrollTop=x.scrollHeight)},[f,o]),n.jsxs("div",{className:"chat-scroll",ref:h,onScroll:x=>{const y=x.currentTarget;p.current=y.scrollHeight-y.scrollTop-y.clientHeight<60},children:[f.length===0&&n.jsx("div",{className:"empty",children:"say something — the agent starts on your first message"}),f.map(x=>n.jsx(ry,{b:x,chatId:u},x.key)),o&&n.jsxs("div",{className:"chat-working",children:[n.jsx("span",{className:"lamp running"})," working…"]})]})}function uy({text:u}){const i=C.useMemo(()=>rs.sanitize(Oe.parse(u,{async:!1})),[u]);return n.jsx("div",{className:"msg agent md-body chat-md",dangerouslySetInnerHTML:{__html:i}})}function ry({b:u,chatId:i}){switch(u.kind){case"user":return n.jsx("div",{className:"msg user",children:u.text});case"agent":return n.jsx(uy,{text:u.text});case"thought":return n.jsxs("details",{className:"msg thought",children:[n.jsx("summary",{children:"thinking"}),n.jsx("div",{children:u.text})]});case"tool":return n.jsxs("div",{className:`tool-card ${u.status??""}`,children:[n.jsx("span",{className:`lamp ${u.status==="completed"?"ok":u.status==="failed"?"failed":"running"}`}),u.toolKind&&n.jsx("span",{className:"chip tool-kind",children:u.toolKind}),n.jsx("span",{className:"tool-title",children:u.title})]});case"permission":return n.jsx(oy,{b:u,chatId:i});case"error":return n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",u.text]})}}function oy({b:u,chatId:i}){const[o,r]=C.useState(!1),f=u.resolved===void 0;async function h(p){r(!0),await fetch(`/api/chats/${i}/permission`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({requestId:u.requestId,optionId:p})}).catch(()=>{}),r(!1)}return n.jsxs("div",{className:`perm-card ${f?"pending":""}`,children:[n.jsxs("div",{className:"perm-title",children:[n.jsx("span",{className:"microlabel",children:"permission"})," ",u.title]}),f?n.jsx("div",{className:"perm-actions",children:u.options.map(p=>n.jsx("button",{className:`perm-btn ${p.kind?.startsWith("allow")?"allow":"deny"}`,disabled:o,onClick:()=>h(p.optionId),children:p.name},p.optionId))}):n.jsx("div",{className:"perm-resolved",children:u.resolved?`→ ${u.options.find(p=>p.optionId===u.resolved)?.name??u.resolved}`:"→ dismissed"})]})}function fy({id:u,busy:i,scope:o}){const[r,f]=C.useState(""),[h,p]=C.useState([]),[x,y]=C.useState(0),[v,S]=C.useState(!1);C.useEffect(()=>{let z=!0;return(async()=>{try{let fe=(await fetch("/api/skills").then(te=>te.json())).skills??[];if(o?.kind==="team"){const[te,F]=await Promise.all([fetch(`/api/team/${encodeURIComponent(o.member)}`).then(le=>le.ok?le.json():null).catch(()=>null),fetch(`/api/team/${encodeURIComponent(o.member)}/skills`).then(le=>le.ok?le.json():null).catch(()=>null)]);if(te&&Array.isArray(te.skills)){const le=new Set(te.skills.map(ae=>ae.toLowerCase()));fe=fe.filter(ae=>le.has(ae.name.toLowerCase()))}const $=F?.skills??[],Z=new Set($.map(le=>le.name.toLowerCase()));fe=[...$,...fe.filter(le=>!Z.has(le.name.toLowerCase()))]}z&&p(fe)}catch{}})(),()=>{z=!1}},[u]);const _=/^\/([\w-]*)$/.exec(r)?.[1],T=_!==void 0&&!v?h.filter(z=>z.name.toLowerCase().startsWith(_.toLowerCase())):[],U=T.length>0,Y=Math.min(x,T.length-1);function ee(z){f(`/${z.name} `),y(0)}async function V(){const z=r.trim();!z||i||(f(""),await fetch(`/api/chats/${u}/message`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({text:z})}).catch(()=>{}))}return n.jsxs("div",{className:"composer",children:[U&&n.jsx("div",{className:"skill-menu",children:T.map((z,de)=>n.jsxs("button",{className:de===Y?"active":"",onMouseDown:fe=>{fe.preventDefault(),ee(z)},children:[n.jsxs("b",{children:["/",z.name]}),z.description&&n.jsxs("span",{children:[" — ",z.description]}),n.jsx("span",{className:"skill-src",children:z.source})]},z.name))}),n.jsx("textarea",{value:r,placeholder:i?"agent is working…":"message · Enter to send, Shift+Enter for newline, / for skills",rows:Math.min(6,Math.max(1,r.split(`
|
|
76
|
-
`).length)),onChange:z=>{f(z.target.value),y(0),S(!1)},onKeyDown:z=>{if(U){if(z.key==="ArrowDown")return z.preventDefault(),y((Y+1)%T.length);if(z.key==="ArrowUp")return z.preventDefault(),y((Y-1+T.length)%T.length);if(z.key==="Tab"||z.key==="Enter")return z.preventDefault(),ee(T[Y]);if(z.key==="Escape")return z.preventDefault(),S(!0)}z.key==="Enter"&&!z.shiftKey&&(z.preventDefault(),V())}}),i?n.jsxs("button",{className:"stop-btn",onClick:()=>fetch(`/api/chats/${u}/cancel`,{method:"POST"}).catch(()=>{}),children:[n.jsx(I,{name:"stop",className:"ms-sm"})," stop"]}):n.jsxs("button",{className:"run-btn",disabled:!r.trim(),onClick:V,children:[n.jsx(I,{name:"send",className:"ms-sm"})," send"]})]})}function dy({id:u}){const i=Ge("/api/runs",!0),o=i?.runs??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"runs"}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"microlabel num",children:o.length})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsx(hy,{r,active:r.id===u},r.id)),i&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs yet"})]})]}),n.jsx("div",{className:"runs-main",children:n.jsx(my,{id:u},u)})]})}function hy({r:u,active:i}){return n.jsxs(Ue,{href:`/runs/${u.id}`,className:`side-row ${i?"active":""}`,children:[n.jsx(Vc,{status:u.status}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:u.workflow??"unknown"}),n.jsx("span",{className:"side-when num",children:pn(u.startedAt)})]}),n.jsxs("div",{className:"side-row-sub",children:[n.jsx("span",{className:"side-req",title:u.request,children:u.status==="running"&&u.currentPhase?`${u.currentPhase}`:u.request??""}),n.jsx("span",{className:"side-meta num",children:u.status==="running"?n.jsx(bo,{since:u.startedAt}):vi(u.durationMs)})]})]})]})}function my({id:u}){const i=Ge(`/api/runs/${u}`,!0),o=i?.status==="running",[r,f]=C.useState(null),[h,p]=C.useState(!1),x=Ga();if(!i)return n.jsx("div",{className:"empty",children:"loading…"});const y=i.files.some(T=>T.name==="runner.json"),v=r??(o?"run":"artifacts"),S=x?i.files.length:i.files.filter(T=>!Zc(T.name)).length;async function _(){p(!0),await fetch(`/api/runs/${u}/stop`,{method:"POST"}).catch(()=>{})}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"detail-head",children:[n.jsx(Vc,{status:i.status}),n.jsx("h1",{children:i.workflow?n.jsx(Ue,{href:`/workflows/${encodeURIComponent(i.workflow)}`,title:"open workflow",children:i.workflow}):"unknown workflow"}),n.jsx(Tx,{status:i.status}),y&&n.jsxs("span",{className:"chip sandbox-chip",children:[n.jsx(I,{name:"science",className:"ms-sm"})," sandbox"]}),n.jsx("span",{className:"rid",children:u.replace(/^run-/,"")}),o&&y&&n.jsx("button",{className:"stop-btn",onClick:_,disabled:h,children:h?"stopping…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"stop",className:"ms-sm"})," stop"]})}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",title:"chat with an agent about this run",onClick:()=>{vn("claude",{kind:"run",runId:u})},children:"⌬ discuss"}),n.jsxs("nav",{className:"tabs",children:[n.jsx("button",{className:v==="run"?"active":"",onClick:()=>f("run"),children:"run"}),n.jsxs("button",{className:v==="artifacts"?"active":"",onClick:()=>f("artifacts"),children:["artifacts ",n.jsxs("span",{className:"num",children:["(",S,")"]})]})]})]}),i.request&&n.jsx("p",{className:"detail-req",children:i.request}),v==="run"?n.jsx(py,{run:i,live:o}):n.jsx(yy,{id:u,files:i.files,live:o})]})}function py({run:u,live:i}){return n.jsxs("div",{className:"run-tab",children:[n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"phases"}),n.jsxs("div",{className:"v num",children:[u.phasesDone,u.phasesTotal!=null?` / ${u.phasesTotal}`:""]})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"duration"}),n.jsx("div",{className:"v num",children:i?n.jsx(bo,{since:u.startedAt}):vi(u.durationMs)})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"cost"}),n.jsx("div",{className:"v num",children:vo(u.costUsd??gy(u.phases))})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"tokens in / out"}),n.jsxs("div",{className:"v num",children:[Yc(Bm(u.phases,"tokensIn"))," / ",Yc(Bm(u.phases,"tokensOut"))]})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"phase timeline"}),n.jsx("span",{className:"spacer"}),i&&n.jsxs("span",{className:"live-note",children:[n.jsx("span",{className:"lamp running"})," live · polling"]})]}),n.jsx("div",{className:"phases",children:u.phases.map(o=>n.jsx(xy,{p:o},o.phase))})]})]})}function Bm(u,i){return u.reduce((o,r)=>o+(r[i]??0),0)}function gy(u){return u.reduce((i,o)=>i+(o.costUsd??0),0)}function xy({p:u}){const i=u.gates.filter(o=>!o.passed);return n.jsxs("div",{className:"phase-row",children:[n.jsx(Vc,{status:u.status}),n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.phase}),u.kind==="agent"?n.jsxs("span",{className:"chip agent",children:[u.agent,u.model?` · ${u.model}`:""]}):n.jsx("span",{className:"chip",children:"script"}),n.jsxs("span",{className:"right num",children:[u.attempts>1&&n.jsxs("span",{children:["att ",u.attempts]}),u.status==="running"?n.jsx(bo,{since:u.startedAt}):u.durationMs!=null&&n.jsx("span",{children:vi(u.durationMs)}),u.kind==="agent"&&u.tokensIn!=null&&n.jsxs("span",{children:[Yc(u.tokensIn)," / ",Yc(u.tokensOut)]}),u.costUsd!=null&&u.costUsd>0&&n.jsx("span",{children:vo(u.costUsd)})]})]}),u.status==="running"&&u.lastActivity&&n.jsx("div",{className:"phase-activity",children:u.lastActivity}),u.summary&&u.status!=="running"&&n.jsx("div",{className:"phase-sub",children:u.summary}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(o=>n.jsxs("span",{className:`gate ${o.passed?"":"failed"}`,title:o.failure??"",children:[n.jsx(I,{name:o.passed?"check":"close",className:"ms-sm"})," ",o.gate]},o.gate))}),i.map(o=>n.jsx("div",{className:"gate-fail-msg",children:o.failure},o.gate))]})}const cp=new Set(["png","jpg","jpeg","gif","webp","svg"]);function Zc(u){return u==="runner.json"||u.endsWith(".jsonl")||u.endsWith(".log")}function vy(u){const o=["report.html","recommendation.md"].find(h=>u.some(p=>p.name===h));if(o)return o;const r=h=>{const p=h.split(".").pop()?.toLowerCase()??"";return["html","md","markdown","pdf"].includes(p)||cp.has(p)?0:Zc(h)?2:1};let f=null;for(const h of u)(!f||r(h.name)<r(f.name))&&(f=h);return f?.name??null}function yy({id:u,files:i,live:o}){const[r,f]=C.useState(null),h=Ga(),p=C.useMemo(()=>h?i:i.filter(x=>!Zc(x.name)),[i,h]);return C.useEffect(()=>{!h&&r&&Zc(r)&&f(null)},[h,r]),C.useEffect(()=>{r||p.length===0||f(vy(p))},[p,r]),n.jsxs("div",{className:"art-layout",children:[n.jsxs("section",{className:"panel art-files",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["files ",n.jsxs("span",{className:"num",children:["(",p.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[p.map(x=>n.jsxs("button",{className:`file-row ${r===x.name?"active":""}`,onClick:()=>f(x.name),children:[n.jsx("span",{className:"fname",children:x.name}),n.jsx("span",{className:"fsize num",children:yo(x.size)})]},x.name)),p.length===0&&n.jsx("div",{className:"viewer-note",children:i.length>0?"no result files — raw run files live in expert mode":"no files yet"})]})]}),n.jsxs("section",{className:"panel art-viewer",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:r??"viewer"}),n.jsx("span",{className:"spacer"}),r&&n.jsx("a",{className:"open-raw",href:`/api/runs/${u}/file?name=${encodeURIComponent(r)}&raw=1`,target:"_blank",children:"open raw ↗"})]}),r?n.jsx(by,{id:u,name:r,live:o}):n.jsx("div",{className:"empty",children:"select a file"})]})]})}function by({id:u,name:i,live:o}){const r=i.split(".").pop()?.toLowerCase()??"",f=`/api/runs/${u}/file?name=${encodeURIComponent(i)}&raw=1`;return r==="html"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,sandbox:"allow-scripts",allow:"clipboard-write",title:i})})}):r==="pdf"?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("iframe",{src:f,title:i})})}):cp.has(r)?n.jsx("div",{className:"viewer",children:n.jsx("div",{className:"viewer-body",children:n.jsx("img",{src:f,alt:i})})}):r==="md"||r==="markdown"?n.jsx(jy,{id:u,name:i,live:o}):n.jsx(Ny,{id:u,name:i,live:o})}function jy({id:u,name:i,live:o}){const[r,f]=C.useState("rendered"),h=Ge(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o),p=C.useMemo(()=>h?rs.sanitize(Oe.parse(h.content,{async:!1})):"",[h?.content]);return n.jsxs("div",{className:"viewer",children:[n.jsxs("div",{className:"viewer-note md-toolbar",children:[n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:r==="rendered"?"active":"",onClick:()=>f("rendered"),children:"rendered"}),n.jsx("button",{className:r==="source"?"active":"",onClick:()=>f("source"),children:"source"})]}),h?.truncated&&n.jsxs("span",{children:["large file — showing the last ",yo(4e5)]})]}),n.jsx("div",{className:"viewer-body",children:h?r==="rendered"?n.jsx("div",{className:"md-body",dangerouslySetInnerHTML:{__html:p}}):n.jsx("pre",{children:h.content||"(empty)"}):n.jsx("pre",{children:"loading…"})})]})}function Ny({id:u,name:i,live:o}){const r=Ge(`/api/runs/${u}/file?name=${encodeURIComponent(i)}`,o);return n.jsxs("div",{className:"viewer",children:[r?.truncated&&n.jsxs("div",{className:"viewer-note",children:["large file — showing the last ",yo(4e5)]}),n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:r?r.content||"(empty)":"loading…"})})]})}function Sy(){const u=Ge("/api/workflows",!1),i=u?.workflows??[];return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"Workflows"}),n.jsxs("span",{className:"count num",children:[i.length," discovered"]}),u?.root&&n.jsx("span",{className:"count mono",children:u.root})]}),u&&i.length===0&&n.jsxs("div",{className:"empty",children:["No workflows found — expected ",n.jsx("code",{children:"src/workflows/"})," or ",n.jsx("code",{children:"workflows/"})," ","next to the output folder."]}),n.jsx("div",{className:"wf-grid",children:i.map(o=>n.jsxs(Ue,{href:`/workflows/${o.slug}`,className:"wf-card",children:[n.jsxs("div",{className:"wf-card-head",children:[n.jsx("span",{className:"wf-name",children:o.name??o.slug}),o.error&&n.jsx("span",{className:"status-word failed",children:"broken"})]}),n.jsx("p",{className:"wf-desc",children:o.error??o.description??""}),n.jsxs("div",{className:"wf-meta num",children:[n.jsxs("span",{children:[o.agents," agents"]}),n.jsx("span",{children:"·"}),n.jsxs("span",{children:[o.steps," steps"]})]})]},o.slug))})]})}function wy({slug:u}){const i=Ge(`/api/workflows/${encodeURIComponent(u)}`,!1),o=Ge("/api/runs",!1);if(!i)return n.jsx("div",{className:"empty",children:"loading…"});if(i.error)return n.jsxs(n.Fragment,{children:[n.jsx(qm,{slug:i.slug}),n.jsxs("div",{className:"empty",children:[n.jsx("span",{className:"status-word failed",children:"broken workflow"}),n.jsx("pre",{style:{marginTop:12,textAlign:"left"},children:i.error})]})]});const r=new Map(i.agents.map((h,p)=>[h.id,p%4])),f=(o?.runs??[]).filter(h=>h.workflow===i.name).slice(0,8);return n.jsxs(n.Fragment,{children:[n.jsx(qm,{slug:i.slug}),n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:i.name??i.slug}),n.jsx("span",{className:"rid mono",children:i.dir})]}),i.description&&n.jsx("p",{className:"detail-req",children:i.description}),n.jsxs("div",{className:"statgrid",children:[n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"agents"}),n.jsx("div",{className:"v num",children:i.agents.length})]}),n.jsxs("div",{className:"stat",children:[n.jsx("div",{className:"microlabel",children:"steps"}),n.jsxs("div",{className:"v num",children:[i.steps.length," ",n.jsxs("span",{style:{color:"var(--muted)",fontWeight:400},children:["(",i.steps.filter(h=>h.kind==="agent").length," agent ·"," ",i.steps.filter(h=>h.kind==="script").length," script)"]})]})]}),i.workspace&&n.jsxs("div",{className:"stat",style:{maxWidth:420},children:[n.jsx("div",{className:"microlabel",children:"workspace"}),n.jsx("div",{className:"wf-workspace mono",children:i.workspace})]})]}),n.jsx(ky,{slug:i.slug,lastRequest:f[0]?.request}),n.jsxs("section",{className:"panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"agents"})}),n.jsxs("div",{className:"agent-grid",children:[i.agents.map(h=>n.jsx(Ty,{a:h,idx:r.get(h.id)??0},h.id)),i.agents.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents — script-only workflow"})]})]}),n.jsxs("div",{className:"columns",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"pipeline"})}),n.jsx("div",{className:"pipeline",children:i.steps.map((h,p)=>n.jsx(Ey,{s:h,i:p,idx:h.agent?r.get(h.agent)??0:null},h.name))})]}),n.jsxs("div",{style:{display:"grid",gap:18},children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["folder ",n.jsxs("span",{className:"num",children:["(",i.files.length," files)"]})]})}),n.jsx("div",{className:"file-list",children:i.files.map(h=>n.jsx("div",{className:"file-row",style:{cursor:"default"},children:n.jsx("span",{className:"fname",children:h})},h))})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsxs("span",{className:"microlabel",children:["recent runs ",n.jsxs("span",{className:"num",children:["(",f.length,")"]})]})}),n.jsxs("div",{className:"file-list",children:[f.map(h=>n.jsxs(Ue,{href:`/runs/${h.id}`,className:"file-row",children:[n.jsx(Vc,{status:h.status}),n.jsx("span",{className:"fname",children:h.id.replace(/^run-/,"")}),n.jsxs("span",{className:"fsize num",children:[vi(h.durationMs)," · ",vo(h.costUsd)," · ",pn(h.startedAt)]})]},h.id)),f.length===0&&n.jsx("div",{className:"viewer-note",children:"no runs of this workflow yet"})]})]})]})]})]})}function ky({slug:u,lastRequest:i}){const[o,r]=C.useState(""),[f,h]=C.useState(!0),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,_]=C.useState(null),T=Ge(`/api/workflows/${encodeURIComponent(u)}/run`,!1);C.useEffect(()=>{!o&&i&&r(i)},[i]);const U=T?.available&&T?.image,Y=T?T.available?T.image?"isolated container per run":"image missing — run `kraftwerk runner build`":"Docker not running — sandbox unavailable":"";async function ee(){if(!(!o.trim()||y)){v(!0),_(null);try{const V=await fetch(`/api/workflows/${encodeURIComponent(u)}/run`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({request:o.trim(),sandbox:f,ssh:p})}),z=await V.json();if(!V.ok)throw new Error(z.error??`HTTP ${V.status}`);gl(`/runs/${z.runId}`)}catch(V){_(V.message),v(!1)}}}return n.jsxs("section",{className:"panel run-panel",style:{marginBottom:18},children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"trigger run"})}),n.jsxs("div",{className:"run-form",children:[n.jsx("input",{type:"text",value:o,placeholder:"request — topic, URL, host …",onChange:V=>r(V.target.value),onKeyDown:V=>V.key==="Enter"&&ee()}),n.jsx("button",{className:"run-btn",onClick:ee,disabled:y||!o.trim()||f&&!U,children:y?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"play_arrow",className:"ms-sm"})," ",f?"run in sandbox":"run locally"]})})]}),n.jsxs("div",{className:"run-opts",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:f,onChange:V=>h(V.target.checked)}),"docker sandbox ",Y&&n.jsxs("span",{className:"opt-hint",children:["— ",Y]})]}),n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:p,onChange:V=>x(V.target.checked),disabled:!f}),"forward SSH agent"]})]}),S&&n.jsx("div",{className:"gate-fail-msg",children:S})]})}function qm({slug:u}){return n.jsxs("nav",{className:"crumbs",children:[n.jsx(Ue,{href:"/workflows",children:"workflows"}),n.jsx("span",{className:"sep",children:"/"}),n.jsx("span",{className:"mono",children:u})]})}function Ty({a:u,idx:i}){return n.jsxs("div",{className:`agent-card aid-${i}`,children:[n.jsxs("div",{className:"agent-head",children:[n.jsx("span",{className:"agent-dot"}),n.jsx("b",{children:u.name??u.id}),n.jsxs("code",{className:"agent-id",children:["[",u.id,"]"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"chip",children:[u.model??"default",u.effort?` · ${u.effort}`:""]})]}),u.tools.length>0&&n.jsx("div",{className:"agent-tools",children:u.tools.map(o=>n.jsx("span",{className:"tool-chip",children:o},o))}),u.persona&&n.jsx("p",{className:"agent-persona",children:u.persona})]})}function Ey({s:u,i,idx:o}){const r=u.kind==="script"?u.script:u.prompt;return n.jsxs("div",{className:"step-node",children:[n.jsx("div",{className:`step-index num ${o!=null?`aid-${o}`:"is-script"}`,children:i+1}),n.jsxs("div",{className:"step-body",children:[n.jsxs("div",{className:"phase-top",children:[n.jsx("span",{className:"phase-name",children:u.name}),u.kind==="agent"?n.jsxs("span",{className:`chip agent-chip aid-${o??0}`,children:["agent · ",u.agent]}):n.jsxs("span",{className:"chip",children:["script",u.sourceRef?` · ${u.sourceRef}`:""]})]}),r&&n.jsxs("details",{className:"step-source",children:[n.jsx("summary",{children:u.kind==="agent"?"prompt":"script"}),n.jsx("pre",{children:r})]}),u.gates.length>0&&n.jsx("div",{className:"gate-line",children:u.gates.map(f=>n.jsxs("span",{className:"gate neutral",children:["⛨ ",f]},f))})]})]})}const Ay=u=>u==="ok"?"ok":u==="running"?"running":u==="aborted"?"aborted":"failed",_y=u=>u==="ok"?"done":u==="running"?"working":u==="aborted"?"stopped":"failed";function Ry(u){return u.scope.kind==="team"?`/agents/${u.scope.member}/chat/${u.id}`:`/agents/chats/${u.id}`}function Gm(u){switch(u.scope.kind){case"team":return u.scope.member;case"run":return u.scope.runId;case"knowledge":return u.scope.bundle?`knowledge:${u.scope.bundle}`:"knowledge";case"kraftwerk":return"kraftwerk-aware";default:return"general"}}function Ym(u){return u.length>64?`${u.slice(0,46)}…${u.slice(-14)}`:u}function zy(){const u=Ge("/api/runs",!1),i=Ge("/api/chats",!1),o=Ge("/api/knowledge",!1),r=Ge("/api/team",!1),f=Ge("/api/workflows",!1),h=Ge("/api/skills",!1),p=Ge("/api/meta",!1),[x,y]=C.useState("all"),v=u?.runs??[],S=i?.chats??[],_=o?.bundles??[],T=(h?.skills??[]).filter(ee=>ee.source==="workspace"),U=[[f?.workflows.length,"workflows","/workflows"],[u?v.length:void 0,"runs","/runs"],[o?_.length:void 0,"bundles","/knowledge"],[h?T.length:void 0,"skills","/skills"],[i?S.length:void 0,"chats","/agents/chats"]],Y=v.filter(ee=>ee.status==="failed"&&Date.now()-Date.parse(ee.updatedAt)<24*36e5);return n.jsxs("div",{className:"dash",children:[n.jsxs("div",{className:"page-head",children:[n.jsxs("h1",{children:[p?.projectIcon?`${p.projectIcon} `:"",p?.projectName||"workspace"]}),n.jsx("span",{className:"spacer"}),n.jsx("span",{className:"dash-mini",children:U.map(([ee,V,z])=>n.jsxs(Ue,{href:z,children:[n.jsx("b",{className:"num",children:ee??"…"})," ",V]},V))}),n.jsx(Cy,{workflows:f?.workflows??[]})]}),n.jsx(Oy,{members:r?.members.filter(ee=>!ee.archived),chats:S}),Y.length>0&&x!=="failed"&&n.jsxs("button",{className:"dash-alert",onClick:()=>y("failed"),children:["⚠ ",Y.length," run",Y.length===1?"":"s"," failed in the last 24 h — review"]}),n.jsx(Uy,{runs:v,chats:S,bundles:_,members:r?.members??[],workflows:f?.workflows??[],filter:x,setFilter:y})]})}function Cy({workflows:u}){const[i,o]=C.useState(!1);return C.useEffect(()=>{if(!i)return;const r=f=>{f.target.closest(".wf-pick-wrap")||o(!1)};return window.addEventListener("mousedown",r),()=>window.removeEventListener("mousedown",r)},[i]),n.jsxs("div",{className:"dash-actions",children:[n.jsxs("button",{className:"run-btn dash-newchat",onClick:()=>gl("/agents/chats"),children:[n.jsx(I,{name:"forum"})," new chat"]}),n.jsxs("span",{className:"wf-pick-wrap",children:[n.jsxs("button",{className:"run-btn tonal","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(r=>!r),children:[n.jsx(I,{name:"play_arrow"})," run workflow"]}),i&&n.jsxs("div",{className:"wf-pick-pop",role:"menu",children:[u.length===0&&n.jsx("span",{className:"wf-pick-empty",children:"no workflows yet"}),u.map(r=>n.jsxs(Ue,{href:`/workflows/${encodeURIComponent(r.slug)}`,className:"wf-pick-item",role:"menuitem",children:[n.jsx("span",{className:"wf-pick-name",children:r.name??r.slug}),r.description&&n.jsx("span",{className:"wf-pick-desc",children:r.description})]},r.slug))]})]})]})}function Oy({members:u,chats:i}){const o=Ga();return u&&u.length===0?n.jsx("section",{className:"panel dash-team-empty",children:n.jsx("div",{className:"viewer-note",children:o?n.jsxs(n.Fragment,{children:["No agent teammates yet — ",n.jsx(Ue,{href:"/agents/new",children:"create your first agent"})," and it will show up here, ready to chat."]}):n.jsx(n.Fragment,{children:"No agent teammates yet — ask an expert-mode user to create one."})})}):n.jsx("div",{className:"dash-team",children:(u??[]).map(r=>{const h=i.filter(x=>x.scope.kind==="team"&&x.scope.member===r.slug).find(x=>x.busy),p=()=>gl(`/agents/${encodeURIComponent(r.slug)}`);return n.jsxs("div",{className:"dash-member",role:"link",tabIndex:0,onClick:p,onKeyDown:x=>{x.key==="Enter"&&p()},children:[n.jsxs("div",{className:"dash-member-id",children:[n.jsxs("span",{className:"agent-avatar lg",children:[n.jsx("span",{"aria-hidden":!0,children:r.emoji}),n.jsx("span",{className:`lamp ${h?"running":"idle"}`})]}),n.jsx("span",{className:"dash-member-name",children:r.name}),r.description&&n.jsx("span",{className:"dash-member-desc",children:r.description})]}),n.jsxs("div",{className:"dash-member-foot",children:[n.jsx("span",{className:"dash-member-state",children:h&&n.jsx(Ue,{href:`/agents/${encodeURIComponent(r.slug)}/chat/${h.id}`,onClick:x=>x.stopPropagation(),children:"working…"})}),n.jsxs("button",{className:"run-btn dash-chat-btn",onClick:x=>{x.stopPropagation(),vn("claude",{kind:"team",member:r.slug})},children:[n.jsx(I,{name:"chat_bubble",className:"ms-sm"})," chat"]})]})]},r.slug)})})}function Dy(u){if(u.lamp==="running")return"now";const i=new Date(u.at),o=new Date;if(i.toDateString()===o.toDateString())return"today";const r=new Date(o);return r.setDate(r.getDate()-1),i.toDateString()===r.toDateString()?"yesterday":"earlier"}const My=[["all","all"],["run","runs"],["session","chats"],["knowledge","knowledge"]];function Uy({runs:u,chats:i,bundles:o,members:r,workflows:f,filter:h,setFilter:p}){const x=Ga(),y=C.useMemo(()=>{const S=[],_=U=>U?f.find(Y=>Y.slug===U)?.name??U:void 0;for(const U of u)S.push({at:U.updatedAt,kind:"run",emoji:"⚙️",title:_(U.workflow)??U.id,sub:U.request??"",href:`/runs/${U.id}`,lamp:Ay(U.status),status:_y(U.status)});for(const U of i){const Y=U.scope.kind==="team"?r.find(ee=>U.scope.kind==="team"&&ee.slug===U.scope.member):void 0;S.push({at:U.updatedAt,kind:"session",emoji:Y?Y.emoji||"🤖":"💬",title:Y?Y.name:U.title||"new chat",sub:Y?`${U.title||"new chat"}${x?` · ${U.agent}`:""}`:x?`${U.agent} · ${Gm(U)}`:Gm(U),href:Ry(U),lamp:U.busy?"running":"ok",status:U.busy?"working":void 0})}for(const U of o)U.updatedAt&&S.push({at:U.updatedAt,kind:"knowledge",emoji:"📚",title:U.name,sub:`${U.concepts} concepts`,href:`/knowledge/${encodeURIComponent(U.name)}`,lamp:"ok"});return(h==="all"?S:h==="failed"?S.filter(U=>U.kind==="run"&&U.lamp==="failed"):S.filter(U=>U.kind===h)).sort((U,Y)=>{const ee=+(Y.lamp==="running")-+(U.lamp==="running");return ee!==0?ee:Y.at.localeCompare(U.at)}).slice(0,15)},[u,i,o,r,x,h]);let v="";return n.jsxs("section",{className:"panel dash-feed",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"dash-feed-filter",children:[My.map(([S,_])=>n.jsx("button",{className:`feed-chip ${h===S?"on":""}`,onClick:()=>p(S),children:_},S)),h==="failed"&&n.jsxs("button",{className:"feed-chip on failed",onClick:()=>p("all"),children:["failed ",n.jsx(I,{name:"close",className:"ms-sm"})]})]})]}),y.length===0?n.jsx("div",{className:"viewer-note",children:h==="all"?"nothing yet — run a workflow or start a session":"nothing here for this filter"}):n.jsx("div",{className:"m3-list",children:y.map(S=>{const _=Dy(S),T=_!==v?_:null;return v=_,n.jsxs("div",{className:"feed-group",children:[T&&n.jsx("div",{className:"feed-day microlabel",children:T}),n.jsxs(Ue,{href:S.href,className:"m3-row m3-link",children:[n.jsxs("span",{className:"agent-avatar",children:[n.jsx("span",{"aria-hidden":!0,children:S.emoji}),S.lamp==="running"&&n.jsx("span",{className:"lamp running"})]}),n.jsx("span",{className:`chip dash-kind ${S.kind}`,children:S.kind==="session"?"chat":S.kind}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:Ym(S.title)}),S.sub&&n.jsx("span",{className:"m3-sub",children:Ym(S.sub)})]}),S.status&&n.jsx("span",{className:`chip status ${S.lamp}`,children:S.status}),n.jsx("span",{className:"side-when num",title:new Date(S.at).toLocaleString(),children:kx(S.at)}),n.jsx("span",{className:"m3-chev",children:n.jsx(I,{name:"chevron_right"})})]})]},`${S.kind}:${S.href}:${S.at}`)})})]})}async function up(u){const i=window.open("","_blank");if(!i)return;i.document.write(`<title>${ss(u)}</title><body style="font-family:system-ui;padding:40px;color:#555">preparing ${ss(u)}…</body>`);let o;try{const p=await fetch(`/api/knowledge/${encodeURIComponent(u)}`).then(x=>x.json());o=await Promise.all(p.concepts.map(x=>fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(x.id)}`).then(y=>y.json())))}catch{i.document.body.textContent=`could not load bundle "${u}"`;return}const r=o.map(p=>{const x=[p.type,p.generated?.at?`updated ${p.generated.at.slice(0,10)}`:"",p.trustTier==="human-reviewed"?"human-reviewed":"",(p.tags??[]).map(v=>`#${v}`).join(" ")].filter(Boolean).join(" · "),y=rs.sanitize(Oe.parse(p.body??"",{async:!1}));return`<article>
|
|
77
|
-
<h1>${ss(p.title||p.id)}</h1>
|
|
78
|
-
<div class="meta">${ss(x)}</div>
|
|
79
|
-
${y}
|
|
80
|
-
</article>`}).join(`
|
|
81
|
-
`),f=new Date().toISOString().slice(0,10),h=`<!doctype html>
|
|
82
|
-
<html>
|
|
83
|
-
<head>
|
|
84
|
-
<meta charset="utf-8">
|
|
85
|
-
<title>${ss(u)}</title>
|
|
86
|
-
<style>
|
|
87
|
-
:root { color-scheme: light; }
|
|
88
|
-
body {
|
|
89
|
-
margin: 0 auto; padding: 48px 56px; max-width: 760px;
|
|
90
|
-
font: 14px/1.65 -apple-system, "Segoe UI", system-ui, sans-serif; color: #191919;
|
|
91
|
-
background: #fff;
|
|
92
|
-
}
|
|
93
|
-
.no-print {
|
|
94
|
-
position: sticky; top: 0; display: flex; gap: 12px; align-items: center;
|
|
95
|
-
margin: -48px -56px 32px; padding: 12px 56px;
|
|
96
|
-
background: #f4efea; border-bottom: 1px solid #ded6cb; font-size: 13px;
|
|
97
|
-
}
|
|
98
|
-
.no-print button {
|
|
99
|
-
font: inherit; font-weight: 600; padding: 6px 16px; cursor: pointer;
|
|
100
|
-
background: #191919; color: #fff; border: none; border-radius: 999px;
|
|
101
|
-
}
|
|
102
|
-
.cover { margin: 0 0 4px; font-size: 28px; letter-spacing: -0.01em; }
|
|
103
|
-
.cover-sub { color: #5e5b56; font-size: 13px; margin-bottom: 40px; }
|
|
104
|
-
article { page-break-before: always; break-before: page; }
|
|
105
|
-
article:first-of-type { page-break-before: auto; break-before: auto; }
|
|
106
|
-
article h1 { font-size: 21px; margin: 0 0 2px; letter-spacing: -0.01em; }
|
|
107
|
-
article .meta { color: #5e5b56; font-size: 12px; margin-bottom: 18px; }
|
|
108
|
-
h2 { font-size: 16px; margin: 24px 0 8px; }
|
|
109
|
-
h3 { font-size: 14px; margin: 18px 0 6px; }
|
|
110
|
-
a { color: inherit; }
|
|
111
|
-
code { font: 12px/1.5 ui-monospace, monospace; background: #f2ede7; padding: 1px 5px; border-radius: 4px; }
|
|
112
|
-
pre { background: #f2ede7; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
|
|
113
|
-
pre code { background: none; padding: 0; }
|
|
114
|
-
table { border-collapse: collapse; margin: 12px 0; font-size: 13px; }
|
|
115
|
-
th, td { border: 1px solid #ded6cb; padding: 6px 12px; text-align: left; }
|
|
116
|
-
th { background: #f4efea; }
|
|
117
|
-
blockquote { margin: 12px 0; padding: 2px 16px; border-left: 3px solid #ded6cb; color: #5e5b56; }
|
|
118
|
-
@media print {
|
|
119
|
-
body { padding: 0; }
|
|
120
|
-
.no-print { display: none; }
|
|
121
|
-
}
|
|
122
|
-
</style>
|
|
123
|
-
</head>
|
|
124
|
-
<body>
|
|
125
|
-
<div class="no-print">
|
|
126
|
-
<span>Use “Save as PDF” in the print dialog.</span>
|
|
127
|
-
<button onclick="window.print()">print / save as PDF</button>
|
|
128
|
-
</div>
|
|
129
|
-
<h1 class="cover">${ss(u)}</h1>
|
|
130
|
-
<div class="cover-sub">knowledge bundle · ${o.length} concept${o.length===1?"":"s"} · exported ${f}</div>
|
|
131
|
-
${r}
|
|
132
|
-
<script>setTimeout(() => window.print(), 400);<\/script>
|
|
133
|
-
</body>
|
|
134
|
-
</html>`;i.location.href=URL.createObjectURL(new Blob([h],{type:"text/html"}))}function ss(u){return u.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Ly({bundle:u,conceptId:i}){const o=Ge("/api/knowledge",!1),r=o?.bundles??[];return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"bundles"}),n.jsx("span",{className:"spacer"}),n.jsxs(Ue,{href:"/knowledge",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[r.map(f=>n.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(f.name)}`,className:`side-row ${f.name===u?"active":""}`,children:[n.jsx("span",{className:"lamp ok"}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsx("span",{className:"side-wf",children:f.name}),n.jsx("span",{className:"side-when num",children:f.concepts})]}),n.jsx("div",{className:"side-row-sub",children:n.jsxs("span",{className:"side-req",children:[f.okfVersion?`okf ${f.okfVersion}`:"okf",f.updatedAt?` · ${f.updatedAt.slice(0,10)}`:""]})})]})]},f.name)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no bundles yet"})]})]}),n.jsx("div",{className:"runs-main",children:u&&i?n.jsx(Qy,{bundle:u,conceptId:i},`${u}/${i}`):u?n.jsx(By,{name:u},u):n.jsx(Hy,{root:o?.root})})]})}function Hy({root:u}){const[i,o]=C.useState(""),[r,f]=C.useState(""),[h,p]=C.useState(!1);async function x(){const y=i.trim();if(!y)return;p(!0),f("");const S=await(await fetch("/api/knowledge",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:y})})).json();p(!1),S.error?f(S.error):window.location.hash=`/knowledge/${encodeURIComponent(y)}`}return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"context & knowledge"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Curated knowledge as ",n.jsx("b",{children:"OKF bundles"})," (Open Knowledge Format v0.2): plain markdown files with YAML frontmatter",u?n.jsxs(n.Fragment,{children:[" under ",n.jsx("code",{children:u})]}):null,", readable by humans and agents, diffable in git. Agents write through"," ",n.jsx("code",{children:"kraftwerk knowledge put"})," (provenance is stamped automatically); you raise a concept's trust tier by verifying it here."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"new bundle"})}),n.jsxs("div",{className:"know-newbundle",children:[n.jsx("input",{value:i,placeholder:"bundle name, e.g. customer-support",onChange:y=>o(y.target.value),onKeyDown:y=>y.key==="Enter"&&void x()}),n.jsx("button",{className:"run-btn",disabled:!i.trim()||h,onClick:x,children:h?"creating…":"create"})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",r]})]})]})}function po({tier:u}){return n.jsx("span",{className:`chip trust ${u}`,children:u})}function By({name:u}){const i=Ge(`/api/knowledge/${encodeURIComponent(u)}`,!1);return i?"error"in i?n.jsx("div",{className:"empty",children:"bundle not found"}):n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:u}),n.jsxs("span",{className:"count",children:[i.concepts.length," concepts"]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:()=>{up(u)},children:[n.jsx(I,{name:"picture_as_pdf",className:"ms-sm"})," export PDF"]}),n.jsx("button",{className:"run-btn",onClick:()=>{vn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"})]}),n.jsx("section",{className:"panel",children:i.concepts.length===0?n.jsxs("div",{className:"viewer-note",children:["No concepts yet — start a chat to author some, or write one with"," ",n.jsxs("code",{children:["kraftwerk knowledge put ",u,"/<path>"]}),"."]}):n.jsx("div",{className:"m3-list",children:Xy(i.concepts).map(({folder:o,concepts:r})=>n.jsxs(C.Fragment,{children:[o&&n.jsxs("div",{className:"m3-subhead",children:[o,"/"]}),r.map(f=>n.jsxs(Ue,{href:`/knowledge/${encodeURIComponent(u)}/${f.id}`,className:"m3-row m3-link",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:qy(f.type)})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[f.title,f.status!=="stable"&&n.jsx("span",{className:`chip ${f.status}`,children:f.status}),f.stale&&n.jsx("span",{className:"chip stale",children:"stale"}),f.error&&n.jsx("span",{className:"chip stale",title:f.error,children:"invalid"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsxs("code",{children:[o?f.id.slice(o.length+1):f.id,".md"]})," · ",f.type??"untyped"]})]}),n.jsx(po,{tier:f.trustTier}),n.jsx("span",{className:"m3-chev",children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})})]},f.id))]},o||"."))})}),i.log&&n.jsx($y,{name:u,log:i.log})]}):n.jsx("div",{className:"empty",children:"loading…"})}function qy(u){switch((u??"").toLowerCase()){case"reference":return"article";case"policy":return"gavel";case"guide":case"howto":return"route";case"decision":return"balance";default:return"menu_book"}}function Gy(u){const i=[];for(const o of u.split(`
|
|
135
|
-
`)){const r=o.match(/^##\s+(\d{4}-\d{2}-\d{2})/);if(r){i.push({date:r[1],entries:[]});continue}const f=o.match(/^[*-]\s+\*\*([^*]+)\*\*:\s*(.*)$/);f&&i.length>0&&i[i.length-1].entries.push({kind:f[1].toLowerCase(),text:f[2]})}return i.filter(o=>o.entries.length>0)}function Yy(u,i){const o=[],r=/\[([^\]]+)\]\(\/?([^)]+?)\.md\)/g;let f=0,h;for(;h=r.exec(i);)h.index>f&&o.push(i.slice(f,h.index)),o.push(n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(u)}/${h[2].replace(/^\//,"")}`,children:h[1]},h.index)),f=h.index+h[0].length;return f<i.length&&o.push(i.slice(f)),o}function $y({name:u,log:i}){const o=Gy(i),[r,f]=C.useState(!1);return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"activity"}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>f(!r),children:r?"timeline":"raw log"})]}),r||o.length===0?n.jsx("div",{className:"viewer-body",children:n.jsx("pre",{children:i})}):n.jsx("div",{className:"know-log",children:o.map(h=>n.jsxs(C.Fragment,{children:[n.jsx("div",{className:"m3-subhead num",children:h.date}),h.entries.map((p,x)=>n.jsxs("div",{className:"know-log-row",children:[n.jsx("span",{className:`chip log-kind log-${p.kind}`,children:p.kind}),n.jsx("span",{className:"know-log-text",children:Yy(u,p.text)})]},x))]},h.date))})]})}function Xy(u){const i=new Map;for(const o of u){const r=o.id.includes("/")?o.id.slice(0,o.id.lastIndexOf("/")):"";(i.get(r)??i.set(r,[]).get(r)).push(o)}return[...i.keys()].sort((o,r)=>o===""?-1:r===""?1:o.localeCompare(r)).map(o=>({folder:o,concepts:i.get(o)}))}function Qy({bundle:u,conceptId:i}){const[o,r]=C.useState(null),[f,h]=C.useState(!1),[p,x]=C.useState(!1),[y,v]=C.useState(!1),[S,_]=C.useState(""),[T,U]=C.useState(!1),[Y,ee]=C.useState(""),[V,z]=C.useState("rendered"),de=C.useMemo(()=>o?rs.sanitize(Oe.parse(o.body,{async:!1})):"",[o?.body]),fe=()=>{fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`).then($=>$.ok?$.json():Promise.reject()).then(r).catch(()=>h(!0))};C.useEffect(()=>{if(y)return;let $=!0,Z;const le=async()=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept?id=${encodeURIComponent(i)}`,{cache:"no-store"});if(ae.ok){const je=await ae.json();$&&(h(!1),r(be=>JSON.stringify(be)===JSON.stringify(je)?be:je))}else ae.status===404&&$&&h(!0)}catch{}$&&(Z=setTimeout(le,6e3))};return le(),()=>{$=!1,clearTimeout(Z)}},[u,i,y]);async function te(){x(!0),await fetch(`/api/knowledge/${encodeURIComponent(u)}/verify`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i})}).catch(()=>{}),x(!1),fe()}async function F(){U(!0),ee("");const $=await fetch(`/api/knowledge/${encodeURIComponent(u)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:i,content:S})}).then(Z=>Z.json()).catch(()=>({error:"save failed"}));U(!1),$.error?ee($.error):(r($),v(!1))}return f?n.jsx("div",{className:"empty",children:"concept not found"}):o?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("h1",{children:o.title}),o.type&&n.jsx("span",{className:"chip agent",children:o.type}),n.jsx(po,{tier:o.trustTier}),o.status!=="stable"&&n.jsx("span",{className:`chip ${o.status}`,children:o.status}),o.stale&&n.jsxs("span",{className:"chip stale",children:["stale since ",o.staleAfter?.slice(0,10)]}),n.jsx("span",{className:"spacer"}),n.jsx("button",{className:"open-raw",onClick:()=>{vn("claude",{kind:"knowledge",bundle:u})},children:"curate in chat"}),n.jsx("button",{className:"run-btn",disabled:p,onClick:te,children:p?"verifying…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," verify (human)"]})})]}),o.error&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",o.error]}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"content"}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"side-meta",children:[u,"/",o.id,".md"]}),y?n.jsxs(n.Fragment,{children:[n.jsx("button",{className:"open-raw",onClick:()=>{v(!1),ee("")},children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:T,onClick:F,children:T?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," save"]})})]}):n.jsxs("button",{className:"open-raw",onClick:()=>{_(o.raw),v(!0),ee("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]})]}),y?n.jsxs(n.Fragment,{children:[n.jsx("textarea",{className:"concept-edit",value:S,rows:Math.min(40,Math.max(18,S.split(`
|
|
136
|
-
`).length+2)),onChange:$=>_($.target.value),spellCheck:!1}),n.jsxs("div",{className:"viewer-note",children:["full file (frontmatter + markdown body) — saving stamps provenance as"," ",n.jsx("code",{children:"human:user"})," and logs an update."]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"viewer-note md-toolbar",children:n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:V==="rendered"?"active":"",onClick:()=>z("rendered"),children:"rendered"}),n.jsx("button",{className:V==="source"?"active":"",onClick:()=>z("source"),children:"source"})]})}),n.jsx("div",{className:"viewer-body",children:V==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:de}}):n.jsx("pre",{children:o.body.trim()||"(empty body)"})})]}),Y&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",Y]})]}),n.jsxs("aside",{className:"detail-rail",children:[n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"trust"}),n.jsx("span",{className:"v",children:n.jsx(po,{tier:o.trustTier})})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"generated"}),n.jsx("span",{className:`v ${o.generated?"":"dim"}`,children:o.generated?`${o.generated.by??"?"} · ${(o.generated.at??"?").slice(0,10)}`:"not stamped"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"verified"}),o.verified.length===0?n.jsx("span",{className:"v dim",children:"never"}):o.verified.map(($,Z)=>n.jsxs("span",{className:"v",children:[$.by??"?"," · ",($.at??"?").slice(0,10)]},Z))]}),o.staleAfter&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"stale after"}),n.jsxs("span",{className:`v ${o.stale?"":"dim"}`,children:[o.staleAfter.slice(0,10),o.stale&&n.jsx("span",{className:"chip stale",children:"stale"})]})]}),o.tags.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"tags"}),n.jsx("span",{className:"m3-chips",children:o.tags.map($=>n.jsx("span",{className:"chip",children:$},$))})]})]})]}),o.sources.length>0&&n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"sources"})}),n.jsx("div",{className:"rail-list",children:o.sources.map(($,Z)=>n.jsxs("div",{className:"rail-kv",children:[n.jsxs("span",{className:"v",children:[$.resource?.startsWith("http")?n.jsx("a",{href:$.resource,target:"_blank",rel:"noreferrer",children:$.title??$.resource}):$.title??$.resource??"?",$.id&&n.jsxs("span",{className:"know-id",children:["[^",$.id,"]"]})]}),n.jsx("span",{className:"v dim",children:[$.author,$.usage_count!=null?`${$.usage_count} uses`:null,$.last_modified?`mod ${$.last_modified.slice(0,10)}`:null].filter(Boolean).join(" · ")})]},Z))})]})]})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const Zy={workspace:"workspace",project:".claude",user:"global",agent:"agent"};function rp(u){return n.jsx("span",{className:`chip skill-src ${u}`,children:Zy[u]})}function Vy({name:u}){const i=Ge("/api/skills",!1),o=i?.skills??[],r=o.filter(p=>p.source==="workspace"),f=o.filter(p=>p.source!=="workspace"),h=p=>n.jsxs(Ue,{href:`/skills/${encodeURIComponent(p.name)}`,className:`side-row ${p.name===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.source==="workspace"?"ok":"dim"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsxs("div",{className:"side-row-top",children:[n.jsxs("span",{className:"side-wf",children:["/",p.name]}),p.source!=="workspace"&&rp(p.source)]}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:p.description||"no description"})})]})]},`${p.source}:${p.name}`);return n.jsxs("div",{className:"runs-screen",children:[n.jsxs("aside",{className:"runs-side",children:[n.jsx("div",{className:"side-head",children:n.jsx("span",{className:"microlabel",children:"workspace skills"})}),n.jsxs("div",{className:"side-list",children:[r.map(h),i&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no workspace skills yet"}),f.length>0&&n.jsxs(C.Fragment,{children:[n.jsx("div",{className:"side-head skills-local-head",children:n.jsx("span",{className:"microlabel",children:"local (this machine / repo)"})}),f.map(h)]})]})]}),n.jsx("div",{className:"runs-main",children:u?n.jsx(Jy,{name:u},u):n.jsx(Ky,{root:i?.root,workspace:r})})]})}function Ky({root:u,workspace:i}){return n.jsxs("div",{className:"new-chat",children:[n.jsxs("div",{className:"page-head",children:[n.jsx("h1",{children:"skills"}),n.jsxs("span",{className:"count",children:[i.length," in workspace"]})]}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.jsxs("div",{className:"know-intro",children:["Skills are reusable ",n.jsx("b",{children:"instruction packages"}),": one folder per skill with a"," ",n.jsx("code",{children:"SKILL.md"})," (YAML frontmatter: name, description). ",n.jsx("b",{children:"Workspace skills"}),u?n.jsxs(n.Fragment,{children:[" live under ",n.jsx("code",{children:u})]}):null,", are tracked in git and shared with everyone in this workspace — they are the ones to build on. Skills from"," ",n.jsx("code",{children:".claude/skills"})," and your personal ",n.jsx("code",{children:"~/.claude/skills"})," also work here, but stay repo-/machine-local. Invoke any skill in a session with"," ",n.jsx("code",{children:"/<name>"}),"."]}),n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"add a workspace skill"})}),n.jsxs("div",{className:"know-intro",children:["Create ",n.jsxs("code",{children:[u?`${u}/`:"skills/","<name>/SKILL.md"]}),", commit it, done — it appears here and in every session's ",n.jsx("code",{children:"/"})," menu."]})]})]})}function Jy({name:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState("rendered"),x=C.useMemo(()=>i?i.content.replace(/^---\r?\n[\s\S]*?\r?\n---(\r?\n|$)/,""):"",[i?.content]),y=C.useMemo(()=>i?rs.sanitize(Oe.parse(x,{async:!1})):"",[x]);return C.useEffect(()=>{fetch(`/api/skills/${encodeURIComponent(u)}`).then(v=>v.ok?v.json():Promise.reject()).then(o).catch(()=>f(!0))},[u]),r?n.jsx("div",{className:"empty",children:"skill not found"}):i?n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsxs("h1",{children:["/",i.name]}),rp(i.source)]}),i.description&&n.jsx("div",{className:"know-intro skill-desc",children:i.description}),n.jsxs("div",{className:"detail-cols",children:[n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"SKILL.md"}),n.jsx("span",{className:"spacer"}),n.jsxs("div",{className:"tabs",children:[n.jsx("button",{className:h==="rendered"?"active":"",onClick:()=>p("rendered"),children:"rendered"}),n.jsx("button",{className:h==="source"?"active":"",onClick:()=>p("source"),children:"source"})]})]}),n.jsx("div",{className:"viewer-body",children:h==="rendered"?n.jsx("div",{className:"md-body concept-md",dangerouslySetInnerHTML:{__html:y}}):n.jsx("pre",{children:i.content.trim()||"(empty)"})})]}),n.jsx("aside",{className:"detail-rail",children:n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"about"})}),n.jsxs("div",{className:"rail-list",children:[n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"source"}),n.jsx("span",{className:"v",children:i.source==="workspace"?"workspace — git-tracked, shared with the team":i.source==="project"?"repo .claude/skills — tracked, but outside the workspace root":"global ~/.claude/skills — only on this machine"})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"path"}),n.jsx("span",{className:"v mono skill-path",title:i.path,children:i.path})]}),n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"invoke"}),n.jsxs("span",{className:"v",children:[n.jsxs("code",{children:["/",i.name]})," in any session"]})]}),i.files.length>0&&n.jsxs("div",{className:"rail-kv",children:[n.jsx("span",{className:"microlabel",children:"bundled files"}),i.files.map(v=>n.jsx("span",{className:"v mono",children:v},v))]})]})]})})]})]}):n.jsx("div",{className:"empty",children:"loading…"})}const Iy=["","low","medium","high","xhigh","max"],Fy=["🤖","🧑💻","🎧","🛠️","📊","✍️","🔍","🧹","📦","🚀"];function $m({seg:u}){const i=u[0]&&u[0]!=="new"&&u[0]!=="chats"?decodeURIComponent(u[0]):void 0,o=u[0]==="new"?"new":u[0]==="chats"?"chats":u[1]==="edit"?"edit":u[1]==="info"?"info":u[1]==="chat"?"chat":i?"member":"home",r=o==="chat"?u[2]:o==="chats"?u[1]:void 0,f=Ge("/api/team",!1),h=Ga(),[p,x]=C.useState(()=>{try{const q=JSON.parse(localStorage.getItem("kw-agent-groups")??"[]");return Array.isArray(q)?q.map(String):[]}catch{return[]}}),[y,v]=C.useState(!1),[S,_]=C.useState(""),[T,U]=C.useState(null),[Y,ee]=C.useState(""),[V,z]=C.useState(null),[de,fe]=C.useState(null),[te,F]=C.useState({}),$=(f?.members??[]).map(q=>te[q.slug]!==void 0?{...q,group:te[q.slug]||void 0}:q);C.useEffect(()=>{F(q=>{const Re={...q};let Ye=!1;for(const We of f?.members??[])Re[We.slug]!==void 0&&(We.group??"")===Re[We.slug]&&(delete Re[We.slug],Ye=!0);return Ye?Re:q})},[f]);const Z=$.filter(q=>!q.archived),le=$.filter(q=>q.archived),[ae,je]=C.useState(!1),be=[...new Set([...Z.map(q=>q.group??"").filter(Boolean),...p])].sort((q,Re)=>q.localeCompare(Re)),W=Z.filter(q=>!q.group);function ve(q){x(q);try{localStorage.setItem("kw-agent-groups",JSON.stringify(q))}catch{}}function Je(){const q=S.trim();v(!1),_(""),q&&!be.includes(q)&&ve([...p,q])}function at(q,Re){U(null);const Ye=Re.trim();if(!(!Ye||Ye===q)){for(const We of $.filter(tl=>tl.group===q))D(We.slug,Ye);p.includes(q)&&ve([...new Set(p.map(We=>We===q?Ye:We))])}}async function D(q,Re){if(($.find(We=>We.slug===q)?.group??"")!==Re){F(We=>({...We,[q]:Re}));try{const We=await fetch(`/api/team/${encodeURIComponent(q)}`);if(!We.ok)throw new Error;const tl=await We.json();if(!(await fetch(`/api/team/${encodeURIComponent(q)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({...tl,group:Re||void 0})})).ok)throw new Error}catch{F(We=>{const tl={...We};return delete tl[q],tl})}}}const K=q=>h?{onDragOver:Re=>{V!=null&&(Re.preventDefault(),Re.dataTransfer.dropEffect="move",de!==q&&fe(q))},onDrop:Re=>{Re.preventDefault();const Ye=Re.dataTransfer.getData("text/plain")||V;Ye&&D(Ye,q),z(null),fe(null)}}:{},ce=q=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(q.slug)}`,className:`side-row ${q.slug===i?"active":""} ${V===q.slug?"dragging":""}`,draggable:h,onDragStart:Re=>{Re.dataTransfer.setData("text/plain",q.slug),Re.dataTransfer.effectAllowed="move",z(q.slug)},onDragEnd:()=>{z(null),fe(null)},children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:q.emoji})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:q.name})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:q.description||q.harness})})]})]},q.slug),_e=q=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(q.slug)}/info`,className:`side-row archived-row ${q.slug===i?"active":""}`,children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:q.emoji})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:q.name})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:q.description||q.harness})})]})]},q.slug);let ye;o==="new"?ye=n.jsx(Qm,{},"new"):o==="edit"&&i?ye=n.jsx(Qm,{slug:i},i):o==="chat"&&i&&r?ye=n.jsx("div",{className:"chat-main",children:n.jsx(Hm,{id:r},r)}):o==="chats"?ye=r?n.jsx("div",{className:"chat-main",children:n.jsx(Hm,{id:r},r)}):n.jsx(sy,{}):o==="info"&&i?ye=n.jsx(op,{slug:i},i):i?ye=n.jsx(Py,{slug:i},i):ye=n.jsx(lb,{hasMembers:Z.length>0,root:f?.root});const N=(o==="member"||o==="info"||o==="chat")&&i?$.find(q=>q.slug===i)?.knowledge??[]:[],[H,J]=C.useState(()=>localStorage.getItem("kw-kside")!=="hidden"),[Q,he]=C.useState(()=>Number(localStorage.getItem("kw-kside-w"))||460),pe=N.length>0&&H;function Ee(q){J(q),localStorage.setItem("kw-kside",q?"open":"hidden")}function mt(q){he(q),localStorage.setItem("kw-kside-w",String(q))}return n.jsxs("div",{className:`runs-screen team-screen ${i||o==="chats"?"has-sessions":""} ${pe?"has-knowledge":""}`,style:pe?{"--kside-w":`${Q}px`}:void 0,children:[n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"agents"}),n.jsx("span",{className:"spacer"}),h&&n.jsxs(Ue,{href:"/agents/new",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[n.jsxs(Ue,{href:"/agents/chats",className:`side-row side-general ${o==="chats"?"active":""}`,children:[n.jsx("span",{className:"agent-avatar sm",children:n.jsx("span",{"aria-hidden":!0,children:"💬"})}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:"General Chats"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-req",children:"chats without an agent"})})]})]}),n.jsxs("div",{className:`side-group ${V&&de===""?"drop-over":""}`,...K(""),children:[W.map(ce),V!=null&&W.length===0&&n.jsx("div",{className:"side-group-empty",children:"no group — drop here"})]}),be.map(q=>{const Re=Z.filter(Ye=>Ye.group===q);return n.jsxs("div",{className:`side-group ${V&&de===q?"drop-over":""}`,...K(q),children:[n.jsxs("div",{className:"side-group-head",children:[T===q?n.jsx("input",{className:"side-group-rename",autoFocus:!0,value:Y,onChange:Ye=>ee(Ye.target.value),onKeyDown:Ye=>{Ye.key==="Enter"&&at(q,Y),Ye.key==="Escape"&&U(null)},onBlur:()=>at(q,Y)}):n.jsx("span",{className:"microlabel",children:q}),n.jsx("span",{className:"side-group-count num",children:Re.length}),n.jsx("span",{className:"spacer"}),h&&T!==q&&n.jsx("button",{className:"side-group-x",title:"Rename group",onClick:()=>{U(q),ee(q)},children:n.jsx(I,{name:"edit",className:"ms-sm"})}),h&&Re.length===0&&p.includes(q)&&n.jsx("button",{className:"side-group-x",title:"Remove empty group",onClick:()=>ve(p.filter(Ye=>Ye!==q)),children:n.jsx(I,{name:"close",className:"ms-sm"})})]}),Re.map(ce),Re.length===0&&n.jsx("div",{className:"side-group-empty",children:h?"drag agents here":"no agents"})]},q)}),le.length>0&&n.jsxs("div",{className:"side-group side-archived",children:[n.jsxs("button",{className:"side-archived-toggle","aria-expanded":ae,onClick:()=>je(q=>!q),children:[n.jsx("span",{className:"microlabel",children:"archived"}),n.jsx("span",{className:"side-group-count num",children:le.length}),n.jsx("span",{className:"spacer"}),n.jsx(I,{name:ae?"expand_less":"expand_more",className:"ms-sm"})]}),ae&&le.map(_e)]}),f&&$.length===0&&n.jsx("div",{className:"viewer-note",children:"no agents yet"}),h&&(y?n.jsx("div",{className:"side-group-new",children:n.jsx("input",{autoFocus:!0,value:S,placeholder:"group name, e.g. Team Content",onChange:q=>_(q.target.value),onKeyDown:q=>{q.key==="Enter"&&Je(),q.key==="Escape"&&(v(!1),_(""))},onBlur:Je})}):n.jsxs("button",{className:"side-group-add",onClick:()=>v(!0),children:[n.jsx(I,{name:"add",className:"ms-sm"})," group"]}))]})]}),i&&n.jsx(eb,{slug:i,chatId:r}),o==="chats"&&n.jsx(tb,{chatId:r}),n.jsx("div",{className:"runs-main",children:ye}),pe&&n.jsx(Wy,{bundles:N,onHide:()=>Ee(!1),onResize:mt}),N.length>0&&!H&&n.jsxs("button",{className:"kside-reopen",onClick:()=>Ee(!0),title:"Show knowledge sidebar",children:[n.jsx(I,{name:"menu_book",className:"ms-sm"})," knowledge"]})]})}function Wy({bundles:u,onHide:i,onResize:o}){const[r,f]=C.useState({}),[h,p]=C.useState(null),[x,y]=C.useState({}),[v,S]=C.useState({}),[_,T]=C.useState(null),[U,Y]=C.useState(""),[ee,V]=C.useState(!1),[z,de]=C.useState("");C.useEffect(()=>{f({});let F=!0,$;const Z=async()=>{await Promise.all(u.map(async le=>{try{const ae=await fetch(`/api/knowledge/${encodeURIComponent(le)}`,{cache:"no-store"}),je=ae.ok?await ae.json():null;F&&f(be=>JSON.stringify(be[le])===JSON.stringify(je)?be:{...be,[le]:je})}catch{F&&f(ae=>le in ae?ae:{...ae,[le]:null})}})),F&&($=setTimeout(Z,6e3))};return Z(),()=>{F=!1,clearTimeout($)}},[u.join(",")]),C.useEffect(()=>{if(!h||_===h)return;const F=h.indexOf("::"),$=h.slice(0,F),Z=h.slice(F+2);let le=!0,ae;const je=async()=>{try{const be=await fetch(`/api/knowledge/${encodeURIComponent($)}/concept?id=${encodeURIComponent(Z)}`,{cache:"no-store"}),W=be.ok?await be.json():null;le&&y(ve=>JSON.stringify(ve[h])===JSON.stringify(W)?ve:{...ve,[h]:W})}catch{le&&y(be=>h in be?be:{...be,[h]:null})}le&&(ae=setTimeout(je,6e3))};return je(),()=>{le=!1,clearTimeout(ae)}},[h,_]);function fe(F,$){const Z=`${F}::${$}`;p(h===Z?null:Z)}async function te(F,$){const Z=`${F}::${$}`;V(!0),de("");try{const ae=await(await fetch(`/api/knowledge/${encodeURIComponent(F)}/concept`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:$,content:U})})).json();ae.error?de(ae.error):(y(je=>({...je,[Z]:ae})),T(null))}catch(le){de(le.message)}V(!1)}return n.jsxs("aside",{className:"runs-side knowledge-side",children:[n.jsx("div",{className:"kside-resizer",title:"Drag to resize",onMouseDown:F=>{F.preventDefault();const $=F.clientX,Z=F.currentTarget.parentElement.offsetWidth,le=je=>o(Math.min(900,Math.max(280,Z+($-je.clientX)))),ae=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",ae)};window.addEventListener("mousemove",le),window.addEventListener("mouseup",ae)}}),n.jsxs("div",{className:"side-head",children:[n.jsxs("span",{className:"kside-headline",children:[n.jsx("span",{className:"microlabel",children:"knowledge"}),n.jsx("span",{className:"kside-hint",children:"read & kept current by this agent"})]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:i,title:"Hide knowledge sidebar",children:["hide ",n.jsx(I,{name:"close",className:"ms-sm"})]})]}),n.jsx("div",{className:"side-list",children:u.map(F=>{const $=r[F],Z=v[F]===!0;return n.jsxs("div",{className:"kside-bundle",children:[n.jsxs("div",{className:"kside-bundle-head",children:[n.jsxs("button",{className:"kside-bundle-toggle","aria-expanded":!Z,onClick:()=>S({...v,[F]:!Z}),children:[n.jsx("span",{className:`kside-chev ${Z?"":"open"}`,"aria-hidden":!0,children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-bundle-name",children:F}),$&&n.jsx("span",{className:"kside-count num",children:$.concepts.length})]}),n.jsx("button",{className:"kside-open",title:"Export this bundle as PDF",onClick:()=>{up(F)},children:n.jsx(I,{name:"picture_as_pdf",className:"ms-sm"})}),n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(F)}`,className:"kside-open",title:"Open this bundle on the knowledge screen",children:"↗"})]}),!Z&&$===null&&n.jsx("div",{className:"viewer-note",children:"bundle not found"}),!Z&&$?.concepts.map(le=>{const ae=`${F}::${le.id}`,je=h===ae,be=`/knowledge/${encodeURIComponent(F)}/${le.id.split("/").map(encodeURIComponent).join("/")}`;return n.jsxs("div",{className:`kside-concept ${je?"open":""}`,children:[n.jsxs("button",{className:"kside-row","aria-expanded":je,title:le.description||void 0,onClick:()=>fe(F,le.id),children:[n.jsx("span",{className:`kside-chev ${je?"open":""}`,"aria-hidden":!0,children:n.jsx(I,{name:"chevron_right",className:"ms-sm"})}),n.jsx("span",{className:"kside-title",children:le.title||le.id}),le.stale&&n.jsx("span",{className:"kside-stale",title:"Past its stale-after date — ask the agent to re-verify it",children:"stale"})]}),je&&n.jsx("div",{className:"kside-card",ref:W=>W?.scrollIntoView({block:"nearest"}),children:x[ae]===void 0?n.jsx("div",{className:"viewer-note",children:"loading…"}):x[ae]===null?n.jsx("div",{className:"viewer-note",children:"could not load concept"}):_===ae?n.jsxs("div",{className:"kside-edit",children:[n.jsx("textarea",{className:"concept-edit",value:U,rows:Math.min(28,Math.max(10,U.split(`
|
|
137
|
-
`).length+2)),onChange:W=>Y(W.target.value),spellCheck:!1}),n.jsxs("div",{className:"kside-actions",children:[n.jsx("button",{className:"open-raw",disabled:ee,onClick:()=>T(null),children:"cancel"}),n.jsx("button",{className:"open-raw",disabled:ee,onClick:()=>te(F,le.id),children:ee?"saving…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"check",className:"ms-sm"})," save"]})})]}),z&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",z]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"kside-card-bar",children:[le.type&&n.jsx("span",{className:"kside-type",children:le.type}),Xm(le)&&n.jsxs("span",{className:"kside-updated num",children:["updated ",pn(Xm(le))]}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"open-raw",onClick:()=>{Y(x[ae].raw),T(ae),de("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx(Ue,{href:be,className:"open-raw",children:"open ↗"})]}),n.jsx("div",{className:"kside-md md-body",dangerouslySetInnerHTML:{__html:rs.sanitize(Oe.parse(x[ae].body??"",{async:!1}))}})]})})]},le.id)}),!Z&&$&&$.concepts.length===0&&n.jsx("div",{className:"viewer-note",children:"no concepts yet"})]},F)})})]})}function Xm(u){return[u.generated?.at,...u.verified.map(o=>o.at)].filter(o=>typeof o=="string"&&o.length>0).sort().pop()}function Py({slug:u}){const[i,o]=C.useState(!1);return C.useEffect(()=>{let r=!0;return o(!1),fetch("/api/chats").then(f=>f.json()).then(f=>{if(!r)return;const h=f.chats.find(p=>p.scope.kind==="team"&&p.scope.member===u);h?gl(`/agents/${encodeURIComponent(u)}/chat/${h.id}`,{replace:!0}):o(!0)}).catch(()=>r&&o(!0)),()=>{r=!1}},[u]),i?n.jsx(op,{slug:u}):n.jsx("div",{className:"empty",children:"loading…"})}function eb({slug:u,chatId:i}){const o=Ge("/api/chats",!1),r=(o?.chats??[]).filter(p=>p.scope.kind==="team"&&p.scope.member===u),[f,h]=C.useState(!1);return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"sessions"}),n.jsx("span",{className:"spacer"}),n.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/info`,className:"open-raw",title:"agent profile & settings",children:"profile"}),n.jsx("button",{className:"open-raw",disabled:f,onClick:async()=>{h(!0),await vn("claude",{kind:"team",member:u}),h(!1)},children:f?"…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})})]}),n.jsxs("div",{className:"side-list",children:[r.map(p=>n.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${p.id}`,className:`side-row ${p.id===i?"active":""}`,children:[n.jsx("span",{className:`lamp ${p.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:p.title||"new session"})}),n.jsx("div",{className:"side-row-sub",children:n.jsx("span",{className:"side-when num",children:pn(p.updatedAt)})})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete session",onClick:async x=>{x.preventDefault(),x.stopPropagation(),window.confirm(`Delete session "${p.title||p.id}"?`)&&(await fetch(`/api/chats/${p.id}`,{method:"DELETE"}).catch(()=>{}),p.id===i&&gl(`/agents/${encodeURIComponent(u)}`))},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},p.id)),o&&r.length===0&&n.jsx("div",{className:"viewer-note",children:"no sessions yet"})]})]})}function tb({chatId:u}){const i=Ge("/api/chats",!1),o=(i?.chats??[]).filter(r=>r.scope.kind!=="team");return n.jsxs("aside",{className:"runs-side",children:[n.jsxs("div",{className:"side-head",children:[n.jsx("span",{className:"microlabel",children:"chats"}),n.jsx("span",{className:"spacer"}),n.jsxs(Ue,{href:"/agents/chats",className:"open-raw",children:[n.jsx(I,{name:"add",className:"ms-sm"})," new"]})]}),n.jsxs("div",{className:"side-list",children:[o.map(r=>n.jsxs(Ue,{href:`/agents/chats/${r.id}`,className:`side-row ${r.id===u?"active":""}`,children:[n.jsx("span",{className:`lamp ${r.busy?"running":"pending"}`}),n.jsxs("div",{className:"side-row-body",children:[n.jsx("div",{className:"side-row-top",children:n.jsx("span",{className:"side-wf",children:r.title||"new chat"})}),n.jsxs("div",{className:"side-row-sub",children:[n.jsxs("span",{className:"side-req",children:[r.agent,r.scope.kind==="run"?` · ${r.scope.runId}`:r.scope.kind==="kraftwerk"?" · kraftwerk":r.scope.kind==="knowledge"?` · knowledge${r.scope.bundle?`:${r.scope.bundle}`:""}`:""]}),n.jsx("span",{className:"side-when num",children:pn(r.updatedAt)})]})]}),n.jsx("button",{type:"button",className:"row-x",title:"delete chat",onClick:async f=>{f.preventDefault(),f.stopPropagation(),window.confirm(`Delete chat "${r.title||r.id}"?`)&&(await fetch(`/api/chats/${r.id}`,{method:"DELETE"}).catch(()=>{}),r.id===u&&gl("/agents/chats"))},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},r.id)),i&&o.length===0&&n.jsx("div",{className:"viewer-note",children:"no chats yet"})]})]})}function lb({hasMembers:u,root:i}){const o=Ga();return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:"agents"})}),n.jsxs("section",{className:"panel new-chat-panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"what lives here"})}),n.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"," ",n.jsx("code",{children:i?`${i}/<slug>/`:"agents/<slug>/"})," as ",n.jsx("code",{children:"agent.yml"})," +"," ",n.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?n.jsx("div",{style:{padding:"0 16px 16px"},children:n.jsx("button",{className:"run-btn",onClick:()=>gl("/agents/new"),children:n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"add",className:"ms-sm"})," ",u?"new agent":"create your first agent"]})})}):n.jsx("div",{className:"settings-note",style:{padding:"0 16px 16px"},children:"Creating agents needs expert mode — flip the switch in the top bar."})]})]})}function op({slug:u}){const[i,o]=C.useState(null),[r,f]=C.useState(!1),[h,p]=C.useState(!1),[x,y]=C.useState(!1),[v,S]=C.useState(""),[_,T]=C.useState(""),[U,Y]=C.useState([]),[ee,V]=C.useState(!0),[z,de]=C.useState(!1),[fe,te]=C.useState(""),F=Ge("/api/workflows",!1),$=Ge("/api/knowledge",!1),Z=Ge("/api/skills",!1);C.useEffect(()=>{let W=!0;return fetch(`/api/team/${encodeURIComponent(u)}`).then(ve=>ve.ok?ve.json():Promise.reject()).then(ve=>W&&o(ve)).catch(()=>W&&f(!0)),()=>{W=!1}},[u]);async function le(W){if(i){de(!0),te("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:i.name,emoji:i.emoji,description:i.description,harness:i.harness,model:i.model,effort:i.effort,group:i.group,system:i.system,workflows:i.workflows,knowledge:i.knowledge,skills:i.skills,...W})})).json();Je.error?te(Je.error):(o(Je),S(""))}catch(ve){te(ve.message)}de(!1)}}function ae(W,ve){Y(ve?[...U,W]:U.filter(Je=>Je!==W))}async function je(W){de(!0),te("");try{const Je=await(await fetch(`/api/team/${encodeURIComponent(u)}/archive`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({archived:W})})).json();Je.error?te(Je.error):o(Je)}catch(ve){te(ve.message)}de(!1)}if(r)return n.jsx("div",{className:"empty",children:"agent not found"});if(!i)return n.jsx("div",{className:"empty",children:"loading…"});const be=W=>n.jsxs("div",{className:"team-form-row",style:{marginTop:8},children:[n.jsx("button",{className:"run-btn",disabled:z,onClick:()=>{le(W)},children:z?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:z,onClick:()=>(S(""),te("")),children:"cancel"})]});return n.jsxs("div",{className:"member-view",children:[n.jsxs("div",{className:"detail-head",children:[n.jsx("span",{className:"agent-avatar lg",children:n.jsx("span",{"aria-hidden":!0,children:i.emoji})}),n.jsx("h1",{children:i.name}),n.jsx("span",{className:"chip agent",children:i.harness}),i.model&&n.jsx("span",{className:"chip",children:i.model}),i.effort&&n.jsxs("span",{className:"chip",children:["effort: ",i.effort]}),i.archived&&n.jsxs("span",{className:"chip archived-chip",children:[n.jsx(I,{name:"inventory_2",className:"ms-sm"})," archived"]}),n.jsx("span",{className:"spacer"}),n.jsx(Ue,{href:`/agents/${encodeURIComponent(u)}/edit`,className:"open-raw",children:"edit"}),i.archived?n.jsxs("button",{className:"run-btn tonal",disabled:z,onClick:()=>{je(!1)},children:[n.jsx(I,{name:"unarchive",className:"ms-sm"})," ",z?"…":"unarchive"]}):n.jsxs(n.Fragment,{children:[n.jsxs("button",{className:"open-raw",disabled:z,title:"Hide this agent from the roster — restorable any time",onClick:()=>{je(!0)},children:[n.jsx(I,{name:"archive",className:"ms-sm"})," archive"]}),n.jsx("button",{className:"run-btn",disabled:h,onClick:async()=>{p(!0),await vn("claude",{kind:"team",member:u}),p(!1)},children:h?"starting…":"new session"})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"m3-list",children:[n.jsxs("button",{type:"button",className:"m3-row m3-toggle",onClick:()=>y(!x),children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"badge"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"role"}),!x&&n.jsx("span",{className:"m3-sub m3-ellipsis",children:(i.system||"").trim().split(`
|
|
138
|
-
`)[0]||"empty — expand to give this agent a role"})]}),n.jsx("span",{className:`m3-chev ${x?"open":""}`,children:n.jsx(I,{name:"expand_more",className:"ms-sm"})})]}),x&&v!=="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("pre",{children:i.system||"(empty — click edit to give this agent a role)"}),n.jsxs("div",{className:"team-form-row",style:{marginTop:10},children:[n.jsxs("button",{className:"open-raw",onClick:()=>{T(i.system),S("role"),te("")},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit role"]}),n.jsx("span",{className:"spacer"}),n.jsxs("span",{className:"m3-sub",children:["agents/",i.slug,"/system.md"]})]})]}),x&&v==="role"&&n.jsxs("div",{className:"m3-expand",children:[n.jsx("textarea",{className:"concept-edit",rows:Math.min(24,Math.max(8,_.split(`
|
|
139
|
-
`).length+2)),value:_,placeholder:"You are the ... for this project. Your job is ...",onChange:W=>T(W.target.value),spellCheck:!1}),be({system:_})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"account_tree"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"workflows"}),v==="workflows"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[(F?.workflows??[]).map(W=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:U.includes(W.slug),onChange:ve=>ae(W.slug,ve.target.checked)}),n.jsx("b",{children:W.slug}),W.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",W.description]})]},W.slug)),(F?.workflows??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]}),be({workflows:U})]}):i.workflows.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — the agent can run any workflow you connect"}):n.jsx("span",{className:"m3-chips",children:i.workflows.map(W=>n.jsx(Ue,{href:`/workflows/${encodeURIComponent(W)}`,className:"chip",children:W},W))})]}),v!=="workflows"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(i.workflows),S("workflows"),te("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"menu_book"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"knowledge"}),v==="knowledge"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[($?.bundles??[]).map(W=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:U.includes(W.name),onChange:ve=>ae(W.name,ve.target.checked)}),n.jsx("b",{children:W.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",W.concepts," concepts"]})]},W.name)),($?.bundles??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]}),be({knowledge:U})]}):i.knowledge.length===0?n.jsx("span",{className:"m3-sub",children:"none connected — connected bundles are read and kept current by the agent"}):n.jsx("span",{className:"m3-chips",children:i.knowledge.map(W=>n.jsx(Ue,{href:`/knowledge/${encodeURIComponent(W)}`,className:"chip",children:W},W))})]}),v!=="knowledge"&&n.jsx("button",{className:"open-raw",onClick:()=>{Y(i.knowledge),S("knowledge"),te("")},children:"edit"})]}),n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsx("span",{className:"m3-head",children:"shared skills"}),v==="skills"?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:ee,onChange:W=>V(W.target.checked)}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!ee&&(Z?.skills??[]).map(W=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:U.includes(W.name),onChange:ve=>ae(W.name,ve.target.checked)}),n.jsxs("b",{children:["/",W.name]}),W.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",W.description]})]},W.name)),!ee&&(Z?.skills??[]).length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]}),be({skills:ee?void 0:U})]}):i.skills===void 0?n.jsx("span",{className:"m3-sub",children:"all discovered skills (default) — invoke with /name in a session"}):i.skills.length===0?n.jsx("span",{className:"m3-sub",children:"none — this agent runs without skills"}):n.jsx("span",{className:"m3-chips",children:i.skills.map(W=>n.jsxs("span",{className:"chip",children:["/",W]},W))})]}),v!=="skills"&&n.jsx("button",{className:"open-raw",onClick:()=>{V(i.skills===void 0),Y(i.skills??[]),S("skills"),te("")},children:"edit"})]})]}),fe&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",fe]})]}),n.jsx(nb,{slug:u}),n.jsx(sb,{slug:u})]})}const ab=`---
|
|
140
|
-
description: What this skill is for (one line)
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
Instructions this agent follows when the skill applies or is invoked with /<name>.
|
|
144
|
-
`;function nb({slug:u}){const o=Ge(`/api/team/${encodeURIComponent(u)}/skills`,!1)?.skills??[],[r,f]=C.useState(null),[h,p]=C.useState(!1),[x,y]=C.useState("");async function v(T){y("");const U=await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(T)}`),Y=await U.json().catch(()=>null);if(!U.ok||!Y||Y.error)return void y(Y?.error??"could not load skill");f({name:T,content:Y.content??"",isNew:!1})}async function S(){if(!r)return;p(!0),y("");const U=await(await fetch(`/api/team/${encodeURIComponent(u)}/skills`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:r.name,content:r.content})})).json().catch(()=>({error:"save failed"}));p(!1),U.error?y(U.error):f(null)}async function _(T){window.confirm(`Delete skill "/${T}" of this agent (its folder is removed)?`)&&(await fetch(`/api/team/${encodeURIComponent(u)}/skills/${encodeURIComponent(T)}`,{method:"DELETE"}).catch(()=>{}),r?.name===T&&f(null))}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"own skills — only this agent"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>{f({name:"",content:ab,isNew:!0}),y("")},children:[n.jsx(I,{name:"add",className:"ms-sm"})," new skill"]})]}),o.length===0&&!r&&n.jsxs("div",{className:"viewer-note",children:["none — skills in ",n.jsxs("code",{children:["agents/",u,"/skills/"]})," are private to this agent; skills for every agent live in the workspace skills folder."]}),o.length>0&&!r&&n.jsx("div",{className:"m3-list",children:o.map(T=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"extension"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:["/",T.name]}),n.jsx("span",{className:"m3-sub",children:T.description||n.jsx("code",{children:"SKILL.md"})})]}),n.jsxs("button",{className:"open-raw",onClick:()=>{v(T.name)},children:[n.jsx(I,{name:"edit",className:"ms-sm"})," edit"]}),n.jsx("button",{className:"open-raw",onClick:()=>{_(T.name)},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},T.name))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsx("div",{className:"team-form-row",children:n.jsxs("label",{className:"team-field",style:{flex:1},children:["name — invoked as /<name>",n.jsx("input",{value:r.name,placeholder:"e.g. report-html",disabled:!r.isNew,onChange:T=>f({...r,name:T.target.value})})]})}),n.jsxs("label",{className:"team-field",children:["SKILL.md — frontmatter (description) + the instructions",n.jsx("textarea",{className:"concept-edit",rows:Math.min(28,Math.max(12,r.content.split(`
|
|
145
|
-
`).length+2)),value:r.content,spellCheck:!1,onChange:T=>f({...r,content:T.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:h||!r.name.trim(),onClick:()=>{S()},children:h?"saving…":"save"}),n.jsx("button",{className:"open-raw",disabled:h,onClick:()=>f(null),children:"cancel"})]})]}),x&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",x]})]})}function sb({slug:u}){const o=Ge(`/api/team/${encodeURIComponent(u)}/routines`,!1)?.routines??[],[r,f]=C.useState(null),[h,p]=C.useState(""),[x,y]=C.useState("");async function v(T){p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(T)})).json();return Y.error?(p(Y.error),!1):!0}async function S(T){y(T),p("");const Y=await(await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(T)}/run`,{method:"POST"})).json();y(""),Y.error?p(Y.error):Y.chatId&&gl(`/agents/${encodeURIComponent(u)}/chat/${Y.chatId}`)}async function _(T){window.confirm(`Delete routine "${T}"?`)&&await fetch(`/api/team/${encodeURIComponent(u)}/routines/${encodeURIComponent(T)}`,{method:"DELETE"}).catch(()=>{})}return n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"routines — scheduled prompts"}),n.jsx("span",{className:"spacer"}),!r&&n.jsxs("button",{className:"open-raw",onClick:()=>f({name:"",schedule:"0 9 * * 1-5",prompt:"",enabled:!0}),children:[n.jsx(I,{name:"add",className:"ms-sm"})," new routine"]})]}),o.length===0&&!r&&n.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&&n.jsx("div",{className:"m3-list",children:o.map(T=>n.jsxs("div",{className:"m3-row",children:[n.jsx("span",{className:"m3-ico",children:n.jsx(I,{name:"schedule"})}),n.jsxs("span",{className:"m3-body",children:[n.jsxs("span",{className:"m3-head",children:[T.name,T.lastError&&n.jsx("span",{className:"chip stale",title:T.lastError,children:"error"})]}),n.jsxs("span",{className:"m3-sub",children:[n.jsx("code",{children:T.schedule}),T.enabled?T.nextRunAt?` · next ${pn(T.nextRunAt)}`:"":" · paused"," · ",T.lastChatId?n.jsxs(Ue,{href:`/agents/${encodeURIComponent(u)}/chat/${T.lastChatId}`,children:["last run ",pn(T.lastRunAt)]}):"never ran"]})]}),n.jsx("button",{className:"open-raw",disabled:x===T.id,onClick:()=>S(T.id),children:x===T.id?"starting…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"play_arrow",className:"ms-sm"})," run"]})}),n.jsx("button",{className:"open-raw",onClick:()=>f({id:T.id,name:T.name,schedule:T.schedule,prompt:T.prompt,enabled:T.enabled}),children:"edit"}),n.jsx("button",{className:"open-raw",onClick:()=>{_(T.id)},children:"delete"}),n.jsxs("label",{className:"m3-switch",title:T.enabled?"enabled — click to pause":"paused — click to enable",children:[n.jsx("input",{type:"checkbox",checked:T.enabled,onChange:()=>{v({id:T.id,name:T.name,schedule:T.schedule,prompt:T.prompt,enabled:!T.enabled})}}),n.jsx("span",{className:"m3-switch-track"})]})]},T.id))}),r&&n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:r.name,placeholder:"e.g. Morning report",onChange:T=>f({...r,name:T.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:200},children:["schedule (cron)",n.jsx("input",{value:r.schedule,placeholder:"0 9 * * 1-5",onChange:T=>f({...r,schedule:T.target.value})})]}),n.jsxs("label",{className:"team-field wf-checks",style:{width:90},children:["enabled",n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:r.enabled,onChange:T=>f({...r,enabled:T.target.checked})}),"on"]})]})]}),n.jsxs("label",{className:"team-field",children:["prompt — what to ask this agent on each run",n.jsx("textarea",{rows:5,value:r.prompt,placeholder:"Check ... and summarize what changed.",onChange:T=>f({...r,prompt:T.target.value})})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!r.name.trim()||!r.prompt.trim(),onClick:async()=>{await v(r)&&f(null)},children:r.id?"save routine":"create routine"}),n.jsx("button",{className:"open-raw",onClick:()=>(f(null),p("")),children:"cancel"})]})]}),h&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",h]})]})}function Qm({slug:u}){const[i,o]=C.useState(u?null:U()),[r,f]=C.useState(""),[h,p]=C.useState(!1),y=Ge("/api/workflows",!1)?.workflows??[],S=Ge("/api/knowledge",!1)?.bundles??[],T=Ge("/api/skills",!1)?.skills??[];C.useEffect(()=>{u&&fetch(`/api/team/${encodeURIComponent(u)}`).then(z=>z.ok?z.json():Promise.reject()).then(z=>o({name:z.name,emoji:z.emoji,description:z.description??"",harness:z.harness,model:z.model??"",effort:z.effort??"",group:z.group??"",system:z.system,workflows:z.workflows,knowledge:z.knowledge??[],skillsAll:z.skills===void 0,skills:z.skills??[]})).catch(()=>f("agent not found"))},[u]);function U(){return{name:"",emoji:"🤖",description:"",harness:"claude",model:"",effort:"",group:"",system:"",workflows:[],knowledge:[],skillsAll:!0,skills:[]}}async function Y(){if(!i)return;p(!0),f("");const de=await(await fetch(u?`/api/team/${encodeURIComponent(u)}`:"/api/team",{method:u?"PUT":"POST",headers:{"content-type":"application/json"},body:JSON.stringify({...i,skills:i.skillsAll?void 0:i.skills})})).json();p(!1),de.error?f(de.error):gl(`/agents/${encodeURIComponent(de.slug)}/info`)}async function ee(){!u||!window.confirm(`Delete agent "${u}" and its definition folder?`)||(await fetch(`/api/team/${encodeURIComponent(u)}`,{method:"DELETE"}).catch(()=>{}),gl("/agents"))}if(!i)return n.jsx("div",{className:"empty",children:r||"loading…"});const V=z=>o({...i,...z});return n.jsxs("div",{className:"new-chat",children:[n.jsx("div",{className:"page-head",children:n.jsx("h1",{children:u?`edit ${u}`:"new agent"})}),n.jsx("section",{className:"panel new-chat-panel",children:n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:i.name,placeholder:"e.g. Max",onChange:z=>V({name:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:90},children:["emoji",n.jsx("input",{value:i.emoji,onChange:z=>V({emoji:z.target.value})})]})]}),n.jsx("div",{className:"emoji-pick",children:Fy.map(z=>n.jsx("button",{type:"button",className:i.emoji===z?"active":"",onClick:()=>V({emoji:z}),children:z},z))}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{flex:1},children:["description",n.jsx("input",{value:i.description,placeholder:"one line: what this agent is for",onChange:z=>V({description:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:180},children:["group",n.jsx("input",{value:i.group,placeholder:"none",onChange:z=>V({group:z.target.value})})]})]}),n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:140},children:["harness",n.jsxs("select",{value:i.harness,onChange:z=>V({harness:z.target.value}),children:[n.jsx("option",{value:"claude",children:"claude"}),n.jsx("option",{value:"codex",children:"codex"}),n.jsx("option",{value:"pi",children:"pi"})]})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["model",n.jsx("input",{value:i.model,placeholder:"harness default — e.g. sonnet, gpt-5.6-sol",onChange:z=>V({model:z.target.value})})]}),n.jsxs("label",{className:"team-field",style:{width:140},children:["effort",n.jsx("select",{value:i.effort,onChange:z=>V({effort:z.target.value}),children:Iy.map(z=>n.jsx("option",{value:z,children:z||"default"},z))})]})]}),n.jsxs("label",{className:"team-field",children:["system prompt — the agent's role",n.jsx("textarea",{rows:10,value:i.system,placeholder:"You are the ... for this project. Your job is ...",onChange:z=>V({system:z.target.value})})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected workflows — autoloaded into the agent's context; it can run them"}),n.jsxs("div",{className:"wf-checks",children:[y.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.workflows.includes(z.slug),onChange:de=>V({workflows:de.target.checked?[...i.workflows,z.slug]:i.workflows.filter(fe=>fe!==z.slug)})}),n.jsx("b",{children:z.slug}),z.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.slug)),y.length===0&&n.jsx("div",{className:"viewer-note",children:"no workflows in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected knowledge — OKF bundles the agent consults and maintains"}),n.jsxs("div",{className:"wf-checks",children:[S.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.knowledge.includes(z.name),onChange:de=>V({knowledge:de.target.checked?[...i.knowledge,z.name]:i.knowledge.filter(fe=>fe!==z.name)})}),n.jsx("b",{children:z.name}),n.jsxs("span",{className:"opt-hint",children:[" — ",z.concepts," concepts"]})]},z.name)),S.length===0&&n.jsx("div",{className:"viewer-note",children:"no knowledge bundles in this project"})]})]}),n.jsxs("div",{className:"team-field",children:[n.jsx("span",{className:"team-field-label",children:"connected skills — workspace skill packages (see the skills tab); invoked with /name in sessions"}),n.jsxs("div",{className:"wf-checks",children:[n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.skillsAll,onChange:z=>V({skillsAll:z.target.checked})}),n.jsx("b",{children:"all skills"}),n.jsx("span",{className:"opt-hint",children:" — every discovered skill, including future ones"})]}),!i.skillsAll&&T.map(z=>n.jsxs("label",{children:[n.jsx("input",{type:"checkbox",checked:i.skills.includes(z.name),onChange:de=>V({skills:de.target.checked?[...i.skills,z.name]:i.skills.filter(fe=>fe!==z.name)})}),n.jsxs("b",{children:["/",z.name]}),z.description&&n.jsxs("span",{className:"opt-hint",children:[" — ",z.description]})]},z.name)),!i.skillsAll&&T.length===0&&n.jsx("div",{className:"viewer-note",children:"no skills found (.claude/skills, project or user)"})]})]}),r&&n.jsxs("div",{className:"msg error",children:[n.jsx(I,{name:"error",className:"ms-sm"})," ",r]}),n.jsxs("div",{className:"team-form-row",children:[n.jsx("button",{className:"run-btn",disabled:!i.name.trim()||h,onClick:Y,children:h?"saving…":u?"save":"create"}),n.jsx("span",{className:"spacer"}),u&&n.jsx("button",{className:"stop-btn",onClick:ee,children:"delete agent"})]})]})})]})}function ib(){const[u,i]=C.useState(null),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]),[y,v]=C.useState(!1),[S,_]=C.useState(!1),[T,U]=C.useState(!1),[Y,ee]=C.useState("");C.useEffect(()=>{fetch("/api/settings").then(te=>te.json()).then(te=>{i(te),r(te.config.name??""),h(te.config.icon??""),x(te.config.switcher??[])}).catch(()=>ee("could not load settings"))},[]);const V=()=>{v(!0),U(!1),ee("")};async function z(){_(!0),ee("");try{const te=await fetch("/api/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({name:o,icon:f,switcher:p})}),F=await te.json();if(!te.ok)throw new Error(F.error||"save failed");i(F),x(F.config.switcher??[]),v(!1),U(!0),window.dispatchEvent(new Event("kw-meta-refresh"))}catch(te){ee(te.message)}finally{_(!1)}}const de=(te,F)=>{x($=>$.map((Z,le)=>le===te?{...Z,...F}:Z)),V()};if(!u)return n.jsx("div",{className:"empty",children:Y||"loading…"});const fe=[["port",String(u.resolved.port),"kraftwerk ui listens here (CLI --port wins)"],["workflows",u.resolved.workflowsRoot??"— none found","workflow definitions"],["output",u.resolved.outputDir,"run artifacts"],["knowledge",u.config.knowledge??"knowledge","OKF knowledge bundles"],["agents",u.config.agents??"agents","team agent definitions"],["skills",u.config.skills??"skills","workspace skills"]];return n.jsxs("div",{className:"settings-screen",children:[n.jsxs("div",{className:"settings-head",children:[n.jsxs("h1",{children:[n.jsx(I,{name:"settings",className:"ms-lg"})," Settings"]}),n.jsx("span",{className:"spacer"}),Y&&n.jsx("span",{className:"settings-err",children:Y}),T&&!y&&n.jsxs("span",{className:"settings-saved",children:[n.jsx(I,{name:"check",className:"ms-sm"})," saved"]}),n.jsx("button",{className:"run-btn",disabled:S||!y,onClick:()=>{z()},children:S?"saving…":"save changes"})]}),n.jsxs("section",{className:"panel",children:[n.jsx("div",{className:"panel-head",children:n.jsx("span",{className:"microlabel",children:"workspace"})}),n.jsxs("div",{className:"team-form",children:[n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:90},children:["icon",n.jsx("input",{value:f,placeholder:"🤖",onChange:te=>{h(te.target.value),V()}})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:o,placeholder:"my workspace",onChange:te=>{r(te.target.value),V()}})]})]}),n.jsx("div",{className:"settings-note",children:"Shown in the header, browser tab and to other workspaces discovering this one."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"workspace switcher"}),n.jsx("span",{className:"spacer"}),n.jsxs("button",{className:"run-btn tonal",onClick:()=>{x(te=>[...te,{name:"",url:"http://localhost:"}]),V()},children:[n.jsx(I,{name:"add",className:"ms-sm"})," add entry"]})]}),n.jsxs("div",{className:"team-form",children:[p.length===0&&n.jsx("div",{className:"settings-note",children:"No manual entries."}),p.map((te,F)=>n.jsxs("div",{className:"team-form-row",children:[n.jsxs("label",{className:"team-field",style:{width:70},children:["icon",n.jsx("input",{value:te.icon??"",placeholder:"•",onChange:$=>de(F,{icon:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1},children:["name",n.jsx("input",{value:te.name,placeholder:"other workspace",onChange:$=>de(F,{name:$.target.value})})]}),n.jsxs("label",{className:"team-field",style:{flex:1.4},children:["url",n.jsx("input",{value:te.url,placeholder:"http://localhost:1982",onChange:$=>de(F,{url:$.target.value})})]}),n.jsx("button",{className:"row-x settings-row-x",title:"remove entry",onClick:()=>{x($=>$.filter((Z,le)=>le!==F)),V()},children:n.jsx(I,{name:"close",className:"ms-sm"})})]},F)),n.jsx("div",{className:"settings-note",children:"Running workspaces on this machine are discovered automatically — manual entries are for remote instances or extra links."})]})]}),n.jsxs("section",{className:"panel",children:[n.jsxs("div",{className:"panel-head",children:[n.jsx("span",{className:"microlabel",children:"paths & port"}),n.jsx("span",{className:"spacer"}),n.jsx("code",{className:"settings-file",title:u.configPath,children:u.exists?u.configPath:`${u.configPath} (not created yet)`})]}),n.jsx("div",{className:"settings-kv-list",children:fe.map(([te,F,$])=>n.jsxs("div",{className:"settings-kv",children:[n.jsx("span",{className:"microlabel",children:te}),n.jsx("code",{children:F}),n.jsx("span",{className:"settings-kv-hint",children:$})]},te))}),n.jsxs("div",{className:"settings-note",style:{padding:"0 18px 14px"},children:["Read-only here — edit ",n.jsx("code",{children:"kraftwerk.yml"})," directly to change these."]})]})]})}function cb(){const i=Sx().split("/").filter(Boolean),[o,r]=C.useState(""),[f,h]=C.useState(""),[p,x]=C.useState([]);C.useEffect(()=>{let v=!0,S;const _=async()=>{try{const U=await fetch("/api/meta",{cache:"no-store"}).then(Y=>Y.json());if(!v)return;r(U.projectName??""),h(U.projectIcon??""),x(Array.isArray(U.switcher)?U.switcher:[])}catch{}v&&(S=setTimeout(_,3e4))};_();const T=()=>{clearTimeout(S),_()};return window.addEventListener("kw-meta-refresh",T),()=>{v=!1,clearTimeout(S),window.removeEventListener("kw-meta-refresh",T)}},[]),C.useEffect(()=>{if(document.title=o?`${o} — kraftwerk`:"kraftwerk inspector",!f)return;const v=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="0.9em" font-size="85">${f}</text></svg>`;let S=document.querySelector('link[rel="icon"]');S||(S=document.createElement("link"),S.rel="icon",document.head.appendChild(S)),S.href=`data:image/svg+xml,${encodeURIComponent(v)}`},[o,f]);let y;return i[0]==="runs"&&i[1]?y=n.jsx(dy,{id:i[1]}):i[0]==="runs"?y=n.jsx(rb,{}):i[0]==="workflows"&&i[1]?y=n.jsx(wy,{slug:decodeURIComponent(i[1])}):i[0]==="workflows"?y=n.jsx(Sy,{}):i[0]==="chats"?y=n.jsx($m,{seg:i}):i[0]==="skills"?y=n.jsx(Vy,{name:i[1]?decodeURIComponent(i[1]):void 0}):i[0]==="settings"?y=n.jsx(ib,{}):i[0]==="agents"||i[0]==="team"?y=n.jsx($m,{seg:i.slice(1)}):i[0]==="knowledge"?y=n.jsx(Ly,{bundle:i[1]?decodeURIComponent(i[1]):void 0,conceptId:i.length>2?i.slice(2).map(decodeURIComponent).join("/"):void 0}):y=n.jsx(zy,{}),n.jsxs(n.Fragment,{children:[n.jsxs("header",{className:"topbar",children:[n.jsxs("span",{className:"wordmark",children:[n.jsx("a",{href:"#/",className:"home-link",title:"Dashboard",children:f||n.jsx(I,{name:"home"})}),o&&n.jsx(ub,{name:o,icon:f,entries:p})]}),n.jsxs("nav",{children:[n.jsxs("a",{href:"#/agents",children:[n.jsx(I,{name:"groups"})," agents"]}),n.jsxs("a",{href:"#/knowledge",children:[n.jsx(I,{name:"menu_book"})," context & knowledge"]}),n.jsxs("a",{href:"#/workflows",children:[n.jsx(I,{name:"account_tree"})," workflows"]}),n.jsxs("a",{href:"#/runs",children:[n.jsx(I,{name:"history"})," workflow runs"]}),n.jsxs("a",{href:"#/skills",children:[n.jsx(I,{name:"extension"})," skills"]})]}),n.jsx("span",{className:"spacer"}),n.jsx(ob,{}),n.jsx(fb,{}),n.jsx(db,{})]}),n.jsx("main",{className:"shell",children:y})]})}function ub({name:u,icon:i,entries:o}){const[r,f]=C.useState(!1);return C.useEffect(()=>{if(!r)return;const h=p=>{p.target.closest(".switcher-wrap")||f(!1)};return window.addEventListener("mousedown",h),()=>window.removeEventListener("mousedown",h)},[r]),o.length===0?n.jsx("span",{className:"env-name",title:"Project (kraftwerk.yml: name)",children:u}):n.jsxs("span",{className:"switcher-wrap",children:[n.jsxs("button",{className:"env-name env-switch",title:"Switch workspace (kraftwerk.yml: switcher)","aria-haspopup":"menu","aria-expanded":r,onClick:()=>f(h=>!h),children:[u,n.jsx(I,{name:"expand_more"})]}),r&&n.jsxs("div",{className:"switcher-pop",role:"menu",children:[n.jsx("div",{className:"switcher-head",children:"Workspaces"}),n.jsxs("span",{className:"switcher-item current","aria-current":"true",children:[n.jsx("span",{className:"switcher-icon",children:i||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:u}),n.jsx("span",{className:"switcher-sub",children:"this workspace"})]}),n.jsx("span",{className:"switcher-hint",children:"current"})]}),o.map(h=>n.jsxs("a",{className:"switcher-item",role:"menuitem",href:h.url,children:[n.jsx("span",{className:"switcher-icon",children:h.icon||"•"}),n.jsxs("span",{className:"switcher-text",children:[n.jsx("span",{className:"switcher-name",children:h.name}),n.jsxs("span",{className:"switcher-sub",children:[h.live&&n.jsx("span",{className:"live-dot",title:"running"}),h.url.replace(/^https?:\/\//,"")]})]})]},h.url))]})]})}function rb(){const[u,i]=C.useState(null);return C.useEffect(()=>{let o=!0;return fetch("/api/runs").then(r=>r.json()).then(r=>{o&&(r.runs.length>0?gl(`/runs/${r.runs[0].id}`,{replace:!0}):i({outputDir:r.outputDir}))}).catch(()=>{}),()=>{o=!1}},[]),u?n.jsxs("div",{className:"empty",children:["No runs found in ",n.jsx("code",{children:u.outputDir}),". Start one with"," ",n.jsx("code",{children:"kraftwerk run <workflow> <request>"})," or from a workflow page."]}):n.jsx("div",{className:"empty",children:"loading…"})}function ob(){const[u,i]=C.useState(null),[o,r]=C.useState(!1);C.useEffect(()=>{let p=!0,x;const y=async()=>{try{const v=await fetch("/api/meta",{cache:"no-store"}).then(S=>S.json());p&&i(v)}catch{}p&&(x=setTimeout(y,3e4))};return y(),()=>{p=!1,clearTimeout(x)}},[]);const f=u?.restartable&&u.diskVersion&&u.diskVersion!==u.version?u.diskVersion:null;async function h(){if(f){r(!0),await fetch("/api/restart",{method:"POST"}).catch(()=>{});for(let p=0;p<60;p++){await new Promise(x=>setTimeout(x,500));try{if((await fetch("/api/meta",{cache:"no-store"}).then(y=>y.json())).version===f)break}catch{}}location.reload()}}return!f&&!o?null:n.jsx("button",{className:"relaunch-note",disabled:o,title:`v${f} is installed on disk, the server still runs v${u?.version}. Click to relaunch with the new version.`,onClick:()=>{h()},children:o?"relaunching…":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"restart_alt",className:"ms-sm"})," v",f," ready — relaunch"]})})}function fb(){const u=Ga();return n.jsxs("button",{className:`expert-toggle ${u?"on":""}`,title:u?"Expert mode on — full detail":"Expert mode off — simplified view","aria-pressed":u,onClick:()=>wx(!u),children:[n.jsx("span",{className:"expert-track",children:n.jsx("span",{className:"expert-knob"})}),"expert"]})}function db(){const[u,i]=C.useState(!1),[o,r]=C.useState(null),[f,h]=C.useState(null),[p,x]=C.useState("");C.useEffect(()=>{if(!u)return;fetch("/api/runs").then(S=>S.json()).then(r).catch(()=>{}),fetch("/api/workflows").then(S=>S.json()).then(h).catch(()=>{}),fetch("/api/meta").then(S=>S.json()).then(S=>x(S.version)).catch(()=>{});const v=S=>{S.target.closest(".info-wrap")||i(!1)};return window.addEventListener("mousedown",v),()=>window.removeEventListener("mousedown",v)},[u]);const y=o?.runs[0];return n.jsxs("span",{className:"info-wrap",children:[n.jsx("button",{className:"info-btn",title:"Project info","aria-label":"Project info",onClick:()=>i(v=>!v),children:n.jsx(I,{name:"info"})}),u&&n.jsxs("div",{className:"info-pop",children:[n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Workflows"}),n.jsx("span",{className:"info-v",children:f?`${f.workflows.length} discovered`:"…"}),n.jsx("code",{className:"info-path",title:f?.root,children:f?.root??""})]}),n.jsxs("div",{className:"info-row",children:[n.jsx("span",{className:"microlabel",children:"Runs"}),n.jsxs("span",{className:"info-v",children:[o?`${o.runs.length} total`:"…",y?` · latest ${y.status}`:""]}),n.jsx("code",{className:"info-path",title:o?.outputDir,children:o?.outputDir??""})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Workspace"}),n.jsxs("a",{className:"update-btn",href:"#/settings",onClick:()=>i(!1),children:[n.jsx(I,{name:"settings",className:"ms-sm"})," settings"]})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Theme"}),n.jsx(pb,{})]}),n.jsxs("div",{className:"info-row info-actions",children:[n.jsx("span",{className:"microlabel",children:"Version"}),n.jsx("span",{className:"info-v mono",children:p?`kraftwerk ${p}`:"…"}),n.jsx(mb,{})]})]})]})}function hb(u,i){const o=u.split(".").map(Number),r=i.split(".").map(Number);for(let f=0;f<3;f++)if((o[f]??0)!==(r[f]??0))return(o[f]??0)<(r[f]??0);return!1}function mb(){const[u,i]=C.useState("idle"),[o,r]=C.useState(null);async function f(){i("busy");try{const h=await fetch("/api/update-check",{cache:"no-store"}),p=await h.json();if(!h.ok||!p.latest)throw new Error;r(p),i("done")}catch{i("err")}}return u==="done"&&o?hb(o.current,o.latest)?n.jsxs("span",{className:"update-result newer",children:["v",o.latest," available — ",n.jsxs("code",{children:["npm i -g ",o.name,"@latest"]})]}):n.jsxs("span",{className:"update-result",children:[n.jsx(I,{name:"check",className:"ms-sm"})," up to date"]}):n.jsx("button",{className:"update-btn",disabled:u==="busy",onClick:()=>{f()},children:u==="busy"?"checking…":u==="err"?"npm unreachable — retry":n.jsxs(n.Fragment,{children:[n.jsx(I,{name:"sync",className:"ms-sm"})," check for updates"]})})}function pb(){return n.jsx("button",{className:"theme-btn",onClick:()=>{const u=document.documentElement,i=u.dataset.theme==="light"?"dark":"light";u.dataset.theme=i;try{localStorage.setItem("kw-theme",i)}catch{}},children:"day / night"})}Nx.createRoot(document.getElementById("root")).render(n.jsx(C.StrictMode,{children:n.jsx(cb,{})}));
|