@origintrail-official/dkg-node-ui 10.0.23 → 10.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist-ui/assets/{3d-force-graph-DbVwxMKf.js → 3d-force-graph-DvzZZzFn.js} +1 -1
- package/dist-ui/assets/{ActivityFeed-Bfg6fmQQ.js → ActivityFeed-B5QxV1dk.js} +2 -2
- package/dist-ui/assets/{AgentHub-DyF5Pa70.js → AgentHub-BO9jGbJl.js} +1 -1
- package/dist-ui/assets/{AgentProfilePage-BPrSuKjV.js → AgentProfilePage-DJJTn1WD.js} +1 -1
- package/dist-ui/assets/{ApproveWalletsModal-Dd_tHLRP.js → ApproveWalletsModal-C2Tu29tB.js} +3 -3
- package/dist-ui/assets/{ContextGraphPrimitives-BXormriD.js → ContextGraphPrimitives-BqlTIZHy.js} +1 -1
- package/dist-ui/assets/{ConvictionDetailView-BsPTd17P.js → ConvictionDetailView-J-DAKHtP.js} +2 -2
- package/dist-ui/assets/MemoryLayerView-BOxI-_TF.js +2 -0
- package/dist-ui/assets/{MemoryStackView-BbUJ2uiM.js → MemoryStackView-BTyZZKNm.js} +1 -1
- package/dist-ui/assets/{Network-BKvJttOu.js → Network-DV9K48MH.js} +1 -1
- package/dist-ui/assets/{OnChainProvenanceCard-BV9-G1cT.js → OnChainProvenanceCard-jxk66g53.js} +1 -1
- package/dist-ui/assets/{Operations-LAhUQsnj.js → Operations-CNB1BMYg.js} +1 -1
- package/dist-ui/assets/{ProjectView-0zCSblAV.js → ProjectView-BP4vNSXI.js} +30 -30
- package/dist-ui/assets/{PublishingConviction-CF6352oT.js → PublishingConviction-DbP1i3v0.js} +2 -2
- package/dist-ui/assets/{Settings-runaZqPv.js → Settings-I6g3MQCV.js} +1 -1
- package/dist-ui/assets/{browserWalletTransaction-CBgx0i4w.js → browserWalletTransaction-CXv612Pn.js} +3 -3
- package/dist-ui/assets/{ccip-BM07w5uU.js → ccip-DY93ay8e.js} +1 -1
- package/dist-ui/assets/index-CIt7zWgM.css +1 -0
- package/dist-ui/assets/{index-CfVUpsfM.js → index-CumB6j2m.js} +3 -3
- package/dist-ui/assets/index-DW3dBcQk.js +1175 -0
- package/dist-ui/assets/{jsonld-32FQRO67-DBZOBQji.js → jsonld-32FQRO67-DKLfQ_nD.js} +2 -2
- package/dist-ui/assets/{jsonld-DOX7dKpf.js → jsonld-BgpgXlDQ.js} +1 -1
- package/dist-ui/assets/{renderer-3d-2EVDZII7-CVCpAmwB.js → renderer-3d-2EVDZII7-BCmzI8Ii.js} +2 -2
- package/dist-ui/assets/{shikiHighlighter-CzU2U2Tx.js → shikiHighlighter-BXl6qMQO.js} +4 -4
- package/dist-ui/assets/{useEntityOnChainReceipt-BvWQ6qdT.js → useEntityOnChainReceipt-CUGQNIsP.js} +1 -1
- package/dist-ui/assets/{useProjectActivity-Cxr4QGX1.js → useProjectActivity-BOgGdtS7.js} +1 -1
- package/dist-ui/index.html +2 -2
- package/package.json +4 -4
- package/dist-ui/assets/MemoryLayerView-CloJeM33.js +0 -2
- package/dist-ui/assets/index-MQh8C4aJ.js +0 -1175
- package/dist-ui/assets/index-xKO-U_eV.css +0 -1
|
@@ -1,1175 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/Operations-LAhUQsnj.js","assets/string-DtUow4KV.js","assets/Settings-runaZqPv.js","assets/browserWalletTransaction-CBgx0i4w.js","assets/AgentProfilePage-BPrSuKjV.js","assets/ActivityFeed-Bfg6fmQQ.js","assets/useProjectActivity-Cxr4QGX1.js","assets/PublishingConviction-CF6352oT.js","assets/ContextGraphPrimitives-BXormriD.js","assets/ApproveWalletsModal-Dd_tHLRP.js","assets/ConvictionDetailView-BsPTd17P.js","assets/ProjectView-0zCSblAV.js","assets/truncate-BaiMkAOo.js","assets/useEntityOnChainReceipt-BvWQ6qdT.js","assets/MemoryLayerView-CloJeM33.js","assets/MemoryStackView-BbUJ2uiM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Y2=Object.defineProperty;var K2=(e,n,a)=>n in e?Y2(e,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[n]=a;var Ut=(e,n,a)=>K2(e,typeof n!="symbol"?n+"":n,a);(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function a(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=a(o);fetch(o.href,s)}})();var u8=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d8(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var n=e.default;if(typeof n=="function"){var a=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),a}var Af={exports:{}},so={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var Kv;function Q2(){if(Kv)return so;Kv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(r,o,s){var u=null;if(s!==void 0&&(u=""+s),o.key!==void 0&&(u=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:u,ref:o!==void 0?o:null,props:s}}return so.Fragment=n,so.jsx=a,so.jsxs=a,so}var Qv;function X2(){return Qv||(Qv=1,Af.exports=Q2()),Af.exports}var m=X2(),jf={exports:{}},Oe={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var Xv;function Z2(){if(Xv)return Oe;Xv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function b(L){return L===null||typeof L!="object"?null:(L=x&&L[x]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,j={};function E(L,X,N){this.props=L,this.context=X,this.refs=j,this.updater=N||k}E.prototype.isReactComponent={},E.prototype.setState=function(L,X){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,X,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function _(){}_.prototype=E.prototype;function R(L,X,N){this.props=L,this.context=X,this.refs=j,this.updater=N||k}var F=R.prototype=new _;F.constructor=R,C(F,E.prototype),F.isPureReactComponent=!0;var U=Array.isArray;function O(){}var W={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function M(L,X,N){var ue=N.ref;return{$$typeof:e,type:L,key:X,ref:ue!==void 0?ue:null,props:N}}function T(L,X){return M(L.type,X,L.props)}function G(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function Y(L){var X={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(N){return X[N]})}var ie=/\/+/g;function B(L,X){return typeof L=="object"&&L!==null&&L.key!=null?Y(""+L.key):X.toString(36)}function Q(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(O,O):(L.status="pending",L.then(function(X){L.status==="pending"&&(L.status="fulfilled",L.value=X)},function(X){L.status==="pending"&&(L.status="rejected",L.reason=X)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function H(L,X,N,ue,pe){var he=typeof L;(he==="undefined"||he==="boolean")&&(L=null);var Ee=!1;if(L===null)Ee=!0;else switch(he){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(L.$$typeof){case e:case n:Ee=!0;break;case y:return Ee=L._init,H(Ee(L._payload),X,N,ue,pe)}}if(Ee)return pe=pe(L),Ee=ue===""?"."+B(L,0):ue,U(pe)?(N="",Ee!=null&&(N=Ee.replace(ie,"$&/")+"/"),H(pe,X,N,"",function(et){return et})):pe!=null&&(G(pe)&&(pe=T(pe,N+(pe.key==null||L&&L.key===pe.key?"":(""+pe.key).replace(ie,"$&/")+"/")+Ee)),X.push(pe)),1;Ee=0;var Ue=ue===""?".":ue+":";if(U(L))for(var Ne=0;Ne<L.length;Ne++)ue=L[Ne],he=Ue+B(ue,Ne),Ee+=H(ue,X,N,he,pe);else if(Ne=b(L),typeof Ne=="function")for(L=Ne.call(L),Ne=0;!(ue=L.next()).done;)ue=ue.value,he=Ue+B(ue,Ne++),Ee+=H(ue,X,N,he,pe);else if(he==="object"){if(typeof L.then=="function")return H(Q(L),X,N,ue,pe);throw X=String(L),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function ee(L,X,N){if(L==null)return L;var ue=[],pe=0;return H(L,ue,"","",function(he){return X.call(N,he,pe++)}),ue}function ne(L){if(L._status===-1){var X=L._result;X=X(),X.then(function(N){(L._status===0||L._status===-1)&&(L._status=1,L._result=N)},function(N){(L._status===0||L._status===-1)&&(L._status=2,L._result=N)}),L._status===-1&&(L._status=0,L._result=X)}if(L._status===1)return L._result.default;throw L._result}var V=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},D={map:ee,forEach:function(L,X,N){ee(L,function(){X.apply(this,arguments)},N)},count:function(L){var X=0;return ee(L,function(){X++}),X},toArray:function(L){return ee(L,function(X){return X})||[]},only:function(L){if(!G(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=D,Oe.Component=E,Oe.Fragment=a,Oe.Profiler=o,Oe.PureComponent=R,Oe.StrictMode=r,Oe.Suspense=p,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return W.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,X,N){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ue=C({},L.props),pe=L.key;if(X!=null)for(he in X.key!==void 0&&(pe=""+X.key),X)!P.call(X,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&X.ref===void 0||(ue[he]=X[he]);var he=arguments.length-2;if(he===1)ue.children=N;else if(1<he){for(var Ee=Array(he),Ue=0;Ue<he;Ue++)Ee[Ue]=arguments[Ue+2];ue.children=Ee}return M(L.type,pe,ue)},Oe.createContext=function(L){return L={$$typeof:u,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},Oe.createElement=function(L,X,N){var ue,pe={},he=null;if(X!=null)for(ue in X.key!==void 0&&(he=""+X.key),X)P.call(X,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(pe[ue]=X[ue]);var Ee=arguments.length-2;if(Ee===1)pe.children=N;else if(1<Ee){for(var Ue=Array(Ee),Ne=0;Ne<Ee;Ne++)Ue[Ne]=arguments[Ne+2];pe.children=Ue}if(L&&L.defaultProps)for(ue in Ee=L.defaultProps,Ee)pe[ue]===void 0&&(pe[ue]=Ee[ue]);return M(L,he,pe)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:d,render:L}},Oe.isValidElement=G,Oe.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:ne}},Oe.memo=function(L,X){return{$$typeof:f,type:L,compare:X===void 0?null:X}},Oe.startTransition=function(L){var X=W.T,N={};W.T=N;try{var ue=L(),pe=W.S;pe!==null&&pe(N,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(O,V)}catch(he){V(he)}finally{X!==null&&N.types!==null&&(X.types=N.types),W.T=X}},Oe.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Oe.use=function(L){return W.H.use(L)},Oe.useActionState=function(L,X,N){return W.H.useActionState(L,X,N)},Oe.useCallback=function(L,X){return W.H.useCallback(L,X)},Oe.useContext=function(L){return W.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,X){return W.H.useDeferredValue(L,X)},Oe.useEffect=function(L,X){return W.H.useEffect(L,X)},Oe.useEffectEvent=function(L){return W.H.useEffectEvent(L)},Oe.useId=function(){return W.H.useId()},Oe.useImperativeHandle=function(L,X,N){return W.H.useImperativeHandle(L,X,N)},Oe.useInsertionEffect=function(L,X){return W.H.useInsertionEffect(L,X)},Oe.useLayoutEffect=function(L,X){return W.H.useLayoutEffect(L,X)},Oe.useMemo=function(L,X){return W.H.useMemo(L,X)},Oe.useOptimistic=function(L,X){return W.H.useOptimistic(L,X)},Oe.useReducer=function(L,X,N){return W.H.useReducer(L,X,N)},Oe.useRef=function(L){return W.H.useRef(L)},Oe.useState=function(L){return W.H.useState(L)},Oe.useSyncExternalStore=function(L,X,N){return W.H.useSyncExternalStore(L,X,N)},Oe.useTransition=function(){return W.H.useTransition()},Oe.version="19.2.4",Oe}var Zv;function uh(){return Zv||(Zv=1,jf.exports=Z2()),jf.exports}var S=uh();const mn=Uo(S);var Tf={exports:{}},co={},Nf={exports:{}},Rf={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var Jv;function J2(){return Jv||(Jv=1,(function(e){function n(H,ee){var ne=H.length;H.push(ee);e:for(;0<ne;){var V=ne-1>>>1,D=H[V];if(0<o(D,ee))H[V]=ee,H[ne]=D,ne=V;else break e}}function a(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],ne=H.pop();if(ne!==ee){H[0]=ne;e:for(var V=0,D=H.length,L=D>>>1;V<L;){var X=2*(V+1)-1,N=H[X],ue=X+1,pe=H[ue];if(0>o(N,ne))ue<D&&0>o(pe,N)?(H[V]=pe,H[ue]=ne,V=ue):(H[V]=N,H[X]=ne,V=X);else if(ue<D&&0>o(pe,ne))H[V]=pe,H[ue]=ne,V=ue;else break e}}return ee}function o(H,ee){var ne=H.sortIndex-ee.sortIndex;return ne!==0?ne:H.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var p=[],f=[],y=1,g=null,x=3,b=!1,k=!1,C=!1,j=!1,E=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function F(H){for(var ee=a(f);ee!==null;){if(ee.callback===null)r(f);else if(ee.startTime<=H)r(f),ee.sortIndex=ee.expirationTime,n(p,ee);else break;ee=a(f)}}function U(H){if(C=!1,F(H),!k)if(a(p)!==null)k=!0,O||(O=!0,Y());else{var ee=a(f);ee!==null&&Q(U,ee.startTime-H)}}var O=!1,W=-1,P=5,M=-1;function T(){return j?!0:!(e.unstable_now()-M<P)}function G(){if(j=!1,O){var H=e.unstable_now();M=H;var ee=!0;try{e:{k=!1,C&&(C=!1,_(W),W=-1),b=!0;var ne=x;try{t:{for(F(H),g=a(p);g!==null&&!(g.expirationTime>H&&T());){var V=g.callback;if(typeof V=="function"){g.callback=null,x=g.priorityLevel;var D=V(g.expirationTime<=H);if(H=e.unstable_now(),typeof D=="function"){g.callback=D,F(H),ee=!0;break t}g===a(p)&&r(p),F(H)}else r(p);g=a(p)}if(g!==null)ee=!0;else{var L=a(f);L!==null&&Q(U,L.startTime-H),ee=!1}}break e}finally{g=null,x=ne,b=!1}ee=void 0}}finally{ee?Y():O=!1}}}var Y;if(typeof R=="function")Y=function(){R(G)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,B=ie.port2;ie.port1.onmessage=G,Y=function(){B.postMessage(null)}}else Y=function(){E(G,0)};function Q(H,ee){W=E(function(){H(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(H){switch(x){case 1:case 2:case 3:var ee=3;break;default:ee=x}var ne=x;x=ee;try{return H()}finally{x=ne}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ne=x;x=H;try{return ee()}finally{x=ne}},e.unstable_scheduleCallback=function(H,ee,ne){var V=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?V+ne:V):ne=V,H){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=ne+D,H={id:y++,callback:ee,priorityLevel:H,startTime:ne,expirationTime:D,sortIndex:-1},ne>V?(H.sortIndex=ne,n(f,H),a(p)===null&&H===a(f)&&(C?(_(W),W=-1):C=!0,Q(U,ne-V))):(H.sortIndex=D,n(p,H),k||b||(k=!0,O||(O=!0,Y()))),H},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(H){var ee=x;return function(){var ne=x;x=ee;try{return H.apply(this,arguments)}finally{x=ne}}}})(Rf)),Rf}var e0;function eC(){return e0||(e0=1,Nf.exports=J2()),Nf.exports}var _f={exports:{}},ln={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var t0;function tC(){if(t0)return ln;t0=1;var e=uh();function n(p){var f="https://react.dev/errors/"+p;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)f+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(p,f,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:f,implementation:y}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,f){if(p==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ln.createPortal=function(p,f){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(n(299));return s(p,f,null,y)},ln.flushSync=function(p){var f=u.T,y=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=f,r.p=y,r.d.f()}},ln.preconnect=function(p,f){typeof p=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(p,f))},ln.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ln.preinit=function(p,f){if(typeof p=="string"&&f&&typeof f.as=="string"){var y=f.as,g=d(y,f.crossOrigin),x=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;y==="style"?r.d.S(p,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:b}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:x,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ln.preinitModule=function(p,f){if(typeof p=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var y=d(f.as,f.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(p)},ln.preload=function(p,f){if(typeof p=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var y=f.as,g=d(y,f.crossOrigin);r.d.L(p,y,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},ln.preloadModule=function(p,f){if(typeof p=="string")if(f){var y=d(f.as,f.crossOrigin);r.d.m(p,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(p)},ln.requestFormReset=function(p){r.d.r(p)},ln.unstable_batchedUpdates=function(p,f){return p(f)},ln.useFormState=function(p,f,y){return u.H.useFormState(p,f,y)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.4",ln}var n0;function Px(){if(n0)return _f.exports;n0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),_f.exports=tC(),_f.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var a0;function nC(){if(a0)return co;a0=1;var e=eC(),n=uh(),a=Px();function r(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var i=t,l=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(l=i.return),t=i.return;while(t)}return i.tag===3?l:null}function u(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function d(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function p(t){if(s(t)!==t)throw Error(r(188))}function f(t){var i=t.alternate;if(!i){if(i=s(t),i===null)throw Error(r(188));return i!==t?null:t}for(var l=t,c=i;;){var h=l.return;if(h===null)break;var v=h.alternate;if(v===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===v.child){for(v=h.child;v;){if(v===l)return p(h),t;if(v===c)return p(h),i;v=v.sibling}throw Error(r(188))}if(l.return!==c.return)l=h,c=v;else{for(var w=!1,A=h.child;A;){if(A===l){w=!0,l=h,c=v;break}if(A===c){w=!0,c=h,l=v;break}A=A.sibling}if(!w){for(A=v.child;A;){if(A===l){w=!0,l=v,c=h;break}if(A===c){w=!0,c=v,l=h;break}A=A.sibling}if(!w)throw Error(r(189))}}if(l.alternate!==c)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:i}function y(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=y(t),i!==null)return i;t=t.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),R=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),T=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function Y(t){return t===null||typeof t!="object"?null:(t=G&&t[G]||t["@@iterator"],typeof t=="function"?t:null)}var ie=Symbol.for("react.client.reference");function B(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ie?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case E:return"Profiler";case j:return"StrictMode";case U:return"Suspense";case O:return"SuspenseList";case M:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case k:return"Portal";case R:return t.displayName||"Context";case _:return(t._context.displayName||"Context")+".Consumer";case F:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case W:return i=t.displayName||null,i!==null?i:B(t.type)||"Memo";case P:i=t._payload,t=t._init;try{return B(t(i))}catch{}}return null}var Q=Array.isArray,H=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},V=[],D=-1;function L(t){return{current:t}}function X(t){0>D||(t.current=V[D],V[D]=null,D--)}function N(t,i){D++,V[D]=t.current,t.current=i}var ue=L(null),pe=L(null),he=L(null),Ee=L(null);function Ue(t,i){switch(N(he,i),N(pe,t),N(ue,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?vv(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=vv(i),t=xv(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(ue),N(ue,t)}function Ne(){X(ue),X(pe),X(he)}function et(t){t.memoizedState!==null&&N(Ee,t);var i=ue.current,l=xv(i,t.type);i!==l&&(N(pe,t),N(ue,l))}function Ot(t){pe.current===t&&(X(ue),X(pe)),Ee.current===t&&(X(Ee),io._currentValue=ne)}var xt,bt;function yt(t){if(xt===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);xt=i&&i[1]||"",bt=-1<l.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+xt+t+bt}var Zt=!1;function Pe(t,i){if(!t||Zt)return"";Zt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ae){var te=ae}Reflect.construct(t,[],ce)}else{try{ce.call()}catch(ae){te=ae}t.call(ce.prototype)}}else{try{throw Error()}catch(ae){te=ae}(ce=t())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ae){if(ae&&te&&typeof ae.stack=="string")return[ae.stack,te.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=c.DetermineComponentFrameRoot(),w=v[0],A=v[1];if(w&&A){var z=w.split(`
|
|
45
|
-
`),J=A.split(`
|
|
46
|
-
`);for(h=c=0;c<z.length&&!z[c].includes("DetermineComponentFrameRoot");)c++;for(;h<J.length&&!J[h].includes("DetermineComponentFrameRoot");)h++;if(c===z.length||h===J.length)for(c=z.length-1,h=J.length-1;1<=c&&0<=h&&z[c]!==J[h];)h--;for(;1<=c&&0<=h;c--,h--)if(z[c]!==J[h]){if(c!==1||h!==1)do if(c--,h--,0>h||z[c]!==J[h]){var re=`
|
|
47
|
-
`+z[c].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=c&&0<=h);break}}}finally{Zt=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?yt(l):""}function pt(t,i){switch(t.tag){case 26:case 27:case 5:return yt(t.type);case 16:return yt("Lazy");case 13:return t.child!==i&&i!==null?yt("Suspense Fallback"):yt("Suspense");case 19:return yt("SuspenseList");case 0:case 15:return Pe(t.type,!1);case 11:return Pe(t.type.render,!1);case 1:return Pe(t.type,!0);case 31:return yt("Activity");default:return""}}function Dt(t){try{var i="",l=null;do i+=pt(t,l),l=t,t=t.return;while(t);return i}catch(c){return`
|
|
48
|
-
Error generating stack: `+c.message+`
|
|
49
|
-
`+c.stack}}var Nt=Object.prototype.hasOwnProperty,ge=e.unstable_scheduleCallback,Mt=e.unstable_cancelCallback,qn=e.unstable_shouldYield,yn=e.unstable_requestPaint,it=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,$=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,me=e.unstable_NormalPriority,ye=e.unstable_LowPriority,I=e.unstable_IdlePriority,Te=e.log,at=e.unstable_setDisableYieldValue,Ie=null,Xe=null;function Ve(t){if(typeof Te=="function"&&at(t),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(Ie,t)}catch{}}var Se=Math.clz32?Math.clz32:ja,Vt=Math.log,rt=Math.LN2;function ja(t){return t>>>=0,t===0?32:31-(Vt(t)/rt|0)|0}var ti=256,Ii=262144,gr=4194304;function Ta(t){var i=t&42;if(i!==0)return i;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function yr(t,i,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,v=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var A=c&134217727;return A!==0?(c=A&~v,c!==0?h=Ta(c):(w&=A,w!==0?h=Ta(w):l||(l=A&~t,l!==0&&(h=Ta(l))))):(A=c&~v,A!==0?h=Ta(A):w!==0?h=Ta(w):l||(l=c&~t,l!==0&&(h=Ta(l)))),h===0?0:i!==0&&i!==h&&(i&v)===0&&(v=h&-h,l=i&-i,v>=l||v===32&&(l&4194048)!==0)?i:h}function Pi(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function mu(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Wo(){var t=gr;return gr<<=1,(gr&62914560)===0&&(gr=4194304),t}function vl(t){for(var i=[],l=0;31>l;l++)i.push(t);return i}function Ui(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function gu(t,i,l,c,h,v){var w=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var A=t.entanglements,z=t.expirationTimes,J=t.hiddenUpdates;for(l=w&~l;0<l;){var re=31-Se(l),ce=1<<re;A[re]=0,z[re]=-1;var te=J[re];if(te!==null)for(J[re]=null,re=0;re<te.length;re++){var ae=te[re];ae!==null&&(ae.lane&=-536870913)}l&=~ce}c!==0&&Yo(t,c,0),v!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=v&~(w&~i))}function Yo(t,i,l){t.pendingLanes|=i,t.suspendedLanes&=~i;var c=31-Se(i);t.entangledLanes|=i,t.entanglements[c]=t.entanglements[c]|1073741824|l&261930}function se(t,i){var l=t.entangledLanes|=i;for(t=t.entanglements;l;){var c=31-Se(l),h=1<<c;h&i|t[c]&i&&(t[c]|=i),l&=~h}}function ve(t,i){var l=i&-i;return l=(l&42)!==0?1:ke(l),(l&(t.suspendedLanes|i))!==0?0:l}function ke(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function De(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ye(){var t=ee.p;return t!==0?t:(t=window.event,t===void 0?32:$v(t.type))}function lt(t,i){var l=ee.p;try{return ee.p=t,i()}finally{ee.p=l}}var Re=Math.random().toString(36).slice(2),we="__reactFiber$"+Re,_e="__reactProps$"+Re,rn="__reactContainer$"+Re,Na="__reactEvents$"+Re,xl="__reactListeners$"+Re,Ko="__reactHandles$"+Re,ni="__reactResources$"+Re,ha="__reactMarker$"+Re;function vr(t){delete t[we],delete t[_e],delete t[Na],delete t[xl],delete t[Ko]}function Ra(t){var i=t[we];if(i)return i;for(var l=t.parentNode;l;){if(i=l[rn]||l[we]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(t=Av(t);t!==null;){if(l=t[we])return l;t=Av(t)}return i}t=l,l=t.parentNode}return null}function Wt(t){if(t=t[we]||t[rn]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function cn(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(r(33))}function Fn(t){var i=t[ni];return i||(i=t[ni]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function At(t){t[ha]=!0}var vn=new Set,ma={};function un(t,i){Gn(t,i),Gn(t+"Capture",i)}function Gn(t,i){for(ma[t]=i,t=0;t<i.length;t++)vn.add(i[t])}var ai=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]*$"),bl={},Qo={};function yu(t){return Nt.call(Qo,t)?!0:Nt.call(bl,t)?!1:ai.test(t)?Qo[t]=!0:(bl[t]=!0,!1)}function dn(t,i,l){if(yu(i))if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+l)}}function Bi(t,i,l){if(l===null)t.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+l)}}function xn(t,i,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(i,l,""+c)}}function Be(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Ft(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function _a(t,i,l){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,v=c.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return h.call(this)},set:function(w){l=""+w,v.call(this,w)}}),Object.defineProperty(t,i,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(w){l=""+w},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function vu(t){if(!t._valueTracker){var i=Ft(t)?"checked":"value";t._valueTracker=_a(t,i,""+t[i])}}function dm(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return t&&(c=Ft(t)?t.checked?"true":"false":t.value),t=c,t!==l?(i.setValue(t),!0):!1}function Xo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var $S=/[\n"\\]/g;function Vn(t){return t.replace($S,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function xu(t,i,l,c,h,v,w,A){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),i!=null?w==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+Be(i)):t.value!==""+Be(i)&&(t.value=""+Be(i)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),i!=null?bu(t,w,Be(i)):l!=null?bu(t,w,Be(l)):c!=null&&t.removeAttribute("value"),h==null&&v!=null&&(t.defaultChecked=!!v),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+Be(A):t.removeAttribute("name")}function fm(t,i,l,c,h,v,w,A){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.type=v),i!=null||l!=null){if(!(v!=="submit"&&v!=="reset"||i!=null)){vu(t);return}l=l!=null?""+Be(l):"",i=i!=null?""+Be(i):l,A||i===t.value||(t.value=i),t.defaultValue=i}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=A?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w),vu(t)}function bu(t,i,l){i==="number"&&Xo(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function xr(t,i,l,c){if(t=t.options,i){i={};for(var h=0;h<l.length;h++)i["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=i.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&c&&(t[l].defaultSelected=!0)}else{for(l=""+Be(l),i=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}i!==null||t[h].disabled||(i=t[h])}i!==null&&(i.selected=!0)}}function pm(t,i,l){if(i!=null&&(i=""+Be(i),i!==t.value&&(t.value=i),l==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=l!=null?""+Be(l):""}function hm(t,i,l,c){if(i==null){if(c!=null){if(l!=null)throw Error(r(92));if(Q(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),i=l}l=Be(i),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c),vu(t)}function br(t,i){if(i){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=i;return}}t.textContent=i}var qS=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 mm(t,i,l){var c=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":c?t.setProperty(i,l):typeof l!="number"||l===0||qS.has(i)?i==="float"?t.cssFloat=l:t[i]=(""+l).trim():t[i]=l+"px"}function gm(t,i,l){if(i!=null&&typeof i!="object")throw Error(r(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in i)c=i[h],i.hasOwnProperty(h)&&l[h]!==c&&mm(t,h,c)}else for(var v in i)i.hasOwnProperty(v)&&mm(t,v,i[v])}function wu(t){if(t.indexOf("-")===-1)return!1;switch(t){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 FS=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"]]),GS=/^[\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 Zo(t){return GS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Oa(){}var Su=null;function ku(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wr=null,Sr=null;function ym(t){var i=Wt(t);if(i&&(t=i.stateNode)){var l=t[_e]||null;e:switch(t=i.stateNode,i.type){case"input":if(xu(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Vn(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var c=l[i];if(c!==t&&c.form===t.form){var h=c[_e]||null;if(!h)throw Error(r(90));xu(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(i=0;i<l.length;i++)c=l[i],c.form===t.form&&dm(c)}break e;case"textarea":pm(t,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&xr(t,!!l.multiple,i,!1)}}}var Cu=!1;function vm(t,i,l){if(Cu)return t(i,l);Cu=!0;try{var c=t(i);return c}finally{if(Cu=!1,(wr!==null||Sr!==null)&&(Us(),wr&&(i=wr,t=Sr,Sr=wr=null,ym(i),t)))for(i=0;i<t.length;i++)ym(t[i])}}function wl(t,i){var l=t.stateNode;if(l===null)return null;var c=l[_e]||null;if(c===null)return null;l=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,i,typeof l));return l}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eu=!1;if(Da)try{var Sl={};Object.defineProperty(Sl,"passive",{get:function(){Eu=!0}}),window.addEventListener("test",Sl,Sl),window.removeEventListener("test",Sl,Sl)}catch{Eu=!1}var ii=null,Au=null,Jo=null;function xm(){if(Jo)return Jo;var t,i=Au,l=i.length,c,h="value"in ii?ii.value:ii.textContent,v=h.length;for(t=0;t<l&&i[t]===h[t];t++);var w=l-t;for(c=1;c<=w&&i[l-c]===h[v-c];c++);return Jo=h.slice(t,1<c?1-c:void 0)}function es(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function ts(){return!0}function bm(){return!1}function bn(t){function i(l,c,h,v,w){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=v,this.target=w,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(l=t[A],this[A]=l?l(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?ts:bm,this.isPropagationStopped=bm,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ts)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ts)},persist:function(){},isPersistent:ts}),i}var Hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ns=bn(Hi),kl=g({},Hi,{view:0,detail:0}),VS=bn(kl),ju,Tu,Cl,as=g({},kl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ru,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Cl&&(Cl&&t.type==="mousemove"?(ju=t.screenX-Cl.screenX,Tu=t.screenY-Cl.screenY):Tu=ju=0,Cl=t),ju)},movementY:function(t){return"movementY"in t?t.movementY:Tu}}),wm=bn(as),WS=g({},as,{dataTransfer:0}),YS=bn(WS),KS=g({},kl,{relatedTarget:0}),Nu=bn(KS),QS=g({},Hi,{animationName:0,elapsedTime:0,pseudoElement:0}),XS=bn(QS),ZS=g({},Hi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),JS=bn(ZS),ek=g({},Hi,{data:0}),Sm=bn(ek),tk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nk={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"},ak={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ik(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=ak[t])?!!i[t]:!1}function Ru(){return ik}var rk=g({},kl,{key:function(t){if(t.key){var i=tk[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=es(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?nk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ru,charCode:function(t){return t.type==="keypress"?es(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?es(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),lk=bn(rk),ok=g({},as,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),km=bn(ok),sk=g({},kl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ru}),ck=bn(sk),uk=g({},Hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),dk=bn(uk),fk=g({},as,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),pk=bn(fk),hk=g({},Hi,{newState:0,oldState:0}),mk=bn(hk),gk=[9,13,27,32],_u=Da&&"CompositionEvent"in window,El=null;Da&&"documentMode"in document&&(El=document.documentMode);var yk=Da&&"TextEvent"in window&&!El,Cm=Da&&(!_u||El&&8<El&&11>=El),Em=" ",Am=!1;function jm(t,i){switch(t){case"keyup":return gk.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var kr=!1;function vk(t,i){switch(t){case"compositionend":return Tm(i);case"keypress":return i.which!==32?null:(Am=!0,Em);case"textInput":return t=i.data,t===Em&&Am?null:t;default:return null}}function xk(t,i){if(kr)return t==="compositionend"||!_u&&jm(t,i)?(t=xm(),Jo=Au=ii=null,kr=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Cm&&i.locale!=="ko"?null:i.data;default:return null}}var bk={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 Nm(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!bk[t.type]:i==="textarea"}function Rm(t,i,l,c){wr?Sr?Sr.push(c):Sr=[c]:wr=c,i=Vs(i,"onChange"),0<i.length&&(l=new ns("onChange","change",null,l,c),t.push({event:l,listeners:i}))}var Al=null,jl=null;function wk(t){fv(t,0)}function is(t){var i=cn(t);if(dm(i))return t}function _m(t,i){if(t==="change")return i}var Om=!1;if(Da){var Ou;if(Da){var Du="oninput"in document;if(!Du){var Dm=document.createElement("div");Dm.setAttribute("oninput","return;"),Du=typeof Dm.oninput=="function"}Ou=Du}else Ou=!1;Om=Ou&&(!document.documentMode||9<document.documentMode)}function Mm(){Al&&(Al.detachEvent("onpropertychange",Lm),jl=Al=null)}function Lm(t){if(t.propertyName==="value"&&is(jl)){var i=[];Rm(i,jl,t,ku(t)),vm(wk,i)}}function Sk(t,i,l){t==="focusin"?(Mm(),Al=i,jl=l,Al.attachEvent("onpropertychange",Lm)):t==="focusout"&&Mm()}function kk(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return is(jl)}function Ck(t,i){if(t==="click")return is(i)}function Ek(t,i){if(t==="input"||t==="change")return is(i)}function Ak(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var Nn=typeof Object.is=="function"?Object.is:Ak;function Tl(t,i){if(Nn(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var l=Object.keys(t),c=Object.keys(i);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!Nt.call(i,h)||!Nn(t[h],i[h]))return!1}return!0}function zm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Im(t,i){var l=zm(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=i&&c>=i)return{node:l,offset:i-t};t=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=zm(l)}}function Pm(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Pm(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Um(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=Xo(t.document);i instanceof t.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)t=i.contentWindow;else break;i=Xo(t.document)}return i}function Mu(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var jk=Da&&"documentMode"in document&&11>=document.documentMode,Cr=null,Lu=null,Nl=null,zu=!1;function Bm(t,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;zu||Cr==null||Cr!==Xo(c)||(c=Cr,"selectionStart"in c&&Mu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Nl&&Tl(Nl,c)||(Nl=c,c=Vs(Lu,"onSelect"),0<c.length&&(i=new ns("onSelect","select",null,i,l),t.push({event:i,listeners:c}),i.target=Cr)))}function $i(t,i){var l={};return l[t.toLowerCase()]=i.toLowerCase(),l["Webkit"+t]="webkit"+i,l["Moz"+t]="moz"+i,l}var Er={animationend:$i("Animation","AnimationEnd"),animationiteration:$i("Animation","AnimationIteration"),animationstart:$i("Animation","AnimationStart"),transitionrun:$i("Transition","TransitionRun"),transitionstart:$i("Transition","TransitionStart"),transitioncancel:$i("Transition","TransitionCancel"),transitionend:$i("Transition","TransitionEnd")},Iu={},Hm={};Da&&(Hm=document.createElement("div").style,"AnimationEvent"in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),"TransitionEvent"in window||delete Er.transitionend.transition);function qi(t){if(Iu[t])return Iu[t];if(!Er[t])return t;var i=Er[t],l;for(l in i)if(i.hasOwnProperty(l)&&l in Hm)return Iu[t]=i[l];return t}var $m=qi("animationend"),qm=qi("animationiteration"),Fm=qi("animationstart"),Tk=qi("transitionrun"),Nk=qi("transitionstart"),Rk=qi("transitioncancel"),Gm=qi("transitionend"),Vm=new Map,Pu="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(" ");Pu.push("scrollEnd");function la(t,i){Vm.set(t,i),un(i,[t])}var rs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Wn=[],Ar=0,Uu=0;function ls(){for(var t=Ar,i=Uu=Ar=0;i<t;){var l=Wn[i];Wn[i++]=null;var c=Wn[i];Wn[i++]=null;var h=Wn[i];Wn[i++]=null;var v=Wn[i];if(Wn[i++]=null,c!==null&&h!==null){var w=c.pending;w===null?h.next=h:(h.next=w.next,w.next=h),c.pending=h}v!==0&&Wm(l,h,v)}}function os(t,i,l,c){Wn[Ar++]=t,Wn[Ar++]=i,Wn[Ar++]=l,Wn[Ar++]=c,Uu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Bu(t,i,l,c){return os(t,i,l,c),ss(t)}function Fi(t,i){return os(t,null,null,i),ss(t)}function Wm(t,i,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,v=t.return;v!==null;)v.childLanes|=l,c=v.alternate,c!==null&&(c.childLanes|=l),v.tag===22&&(t=v.stateNode,t===null||t._visibility&1||(h=!0)),t=v,v=v.return;return t.tag===3?(v=t.stateNode,h&&i!==null&&(h=31-Se(l),t=v.hiddenUpdates,c=t[h],c===null?t[h]=[i]:c.push(i),i.lane=l|536870912),v):null}function ss(t){if(50<Xl)throw Xl=0,Kd=null,Error(r(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var jr={};function _k(t,i,l,c){this.tag=t,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=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Rn(t,i,l,c){return new _k(t,i,l,c)}function Hu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ma(t,i){var l=t.alternate;return l===null?(l=Rn(t.tag,i,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=i,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,i=t.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Ym(t,i){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,i=l.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function cs(t,i,l,c,h,v){var w=0;if(c=t,typeof t=="function")Hu(t)&&(w=1);else if(typeof t=="string")w=z2(t,l,ue.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case M:return t=Rn(31,l,i,h),t.elementType=M,t.lanes=v,t;case C:return Gi(l.children,h,v,i);case j:w=8,h|=24;break;case E:return t=Rn(12,l,i,h|2),t.elementType=E,t.lanes=v,t;case U:return t=Rn(13,l,i,h),t.elementType=U,t.lanes=v,t;case O:return t=Rn(19,l,i,h),t.elementType=O,t.lanes=v,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case R:w=10;break e;case _:w=9;break e;case F:w=11;break e;case W:w=14;break e;case P:w=16,c=null;break e}w=29,l=Error(r(130,t===null?"null":typeof t,"")),c=null}return i=Rn(w,l,i,h),i.elementType=t,i.type=c,i.lanes=v,i}function Gi(t,i,l,c){return t=Rn(7,t,c,i),t.lanes=l,t}function $u(t,i,l){return t=Rn(6,t,null,i),t.lanes=l,t}function Km(t){var i=Rn(18,null,null,0);return i.stateNode=t,i}function qu(t,i,l){return i=Rn(4,t.children!==null?t.children:[],t.key,i),i.lanes=l,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var Qm=new WeakMap;function Yn(t,i){if(typeof t=="object"&&t!==null){var l=Qm.get(t);return l!==void 0?l:(i={value:t,source:i,stack:Dt(i)},Qm.set(t,i),i)}return{value:t,source:i,stack:Dt(i)}}var Tr=[],Nr=0,us=null,Rl=0,Kn=[],Qn=0,ri=null,ga=1,ya="";function La(t,i){Tr[Nr++]=Rl,Tr[Nr++]=us,us=t,Rl=i}function Xm(t,i,l){Kn[Qn++]=ga,Kn[Qn++]=ya,Kn[Qn++]=ri,ri=t;var c=ga;t=ya;var h=32-Se(c)-1;c&=~(1<<h),l+=1;var v=32-Se(i)+h;if(30<v){var w=h-h%5;v=(c&(1<<w)-1).toString(32),c>>=w,h-=w,ga=1<<32-Se(i)+h|l<<h|c,ya=v+t}else ga=1<<v|l<<h|c,ya=t}function Fu(t){t.return!==null&&(La(t,1),Xm(t,1,0))}function Gu(t){for(;t===us;)us=Tr[--Nr],Tr[Nr]=null,Rl=Tr[--Nr],Tr[Nr]=null;for(;t===ri;)ri=Kn[--Qn],Kn[Qn]=null,ya=Kn[--Qn],Kn[Qn]=null,ga=Kn[--Qn],Kn[Qn]=null}function Zm(t,i){Kn[Qn++]=ga,Kn[Qn++]=ya,Kn[Qn++]=ri,ga=i.id,ya=i.overflow,ri=t}var Jt=null,wt=null,We=!1,li=null,Xn=!1,Vu=Error(r(519));function oi(t){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw _l(Yn(i,t)),Vu}function Jm(t){var i=t.stateNode,l=t.type,c=t.memoizedProps;switch(i[we]=t,i[_e]=c,l){case"dialog":$e("cancel",i),$e("close",i);break;case"iframe":case"object":case"embed":$e("load",i);break;case"video":case"audio":for(l=0;l<Jl.length;l++)$e(Jl[l],i);break;case"source":$e("error",i);break;case"img":case"image":case"link":$e("error",i),$e("load",i);break;case"details":$e("toggle",i);break;case"input":$e("invalid",i),fm(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":$e("invalid",i);break;case"textarea":$e("invalid",i),hm(i,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||c.suppressHydrationWarning===!0||gv(i.textContent,l)?(c.popover!=null&&($e("beforetoggle",i),$e("toggle",i)),c.onScroll!=null&&$e("scroll",i),c.onScrollEnd!=null&&$e("scrollend",i),c.onClick!=null&&(i.onclick=Oa),i=!0):i=!1,i||oi(t,!0)}function eg(t){for(Jt=t.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Xn=!1;return;case 27:case 3:Xn=!0;return;default:Jt=Jt.return}}function Rr(t){if(t!==Jt)return!1;if(!We)return eg(t),We=!0,!1;var i=t.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||df(t.type,t.memoizedProps)),l=!l),l&&wt&&oi(t),eg(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));wt=Ev(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));wt=Ev(t)}else i===27?(i=wt,wi(t.type)?(t=gf,gf=null,wt=t):wt=i):wt=Jt?Jn(t.stateNode.nextSibling):null;return!0}function Vi(){wt=Jt=null,We=!1}function Wu(){var t=li;return t!==null&&(Cn===null?Cn=t:Cn.push.apply(Cn,t),li=null),t}function _l(t){li===null?li=[t]:li.push(t)}var Yu=L(null),Wi=null,za=null;function si(t,i,l){N(Yu,i._currentValue),i._currentValue=l}function Ia(t){t._currentValue=Yu.current,X(Yu)}function Ku(t,i,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),t===l)break;t=t.return}}function Qu(t,i,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var v=h.dependencies;if(v!==null){var w=h.child;v=v.firstContext;e:for(;v!==null;){var A=v;v=h;for(var z=0;z<i.length;z++)if(A.context===i[z]){v.lanes|=l,A=v.alternate,A!==null&&(A.lanes|=l),Ku(v.return,l,t),c||(w=null);break e}v=A.next}}else if(h.tag===18){if(w=h.return,w===null)throw Error(r(341));w.lanes|=l,v=w.alternate,v!==null&&(v.lanes|=l),Ku(w,l,t),w=null}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===t){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}}function _r(t,i,l,c){t=null;for(var h=i,v=!1;h!==null;){if(!v){if((h.flags&524288)!==0)v=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var w=h.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var A=h.type;Nn(h.pendingProps.value,w.value)||(t!==null?t.push(A):t=[A])}}else if(h===Ee.current){if(w=h.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(io):t=[io])}h=h.return}t!==null&&Qu(i,t,l,c),i.flags|=262144}function ds(t){for(t=t.firstContext;t!==null;){if(!Nn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Yi(t){Wi=t,za=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function en(t){return tg(Wi,t)}function fs(t,i){return Wi===null&&Yi(t),tg(t,i)}function tg(t,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},za===null){if(t===null)throw Error(r(308));za=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else za=za.next=i;return l}var Ok=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){i.aborted=!0,t.forEach(function(l){return l()})}},Dk=e.unstable_scheduleCallback,Mk=e.unstable_NormalPriority,Lt={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xu(){return{controller:new Ok,data:new Map,refCount:0}}function Ol(t){t.refCount--,t.refCount===0&&Dk(Mk,function(){t.controller.abort()})}var Dl=null,Zu=0,Or=0,Dr=null;function Lk(t,i){if(Dl===null){var l=Dl=[];Zu=0,Or=tf(),Dr={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Zu++,i.then(ng,ng),i}function ng(){if(--Zu===0&&Dl!==null){Dr!==null&&(Dr.status="fulfilled");var t=Dl;Dl=null,Or=0,Dr=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function zk(t,i){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=i;for(var h=0;h<l.length;h++)(0,l[h])(i)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var ag=H.S;H.S=function(t,i){By=it(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Lk(t,i),ag!==null&&ag(t,i)};var Ki=L(null);function Ju(){var t=Ki.current;return t!==null?t:ht.pooledCache}function ps(t,i){i===null?N(Ki,Ki.current):N(Ki,i.pool)}function ig(){var t=Ju();return t===null?null:{parent:Lt._currentValue,pool:t}}var Mr=Error(r(460)),ed=Error(r(474)),hs=Error(r(542)),ms={then:function(){}};function rg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function lg(t,i,l){switch(l=t[l],l===void 0?t.push(i):l!==i&&(i.then(Oa,Oa),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,sg(t),t;default:if(typeof i.status=="string")i.then(Oa,Oa);else{if(t=ht,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=i,t.status="pending",t.then(function(c){if(i.status==="pending"){var h=i;h.status="fulfilled",h.value=c}},function(c){if(i.status==="pending"){var h=i;h.status="rejected",h.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,sg(t),t}throw Xi=i,Mr}}function Qi(t){try{var i=t._init;return i(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Xi=l,Mr):l}}var Xi=null;function og(){if(Xi===null)throw Error(r(459));var t=Xi;return Xi=null,t}function sg(t){if(t===Mr||t===hs)throw Error(r(483))}var Lr=null,Ml=0;function gs(t){var i=Ml;return Ml+=1,Lr===null&&(Lr=[]),lg(Lr,t,i)}function Ll(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function ys(t,i){throw i.$$typeof===x?Error(r(525)):(t=Object.prototype.toString.call(i),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function cg(t){function i(K,q){if(t){var Z=K.deletions;Z===null?(K.deletions=[q],K.flags|=16):Z.push(q)}}function l(K,q){if(!t)return null;for(;q!==null;)i(K,q),q=q.sibling;return null}function c(K){for(var q=new Map;K!==null;)K.key!==null?q.set(K.key,K):q.set(K.index,K),K=K.sibling;return q}function h(K,q){return K=Ma(K,q),K.index=0,K.sibling=null,K}function v(K,q,Z){return K.index=Z,t?(Z=K.alternate,Z!==null?(Z=Z.index,Z<q?(K.flags|=67108866,q):Z):(K.flags|=67108866,q)):(K.flags|=1048576,q)}function w(K){return t&&K.alternate===null&&(K.flags|=67108866),K}function A(K,q,Z,oe){return q===null||q.tag!==6?(q=$u(Z,K.mode,oe),q.return=K,q):(q=h(q,Z),q.return=K,q)}function z(K,q,Z,oe){var Ce=Z.type;return Ce===C?re(K,q,Z.props.children,oe,Z.key):q!==null&&(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===P&&Qi(Ce)===q.type)?(q=h(q,Z.props),Ll(q,Z),q.return=K,q):(q=cs(Z.type,Z.key,Z.props,null,K.mode,oe),Ll(q,Z),q.return=K,q)}function J(K,q,Z,oe){return q===null||q.tag!==4||q.stateNode.containerInfo!==Z.containerInfo||q.stateNode.implementation!==Z.implementation?(q=qu(Z,K.mode,oe),q.return=K,q):(q=h(q,Z.children||[]),q.return=K,q)}function re(K,q,Z,oe,Ce){return q===null||q.tag!==7?(q=Gi(Z,K.mode,oe,Ce),q.return=K,q):(q=h(q,Z),q.return=K,q)}function ce(K,q,Z){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=$u(""+q,K.mode,Z),q.return=K,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case b:return Z=cs(q.type,q.key,q.props,null,K.mode,Z),Ll(Z,q),Z.return=K,Z;case k:return q=qu(q,K.mode,Z),q.return=K,q;case P:return q=Qi(q),ce(K,q,Z)}if(Q(q)||Y(q))return q=Gi(q,K.mode,Z,null),q.return=K,q;if(typeof q.then=="function")return ce(K,gs(q),Z);if(q.$$typeof===R)return ce(K,fs(K,q),Z);ys(K,q)}return null}function te(K,q,Z,oe){var Ce=q!==null?q.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Ce!==null?null:A(K,q,""+Z,oe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:return Z.key===Ce?z(K,q,Z,oe):null;case k:return Z.key===Ce?J(K,q,Z,oe):null;case P:return Z=Qi(Z),te(K,q,Z,oe)}if(Q(Z)||Y(Z))return Ce!==null?null:re(K,q,Z,oe,null);if(typeof Z.then=="function")return te(K,q,gs(Z),oe);if(Z.$$typeof===R)return te(K,q,fs(K,Z),oe);ys(K,Z)}return null}function ae(K,q,Z,oe,Ce){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return K=K.get(Z)||null,A(q,K,""+oe,Ce);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return K=K.get(oe.key===null?Z:oe.key)||null,z(q,K,oe,Ce);case k:return K=K.get(oe.key===null?Z:oe.key)||null,J(q,K,oe,Ce);case P:return oe=Qi(oe),ae(K,q,Z,oe,Ce)}if(Q(oe)||Y(oe))return K=K.get(Z)||null,re(q,K,oe,Ce,null);if(typeof oe.then=="function")return ae(K,q,Z,gs(oe),Ce);if(oe.$$typeof===R)return ae(K,q,Z,fs(q,oe),Ce);ys(q,oe)}return null}function xe(K,q,Z,oe){for(var Ce=null,Ze=null,be=q,Le=q=0,Ge=null;be!==null&&Le<Z.length;Le++){be.index>Le?(Ge=be,be=null):Ge=be.sibling;var Je=te(K,be,Z[Le],oe);if(Je===null){be===null&&(be=Ge);break}t&&be&&Je.alternate===null&&i(K,be),q=v(Je,q,Le),Ze===null?Ce=Je:Ze.sibling=Je,Ze=Je,be=Ge}if(Le===Z.length)return l(K,be),We&&La(K,Le),Ce;if(be===null){for(;Le<Z.length;Le++)be=ce(K,Z[Le],oe),be!==null&&(q=v(be,q,Le),Ze===null?Ce=be:Ze.sibling=be,Ze=be);return We&&La(K,Le),Ce}for(be=c(be);Le<Z.length;Le++)Ge=ae(be,K,Le,Z[Le],oe),Ge!==null&&(t&&Ge.alternate!==null&&be.delete(Ge.key===null?Le:Ge.key),q=v(Ge,q,Le),Ze===null?Ce=Ge:Ze.sibling=Ge,Ze=Ge);return t&&be.forEach(function(Ai){return i(K,Ai)}),We&&La(K,Le),Ce}function je(K,q,Z,oe){if(Z==null)throw Error(r(151));for(var Ce=null,Ze=null,be=q,Le=q=0,Ge=null,Je=Z.next();be!==null&&!Je.done;Le++,Je=Z.next()){be.index>Le?(Ge=be,be=null):Ge=be.sibling;var Ai=te(K,be,Je.value,oe);if(Ai===null){be===null&&(be=Ge);break}t&&be&&Ai.alternate===null&&i(K,be),q=v(Ai,q,Le),Ze===null?Ce=Ai:Ze.sibling=Ai,Ze=Ai,be=Ge}if(Je.done)return l(K,be),We&&La(K,Le),Ce;if(be===null){for(;!Je.done;Le++,Je=Z.next())Je=ce(K,Je.value,oe),Je!==null&&(q=v(Je,q,Le),Ze===null?Ce=Je:Ze.sibling=Je,Ze=Je);return We&&La(K,Le),Ce}for(be=c(be);!Je.done;Le++,Je=Z.next())Je=ae(be,K,Le,Je.value,oe),Je!==null&&(t&&Je.alternate!==null&&be.delete(Je.key===null?Le:Je.key),q=v(Je,q,Le),Ze===null?Ce=Je:Ze.sibling=Je,Ze=Je);return t&&be.forEach(function(W2){return i(K,W2)}),We&&La(K,Le),Ce}function dt(K,q,Z,oe){if(typeof Z=="object"&&Z!==null&&Z.type===C&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case b:e:{for(var Ce=Z.key;q!==null;){if(q.key===Ce){if(Ce=Z.type,Ce===C){if(q.tag===7){l(K,q.sibling),oe=h(q,Z.props.children),oe.return=K,K=oe;break e}}else if(q.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===P&&Qi(Ce)===q.type){l(K,q.sibling),oe=h(q,Z.props),Ll(oe,Z),oe.return=K,K=oe;break e}l(K,q);break}else i(K,q);q=q.sibling}Z.type===C?(oe=Gi(Z.props.children,K.mode,oe,Z.key),oe.return=K,K=oe):(oe=cs(Z.type,Z.key,Z.props,null,K.mode,oe),Ll(oe,Z),oe.return=K,K=oe)}return w(K);case k:e:{for(Ce=Z.key;q!==null;){if(q.key===Ce)if(q.tag===4&&q.stateNode.containerInfo===Z.containerInfo&&q.stateNode.implementation===Z.implementation){l(K,q.sibling),oe=h(q,Z.children||[]),oe.return=K,K=oe;break e}else{l(K,q);break}else i(K,q);q=q.sibling}oe=qu(Z,K.mode,oe),oe.return=K,K=oe}return w(K);case P:return Z=Qi(Z),dt(K,q,Z,oe)}if(Q(Z))return xe(K,q,Z,oe);if(Y(Z)){if(Ce=Y(Z),typeof Ce!="function")throw Error(r(150));return Z=Ce.call(Z),je(K,q,Z,oe)}if(typeof Z.then=="function")return dt(K,q,gs(Z),oe);if(Z.$$typeof===R)return dt(K,q,fs(K,Z),oe);ys(K,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,q!==null&&q.tag===6?(l(K,q.sibling),oe=h(q,Z),oe.return=K,K=oe):(l(K,q),oe=$u(Z,K.mode,oe),oe.return=K,K=oe),w(K)):l(K,q)}return function(K,q,Z,oe){try{Ml=0;var Ce=dt(K,q,Z,oe);return Lr=null,Ce}catch(be){if(be===Mr||be===hs)throw be;var Ze=Rn(29,be,null,K.mode);return Ze.lanes=oe,Ze.return=K,Ze}finally{}}}var Zi=cg(!0),ug=cg(!1),ci=!1;function td(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nd(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ui(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function di(t,i,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(tt&2)!==0){var h=c.pending;return h===null?i.next=i:(i.next=h.next,h.next=i),c.pending=i,i=ss(t),Wm(t,null,l),i}return os(t,c,i,l),ss(t)}function zl(t,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var c=i.lanes;c&=t.pendingLanes,l|=c,i.lanes=l,se(t,l)}}function ad(t,i){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,v=null;if(l=l.firstBaseUpdate,l!==null){do{var w={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};v===null?h=v=w:v=v.next=w,l=l.next}while(l!==null);v===null?h=v=i:v=v.next=i}else h=v=i;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:v,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=i:t.next=i,l.lastBaseUpdate=i}var id=!1;function Il(){if(id){var t=Dr;if(t!==null)throw t}}function Pl(t,i,l,c){id=!1;var h=t.updateQueue;ci=!1;var v=h.firstBaseUpdate,w=h.lastBaseUpdate,A=h.shared.pending;if(A!==null){h.shared.pending=null;var z=A,J=z.next;z.next=null,w===null?v=J:w.next=J,w=z;var re=t.alternate;re!==null&&(re=re.updateQueue,A=re.lastBaseUpdate,A!==w&&(A===null?re.firstBaseUpdate=J:A.next=J,re.lastBaseUpdate=z))}if(v!==null){var ce=h.baseState;w=0,re=J=z=null,A=v;do{var te=A.lane&-536870913,ae=te!==A.lane;if(ae?(Fe&te)===te:(c&te)===te){te!==0&&te===Or&&(id=!0),re!==null&&(re=re.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var xe=t,je=A;te=i;var dt=l;switch(je.tag){case 1:if(xe=je.payload,typeof xe=="function"){ce=xe.call(dt,ce,te);break e}ce=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=je.payload,te=typeof xe=="function"?xe.call(dt,ce,te):xe,te==null)break e;ce=g({},ce,te);break e;case 2:ci=!0}}te=A.callback,te!==null&&(t.flags|=64,ae&&(t.flags|=8192),ae=h.callbacks,ae===null?h.callbacks=[te]:ae.push(te))}else ae={lane:te,tag:A.tag,payload:A.payload,callback:A.callback,next:null},re===null?(J=re=ae,z=ce):re=re.next=ae,w|=te;if(A=A.next,A===null){if(A=h.shared.pending,A===null)break;ae=A,A=ae.next,ae.next=null,h.lastBaseUpdate=ae,h.shared.pending=null}}while(!0);re===null&&(z=ce),h.baseState=z,h.firstBaseUpdate=J,h.lastBaseUpdate=re,v===null&&(h.shared.lanes=0),gi|=w,t.lanes=w,t.memoizedState=ce}}function dg(t,i){if(typeof t!="function")throw Error(r(191,t));t.call(i)}function fg(t,i){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)dg(l[t],i)}var zr=L(null),vs=L(0);function pg(t,i){t=Va,N(vs,t),N(zr,i),Va=t|i.baseLanes}function rd(){N(vs,Va),N(zr,zr.current)}function ld(){Va=vs.current,X(zr),X(vs)}var _n=L(null),Zn=null;function fi(t){var i=t.alternate;N(Rt,Rt.current&1),N(_n,t),Zn===null&&(i===null||zr.current!==null||i.memoizedState!==null)&&(Zn=t)}function od(t){N(Rt,Rt.current),N(_n,t),Zn===null&&(Zn=t)}function hg(t){t.tag===22?(N(Rt,Rt.current),N(_n,t),Zn===null&&(Zn=t)):pi()}function pi(){N(Rt,Rt.current),N(_n,_n.current)}function On(t){X(_n),Zn===t&&(Zn=null),X(Rt)}var Rt=L(0);function xs(t){for(var i=t;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||hf(l)||mf(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Pa=0,Me=null,ct=null,zt=null,bs=!1,Ir=!1,Ji=!1,ws=0,Ul=0,Pr=null,Ik=0;function jt(){throw Error(r(321))}function sd(t,i){if(i===null)return!1;for(var l=0;l<i.length&&l<t.length;l++)if(!Nn(t[l],i[l]))return!1;return!0}function cd(t,i,l,c,h,v){return Pa=v,Me=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,H.H=t===null||t.memoizedState===null?Xg:Cd,Ji=!1,v=l(c,h),Ji=!1,Ir&&(v=gg(i,l,c,h)),mg(t),v}function mg(t){H.H=$l;var i=ct!==null&&ct.next!==null;if(Pa=0,zt=ct=Me=null,bs=!1,Ul=0,Pr=null,i)throw Error(r(300));t===null||It||(t=t.dependencies,t!==null&&ds(t)&&(It=!0))}function gg(t,i,l,c){Me=t;var h=0;do{if(Ir&&(Pr=null),Ul=0,Ir=!1,25<=h)throw Error(r(301));if(h+=1,zt=ct=null,t.updateQueue!=null){var v=t.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}H.H=Zg,v=i(l,c)}while(Ir);return v}function Pk(){var t=H.H,i=t.useState()[0];return i=typeof i.then=="function"?Bl(i):i,t=t.useState()[0],(ct!==null?ct.memoizedState:null)!==t&&(Me.flags|=1024),i}function ud(){var t=ws!==0;return ws=0,t}function dd(t,i,l){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~l}function fd(t){if(bs){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}bs=!1}Pa=0,zt=ct=Me=null,Ir=!1,Ul=ws=0,Pr=null}function fn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Me.memoizedState=zt=t:zt=zt.next=t,zt}function _t(){if(ct===null){var t=Me.alternate;t=t!==null?t.memoizedState:null}else t=ct.next;var i=zt===null?Me.memoizedState:zt.next;if(i!==null)zt=i,ct=t;else{if(t===null)throw Me.alternate===null?Error(r(467)):Error(r(310));ct=t,t={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},zt===null?Me.memoizedState=zt=t:zt=zt.next=t}return zt}function Ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Bl(t){var i=Ul;return Ul+=1,Pr===null&&(Pr=[]),t=lg(Pr,t,i),i=Me,(zt===null?i.memoizedState:zt.next)===null&&(i=i.alternate,H.H=i===null||i.memoizedState===null?Xg:Cd),t}function ks(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Bl(t);if(t.$$typeof===R)return en(t)}throw Error(r(438,String(t)))}function pd(t){var i=null,l=Me.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var c=Me.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(h){return h.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=Ss(),Me.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(t),c=0;c<t;c++)l[c]=T;return i.index++,l}function Ua(t,i){return typeof i=="function"?i(t):i}function Cs(t){var i=_t();return hd(i,ct,t)}function hd(t,i,l){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var h=t.baseQueue,v=c.pending;if(v!==null){if(h!==null){var w=h.next;h.next=v.next,v.next=w}i.baseQueue=h=v,c.pending=null}if(v=t.baseState,h===null)t.memoizedState=v;else{i=h.next;var A=w=null,z=null,J=i,re=!1;do{var ce=J.lane&-536870913;if(ce!==J.lane?(Fe&ce)===ce:(Pa&ce)===ce){var te=J.revertLane;if(te===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),ce===Or&&(re=!0);else if((Pa&te)===te){J=J.next,te===Or&&(re=!0);continue}else ce={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(A=z=ce,w=v):z=z.next=ce,Me.lanes|=te,gi|=te;ce=J.action,Ji&&l(v,ce),v=J.hasEagerState?J.eagerState:l(v,ce)}else te={lane:ce,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},z===null?(A=z=te,w=v):z=z.next=te,Me.lanes|=ce,gi|=ce;J=J.next}while(J!==null&&J!==i);if(z===null?w=v:z.next=A,!Nn(v,t.memoizedState)&&(It=!0,re&&(l=Dr,l!==null)))throw l;t.memoizedState=v,t.baseState=w,t.baseQueue=z,c.lastRenderedState=v}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function md(t){var i=_t(),l=i.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,v=i.memoizedState;if(h!==null){l.pending=null;var w=h=h.next;do v=t(v,w.action),w=w.next;while(w!==h);Nn(v,i.memoizedState)||(It=!0),i.memoizedState=v,i.baseQueue===null&&(i.baseState=v),l.lastRenderedState=v}return[v,c]}function yg(t,i,l){var c=Me,h=_t(),v=We;if(v){if(l===void 0)throw Error(r(407));l=l()}else l=i();var w=!Nn((ct||h).memoizedState,l);if(w&&(h.memoizedState=l,It=!0),h=h.queue,vd(bg.bind(null,c,h,t),[t]),h.getSnapshot!==i||w||zt!==null&&zt.memoizedState.tag&1){if(c.flags|=2048,Ur(9,{destroy:void 0},xg.bind(null,c,h,l,i),null),ht===null)throw Error(r(349));v||(Pa&127)!==0||vg(c,i,l)}return l}function vg(t,i,l){t.flags|=16384,t={getSnapshot:i,value:l},i=Me.updateQueue,i===null?(i=Ss(),Me.updateQueue=i,i.stores=[t]):(l=i.stores,l===null?i.stores=[t]:l.push(t))}function xg(t,i,l,c){i.value=l,i.getSnapshot=c,wg(i)&&Sg(t)}function bg(t,i,l){return l(function(){wg(i)&&Sg(t)})}function wg(t){var i=t.getSnapshot;t=t.value;try{var l=i();return!Nn(t,l)}catch{return!0}}function Sg(t){var i=Fi(t,2);i!==null&&En(i,t,2)}function gd(t){var i=fn();if(typeof t=="function"){var l=t;if(t=l(),Ji){Ve(!0);try{l()}finally{Ve(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:t},i}function kg(t,i,l,c){return t.baseState=l,hd(t,ct,typeof c=="function"?c:Ua)}function Uk(t,i,l,c,h){if(js(t))throw Error(r(485));if(t=i.action,t!==null){var v={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){v.listeners.push(w)}};H.T!==null?l(!0):v.isTransition=!1,c(v),l=i.pending,l===null?(v.next=i.pending=v,Cg(i,v)):(v.next=l.next,i.pending=l.next=v)}}function Cg(t,i){var l=i.action,c=i.payload,h=t.state;if(i.isTransition){var v=H.T,w={};H.T=w;try{var A=l(h,c),z=H.S;z!==null&&z(w,A),Eg(t,i,A)}catch(J){yd(t,i,J)}finally{v!==null&&w.types!==null&&(v.types=w.types),H.T=v}}else try{v=l(h,c),Eg(t,i,v)}catch(J){yd(t,i,J)}}function Eg(t,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Ag(t,i,c)},function(c){return yd(t,i,c)}):Ag(t,i,l)}function Ag(t,i,l){i.status="fulfilled",i.value=l,jg(i),t.state=l,i=t.pending,i!==null&&(l=i.next,l===i?t.pending=null:(l=l.next,i.next=l,Cg(t,l)))}function yd(t,i,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=l,jg(i),i=i.next;while(i!==c)}t.action=null}function jg(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function Tg(t,i){return i}function Ng(t,i){if(We){var l=ht.formState;if(l!==null){e:{var c=Me;if(We){if(wt){t:{for(var h=wt,v=Xn;h.nodeType!==8;){if(!v){h=null;break t}if(h=Jn(h.nextSibling),h===null){h=null;break t}}v=h.data,h=v==="F!"||v==="F"?h:null}if(h){wt=Jn(h.nextSibling),c=h.data==="F!";break e}}oi(c)}c=!1}c&&(i=l[0])}}return l=fn(),l.memoizedState=l.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tg,lastRenderedState:i},l.queue=c,l=Yg.bind(null,Me,c),c.dispatch=l,c=gd(!1),v=kd.bind(null,Me,!1,c.queue),c=fn(),h={state:i,dispatch:null,action:t,pending:null},c.queue=h,l=Uk.bind(null,Me,h,v,l),h.dispatch=l,c.memoizedState=t,[i,l,!1]}function Rg(t){var i=_t();return _g(i,ct,t)}function _g(t,i,l){if(i=hd(t,i,Tg)[0],t=Cs(Ua)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=Bl(i)}catch(w){throw w===Mr?hs:w}else c=i;i=_t();var h=i.queue,v=h.dispatch;return l!==i.memoizedState&&(Me.flags|=2048,Ur(9,{destroy:void 0},Bk.bind(null,h,l),null)),[c,v,t]}function Bk(t,i){t.action=i}function Og(t){var i=_t(),l=ct;if(l!==null)return _g(i,l,t);_t(),i=i.memoizedState,l=_t();var c=l.queue.dispatch;return l.memoizedState=t,[i,c,!1]}function Ur(t,i,l,c){return t={tag:t,create:l,deps:c,inst:i,next:null},i=Me.updateQueue,i===null&&(i=Ss(),Me.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,i.lastEffect=t),t}function Dg(){return _t().memoizedState}function Es(t,i,l,c){var h=fn();Me.flags|=t,h.memoizedState=Ur(1|i,{destroy:void 0},l,c===void 0?null:c)}function As(t,i,l,c){var h=_t();c=c===void 0?null:c;var v=h.memoizedState.inst;ct!==null&&c!==null&&sd(c,ct.memoizedState.deps)?h.memoizedState=Ur(i,v,l,c):(Me.flags|=t,h.memoizedState=Ur(1|i,v,l,c))}function Mg(t,i){Es(8390656,8,t,i)}function vd(t,i){As(2048,8,t,i)}function Hk(t){Me.flags|=4;var i=Me.updateQueue;if(i===null)i=Ss(),Me.updateQueue=i,i.events=[t];else{var l=i.events;l===null?i.events=[t]:l.push(t)}}function Lg(t){var i=_t().memoizedState;return Hk({ref:i,nextImpl:t}),function(){if((tt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function zg(t,i){return As(4,2,t,i)}function Ig(t,i){return As(4,4,t,i)}function Pg(t,i){if(typeof i=="function"){t=t();var l=i(t);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function Ug(t,i,l){l=l!=null?l.concat([t]):null,As(4,4,Pg.bind(null,i,t),l)}function xd(){}function Bg(t,i){var l=_t();i=i===void 0?null:i;var c=l.memoizedState;return i!==null&&sd(i,c[1])?c[0]:(l.memoizedState=[t,i],t)}function Hg(t,i){var l=_t();i=i===void 0?null:i;var c=l.memoizedState;if(i!==null&&sd(i,c[1]))return c[0];if(c=t(),Ji){Ve(!0);try{t()}finally{Ve(!1)}}return l.memoizedState=[c,i],c}function bd(t,i,l){return l===void 0||(Pa&1073741824)!==0&&(Fe&261930)===0?t.memoizedState=i:(t.memoizedState=l,t=$y(),Me.lanes|=t,gi|=t,l)}function $g(t,i,l,c){return Nn(l,i)?l:zr.current!==null?(t=bd(t,l,c),Nn(t,i)||(It=!0),t):(Pa&42)===0||(Pa&1073741824)!==0&&(Fe&261930)===0?(It=!0,t.memoizedState=l):(t=$y(),Me.lanes|=t,gi|=t,i)}function qg(t,i,l,c,h){var v=ee.p;ee.p=v!==0&&8>v?v:8;var w=H.T,A={};H.T=A,kd(t,!1,i,l);try{var z=h(),J=H.S;if(J!==null&&J(A,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var re=zk(z,c);Hl(t,i,re,Ln(t))}else Hl(t,i,c,Ln(t))}catch(ce){Hl(t,i,{then:function(){},status:"rejected",reason:ce},Ln())}finally{ee.p=v,w!==null&&A.types!==null&&(w.types=A.types),H.T=w}}function $k(){}function wd(t,i,l,c){if(t.tag!==5)throw Error(r(476));var h=Fg(t).queue;qg(t,h,i,ne,l===null?$k:function(){return Gg(t),l(c)})}function Fg(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:ne},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:l},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function Gg(t){var i=Fg(t);i.next===null&&(i=t.alternate.memoizedState),Hl(t,i.next.queue,{},Ln())}function Sd(){return en(io)}function Vg(){return _t().memoizedState}function Wg(){return _t().memoizedState}function qk(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var l=Ln();t=ui(l);var c=di(i,t,l);c!==null&&(En(c,i,l),zl(c,i,l)),i={cache:Xu()},t.payload=i;return}i=i.return}}function Fk(t,i,l){var c=Ln();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},js(t)?Kg(i,l):(l=Bu(t,i,l,c),l!==null&&(En(l,t,c),Qg(l,i,c)))}function Yg(t,i,l){var c=Ln();Hl(t,i,l,c)}function Hl(t,i,l,c){var h={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(js(t))Kg(i,h);else{var v=t.alternate;if(t.lanes===0&&(v===null||v.lanes===0)&&(v=i.lastRenderedReducer,v!==null))try{var w=i.lastRenderedState,A=v(w,l);if(h.hasEagerState=!0,h.eagerState=A,Nn(A,w))return os(t,i,h,0),ht===null&&ls(),!1}catch{}finally{}if(l=Bu(t,i,h,c),l!==null)return En(l,t,c),Qg(l,i,c),!0}return!1}function kd(t,i,l,c){if(c={lane:2,revertLane:tf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},js(t)){if(i)throw Error(r(479))}else i=Bu(t,l,c,2),i!==null&&En(i,t,2)}function js(t){var i=t.alternate;return t===Me||i!==null&&i===Me}function Kg(t,i){Ir=bs=!0;var l=t.pending;l===null?i.next=i:(i.next=l.next,l.next=i),t.pending=i}function Qg(t,i,l){if((l&4194048)!==0){var c=i.lanes;c&=t.pendingLanes,l|=c,i.lanes=l,se(t,l)}}var $l={readContext:en,use:ks,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};$l.useEffectEvent=jt;var Xg={readContext:en,use:ks,useCallback:function(t,i){return fn().memoizedState=[t,i===void 0?null:i],t},useContext:en,useEffect:Mg,useImperativeHandle:function(t,i,l){l=l!=null?l.concat([t]):null,Es(4194308,4,Pg.bind(null,i,t),l)},useLayoutEffect:function(t,i){return Es(4194308,4,t,i)},useInsertionEffect:function(t,i){Es(4,2,t,i)},useMemo:function(t,i){var l=fn();i=i===void 0?null:i;var c=t();if(Ji){Ve(!0);try{t()}finally{Ve(!1)}}return l.memoizedState=[c,i],c},useReducer:function(t,i,l){var c=fn();if(l!==void 0){var h=l(i);if(Ji){Ve(!0);try{l(i)}finally{Ve(!1)}}}else h=i;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=Fk.bind(null,Me,t),[c.memoizedState,t]},useRef:function(t){var i=fn();return t={current:t},i.memoizedState=t},useState:function(t){t=gd(t);var i=t.queue,l=Yg.bind(null,Me,i);return i.dispatch=l,[t.memoizedState,l]},useDebugValue:xd,useDeferredValue:function(t,i){var l=fn();return bd(l,t,i)},useTransition:function(){var t=gd(!1);return t=qg.bind(null,Me,t.queue,!0,!1),fn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,l){var c=Me,h=fn();if(We){if(l===void 0)throw Error(r(407));l=l()}else{if(l=i(),ht===null)throw Error(r(349));(Fe&127)!==0||vg(c,i,l)}h.memoizedState=l;var v={value:l,getSnapshot:i};return h.queue=v,Mg(bg.bind(null,c,v,t),[t]),c.flags|=2048,Ur(9,{destroy:void 0},xg.bind(null,c,v,l,i),null),l},useId:function(){var t=fn(),i=ht.identifierPrefix;if(We){var l=ya,c=ga;l=(c&~(1<<32-Se(c)-1)).toString(32)+l,i="_"+i+"R_"+l,l=ws++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=Ik++,i="_"+i+"r_"+l.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Sd,useFormState:Ng,useActionState:Ng,useOptimistic:function(t){var i=fn();i.memoizedState=i.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=kd.bind(null,Me,!0,l),l.dispatch=i,[t,i]},useMemoCache:pd,useCacheRefresh:function(){return fn().memoizedState=qk.bind(null,Me)},useEffectEvent:function(t){var i=fn(),l={impl:t};return i.memoizedState=l,function(){if((tt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Cd={readContext:en,use:ks,useCallback:Bg,useContext:en,useEffect:vd,useImperativeHandle:Ug,useInsertionEffect:zg,useLayoutEffect:Ig,useMemo:Hg,useReducer:Cs,useRef:Dg,useState:function(){return Cs(Ua)},useDebugValue:xd,useDeferredValue:function(t,i){var l=_t();return $g(l,ct.memoizedState,t,i)},useTransition:function(){var t=Cs(Ua)[0],i=_t().memoizedState;return[typeof t=="boolean"?t:Bl(t),i]},useSyncExternalStore:yg,useId:Vg,useHostTransitionStatus:Sd,useFormState:Rg,useActionState:Rg,useOptimistic:function(t,i){var l=_t();return kg(l,ct,t,i)},useMemoCache:pd,useCacheRefresh:Wg};Cd.useEffectEvent=Lg;var Zg={readContext:en,use:ks,useCallback:Bg,useContext:en,useEffect:vd,useImperativeHandle:Ug,useInsertionEffect:zg,useLayoutEffect:Ig,useMemo:Hg,useReducer:md,useRef:Dg,useState:function(){return md(Ua)},useDebugValue:xd,useDeferredValue:function(t,i){var l=_t();return ct===null?bd(l,t,i):$g(l,ct.memoizedState,t,i)},useTransition:function(){var t=md(Ua)[0],i=_t().memoizedState;return[typeof t=="boolean"?t:Bl(t),i]},useSyncExternalStore:yg,useId:Vg,useHostTransitionStatus:Sd,useFormState:Og,useActionState:Og,useOptimistic:function(t,i){var l=_t();return ct!==null?kg(l,ct,t,i):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:pd,useCacheRefresh:Wg};Zg.useEffectEvent=Lg;function Ed(t,i,l,c){i=t.memoizedState,l=l(c,i),l=l==null?i:g({},i,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var Ad={enqueueSetState:function(t,i,l){t=t._reactInternals;var c=Ln(),h=ui(c);h.payload=i,l!=null&&(h.callback=l),i=di(t,h,c),i!==null&&(En(i,t,c),zl(i,t,c))},enqueueReplaceState:function(t,i,l){t=t._reactInternals;var c=Ln(),h=ui(c);h.tag=1,h.payload=i,l!=null&&(h.callback=l),i=di(t,h,c),i!==null&&(En(i,t,c),zl(i,t,c))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var l=Ln(),c=ui(l);c.tag=2,i!=null&&(c.callback=i),i=di(t,c,l),i!==null&&(En(i,t,l),zl(i,t,l))}};function Jg(t,i,l,c,h,v,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,v,w):i.prototype&&i.prototype.isPureReactComponent?!Tl(l,c)||!Tl(h,v):!0}function ey(t,i,l,c){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,c),i.state!==t&&Ad.enqueueReplaceState(i,i.state,null)}function er(t,i){var l=i;if("ref"in i){l={};for(var c in i)c!=="ref"&&(l[c]=i[c])}if(t=t.defaultProps){l===i&&(l=g({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function ty(t){rs(t)}function ny(t){console.error(t)}function ay(t){rs(t)}function Ts(t,i){try{var l=t.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function iy(t,i,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function jd(t,i,l){return l=ui(l),l.tag=3,l.payload={element:null},l.callback=function(){Ts(t,i)},l}function ry(t){return t=ui(t),t.tag=3,t}function ly(t,i,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var v=c.value;t.payload=function(){return h(v)},t.callback=function(){iy(i,l,c)}}var w=l.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){iy(i,l,c),typeof h!="function"&&(yi===null?yi=new Set([this]):yi.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function Gk(t,i,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=l.alternate,i!==null&&_r(i,l,h,!0),l=_n.current,l!==null){switch(l.tag){case 31:case 13:return Zn===null?Bs():l.alternate===null&&Tt===0&&(Tt=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===ms?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([c]):i.add(c),Zd(t,c,h)),!1;case 22:return l.flags|=65536,c===ms?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([c]):l.add(c)),Zd(t,c,h)),!1}throw Error(r(435,l.tag))}return Zd(t,c,h),Bs(),!1}if(We)return i=_n.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=h,c!==Vu&&(t=Error(r(422),{cause:c}),_l(Yn(t,l)))):(c!==Vu&&(i=Error(r(423),{cause:c}),_l(Yn(i,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=Yn(c,l),h=jd(t.stateNode,c,h),ad(t,h),Tt!==4&&(Tt=2)),!1;var v=Error(r(520),{cause:c});if(v=Yn(v,l),Ql===null?Ql=[v]:Ql.push(v),Tt!==4&&(Tt=2),i===null)return!0;c=Yn(c,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=jd(l.stateNode,c,t),ad(l,t),!1;case 1:if(i=l.type,v=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(yi===null||!yi.has(v))))return l.flags|=65536,h&=-h,l.lanes|=h,h=ry(h),ly(h,t,l,c),ad(l,h),!1}l=l.return}while(l!==null);return!1}var Td=Error(r(461)),It=!1;function tn(t,i,l,c){i.child=t===null?ug(i,null,l,c):Zi(i,t.child,l,c)}function oy(t,i,l,c,h){l=l.render;var v=i.ref;if("ref"in c){var w={};for(var A in c)A!=="ref"&&(w[A]=c[A])}else w=c;return Yi(i),c=cd(t,i,l,w,v,h),A=ud(),t!==null&&!It?(dd(t,i,h),Ba(t,i,h)):(We&&A&&Fu(i),i.flags|=1,tn(t,i,c,h),i.child)}function sy(t,i,l,c,h){if(t===null){var v=l.type;return typeof v=="function"&&!Hu(v)&&v.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=v,cy(t,i,v,c,h)):(t=cs(l.type,null,c,i,i.mode,h),t.ref=i.ref,t.return=i,i.child=t)}if(v=t.child,!zd(t,h)){var w=v.memoizedProps;if(l=l.compare,l=l!==null?l:Tl,l(w,c)&&t.ref===i.ref)return Ba(t,i,h)}return i.flags|=1,t=Ma(v,c),t.ref=i.ref,t.return=i,i.child=t}function cy(t,i,l,c,h){if(t!==null){var v=t.memoizedProps;if(Tl(v,c)&&t.ref===i.ref)if(It=!1,i.pendingProps=c=v,zd(t,h))(t.flags&131072)!==0&&(It=!0);else return i.lanes=t.lanes,Ba(t,i,h)}return Nd(t,i,l,c,h)}function uy(t,i,l,c){var h=c.children,v=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(v=v!==null?v.baseLanes|l:l,t!==null){for(c=i.child=t.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~v}else c=0,i.child=null;return dy(t,i,v,l,c)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&ps(i,v!==null?v.cachePool:null),v!==null?pg(i,v):rd(),hg(i);else return c=i.lanes=536870912,dy(t,i,v!==null?v.baseLanes|l:l,l,c)}else v!==null?(ps(i,v.cachePool),pg(i,v),pi(),i.memoizedState=null):(t!==null&&ps(i,null),rd(),pi());return tn(t,i,h,l),i.child}function ql(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function dy(t,i,l,c,h){var v=Ju();return v=v===null?null:{parent:Lt._currentValue,pool:v},i.memoizedState={baseLanes:l,cachePool:v},t!==null&&ps(i,null),rd(),hg(i),t!==null&&_r(t,i,c,!0),i.childLanes=h,null}function Ns(t,i){return i=_s({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function fy(t,i,l){return Zi(i,t.child,null,l),t=Ns(i,i.pendingProps),t.flags|=2,On(i),i.memoizedState=null,t}function Vk(t,i,l){var c=i.pendingProps,h=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(We){if(c.mode==="hidden")return t=Ns(i,c),i.lanes=536870912,ql(null,t);if(od(i),(t=wt)?(t=Cv(t,Xn),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:ri!==null?{id:ga,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},l=Km(t),l.return=i,i.child=l,Jt=i,wt=null)):t=null,t===null)throw oi(i);return i.lanes=536870912,null}return Ns(i,c)}var v=t.memoizedState;if(v!==null){var w=v.dehydrated;if(od(i),h)if(i.flags&256)i.flags&=-257,i=fy(t,i,l);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(r(558));else if(It||_r(t,i,l,!1),h=(l&t.childLanes)!==0,It||h){if(c=ht,c!==null&&(w=ve(c,l),w!==0&&w!==v.retryLane))throw v.retryLane=w,Fi(t,w),En(c,t,w),Td;Bs(),i=fy(t,i,l)}else t=v.treeContext,wt=Jn(w.nextSibling),Jt=i,We=!0,li=null,Xn=!1,t!==null&&Zm(i,t),i=Ns(i,c),i.flags|=4096;return i}return t=Ma(t.child,{mode:c.mode,children:c.children}),t.ref=i.ref,i.child=t,t.return=i,t}function Rs(t,i){var l=i.ref;if(l===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(i.flags|=4194816)}}function Nd(t,i,l,c,h){return Yi(i),l=cd(t,i,l,c,void 0,h),c=ud(),t!==null&&!It?(dd(t,i,h),Ba(t,i,h)):(We&&c&&Fu(i),i.flags|=1,tn(t,i,l,h),i.child)}function py(t,i,l,c,h,v){return Yi(i),i.updateQueue=null,l=gg(i,c,l,h),mg(t),c=ud(),t!==null&&!It?(dd(t,i,v),Ba(t,i,v)):(We&&c&&Fu(i),i.flags|=1,tn(t,i,l,v),i.child)}function hy(t,i,l,c,h){if(Yi(i),i.stateNode===null){var v=jr,w=l.contextType;typeof w=="object"&&w!==null&&(v=en(w)),v=new l(c,v),i.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=Ad,i.stateNode=v,v._reactInternals=i,v=i.stateNode,v.props=c,v.state=i.memoizedState,v.refs={},td(i),w=l.contextType,v.context=typeof w=="object"&&w!==null?en(w):jr,v.state=i.memoizedState,w=l.getDerivedStateFromProps,typeof w=="function"&&(Ed(i,l,w,c),v.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(w=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),w!==v.state&&Ad.enqueueReplaceState(v,v.state,null),Pl(i,c,v,h),Il(),v.state=i.memoizedState),typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(t===null){v=i.stateNode;var A=i.memoizedProps,z=er(l,A);v.props=z;var J=v.context,re=l.contextType;w=jr,typeof re=="object"&&re!==null&&(w=en(re));var ce=l.getDerivedStateFromProps;re=typeof ce=="function"||typeof v.getSnapshotBeforeUpdate=="function",A=i.pendingProps!==A,re||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(A||J!==w)&&ey(i,v,c,w),ci=!1;var te=i.memoizedState;v.state=te,Pl(i,c,v,h),Il(),J=i.memoizedState,A||te!==J||ci?(typeof ce=="function"&&(Ed(i,l,ce,c),J=i.memoizedState),(z=ci||Jg(i,l,z,c,te,J,w))?(re||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(i.flags|=4194308)):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=J),v.props=c,v.state=J,v.context=w,c=z):(typeof v.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{v=i.stateNode,nd(t,i),w=i.memoizedProps,re=er(l,w),v.props=re,ce=i.pendingProps,te=v.context,J=l.contextType,z=jr,typeof J=="object"&&J!==null&&(z=en(J)),A=l.getDerivedStateFromProps,(J=typeof A=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(w!==ce||te!==z)&&ey(i,v,c,z),ci=!1,te=i.memoizedState,v.state=te,Pl(i,c,v,h),Il();var ae=i.memoizedState;w!==ce||te!==ae||ci||t!==null&&t.dependencies!==null&&ds(t.dependencies)?(typeof A=="function"&&(Ed(i,l,A,c),ae=i.memoizedState),(re=ci||Jg(i,l,re,c,te,ae,z)||t!==null&&t.dependencies!==null&&ds(t.dependencies))?(J||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(c,ae,z),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(c,ae,z)),typeof v.componentDidUpdate=="function"&&(i.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof v.componentDidUpdate!="function"||w===t.memoizedProps&&te===t.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&te===t.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ae),v.props=c,v.state=ae,v.context=z,c=re):(typeof v.componentDidUpdate!="function"||w===t.memoizedProps&&te===t.memoizedState||(i.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&te===t.memoizedState||(i.flags|=1024),c=!1)}return v=c,Rs(t,i),c=(i.flags&128)!==0,v||c?(v=i.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:v.render(),i.flags|=1,t!==null&&c?(i.child=Zi(i,t.child,null,h),i.child=Zi(i,null,l,h)):tn(t,i,l,h),i.memoizedState=v.state,t=i.child):t=Ba(t,i,h),t}function my(t,i,l,c){return Vi(),i.flags|=256,tn(t,i,l,c),i.child}var Rd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _d(t){return{baseLanes:t,cachePool:ig()}}function Od(t,i,l){return t=t!==null?t.childLanes&~l:0,i&&(t|=Mn),t}function gy(t,i,l){var c=i.pendingProps,h=!1,v=(i.flags&128)!==0,w;if((w=v)||(w=t!==null&&t.memoizedState===null?!1:(Rt.current&2)!==0),w&&(h=!0,i.flags&=-129),w=(i.flags&32)!==0,i.flags&=-33,t===null){if(We){if(h?fi(i):pi(),(t=wt)?(t=Cv(t,Xn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:ri!==null?{id:ga,overflow:ya}:null,retryLane:536870912,hydrationErrors:null},l=Km(t),l.return=i,i.child=l,Jt=i,wt=null)):t=null,t===null)throw oi(i);return mf(t)?i.lanes=32:i.lanes=536870912,null}var A=c.children;return c=c.fallback,h?(pi(),h=i.mode,A=_s({mode:"hidden",children:A},h),c=Gi(c,h,l,null),A.return=i,c.return=i,A.sibling=c,i.child=A,c=i.child,c.memoizedState=_d(l),c.childLanes=Od(t,w,l),i.memoizedState=Rd,ql(null,c)):(fi(i),Dd(i,A))}var z=t.memoizedState;if(z!==null&&(A=z.dehydrated,A!==null)){if(v)i.flags&256?(fi(i),i.flags&=-257,i=Md(t,i,l)):i.memoizedState!==null?(pi(),i.child=t.child,i.flags|=128,i=null):(pi(),A=c.fallback,h=i.mode,c=_s({mode:"visible",children:c.children},h),A=Gi(A,h,l,null),A.flags|=2,c.return=i,A.return=i,c.sibling=A,i.child=c,Zi(i,t.child,null,l),c=i.child,c.memoizedState=_d(l),c.childLanes=Od(t,w,l),i.memoizedState=Rd,i=ql(null,c));else if(fi(i),mf(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var J=w.dgst;w=J,c=Error(r(419)),c.stack="",c.digest=w,_l({value:c,source:null,stack:null}),i=Md(t,i,l)}else if(It||_r(t,i,l,!1),w=(l&t.childLanes)!==0,It||w){if(w=ht,w!==null&&(c=ve(w,l),c!==0&&c!==z.retryLane))throw z.retryLane=c,Fi(t,c),En(w,t,c),Td;hf(A)||Bs(),i=Md(t,i,l)}else hf(A)?(i.flags|=192,i.child=t.child,i=null):(t=z.treeContext,wt=Jn(A.nextSibling),Jt=i,We=!0,li=null,Xn=!1,t!==null&&Zm(i,t),i=Dd(i,c.children),i.flags|=4096);return i}return h?(pi(),A=c.fallback,h=i.mode,z=t.child,J=z.sibling,c=Ma(z,{mode:"hidden",children:c.children}),c.subtreeFlags=z.subtreeFlags&65011712,J!==null?A=Ma(J,A):(A=Gi(A,h,l,null),A.flags|=2),A.return=i,c.return=i,c.sibling=A,i.child=c,ql(null,c),c=i.child,A=t.child.memoizedState,A===null?A=_d(l):(h=A.cachePool,h!==null?(z=Lt._currentValue,h=h.parent!==z?{parent:z,pool:z}:h):h=ig(),A={baseLanes:A.baseLanes|l,cachePool:h}),c.memoizedState=A,c.childLanes=Od(t,w,l),i.memoizedState=Rd,ql(t.child,c)):(fi(i),l=t.child,t=l.sibling,l=Ma(l,{mode:"visible",children:c.children}),l.return=i,l.sibling=null,t!==null&&(w=i.deletions,w===null?(i.deletions=[t],i.flags|=16):w.push(t)),i.child=l,i.memoizedState=null,l)}function Dd(t,i){return i=_s({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function _s(t,i){return t=Rn(22,t,null,i),t.lanes=0,t}function Md(t,i,l){return Zi(i,t.child,null,l),t=Dd(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function yy(t,i,l){t.lanes|=i;var c=t.alternate;c!==null&&(c.lanes|=i),Ku(t.return,i,l)}function Ld(t,i,l,c,h,v){var w=t.memoizedState;w===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h,treeForkCount:v}:(w.isBackwards=i,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=l,w.tailMode=h,w.treeForkCount=v)}function vy(t,i,l){var c=i.pendingProps,h=c.revealOrder,v=c.tail;c=c.children;var w=Rt.current,A=(w&2)!==0;if(A?(w=w&1|2,i.flags|=128):w&=1,N(Rt,w),tn(t,i,c,l),c=We?Rl:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&yy(t,l,i);else if(t.tag===19)yy(t,l,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=i.child,h=null;l!==null;)t=l.alternate,t!==null&&xs(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=i.child,i.child=null):(h=l.sibling,l.sibling=null),Ld(i,!1,h,l,v,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=i.child,i.child=null;h!==null;){if(t=h.alternate,t!==null&&xs(t)===null){i.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}Ld(i,!0,l,null,v,c);break;case"together":Ld(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Ba(t,i,l){if(t!==null&&(i.dependencies=t.dependencies),gi|=i.lanes,(l&i.childLanes)===0)if(t!==null){if(_r(t,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(r(153));if(i.child!==null){for(t=i.child,l=Ma(t,t.pendingProps),i.child=l,l.return=i;t.sibling!==null;)t=t.sibling,l=l.sibling=Ma(t,t.pendingProps),l.return=i;l.sibling=null}return i.child}function zd(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&ds(t)))}function Wk(t,i,l){switch(i.tag){case 3:Ue(i,i.stateNode.containerInfo),si(i,Lt,t.memoizedState.cache),Vi();break;case 27:case 5:et(i);break;case 4:Ue(i,i.stateNode.containerInfo);break;case 10:si(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,od(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(fi(i),i.flags|=128,null):(l&i.child.childLanes)!==0?gy(t,i,l):(fi(i),t=Ba(t,i,l),t!==null?t.sibling:null);fi(i);break;case 19:var h=(t.flags&128)!==0;if(c=(l&i.childLanes)!==0,c||(_r(t,i,l,!1),c=(l&i.childLanes)!==0),h){if(c)return vy(t,i,l);i.flags|=128}if(h=i.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),N(Rt,Rt.current),c)break;return null;case 22:return i.lanes=0,uy(t,i,l,i.pendingProps);case 24:si(i,Lt,t.memoizedState.cache)}return Ba(t,i,l)}function xy(t,i,l){if(t!==null)if(t.memoizedProps!==i.pendingProps)It=!0;else{if(!zd(t,l)&&(i.flags&128)===0)return It=!1,Wk(t,i,l);It=(t.flags&131072)!==0}else It=!1,We&&(i.flags&1048576)!==0&&Xm(i,Rl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(t=Qi(i.elementType),i.type=t,typeof t=="function")Hu(t)?(c=er(t,c),i.tag=1,i=hy(null,i,t,c,l)):(i.tag=0,i=Nd(null,i,t,c,l));else{if(t!=null){var h=t.$$typeof;if(h===F){i.tag=11,i=oy(null,i,t,c,l);break e}else if(h===W){i.tag=14,i=sy(null,i,t,c,l);break e}}throw i=B(t)||t,Error(r(306,i,""))}}return i;case 0:return Nd(t,i,i.type,i.pendingProps,l);case 1:return c=i.type,h=er(c,i.pendingProps),hy(t,i,c,h,l);case 3:e:{if(Ue(i,i.stateNode.containerInfo),t===null)throw Error(r(387));c=i.pendingProps;var v=i.memoizedState;h=v.element,nd(t,i),Pl(i,c,null,l);var w=i.memoizedState;if(c=w.cache,si(i,Lt,c),c!==v.cache&&Qu(i,[Lt],l,!0),Il(),c=w.element,v.isDehydrated)if(v={element:c,isDehydrated:!1,cache:w.cache},i.updateQueue.baseState=v,i.memoizedState=v,i.flags&256){i=my(t,i,c,l);break e}else if(c!==h){h=Yn(Error(r(424)),i),_l(h),i=my(t,i,c,l);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(wt=Jn(t.firstChild),Jt=i,We=!0,li=null,Xn=!0,l=ug(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Vi(),c===h){i=Ba(t,i,l);break e}tn(t,i,c,l)}i=i.child}return i;case 26:return Rs(t,i),t===null?(l=Rv(i.type,null,i.pendingProps,null))?i.memoizedState=l:We||(l=i.type,t=i.pendingProps,c=Ws(he.current).createElement(l),c[we]=i,c[_e]=t,nn(c,l,t),At(c),i.stateNode=c):i.memoizedState=Rv(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return et(i),t===null&&We&&(c=i.stateNode=jv(i.type,i.pendingProps,he.current),Jt=i,Xn=!0,h=wt,wi(i.type)?(gf=h,wt=Jn(c.firstChild)):wt=h),tn(t,i,i.pendingProps.children,l),Rs(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&We&&((h=c=wt)&&(c=k2(c,i.type,i.pendingProps,Xn),c!==null?(i.stateNode=c,Jt=i,wt=Jn(c.firstChild),Xn=!1,h=!0):h=!1),h||oi(i)),et(i),h=i.type,v=i.pendingProps,w=t!==null?t.memoizedProps:null,c=v.children,df(h,v)?c=null:w!==null&&df(h,w)&&(i.flags|=32),i.memoizedState!==null&&(h=cd(t,i,Pk,null,null,l),io._currentValue=h),Rs(t,i),tn(t,i,c,l),i.child;case 6:return t===null&&We&&((t=l=wt)&&(l=C2(l,i.pendingProps,Xn),l!==null?(i.stateNode=l,Jt=i,wt=null,t=!0):t=!1),t||oi(i)),null;case 13:return gy(t,i,l);case 4:return Ue(i,i.stateNode.containerInfo),c=i.pendingProps,t===null?i.child=Zi(i,null,c,l):tn(t,i,c,l),i.child;case 11:return oy(t,i,i.type,i.pendingProps,l);case 7:return tn(t,i,i.pendingProps,l),i.child;case 8:return tn(t,i,i.pendingProps.children,l),i.child;case 12:return tn(t,i,i.pendingProps.children,l),i.child;case 10:return c=i.pendingProps,si(i,i.type,c.value),tn(t,i,c.children,l),i.child;case 9:return h=i.type._context,c=i.pendingProps.children,Yi(i),h=en(h),c=c(h),i.flags|=1,tn(t,i,c,l),i.child;case 14:return sy(t,i,i.type,i.pendingProps,l);case 15:return cy(t,i,i.type,i.pendingProps,l);case 19:return vy(t,i,l);case 31:return Vk(t,i,l);case 22:return uy(t,i,l,i.pendingProps);case 24:return Yi(i),c=en(Lt),t===null?(h=Ju(),h===null&&(h=ht,v=Xu(),h.pooledCache=v,v.refCount++,v!==null&&(h.pooledCacheLanes|=l),h=v),i.memoizedState={parent:c,cache:h},td(i),si(i,Lt,h)):((t.lanes&l)!==0&&(nd(t,i),Pl(i,null,null,l),Il()),h=t.memoizedState,v=i.memoizedState,h.parent!==c?(h={parent:c,cache:c},i.memoizedState=h,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=h),si(i,Lt,c)):(c=v.cache,si(i,Lt,c),c!==h.cache&&Qu(i,[Lt],l,!0))),tn(t,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Ha(t){t.flags|=4}function Id(t,i,l,c,h){if((i=(t.mode&32)!==0)&&(i=!1),i){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(Vy())t.flags|=8192;else throw Xi=ms,ed}else t.flags&=-16777217}function by(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Lv(i))if(Vy())t.flags|=8192;else throw Xi=ms,ed}function Os(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?Wo():536870912,t.lanes|=i,qr|=i)}function Fl(t,i){if(!We)switch(t.tailMode){case"hidden":i=t.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function St(t){var i=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(i)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,i}function Yk(t,i,l){var c=i.pendingProps;switch(Gu(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(i),null;case 1:return St(i),null;case 3:return l=i.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Ia(Lt),Ne(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Rr(i)?Ha(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Wu())),St(i),null;case 26:var h=i.type,v=i.memoizedState;return t===null?(Ha(i),v!==null?(St(i),by(i,v)):(St(i),Id(i,h,null,c,l))):v?v!==t.memoizedState?(Ha(i),St(i),by(i,v)):(St(i),i.flags&=-16777217):(t=t.memoizedProps,t!==c&&Ha(i),St(i),Id(i,h,t,c,l)),null;case 27:if(Ot(i),l=he.current,h=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&Ha(i);else{if(!c){if(i.stateNode===null)throw Error(r(166));return St(i),null}t=ue.current,Rr(i)?Jm(i):(t=jv(h,c,l),i.stateNode=t,Ha(i))}return St(i),null;case 5:if(Ot(i),h=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==c&&Ha(i);else{if(!c){if(i.stateNode===null)throw Error(r(166));return St(i),null}if(v=ue.current,Rr(i))Jm(i);else{var w=Ws(he.current);switch(v){case 1:v=w.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:v=w.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":v=w.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":v=w.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":v=w.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?v.multiple=!0:c.size&&(v.size=c.size);break;default:v=typeof c.is=="string"?w.createElement(h,{is:c.is}):w.createElement(h)}}v[we]=i,v[_e]=c;e:for(w=i.child;w!==null;){if(w.tag===5||w.tag===6)v.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===i)break e;for(;w.sibling===null;){if(w.return===null||w.return===i)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}i.stateNode=v;e:switch(nn(v,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ha(i)}}return St(i),Id(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,l),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==c&&Ha(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(r(166));if(t=he.current,Rr(i)){if(t=i.stateNode,l=i.memoizedProps,c=null,h=Jt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[we]=i,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||gv(t.nodeValue,l)),t||oi(i,!0)}else t=Ws(t).createTextNode(c),t[we]=i,i.stateNode=t}return St(i),null;case 31:if(l=i.memoizedState,t===null||t.memoizedState!==null){if(c=Rr(i),l!==null){if(t===null){if(!c)throw Error(r(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[we]=i}else Vi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;St(i),t=!1}else l=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return i.flags&256?(On(i),i):(On(i),null);if((i.flags&128)!==0)throw Error(r(558))}return St(i),null;case 13:if(c=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=Rr(i),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=i.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[we]=i}else Vi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;St(i),h=!1}else h=Wu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return i.flags&256?(On(i),i):(On(i),null)}return On(i),(i.flags&128)!==0?(i.lanes=l,i):(l=c!==null,t=t!==null&&t.memoizedState!==null,l&&(c=i.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==h&&(c.flags|=2048)),l!==t&&l&&(i.child.flags|=8192),Os(i,i.updateQueue),St(i),null);case 4:return Ne(),t===null&&lf(i.stateNode.containerInfo),St(i),null;case 10:return Ia(i.type),St(i),null;case 19:if(X(Rt),c=i.memoizedState,c===null)return St(i),null;if(h=(i.flags&128)!==0,v=c.rendering,v===null)if(h)Fl(c,!1);else{if(Tt!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(v=xs(t),v!==null){for(i.flags|=128,Fl(c,!1),t=v.updateQueue,i.updateQueue=t,Os(i,t),i.subtreeFlags=0,t=l,l=i.child;l!==null;)Ym(l,t),l=l.sibling;return N(Rt,Rt.current&1|2),We&&La(i,c.treeForkCount),i.child}t=t.sibling}c.tail!==null&&it()>Is&&(i.flags|=128,h=!0,Fl(c,!1),i.lanes=4194304)}else{if(!h)if(t=xs(v),t!==null){if(i.flags|=128,h=!0,t=t.updateQueue,i.updateQueue=t,Os(i,t),Fl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!v.alternate&&!We)return St(i),null}else 2*it()-c.renderingStartTime>Is&&l!==536870912&&(i.flags|=128,h=!0,Fl(c,!1),i.lanes=4194304);c.isBackwards?(v.sibling=i.child,i.child=v):(t=c.last,t!==null?t.sibling=v:i.child=v,c.last=v)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=it(),t.sibling=null,l=Rt.current,N(Rt,h?l&1|2:l&1),We&&La(i,c.treeForkCount),t):(St(i),null);case 22:case 23:return On(i),ld(),c=i.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(l&536870912)!==0&&(i.flags&128)===0&&(St(i),i.subtreeFlags&6&&(i.flags|=8192)):St(i),l=i.updateQueue,l!==null&&Os(i,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==l&&(i.flags|=2048),t!==null&&X(Ki),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Ia(Lt),St(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function Kk(t,i){switch(Gu(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return Ia(Lt),Ne(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return Ot(i),null;case 31:if(i.memoizedState!==null){if(On(i),i.alternate===null)throw Error(r(340));Vi()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(On(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(r(340));Vi()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return X(Rt),null;case 4:return Ne(),null;case 10:return Ia(i.type),null;case 22:case 23:return On(i),ld(),t!==null&&X(Ki),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return Ia(Lt),null;case 25:return null;default:return null}}function wy(t,i){switch(Gu(i),i.tag){case 3:Ia(Lt),Ne();break;case 26:case 27:case 5:Ot(i);break;case 4:Ne();break;case 31:i.memoizedState!==null&&On(i);break;case 13:On(i);break;case 19:X(Rt);break;case 10:Ia(i.type);break;case 22:case 23:On(i),ld(),t!==null&&X(Ki);break;case 24:Ia(Lt)}}function Gl(t,i){try{var l=i.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var v=l.create,w=l.inst;c=v(),w.destroy=c}l=l.next}while(l!==h)}}catch(A){st(i,i.return,A)}}function hi(t,i,l){try{var c=i.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var v=h.next;c=v;do{if((c.tag&t)===t){var w=c.inst,A=w.destroy;if(A!==void 0){w.destroy=void 0,h=i;var z=l,J=A;try{J()}catch(re){st(h,z,re)}}}c=c.next}while(c!==v)}}catch(re){st(i,i.return,re)}}function Sy(t){var i=t.updateQueue;if(i!==null){var l=t.stateNode;try{fg(i,l)}catch(c){st(t,t.return,c)}}}function ky(t,i,l){l.props=er(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){st(t,i,c)}}function Vl(t,i){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(h){st(t,i,h)}}function va(t,i){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){st(t,i,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){st(t,i,h)}else l.current=null}function Cy(t){var i=t.type,l=t.memoizedProps,c=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){st(t,t.return,h)}}function Pd(t,i,l){try{var c=t.stateNode;y2(c,t.type,l,i),c[_e]=i}catch(h){st(t,t.return,h)}}function Ey(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&wi(t.type)||t.tag===4}function Ud(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ey(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&wi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Bd(t,i,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(t),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Oa));else if(c!==4&&(c===27&&wi(t.type)&&(l=t.stateNode,i=null),t=t.child,t!==null))for(Bd(t,i,l),t=t.sibling;t!==null;)Bd(t,i,l),t=t.sibling}function Ds(t,i,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,i?l.insertBefore(t,i):l.appendChild(t);else if(c!==4&&(c===27&&wi(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Ds(t,i,l),t=t.sibling;t!==null;)Ds(t,i,l),t=t.sibling}function Ay(t){var i=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=i.attributes;h.length;)i.removeAttributeNode(h[0]);nn(i,c,l),i[we]=t,i[_e]=l}catch(v){st(t,t.return,v)}}var $a=!1,Pt=!1,Hd=!1,jy=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function Qk(t,i){if(t=t.containerInfo,cf=ec,t=Um(t),Mu(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,v=c.focusNode;c=c.focusOffset;try{l.nodeType,v.nodeType}catch{l=null;break e}var w=0,A=-1,z=-1,J=0,re=0,ce=t,te=null;t:for(;;){for(var ae;ce!==l||h!==0&&ce.nodeType!==3||(A=w+h),ce!==v||c!==0&&ce.nodeType!==3||(z=w+c),ce.nodeType===3&&(w+=ce.nodeValue.length),(ae=ce.firstChild)!==null;)te=ce,ce=ae;for(;;){if(ce===t)break t;if(te===l&&++J===h&&(A=w),te===v&&++re===c&&(z=w),(ae=ce.nextSibling)!==null)break;ce=te,te=ce.parentNode}ce=ae}l=A===-1||z===-1?null:{start:A,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(uf={focusedElem:t,selectionRange:l},ec=!1,Yt=i;Yt!==null;)if(i=Yt,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,Yt=t;else for(;Yt!==null;){switch(i=Yt,v=i.alternate,t=i.flags,i.tag){case 0:if((t&4)!==0&&(t=i.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&v!==null){t=void 0,l=i,h=v.memoizedProps,v=v.memoizedState,c=l.stateNode;try{var xe=er(l.type,h);t=c.getSnapshotBeforeUpdate(xe,v),c.__reactInternalSnapshotBeforeUpdate=t}catch(je){st(l,l.return,je)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,l=t.nodeType,l===9)pf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":pf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=i.sibling,t!==null){t.return=i.return,Yt=t;break}Yt=i.return}}function Ty(t,i,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Fa(t,l),c&4&&Gl(5,l);break;case 1:if(Fa(t,l),c&4)if(t=l.stateNode,i===null)try{t.componentDidMount()}catch(w){st(l,l.return,w)}else{var h=er(l.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(h,i,t.__reactInternalSnapshotBeforeUpdate)}catch(w){st(l,l.return,w)}}c&64&&Sy(l),c&512&&Vl(l,l.return);break;case 3:if(Fa(t,l),c&64&&(t=l.updateQueue,t!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{fg(t,i)}catch(w){st(l,l.return,w)}}break;case 27:i===null&&c&4&&Ay(l);case 26:case 5:Fa(t,l),i===null&&c&4&&Cy(l),c&512&&Vl(l,l.return);break;case 12:Fa(t,l);break;case 31:Fa(t,l),c&4&&_y(t,l);break;case 13:Fa(t,l),c&4&&Oy(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=r2.bind(null,l),E2(t,l))));break;case 22:if(c=l.memoizedState!==null||$a,!c){i=i!==null&&i.memoizedState!==null||Pt,h=$a;var v=Pt;$a=c,(Pt=i)&&!v?Ga(t,l,(l.subtreeFlags&8772)!==0):Fa(t,l),$a=h,Pt=v}break;case 30:break;default:Fa(t,l)}}function Ny(t){var i=t.alternate;i!==null&&(t.alternate=null,Ny(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&vr(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Ct=null,wn=!1;function qa(t,i,l){for(l=l.child;l!==null;)Ry(t,i,l),l=l.sibling}function Ry(t,i,l){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(Ie,l)}catch{}switch(l.tag){case 26:Pt||va(l,i),qa(t,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Pt||va(l,i);var c=Ct,h=wn;wi(l.type)&&(Ct=l.stateNode,wn=!1),qa(t,i,l),to(l.stateNode),Ct=c,wn=h;break;case 5:Pt||va(l,i);case 6:if(c=Ct,h=wn,Ct=null,qa(t,i,l),Ct=c,wn=h,Ct!==null)if(wn)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(l.stateNode)}catch(v){st(l,i,v)}else try{Ct.removeChild(l.stateNode)}catch(v){st(l,i,v)}break;case 18:Ct!==null&&(wn?(t=Ct,Sv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Xr(t)):Sv(Ct,l.stateNode));break;case 4:c=Ct,h=wn,Ct=l.stateNode.containerInfo,wn=!0,qa(t,i,l),Ct=c,wn=h;break;case 0:case 11:case 14:case 15:hi(2,l,i),Pt||hi(4,l,i),qa(t,i,l);break;case 1:Pt||(va(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"&&ky(l,i,c)),qa(t,i,l);break;case 21:qa(t,i,l);break;case 22:Pt=(c=Pt)||l.memoizedState!==null,qa(t,i,l),Pt=c;break;default:qa(t,i,l)}}function _y(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Xr(t)}catch(l){st(i,i.return,l)}}}function Oy(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Xr(t)}catch(l){st(i,i.return,l)}}function Xk(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new jy),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new jy),i;default:throw Error(r(435,t.tag))}}function Ms(t,i){var l=Xk(t);i.forEach(function(c){if(!l.has(c)){l.add(c);var h=l2.bind(null,t,c);c.then(h,h)}})}function Sn(t,i){var l=i.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],v=t,w=i,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(wi(A.type)){Ct=A.stateNode,wn=!1;break e}break;case 5:Ct=A.stateNode,wn=!1;break e;case 3:case 4:Ct=A.stateNode.containerInfo,wn=!0;break e}A=A.return}if(Ct===null)throw Error(r(160));Ry(v,w,h),Ct=null,wn=!1,v=h.alternate,v!==null&&(v.return=null),h.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Dy(i,t),i=i.sibling}var oa=null;function Dy(t,i){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Sn(i,t),kn(t),c&4&&(hi(3,t,t.return),Gl(3,t),hi(5,t,t.return));break;case 1:Sn(i,t),kn(t),c&512&&(Pt||l===null||va(l,l.return)),c&64&&$a&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=oa;if(Sn(i,t),kn(t),c&512&&(Pt||l===null||va(l,l.return)),c&4){var v=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){e:{c=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":v=h.getElementsByTagName("title")[0],(!v||v[ha]||v[we]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=h.createElement(c),h.head.insertBefore(v,h.querySelector("head > title"))),nn(v,c,l),v[we]=t,At(v),c=v;break e;case"link":var w=Dv("link","href",h).get(c+(l.href||""));if(w){for(var A=0;A<w.length;A++)if(v=w[A],v.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&v.getAttribute("rel")===(l.rel==null?null:l.rel)&&v.getAttribute("title")===(l.title==null?null:l.title)&&v.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){w.splice(A,1);break t}}v=h.createElement(c),nn(v,c,l),h.head.appendChild(v);break;case"meta":if(w=Dv("meta","content",h).get(c+(l.content||""))){for(A=0;A<w.length;A++)if(v=w[A],v.getAttribute("content")===(l.content==null?null:""+l.content)&&v.getAttribute("name")===(l.name==null?null:l.name)&&v.getAttribute("property")===(l.property==null?null:l.property)&&v.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&v.getAttribute("charset")===(l.charSet==null?null:l.charSet)){w.splice(A,1);break t}}v=h.createElement(c),nn(v,c,l),h.head.appendChild(v);break;default:throw Error(r(468,c))}v[we]=t,At(v),c=v}t.stateNode=c}else Mv(h,t.type,t.stateNode);else t.stateNode=Ov(h,c,t.memoizedProps);else v!==c?(v===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):v.count--,c===null?Mv(h,t.type,t.stateNode):Ov(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Pd(t,t.memoizedProps,l.memoizedProps)}break;case 27:Sn(i,t),kn(t),c&512&&(Pt||l===null||va(l,l.return)),l!==null&&c&4&&Pd(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Sn(i,t),kn(t),c&512&&(Pt||l===null||va(l,l.return)),t.flags&32){h=t.stateNode;try{br(h,"")}catch(xe){st(t,t.return,xe)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,Pd(t,h,l!==null?l.memoizedProps:h)),c&1024&&(Hd=!0);break;case 6:if(Sn(i,t),kn(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(xe){st(t,t.return,xe)}}break;case 3:if(Qs=null,h=oa,oa=Ys(i.containerInfo),Sn(i,t),oa=h,kn(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{Xr(i.containerInfo)}catch(xe){st(t,t.return,xe)}Hd&&(Hd=!1,My(t));break;case 4:c=oa,oa=Ys(t.stateNode.containerInfo),Sn(i,t),kn(t),oa=c;break;case 12:Sn(i,t),kn(t);break;case 31:Sn(i,t),kn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ms(t,c)));break;case 13:Sn(i,t),kn(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(zs=it()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ms(t,c)));break;case 22:h=t.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,J=$a,re=Pt;if($a=J||h,Pt=re||z,Sn(i,t),Pt=re,$a=J,kn(t),c&8192)e:for(i=t.stateNode,i._visibility=h?i._visibility&-2:i._visibility|1,h&&(l===null||z||$a||Pt||tr(t)),l=null,i=t;;){if(i.tag===5||i.tag===26){if(l===null){z=l=i;try{if(v=z.stateNode,h)w=v.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{A=z.stateNode;var ce=z.memoizedProps.style,te=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;A.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(xe){st(z,z.return,xe)}}}else if(i.tag===6){if(l===null){z=i;try{z.stateNode.nodeValue=h?"":z.memoizedProps}catch(xe){st(z,z.return,xe)}}}else if(i.tag===18){if(l===null){z=i;try{var ae=z.stateNode;h?kv(ae,!0):kv(z.stateNode,!1)}catch(xe){st(z,z.return,xe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,Ms(t,l))));break;case 19:Sn(i,t),kn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Ms(t,c)));break;case 30:break;case 21:break;default:Sn(i,t),kn(t)}}function kn(t){var i=t.flags;if(i&2){try{for(var l,c=t.return;c!==null;){if(Ey(c)){l=c;break}c=c.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var h=l.stateNode,v=Ud(t);Ds(t,v,h);break;case 5:var w=l.stateNode;l.flags&32&&(br(w,""),l.flags&=-33);var A=Ud(t);Ds(t,A,w);break;case 3:case 4:var z=l.stateNode.containerInfo,J=Ud(t);Bd(t,J,z);break;default:throw Error(r(161))}}catch(re){st(t,t.return,re)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function My(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;My(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function Fa(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ty(t,i.alternate,i),i=i.sibling}function tr(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:hi(4,i,i.return),tr(i);break;case 1:va(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&ky(i,i.return,l),tr(i);break;case 27:to(i.stateNode);case 26:case 5:va(i,i.return),tr(i);break;case 22:i.memoizedState===null&&tr(i);break;case 30:tr(i);break;default:tr(i)}t=t.sibling}}function Ga(t,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,h=t,v=i,w=v.flags;switch(v.tag){case 0:case 11:case 15:Ga(h,v,l),Gl(4,v);break;case 1:if(Ga(h,v,l),c=v,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(J){st(c,c.return,J)}if(c=v,h=c.updateQueue,h!==null){var A=c.stateNode;try{var z=h.shared.hiddenCallbacks;if(z!==null)for(h.shared.hiddenCallbacks=null,h=0;h<z.length;h++)dg(z[h],A)}catch(J){st(c,c.return,J)}}l&&w&64&&Sy(v),Vl(v,v.return);break;case 27:Ay(v);case 26:case 5:Ga(h,v,l),l&&c===null&&w&4&&Cy(v),Vl(v,v.return);break;case 12:Ga(h,v,l);break;case 31:Ga(h,v,l),l&&w&4&&_y(h,v);break;case 13:Ga(h,v,l),l&&w&4&&Oy(h,v);break;case 22:v.memoizedState===null&&Ga(h,v,l),Vl(v,v.return);break;case 30:break;default:Ga(h,v,l)}i=i.sibling}}function $d(t,i){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&Ol(l))}function qd(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Ol(t))}function sa(t,i,l,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Ly(t,i,l,c),i=i.sibling}function Ly(t,i,l,c){var h=i.flags;switch(i.tag){case 0:case 11:case 15:sa(t,i,l,c),h&2048&&Gl(9,i);break;case 1:sa(t,i,l,c);break;case 3:sa(t,i,l,c),h&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Ol(t)));break;case 12:if(h&2048){sa(t,i,l,c),t=i.stateNode;try{var v=i.memoizedProps,w=v.id,A=v.onPostCommit;typeof A=="function"&&A(w,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(z){st(i,i.return,z)}}else sa(t,i,l,c);break;case 31:sa(t,i,l,c);break;case 13:sa(t,i,l,c);break;case 23:break;case 22:v=i.stateNode,w=i.alternate,i.memoizedState!==null?v._visibility&2?sa(t,i,l,c):Wl(t,i):v._visibility&2?sa(t,i,l,c):(v._visibility|=2,Br(t,i,l,c,(i.subtreeFlags&10256)!==0||!1)),h&2048&&$d(w,i);break;case 24:sa(t,i,l,c),h&2048&&qd(i.alternate,i);break;default:sa(t,i,l,c)}}function Br(t,i,l,c,h){for(h=h&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var v=t,w=i,A=l,z=c,J=w.flags;switch(w.tag){case 0:case 11:case 15:Br(v,w,A,z,h),Gl(8,w);break;case 23:break;case 22:var re=w.stateNode;w.memoizedState!==null?re._visibility&2?Br(v,w,A,z,h):Wl(v,w):(re._visibility|=2,Br(v,w,A,z,h)),h&&J&2048&&$d(w.alternate,w);break;case 24:Br(v,w,A,z,h),h&&J&2048&&qd(w.alternate,w);break;default:Br(v,w,A,z,h)}i=i.sibling}}function Wl(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=t,c=i,h=c.flags;switch(c.tag){case 22:Wl(l,c),h&2048&&$d(c.alternate,c);break;case 24:Wl(l,c),h&2048&&qd(c.alternate,c);break;default:Wl(l,c)}i=i.sibling}}var Yl=8192;function Hr(t,i,l){if(t.subtreeFlags&Yl)for(t=t.child;t!==null;)zy(t,i,l),t=t.sibling}function zy(t,i,l){switch(t.tag){case 26:Hr(t,i,l),t.flags&Yl&&t.memoizedState!==null&&I2(l,oa,t.memoizedState,t.memoizedProps);break;case 5:Hr(t,i,l);break;case 3:case 4:var c=oa;oa=Ys(t.stateNode.containerInfo),Hr(t,i,l),oa=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=Yl,Yl=16777216,Hr(t,i,l),Yl=c):Hr(t,i,l));break;default:Hr(t,i,l)}}function Iy(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function Kl(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Yt=c,Uy(c,t)}Iy(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Py(t),t=t.sibling}function Py(t){switch(t.tag){case 0:case 11:case 15:Kl(t),t.flags&2048&&hi(9,t,t.return);break;case 3:Kl(t);break;case 12:Kl(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,Ls(t)):Kl(t);break;default:Kl(t)}}function Ls(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Yt=c,Uy(c,t)}Iy(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:hi(8,i,i.return),Ls(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,Ls(i));break;default:Ls(i)}t=t.sibling}}function Uy(t,i){for(;Yt!==null;){var l=Yt;switch(l.tag){case 0:case 11:case 15:hi(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ol(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,Yt=c;else e:for(l=t;Yt!==null;){c=Yt;var h=c.sibling,v=c.return;if(Ny(c),c===l){Yt=null;break e}if(h!==null){h.return=v,Yt=h;break e}Yt=v}}}var Zk={getCacheForType:function(t){var i=en(Lt),l=i.data.get(t);return l===void 0&&(l=t(),i.data.set(t,l)),l},cacheSignal:function(){return en(Lt).controller.signal}},Jk=typeof WeakMap=="function"?WeakMap:Map,tt=0,ht=null,He=null,Fe=0,ot=0,Dn=null,mi=!1,$r=!1,Fd=!1,Va=0,Tt=0,gi=0,nr=0,Gd=0,Mn=0,qr=0,Ql=null,Cn=null,Vd=!1,zs=0,By=0,Is=1/0,Ps=null,yi=null,Gt=0,vi=null,Fr=null,Wa=0,Wd=0,Yd=null,Hy=null,Xl=0,Kd=null;function Ln(){return(tt&2)!==0&&Fe!==0?Fe&-Fe:H.T!==null?tf():Ye()}function $y(){if(Mn===0)if((Fe&536870912)===0||We){var t=Ii;Ii<<=1,(Ii&3932160)===0&&(Ii=262144),Mn=t}else Mn=536870912;return t=_n.current,t!==null&&(t.flags|=32),Mn}function En(t,i,l){(t===ht&&(ot===2||ot===9)||t.cancelPendingCommit!==null)&&(Gr(t,0),xi(t,Fe,Mn,!1)),Ui(t,l),((tt&2)===0||t!==ht)&&(t===ht&&((tt&2)===0&&(nr|=l),Tt===4&&xi(t,Fe,Mn,!1)),xa(t))}function qy(t,i,l){if((tt&6)!==0)throw Error(r(327));var c=!l&&(i&127)===0&&(i&t.expiredLanes)===0||Pi(t,i),h=c?n2(t,i):Xd(t,i,!0),v=c;do{if(h===0){$r&&!c&&xi(t,i,0,!1);break}else{if(l=t.current.alternate,v&&!e2(l)){h=Xd(t,i,!1),v=!1;continue}if(h===2){if(v=i,t.errorRecoveryDisabledLanes&v)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){i=w;e:{var A=t;h=Ql;var z=A.current.memoizedState.isDehydrated;if(z&&(Gr(A,w).flags|=256),w=Xd(A,w,!1),w!==2){if(Fd&&!z){A.errorRecoveryDisabledLanes|=v,nr|=v,h=4;break e}v=Cn,Cn=h,v!==null&&(Cn===null?Cn=v:Cn.push.apply(Cn,v))}h=w}if(v=!1,h!==2)continue}}if(h===1){Gr(t,0),xi(t,i,0,!0);break}e:{switch(c=t,v=h,v){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:xi(c,i,Mn,!mi);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(h=zs+300-it(),10<h)){if(xi(c,i,Mn,!mi),yr(c,0,!0)!==0)break e;Wa=i,c.timeoutHandle=bv(Fy.bind(null,c,l,Cn,Ps,Vd,i,Mn,nr,qr,mi,v,"Throttled",-0,0),h);break e}Fy(c,l,Cn,Ps,Vd,i,Mn,nr,qr,mi,v,null,-0,0)}}break}while(!0);xa(t)}function Fy(t,i,l,c,h,v,w,A,z,J,re,ce,te,ae){if(t.timeoutHandle=-1,ce=i.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Oa},zy(i,v,ce);var xe=(v&62914560)===v?zs-it():(v&4194048)===v?By-it():0;if(xe=P2(ce,xe),xe!==null){Wa=v,t.cancelPendingCommit=xe(Zy.bind(null,t,i,v,l,c,h,w,A,z,re,ce,null,te,ae)),xi(t,v,w,!J);return}}Zy(t,i,v,l,c,h,w,A,z)}function e2(t){for(var i=t;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var h=l[c],v=h.getSnapshot;h=h.value;try{if(!Nn(v(),h))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function xi(t,i,l,c){i&=~Gd,i&=~nr,t.suspendedLanes|=i,t.pingedLanes&=~i,c&&(t.warmLanes|=i),c=t.expirationTimes;for(var h=i;0<h;){var v=31-Se(h),w=1<<v;c[v]=-1,h&=~w}l!==0&&Yo(t,l,i)}function Us(){return(tt&6)===0?(Zl(0),!1):!0}function Qd(){if(He!==null){if(ot===0)var t=He.return;else t=He,za=Wi=null,fd(t),Lr=null,Ml=0,t=He;for(;t!==null;)wy(t.alternate,t),t=t.return;He=null}}function Gr(t,i){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,b2(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Wa=0,Qd(),ht=t,He=l=Ma(t.current,null),Fe=i,ot=0,Dn=null,mi=!1,$r=Pi(t,i),Fd=!1,qr=Mn=Gd=nr=gi=Tt=0,Cn=Ql=null,Vd=!1,(i&8)!==0&&(i|=i&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=i;0<c;){var h=31-Se(c),v=1<<h;i|=t[h],c&=~v}return Va=i,ls(),l}function Gy(t,i){Me=null,H.H=$l,i===Mr||i===hs?(i=og(),ot=3):i===ed?(i=og(),ot=4):ot=i===Td?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,He===null&&(Tt=1,Ts(t,Yn(i,t.current)))}function Vy(){var t=_n.current;return t===null?!0:(Fe&4194048)===Fe?Zn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?t===Zn:!1}function Wy(){var t=H.H;return H.H=$l,t===null?$l:t}function Yy(){var t=H.A;return H.A=Zk,t}function Bs(){Tt=4,mi||(Fe&4194048)!==Fe&&_n.current!==null||($r=!0),(gi&134217727)===0&&(nr&134217727)===0||ht===null||xi(ht,Fe,Mn,!1)}function Xd(t,i,l){var c=tt;tt|=2;var h=Wy(),v=Yy();(ht!==t||Fe!==i)&&(Ps=null,Gr(t,i)),i=!1;var w=Tt;e:do try{if(ot!==0&&He!==null){var A=He,z=Dn;switch(ot){case 8:Qd(),w=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(i=!0);var J=ot;if(ot=0,Dn=null,Vr(t,A,z,J),l&&$r){w=0;break e}break;default:J=ot,ot=0,Dn=null,Vr(t,A,z,J)}}t2(),w=Tt;break}catch(re){Gy(t,re)}while(!0);return i&&t.shellSuspendCounter++,za=Wi=null,tt=c,H.H=h,H.A=v,He===null&&(ht=null,Fe=0,ls()),w}function t2(){for(;He!==null;)Ky(He)}function n2(t,i){var l=tt;tt|=2;var c=Wy(),h=Yy();ht!==t||Fe!==i?(Ps=null,Is=it()+500,Gr(t,i)):$r=Pi(t,i);e:do try{if(ot!==0&&He!==null){i=He;var v=Dn;t:switch(ot){case 1:ot=0,Dn=null,Vr(t,i,v,1);break;case 2:case 9:if(rg(v)){ot=0,Dn=null,Qy(i);break}i=function(){ot!==2&&ot!==9||ht!==t||(ot=7),xa(t)},v.then(i,i);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:rg(v)?(ot=0,Dn=null,Qy(i)):(ot=0,Dn=null,Vr(t,i,v,7));break;case 5:var w=null;switch(He.tag){case 26:w=He.memoizedState;case 5:case 27:var A=He;if(w?Lv(w):A.stateNode.complete){ot=0,Dn=null;var z=A.sibling;if(z!==null)He=z;else{var J=A.return;J!==null?(He=J,Hs(J)):He=null}break t}}ot=0,Dn=null,Vr(t,i,v,5);break;case 6:ot=0,Dn=null,Vr(t,i,v,6);break;case 8:Qd(),Tt=6;break e;default:throw Error(r(462))}}a2();break}catch(re){Gy(t,re)}while(!0);return za=Wi=null,H.H=c,H.A=h,tt=l,He!==null?0:(ht=null,Fe=0,ls(),Tt)}function a2(){for(;He!==null&&!qn();)Ky(He)}function Ky(t){var i=xy(t.alternate,t,Va);t.memoizedProps=t.pendingProps,i===null?Hs(t):He=i}function Qy(t){var i=t,l=i.alternate;switch(i.tag){case 15:case 0:i=py(l,i,i.pendingProps,i.type,void 0,Fe);break;case 11:i=py(l,i,i.pendingProps,i.type.render,i.ref,Fe);break;case 5:fd(i);default:wy(l,i),i=He=Ym(i,Va),i=xy(l,i,Va)}t.memoizedProps=t.pendingProps,i===null?Hs(t):He=i}function Vr(t,i,l,c){za=Wi=null,fd(i),Lr=null,Ml=0;var h=i.return;try{if(Gk(t,h,i,l,Fe)){Tt=1,Ts(t,Yn(l,t.current)),He=null;return}}catch(v){if(h!==null)throw He=h,v;Tt=1,Ts(t,Yn(l,t.current)),He=null;return}i.flags&32768?(We||c===1?t=!0:$r||(Fe&536870912)!==0?t=!1:(mi=t=!0,(c===2||c===9||c===3||c===6)&&(c=_n.current,c!==null&&c.tag===13&&(c.flags|=16384))),Xy(i,t)):Hs(i)}function Hs(t){var i=t;do{if((i.flags&32768)!==0){Xy(i,mi);return}t=i.return;var l=Yk(i.alternate,i,Va);if(l!==null){He=l;return}if(i=i.sibling,i!==null){He=i;return}He=i=t}while(i!==null);Tt===0&&(Tt=5)}function Xy(t,i){do{var l=Kk(t.alternate,t);if(l!==null){l.flags&=32767,He=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(t=t.sibling,t!==null)){He=t;return}He=t=l}while(t!==null);Tt=6,He=null}function Zy(t,i,l,c,h,v,w,A,z){t.cancelPendingCommit=null;do $s();while(Gt!==0);if((tt&6)!==0)throw Error(r(327));if(i!==null){if(i===t.current)throw Error(r(177));if(v=i.lanes|i.childLanes,v|=Uu,gu(t,l,v,w,A,z),t===ht&&(He=ht=null,Fe=0),Fr=i,vi=t,Wa=l,Wd=v,Yd=h,Hy=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,o2(me,function(){return av(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=H.T,H.T=null,h=ee.p,ee.p=2,w=tt,tt|=4;try{Qk(t,i,l)}finally{tt=w,ee.p=h,H.T=c}}Gt=1,Jy(),ev(),tv()}}function Jy(){if(Gt===1){Gt=0;var t=vi,i=Fr,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var c=ee.p;ee.p=2;var h=tt;tt|=4;try{Dy(i,t);var v=uf,w=Um(t.containerInfo),A=v.focusedElem,z=v.selectionRange;if(w!==A&&A&&A.ownerDocument&&Pm(A.ownerDocument.documentElement,A)){if(z!==null&&Mu(A)){var J=z.start,re=z.end;if(re===void 0&&(re=J),"selectionStart"in A)A.selectionStart=J,A.selectionEnd=Math.min(re,A.value.length);else{var ce=A.ownerDocument||document,te=ce&&ce.defaultView||window;if(te.getSelection){var ae=te.getSelection(),xe=A.textContent.length,je=Math.min(z.start,xe),dt=z.end===void 0?je:Math.min(z.end,xe);!ae.extend&&je>dt&&(w=dt,dt=je,je=w);var K=Im(A,je),q=Im(A,dt);if(K&&q&&(ae.rangeCount!==1||ae.anchorNode!==K.node||ae.anchorOffset!==K.offset||ae.focusNode!==q.node||ae.focusOffset!==q.offset)){var Z=ce.createRange();Z.setStart(K.node,K.offset),ae.removeAllRanges(),je>dt?(ae.addRange(Z),ae.extend(q.node,q.offset)):(Z.setEnd(q.node,q.offset),ae.addRange(Z))}}}}for(ce=[],ae=A;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ce.length;A++){var oe=ce[A];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ec=!!cf,uf=cf=null}finally{tt=h,ee.p=c,H.T=l}}t.current=i,Gt=2}}function ev(){if(Gt===2){Gt=0;var t=vi,i=Fr,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var c=ee.p;ee.p=2;var h=tt;tt|=4;try{Ty(t,i.alternate,i)}finally{tt=h,ee.p=c,H.T=l}}Gt=3}}function tv(){if(Gt===4||Gt===3){Gt=0,yn();var t=vi,i=Fr,l=Wa,c=Hy;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Gt=5:(Gt=0,Fr=vi=null,nv(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(yi=null),De(l),i=i.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(Ie,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=H.T,h=ee.p,ee.p=2,H.T=null;try{for(var v=t.onRecoverableError,w=0;w<c.length;w++){var A=c[w];v(A.value,{componentStack:A.stack})}}finally{H.T=i,ee.p=h}}(Wa&3)!==0&&$s(),xa(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===Kd?Xl++:(Xl=0,Kd=t):Xl=0,Zl(0)}}function nv(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,Ol(i)))}function $s(){return Jy(),ev(),tv(),av()}function av(){if(Gt!==5)return!1;var t=vi,i=Wd;Wd=0;var l=De(Wa),c=H.T,h=ee.p;try{ee.p=32>l?32:l,H.T=null,l=Yd,Yd=null;var v=vi,w=Wa;if(Gt=0,Fr=vi=null,Wa=0,(tt&6)!==0)throw Error(r(331));var A=tt;if(tt|=4,Py(v.current),Ly(v,v.current,w,l),tt=A,Zl(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(Ie,v)}catch{}return!0}finally{ee.p=h,H.T=c,nv(t,i)}}function iv(t,i,l){i=Yn(l,i),i=jd(t.stateNode,i,2),t=di(t,i,2),t!==null&&(Ui(t,2),xa(t))}function st(t,i,l){if(t.tag===3)iv(t,t,l);else for(;i!==null;){if(i.tag===3){iv(i,t,l);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(yi===null||!yi.has(c))){t=Yn(l,t),l=ry(2),c=di(i,l,2),c!==null&&(ly(l,c,i,t),Ui(c,2),xa(c));break}}i=i.return}}function Zd(t,i,l){var c=t.pingCache;if(c===null){c=t.pingCache=new Jk;var h=new Set;c.set(i,h)}else h=c.get(i),h===void 0&&(h=new Set,c.set(i,h));h.has(l)||(Fd=!0,h.add(l),t=i2.bind(null,t,i,l),i.then(t,t))}function i2(t,i,l){var c=t.pingCache;c!==null&&c.delete(i),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,ht===t&&(Fe&l)===l&&(Tt===4||Tt===3&&(Fe&62914560)===Fe&&300>it()-zs?(tt&2)===0&&Gr(t,0):Gd|=l,qr===Fe&&(qr=0)),xa(t)}function rv(t,i){i===0&&(i=Wo()),t=Fi(t,i),t!==null&&(Ui(t,i),xa(t))}function r2(t){var i=t.memoizedState,l=0;i!==null&&(l=i.retryLane),rv(t,l)}function l2(t,i){var l=0;switch(t.tag){case 31:case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(i),rv(t,l)}function o2(t,i){return ge(t,i)}var qs=null,Wr=null,Jd=!1,Fs=!1,ef=!1,bi=0;function xa(t){t!==Wr&&t.next===null&&(Wr===null?qs=Wr=t:Wr=Wr.next=t),Fs=!0,Jd||(Jd=!0,c2())}function Zl(t,i){if(!ef&&Fs){ef=!0;do for(var l=!1,c=qs;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var v=0;else{var w=c.suspendedLanes,A=c.pingedLanes;v=(1<<31-Se(42|t)+1)-1,v&=h&~(w&~A),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(l=!0,cv(c,v))}else v=Fe,v=yr(c,c===ht?v:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(v&3)===0||Pi(c,v)||(l=!0,cv(c,v));c=c.next}while(l);ef=!1}}function s2(){lv()}function lv(){Fs=Jd=!1;var t=0;bi!==0&&x2()&&(t=bi);for(var i=it(),l=null,c=qs;c!==null;){var h=c.next,v=ov(c,i);v===0?(c.next=null,l===null?qs=h:l.next=h,h===null&&(Wr=l)):(l=c,(t!==0||(v&3)!==0)&&(Fs=!0)),c=h}Gt!==0&&Gt!==5||Zl(t),bi!==0&&(bi=0)}function ov(t,i){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,v=t.pendingLanes&-62914561;0<v;){var w=31-Se(v),A=1<<w,z=h[w];z===-1?((A&l)===0||(A&c)!==0)&&(h[w]=mu(A,i)):z<=i&&(t.expiredLanes|=A),v&=~A}if(i=ht,l=Fe,l=yr(t,t===i?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===i&&(ot===2||ot===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Mt(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||Pi(t,l)){if(i=l&-l,i===t.callbackPriority)return i;switch(c!==null&&Mt(c),De(l)){case 2:case 8:l=le;break;case 32:l=me;break;case 268435456:l=I;break;default:l=me}return c=sv.bind(null,t),l=ge(l,c),t.callbackPriority=i,t.callbackNode=l,i}return c!==null&&c!==null&&Mt(c),t.callbackPriority=2,t.callbackNode=null,2}function sv(t,i){if(Gt!==0&&Gt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if($s()&&t.callbackNode!==l)return null;var c=Fe;return c=yr(t,t===ht?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(qy(t,c,i),ov(t,it()),t.callbackNode!=null&&t.callbackNode===l?sv.bind(null,t):null)}function cv(t,i){if($s())return null;qy(t,i,!0)}function c2(){w2(function(){(tt&6)!==0?ge($,s2):lv()})}function tf(){if(bi===0){var t=Or;t===0&&(t=ti,ti<<=1,(ti&261888)===0&&(ti=256)),bi=t}return bi}function uv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Zo(""+t)}function dv(t,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,t.id&&l.setAttribute("form",t.id),i.parentNode.insertBefore(l,i),t=new FormData(t),l.parentNode.removeChild(l),t}function u2(t,i,l,c,h){if(i==="submit"&&l&&l.stateNode===h){var v=uv((h[_e]||null).action),w=c.submitter;w&&(i=(i=w[_e]||null)?uv(i.formAction):w.getAttribute("formAction"),i!==null&&(v=i,w=null));var A=new ns("action","action",null,c,h);t.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(bi!==0){var z=w?dv(h,w):new FormData(h);wd(l,{pending:!0,data:z,method:h.method,action:v},null,z)}}else typeof v=="function"&&(A.preventDefault(),z=w?dv(h,w):new FormData(h),wd(l,{pending:!0,data:z,method:h.method,action:v},v,z))},currentTarget:h}]})}}for(var nf=0;nf<Pu.length;nf++){var af=Pu[nf],d2=af.toLowerCase(),f2=af[0].toUpperCase()+af.slice(1);la(d2,"on"+f2)}la($m,"onAnimationEnd"),la(qm,"onAnimationIteration"),la(Fm,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(Tk,"onTransitionRun"),la(Nk,"onTransitionStart"),la(Rk,"onTransitionCancel"),la(Gm,"onTransitionEnd"),Gn("onMouseEnter",["mouseout","mouseover"]),Gn("onMouseLeave",["mouseout","mouseover"]),Gn("onPointerEnter",["pointerout","pointerover"]),Gn("onPointerLeave",["pointerout","pointerover"]),un("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),un("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),un("onBeforeInput",["compositionend","keypress","textInput","paste"]),un("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),un("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),un("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jl="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(" "),p2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jl));function fv(t,i){i=(i&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var v=void 0;if(i)for(var w=c.length-1;0<=w;w--){var A=c[w],z=A.instance,J=A.currentTarget;if(A=A.listener,z!==v&&h.isPropagationStopped())break e;v=A,h.currentTarget=J;try{v(h)}catch(re){rs(re)}h.currentTarget=null,v=z}else for(w=0;w<c.length;w++){if(A=c[w],z=A.instance,J=A.currentTarget,A=A.listener,z!==v&&h.isPropagationStopped())break e;v=A,h.currentTarget=J;try{v(h)}catch(re){rs(re)}h.currentTarget=null,v=z}}}}function $e(t,i){var l=i[Na];l===void 0&&(l=i[Na]=new Set);var c=t+"__bubble";l.has(c)||(pv(i,t,2,!1),l.add(c))}function rf(t,i,l){var c=0;i&&(c|=4),pv(l,t,c,i)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function lf(t){if(!t[Gs]){t[Gs]=!0,vn.forEach(function(l){l!=="selectionchange"&&(p2.has(l)||rf(l,!1,t),rf(l,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Gs]||(i[Gs]=!0,rf("selectionchange",!1,i))}}function pv(t,i,l,c){switch($v(i)){case 2:var h=H2;break;case 8:h=$2;break;default:h=wf}l=h.bind(null,i,l,t),h=void 0,!Eu||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(i,l,{capture:!0,passive:h}):t.addEventListener(i,l,!0):h!==void 0?t.addEventListener(i,l,{passive:h}):t.addEventListener(i,l,!1)}function of(t,i,l,c,h){var v=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var A=c.stateNode.containerInfo;if(A===h)break;if(w===4)for(w=c.return;w!==null;){var z=w.tag;if((z===3||z===4)&&w.stateNode.containerInfo===h)return;w=w.return}for(;A!==null;){if(w=Ra(A),w===null)return;if(z=w.tag,z===5||z===6||z===26||z===27){c=v=w;continue e}A=A.parentNode}}c=c.return}vm(function(){var J=v,re=ku(l),ce=[];e:{var te=Vm.get(t);if(te!==void 0){var ae=ns,xe=t;switch(t){case"keypress":if(es(l)===0)break e;case"keydown":case"keyup":ae=lk;break;case"focusin":xe="focus",ae=Nu;break;case"focusout":xe="blur",ae=Nu;break;case"beforeblur":case"afterblur":ae=Nu;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":ae=wm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=YS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=ck;break;case $m:case qm:case Fm:ae=XS;break;case Gm:ae=dk;break;case"scroll":case"scrollend":ae=VS;break;case"wheel":ae=pk;break;case"copy":case"cut":case"paste":ae=JS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=km;break;case"toggle":case"beforetoggle":ae=mk}var je=(i&4)!==0,dt=!je&&(t==="scroll"||t==="scrollend"),K=je?te!==null?te+"Capture":null:te;je=[];for(var q=J,Z;q!==null;){var oe=q;if(Z=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Z===null||K===null||(oe=wl(q,K),oe!=null&&je.push(eo(q,oe,Z))),dt)break;q=q.return}0<je.length&&(te=new ae(te,xe,null,l,re),ce.push({event:te,listeners:je}))}}if((i&7)===0){e:{if(te=t==="mouseover"||t==="pointerover",ae=t==="mouseout"||t==="pointerout",te&&l!==Su&&(xe=l.relatedTarget||l.fromElement)&&(Ra(xe)||xe[rn]))break e;if((ae||te)&&(te=re.window===re?re:(te=re.ownerDocument)?te.defaultView||te.parentWindow:window,ae?(xe=l.relatedTarget||l.toElement,ae=J,xe=xe?Ra(xe):null,xe!==null&&(dt=s(xe),je=xe.tag,xe!==dt||je!==5&&je!==27&&je!==6)&&(xe=null)):(ae=null,xe=J),ae!==xe)){if(je=wm,oe="onMouseLeave",K="onMouseEnter",q="mouse",(t==="pointerout"||t==="pointerover")&&(je=km,oe="onPointerLeave",K="onPointerEnter",q="pointer"),dt=ae==null?te:cn(ae),Z=xe==null?te:cn(xe),te=new je(oe,q+"leave",ae,l,re),te.target=dt,te.relatedTarget=Z,oe=null,Ra(re)===J&&(je=new je(K,q+"enter",xe,l,re),je.target=Z,je.relatedTarget=dt,oe=je),dt=oe,ae&&xe)t:{for(je=h2,K=ae,q=xe,Z=0,oe=K;oe;oe=je(oe))Z++;oe=0;for(var Ce=q;Ce;Ce=je(Ce))oe++;for(;0<Z-oe;)K=je(K),Z--;for(;0<oe-Z;)q=je(q),oe--;for(;Z--;){if(K===q||q!==null&&K===q.alternate){je=K;break t}K=je(K),q=je(q)}je=null}else je=null;ae!==null&&hv(ce,te,ae,je,!1),xe!==null&&dt!==null&&hv(ce,dt,xe,je,!0)}}e:{if(te=J?cn(J):window,ae=te.nodeName&&te.nodeName.toLowerCase(),ae==="select"||ae==="input"&&te.type==="file")var Ze=_m;else if(Nm(te))if(Om)Ze=Ek;else{Ze=kk;var be=Sk}else ae=te.nodeName,!ae||ae.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?J&&wu(J.elementType)&&(Ze=_m):Ze=Ck;if(Ze&&(Ze=Ze(t,J))){Rm(ce,Ze,l,re);break e}be&&be(t,te,J),t==="focusout"&&J&&te.type==="number"&&J.memoizedProps.value!=null&&bu(te,"number",te.value)}switch(be=J?cn(J):window,t){case"focusin":(Nm(be)||be.contentEditable==="true")&&(Cr=be,Lu=J,Nl=null);break;case"focusout":Nl=Lu=Cr=null;break;case"mousedown":zu=!0;break;case"contextmenu":case"mouseup":case"dragend":zu=!1,Bm(ce,l,re);break;case"selectionchange":if(jk)break;case"keydown":case"keyup":Bm(ce,l,re)}var Le;if(_u)e:{switch(t){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else kr?jm(t,l)&&(Ge="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(Cm&&l.locale!=="ko"&&(kr||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&kr&&(Le=xm()):(ii=re,Au="value"in ii?ii.value:ii.textContent,kr=!0)),be=Vs(J,Ge),0<be.length&&(Ge=new Sm(Ge,t,null,l,re),ce.push({event:Ge,listeners:be}),Le?Ge.data=Le:(Le=Tm(l),Le!==null&&(Ge.data=Le)))),(Le=yk?vk(t,l):xk(t,l))&&(Ge=Vs(J,"onBeforeInput"),0<Ge.length&&(be=new Sm("onBeforeInput","beforeinput",null,l,re),ce.push({event:be,listeners:Ge}),be.data=Le)),u2(ce,t,J,l,re)}fv(ce,i)})}function eo(t,i,l){return{instance:t,listener:i,currentTarget:l}}function Vs(t,i){for(var l=i+"Capture",c=[];t!==null;){var h=t,v=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||v===null||(h=wl(t,l),h!=null&&c.unshift(eo(t,h,v)),h=wl(t,i),h!=null&&c.push(eo(t,h,v))),t.tag===3)return c;t=t.return}return[]}function h2(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function hv(t,i,l,c,h){for(var v=i._reactName,w=[];l!==null&&l!==c;){var A=l,z=A.alternate,J=A.stateNode;if(A=A.tag,z!==null&&z===c)break;A!==5&&A!==26&&A!==27||J===null||(z=J,h?(J=wl(l,v),J!=null&&w.unshift(eo(l,J,z))):h||(J=wl(l,v),J!=null&&w.push(eo(l,J,z)))),l=l.return}w.length!==0&&t.push({event:i,listeners:w})}var m2=/\r\n?/g,g2=/\u0000|\uFFFD/g;function mv(t){return(typeof t=="string"?t:""+t).replace(m2,`
|
|
50
|
-
`).replace(g2,"")}function gv(t,i){return i=mv(i),mv(t)===i}function ut(t,i,l,c,h,v){switch(l){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||br(t,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&br(t,""+c);break;case"className":Bi(t,"class",c);break;case"tabIndex":Bi(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Bi(t,l,c);break;case"style":gm(t,c,v);break;case"data":if(i!=="object"){Bi(t,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Zo(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.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 v=="function"&&(l==="formAction"?(i!=="input"&&ut(t,i,"name",h.name,h,null),ut(t,i,"formEncType",h.formEncType,h,null),ut(t,i,"formMethod",h.formMethod,h,null),ut(t,i,"formTarget",h.formTarget,h,null)):(ut(t,i,"encType",h.encType,h,null),ut(t,i,"method",h.method,h,null),ut(t,i,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Zo(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=Oa);break;case"onScroll":c!=null&&$e("scroll",t);break;case"onScrollEnd":c!=null&&$e("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=Zo(""+c),t.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":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":$e("beforetoggle",t),$e("toggle",t),dn(t,"popover",c);break;case"xlinkActuate":xn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":xn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":xn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":xn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":xn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":xn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":xn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":xn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":xn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":dn(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=FS.get(l)||l,dn(t,l,c))}}function sf(t,i,l,c,h,v){switch(l){case"style":gm(t,c,v);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"children":typeof c=="string"?br(t,c):(typeof c=="number"||typeof c=="bigint")&&br(t,""+c);break;case"onScroll":c!=null&&$e("scroll",t);break;case"onScrollEnd":c!=null&&$e("scrollend",t);break;case"onClick":c!=null&&(t.onclick=Oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ma.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),i=l.slice(2,h?l.length-7:void 0),v=t[_e]||null,v=v!=null?v[l]:null,typeof v=="function"&&t.removeEventListener(i,v,h),typeof c=="function")){typeof v!="function"&&v!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(i,c,h);break e}l in t?t[l]=c:c===!0?t.setAttribute(l,""):dn(t,l,c)}}}function nn(t,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":$e("error",t),$e("load",t);var c=!1,h=!1,v;for(v in l)if(l.hasOwnProperty(v)){var w=l[v];if(w!=null)switch(v){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:ut(t,i,v,w,l,null)}}h&&ut(t,i,"srcSet",l.srcSet,l,null),c&&ut(t,i,"src",l.src,l,null);return;case"input":$e("invalid",t);var A=v=w=h=null,z=null,J=null;for(c in l)if(l.hasOwnProperty(c)){var re=l[c];if(re!=null)switch(c){case"name":h=re;break;case"type":w=re;break;case"checked":z=re;break;case"defaultChecked":J=re;break;case"value":v=re;break;case"defaultValue":A=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,i));break;default:ut(t,i,c,re,l,null)}}fm(t,v,A,z,J,w,h,!1);return;case"select":$e("invalid",t),c=w=v=null;for(h in l)if(l.hasOwnProperty(h)&&(A=l[h],A!=null))switch(h){case"value":v=A;break;case"defaultValue":w=A;break;case"multiple":c=A;default:ut(t,i,h,A,l,null)}i=v,l=w,t.multiple=!!c,i!=null?xr(t,!!c,i,!1):l!=null&&xr(t,!!c,l,!0);return;case"textarea":$e("invalid",t),v=h=c=null;for(w in l)if(l.hasOwnProperty(w)&&(A=l[w],A!=null))switch(w){case"value":c=A;break;case"defaultValue":h=A;break;case"children":v=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(91));break;default:ut(t,i,w,A,l,null)}hm(t,c,h,v);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(c=l[z],c!=null))switch(z){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:ut(t,i,z,c,l,null)}return;case"dialog":$e("beforetoggle",t),$e("toggle",t),$e("cancel",t),$e("close",t);break;case"iframe":case"object":$e("load",t);break;case"video":case"audio":for(c=0;c<Jl.length;c++)$e(Jl[c],t);break;case"image":$e("error",t),$e("load",t);break;case"details":$e("toggle",t);break;case"embed":case"source":case"link":$e("error",t),$e("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in l)if(l.hasOwnProperty(J)&&(c=l[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:ut(t,i,J,c,l,null)}return;default:if(wu(i)){for(re in l)l.hasOwnProperty(re)&&(c=l[re],c!==void 0&&sf(t,i,re,c,l,void 0));return}}for(A in l)l.hasOwnProperty(A)&&(c=l[A],c!=null&&ut(t,i,A,c,l,null))}function y2(t,i,l,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,v=null,w=null,A=null,z=null,J=null,re=null;for(ae in l){var ce=l[ae];if(l.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":z=ce;default:c.hasOwnProperty(ae)||ut(t,i,ae,null,c,ce)}}for(var te in c){var ae=c[te];if(ce=l[te],c.hasOwnProperty(te)&&(ae!=null||ce!=null))switch(te){case"type":v=ae;break;case"name":h=ae;break;case"checked":J=ae;break;case"defaultChecked":re=ae;break;case"value":w=ae;break;case"defaultValue":A=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,i));break;default:ae!==ce&&ut(t,i,te,ae,c,ce)}}xu(t,w,A,z,J,re,v,h);return;case"select":ae=w=A=te=null;for(v in l)if(z=l[v],l.hasOwnProperty(v)&&z!=null)switch(v){case"value":break;case"multiple":ae=z;default:c.hasOwnProperty(v)||ut(t,i,v,null,c,z)}for(h in c)if(v=c[h],z=l[h],c.hasOwnProperty(h)&&(v!=null||z!=null))switch(h){case"value":te=v;break;case"defaultValue":A=v;break;case"multiple":w=v;default:v!==z&&ut(t,i,h,v,c,z)}i=A,l=w,c=ae,te!=null?xr(t,!!l,te,!1):!!c!=!!l&&(i!=null?xr(t,!!l,i,!0):xr(t,!!l,l?[]:"",!1));return;case"textarea":ae=te=null;for(A in l)if(h=l[A],l.hasOwnProperty(A)&&h!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:ut(t,i,A,null,c,h)}for(w in c)if(h=c[w],v=l[w],c.hasOwnProperty(w)&&(h!=null||v!=null))switch(w){case"value":te=h;break;case"defaultValue":ae=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==v&&ut(t,i,w,h,c,v)}pm(t,te,ae);return;case"option":for(var xe in l)if(te=l[xe],l.hasOwnProperty(xe)&&te!=null&&!c.hasOwnProperty(xe))switch(xe){case"selected":t.selected=!1;break;default:ut(t,i,xe,null,c,te)}for(z in c)if(te=c[z],ae=l[z],c.hasOwnProperty(z)&&te!==ae&&(te!=null||ae!=null))switch(z){case"selected":t.selected=te&&typeof te!="function"&&typeof te!="symbol";break;default:ut(t,i,z,te,c,ae)}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 je in l)te=l[je],l.hasOwnProperty(je)&&te!=null&&!c.hasOwnProperty(je)&&ut(t,i,je,null,c,te);for(J in c)if(te=c[J],ae=l[J],c.hasOwnProperty(J)&&te!==ae&&(te!=null||ae!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,i));break;default:ut(t,i,J,te,c,ae)}return;default:if(wu(i)){for(var dt in l)te=l[dt],l.hasOwnProperty(dt)&&te!==void 0&&!c.hasOwnProperty(dt)&&sf(t,i,dt,void 0,c,te);for(re in c)te=c[re],ae=l[re],!c.hasOwnProperty(re)||te===ae||te===void 0&&ae===void 0||sf(t,i,re,te,c,ae);return}}for(var K in l)te=l[K],l.hasOwnProperty(K)&&te!=null&&!c.hasOwnProperty(K)&&ut(t,i,K,null,c,te);for(ce in c)te=c[ce],ae=l[ce],!c.hasOwnProperty(ce)||te===ae||te==null&&ae==null||ut(t,i,ce,te,c,ae)}function yv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function v2(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var h=l[c],v=h.transferSize,w=h.initiatorType,A=h.duration;if(v&&A&&yv(w)){for(w=0,A=h.responseEnd,c+=1;c<l.length;c++){var z=l[c],J=z.startTime;if(J>A)break;var re=z.transferSize,ce=z.initiatorType;re&&yv(ce)&&(z=z.responseEnd,w+=re*(z<A?1:(A-J)/(z-J)))}if(--c,i+=8*(v+w)/(h.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var cf=null,uf=null;function Ws(t){return t.nodeType===9?t:t.ownerDocument}function vv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xv(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function df(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var ff=null;function x2(){var t=window.event;return t&&t.type==="popstate"?t===ff?!1:(ff=t,!0):(ff=null,!1)}var bv=typeof setTimeout=="function"?setTimeout:void 0,b2=typeof clearTimeout=="function"?clearTimeout:void 0,wv=typeof Promise=="function"?Promise:void 0,w2=typeof queueMicrotask=="function"?queueMicrotask:typeof wv<"u"?function(t){return wv.resolve(null).then(t).catch(S2)}:bv;function S2(t){setTimeout(function(){throw t})}function wi(t){return t==="head"}function Sv(t,i){var l=i,c=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(c===0){t.removeChild(h),Xr(i);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")to(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,to(l);for(var v=l.firstChild;v;){var w=v.nextSibling,A=v.nodeName;v[ha]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&v.rel.toLowerCase()==="stylesheet"||l.removeChild(v),v=w}}else l==="body"&&to(t.ownerDocument.body);l=h}while(l);Xr(i)}function kv(t,i){var l=t;t=0;do{var c=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=c}while(l)}function pf(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":pf(l),vr(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function k2(t,i,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[ha])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(v=t.getAttribute("rel"),v==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(v!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(v=t.getAttribute("src"),(v!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&v&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var v=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===v)return t}else return t;if(t=Jn(t.nextSibling),t===null)break}return null}function C2(t,i,l){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=Jn(t.nextSibling),t===null))return null;return t}function Cv(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Jn(t.nextSibling),t===null))return null;return t}function hf(t){return t.data==="$?"||t.data==="$~"}function mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function E2(t,i){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||l.readyState!=="loading")i();else{var c=function(){i(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Jn(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var gf=null;function Ev(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(i===0)return Jn(t.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}t=t.nextSibling}return null}function Av(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return t;i--}else l!=="/$"&&l!=="/&"||i++}t=t.previousSibling}return null}function jv(t,i,l){switch(i=Ws(l),t){case"html":if(t=i.documentElement,!t)throw Error(r(452));return t;case"head":if(t=i.head,!t)throw Error(r(453));return t;case"body":if(t=i.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function to(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);vr(t)}var ea=new Map,Tv=new Set;function Ys(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Ya=ee.d;ee.d={f:A2,r:j2,D:T2,C:N2,L:R2,m:_2,X:D2,S:O2,M:M2};function A2(){var t=Ya.f(),i=Us();return t||i}function j2(t){var i=Wt(t);i!==null&&i.tag===5&&i.type==="form"?Gg(i):Ya.r(t)}var Yr=typeof document>"u"?null:document;function Nv(t,i,l){var c=Yr;if(c&&typeof i=="string"&&i){var h=Vn(i);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Tv.has(h)||(Tv.add(h),t={rel:t,crossOrigin:l,href:i},c.querySelector(h)===null&&(i=c.createElement("link"),nn(i,"link",t),At(i),c.head.appendChild(i)))}}function T2(t){Ya.D(t),Nv("dns-prefetch",t,null)}function N2(t,i){Ya.C(t,i),Nv("preconnect",t,i)}function R2(t,i,l){Ya.L(t,i,l);var c=Yr;if(c&&t&&i){var h='link[rel="preload"][as="'+Vn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+Vn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+Vn(l.imageSizes)+'"]')):h+='[href="'+Vn(t)+'"]';var v=h;switch(i){case"style":v=Kr(t);break;case"script":v=Qr(t)}ea.has(v)||(t=g({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:t,as:i},l),ea.set(v,t),c.querySelector(h)!==null||i==="style"&&c.querySelector(no(v))||i==="script"&&c.querySelector(ao(v))||(i=c.createElement("link"),nn(i,"link",t),At(i),c.head.appendChild(i)))}}function _2(t,i){Ya.m(t,i);var l=Yr;if(l&&t){var c=i&&typeof i.as=="string"?i.as:"script",h='link[rel="modulepreload"][as="'+Vn(c)+'"][href="'+Vn(t)+'"]',v=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Qr(t)}if(!ea.has(v)&&(t=g({rel:"modulepreload",href:t},i),ea.set(v,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ao(v)))return}c=l.createElement("link"),nn(c,"link",t),At(c),l.head.appendChild(c)}}}function O2(t,i,l){Ya.S(t,i,l);var c=Yr;if(c&&t){var h=Fn(c).hoistableStyles,v=Kr(t);i=i||"default";var w=h.get(v);if(!w){var A={loading:0,preload:null};if(w=c.querySelector(no(v)))A.loading=5;else{t=g({rel:"stylesheet",href:t,"data-precedence":i},l),(l=ea.get(v))&&yf(t,l);var z=w=c.createElement("link");At(z),nn(z,"link",t),z._p=new Promise(function(J,re){z.onload=J,z.onerror=re}),z.addEventListener("load",function(){A.loading|=1}),z.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Ks(w,i,c)}w={type:"stylesheet",instance:w,count:1,state:A},h.set(v,w)}}}function D2(t,i){Ya.X(t,i);var l=Yr;if(l&&t){var c=Fn(l).hoistableScripts,h=Qr(t),v=c.get(h);v||(v=l.querySelector(ao(h)),v||(t=g({src:t,async:!0},i),(i=ea.get(h))&&vf(t,i),v=l.createElement("script"),At(v),nn(v,"link",t),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(h,v))}}function M2(t,i){Ya.M(t,i);var l=Yr;if(l&&t){var c=Fn(l).hoistableScripts,h=Qr(t),v=c.get(h);v||(v=l.querySelector(ao(h)),v||(t=g({src:t,async:!0,type:"module"},i),(i=ea.get(h))&&vf(t,i),v=l.createElement("script"),At(v),nn(v,"link",t),l.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},c.set(h,v))}}function Rv(t,i,l,c){var h=(h=he.current)?Ys(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Kr(l.href),l=Fn(h).hoistableStyles,c=l.get(i),c||(c={type:"style",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Kr(l.href);var v=Fn(h).hoistableStyles,w=v.get(t);if(w||(h=h.ownerDocument||h,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(t,w),(v=h.querySelector(no(t)))&&!v._p&&(w.instance=v,w.state.loading=5),ea.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},ea.set(t,l),v||L2(h,t,l,w.state))),i&&c===null)throw Error(r(528,""));return w}if(i&&c!==null)throw Error(r(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Qr(l),l=Fn(h).hoistableScripts,c=l.get(i),c||(c={type:"script",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Kr(t){return'href="'+Vn(t)+'"'}function no(t){return'link[rel="stylesheet"]['+t+"]"}function _v(t){return g({},t,{"data-precedence":t.precedence,precedence:null})}function L2(t,i,l,c){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=t.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),nn(i,"link",l),At(i),t.head.appendChild(i))}function Qr(t){return'[src="'+Vn(t)+'"]'}function ao(t){return"script[async]"+t}function Ov(t,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var c=t.querySelector('style[data-href~="'+Vn(l.href)+'"]');if(c)return i.instance=c,At(c),c;var h=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),At(c),nn(c,"style",h),Ks(c,l.precedence,t),i.instance=c;case"stylesheet":h=Kr(l.href);var v=t.querySelector(no(h));if(v)return i.state.loading|=4,i.instance=v,At(v),v;c=_v(l),(h=ea.get(h))&&yf(c,h),v=(t.ownerDocument||t).createElement("link"),At(v);var w=v;return w._p=new Promise(function(A,z){w.onload=A,w.onerror=z}),nn(v,"link",c),i.state.loading|=4,Ks(v,l.precedence,t),i.instance=v;case"script":return v=Qr(l.src),(h=t.querySelector(ao(v)))?(i.instance=h,At(h),h):(c=l,(h=ea.get(v))&&(c=g({},l),vf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),At(h),nn(h,"link",c),t.head.appendChild(h),i.instance=h);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,Ks(c,l.precedence,t));return i.instance}function Ks(t,i,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,v=h,w=0;w<c.length;w++){var A=c[w];if(A.dataset.precedence===i)v=A;else if(v!==h)break}v?v.parentNode.insertBefore(t,v.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(t,i.firstChild))}function yf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function vf(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Qs=null;function Dv(t,i,l){if(Qs===null){var c=new Map,h=Qs=new Map;h.set(l,c)}else h=Qs,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var v=l[h];if(!(v[ha]||v[we]||t==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var w=v.getAttribute(i)||"";w=t+w;var A=c.get(w);A?A.push(v):c.set(w,[v])}}return c}function Mv(t,i,l){t=t.ownerDocument||t,t.head.insertBefore(l,i==="title"?t.querySelector("head > title"):null)}function z2(t,i,l){if(l===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Lv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function I2(t,i,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=Kr(c.href),v=i.querySelector(no(h));if(v){i=v._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=Xs.bind(t),i.then(t,t)),l.state.loading|=4,l.instance=v,At(v);return}v=i.ownerDocument||i,c=_v(c),(h=ea.get(h))&&yf(c,h),v=v.createElement("link"),At(v);var w=v;w._p=new Promise(function(A,z){w.onload=A,w.onerror=z}),nn(v,"link",c),l.instance=v}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Xs.bind(t),i.addEventListener("load",l),i.addEventListener("error",l))}}var xf=0;function P2(t,i){return t.stylesheets&&t.count===0&&Js(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var c=setTimeout(function(){if(t.stylesheets&&Js(t,t.stylesheets),t.unsuspend){var v=t.unsuspend;t.unsuspend=null,v()}},6e4+i);0<t.imgBytes&&xf===0&&(xf=62500*v2());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Js(t,t.stylesheets),t.unsuspend)){var v=t.unsuspend;t.unsuspend=null,v()}},(t.imgBytes>xf?50:800)+i);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function Xs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Js(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Zs=null;function Js(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Zs=new Map,i.forEach(U2,t),Zs=null,Xs.call(t))}function U2(t,i){if(!(i.state.loading&4)){var l=Zs.get(t);if(l)var c=l.get(null);else{l=new Map,Zs.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<h.length;v++){var w=h[v];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(l.set(w.dataset.precedence,w),c=w)}c&&l.set(null,c)}h=i.instance,w=h.getAttribute("data-precedence"),v=l.get(w)||c,v===c&&l.set(null,h),l.set(w,h),this.count++,c=Xs.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),v?v.parentNode.insertBefore(h,v.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),i.state.loading|=4}}var io={$$typeof:R,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function B2(t,i,l,c,h,v,w,A,z){this.tag=1,this.containerInfo=t,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=vl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vl(0),this.hiddenUpdates=vl(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=v,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function zv(t,i,l,c,h,v,w,A,z,J,re,ce){return t=new B2(t,i,l,w,z,J,re,ce,A),i=1,v===!0&&(i|=24),v=Rn(3,null,null,i),t.current=v,v.stateNode=t,i=Xu(),i.refCount++,t.pooledCache=i,i.refCount++,v.memoizedState={element:c,isDehydrated:l,cache:i},td(v),t}function Iv(t){return t?(t=jr,t):jr}function Pv(t,i,l,c,h,v){h=Iv(h),c.context===null?c.context=h:c.pendingContext=h,c=ui(i),c.payload={element:l},v=v===void 0?null:v,v!==null&&(c.callback=v),l=di(t,c,i),l!==null&&(En(l,t,i),zl(l,t,i))}function Uv(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<i?l:i}}function bf(t,i){Uv(t,i),(t=t.alternate)&&Uv(t,i)}function Bv(t){if(t.tag===13||t.tag===31){var i=Fi(t,67108864);i!==null&&En(i,t,67108864),bf(t,67108864)}}function Hv(t){if(t.tag===13||t.tag===31){var i=Ln();i=ke(i);var l=Fi(t,i);l!==null&&En(l,t,i),bf(t,i)}}var ec=!0;function H2(t,i,l,c){var h=H.T;H.T=null;var v=ee.p;try{ee.p=2,wf(t,i,l,c)}finally{ee.p=v,H.T=h}}function $2(t,i,l,c){var h=H.T;H.T=null;var v=ee.p;try{ee.p=8,wf(t,i,l,c)}finally{ee.p=v,H.T=h}}function wf(t,i,l,c){if(ec){var h=Sf(c);if(h===null)of(t,i,c,tc,l),qv(t,c);else if(F2(h,t,i,l,c))c.stopPropagation();else if(qv(t,c),i&4&&-1<q2.indexOf(t)){for(;h!==null;){var v=Wt(h);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var w=Ta(v.pendingLanes);if(w!==0){var A=v;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var z=1<<31-Se(w);A.entanglements[1]|=z,w&=~z}xa(v),(tt&6)===0&&(Is=it()+500,Zl(0))}}break;case 31:case 13:A=Fi(v,2),A!==null&&En(A,v,2),Us(),bf(v,2)}if(v=Sf(c),v===null&&of(t,i,c,tc,l),v===h)break;h=v}h!==null&&c.stopPropagation()}else of(t,i,c,null,l)}}function Sf(t){return t=ku(t),kf(t)}var tc=null;function kf(t){if(tc=null,t=Ra(t),t!==null){var i=s(t);if(i===null)t=null;else{var l=i.tag;if(l===13){if(t=u(i),t!==null)return t;t=null}else if(l===31){if(t=d(i),t!==null)return t;t=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return tc=t,null}function $v(t){switch(t){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(fe()){case $:return 2;case le:return 8;case me:case ye:return 32;case I:return 268435456;default:return 32}default:return 32}}var Cf=!1,Si=null,ki=null,Ci=null,ro=new Map,lo=new Map,Ei=[],q2="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 qv(t,i){switch(t){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":ki=null;break;case"mouseover":case"mouseout":Ci=null;break;case"pointerover":case"pointerout":ro.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":lo.delete(i.pointerId)}}function oo(t,i,l,c,h,v){return t===null||t.nativeEvent!==v?(t={blockedOn:i,domEventName:l,eventSystemFlags:c,nativeEvent:v,targetContainers:[h]},i!==null&&(i=Wt(i),i!==null&&Bv(i)),t):(t.eventSystemFlags|=c,i=t.targetContainers,h!==null&&i.indexOf(h)===-1&&i.push(h),t)}function F2(t,i,l,c,h){switch(i){case"focusin":return Si=oo(Si,t,i,l,c,h),!0;case"dragenter":return ki=oo(ki,t,i,l,c,h),!0;case"mouseover":return Ci=oo(Ci,t,i,l,c,h),!0;case"pointerover":var v=h.pointerId;return ro.set(v,oo(ro.get(v)||null,t,i,l,c,h)),!0;case"gotpointercapture":return v=h.pointerId,lo.set(v,oo(lo.get(v)||null,t,i,l,c,h)),!0}return!1}function Fv(t){var i=Ra(t.target);if(i!==null){var l=s(i);if(l!==null){if(i=l.tag,i===13){if(i=u(l),i!==null){t.blockedOn=i,lt(t.priority,function(){Hv(l)});return}}else if(i===31){if(i=d(l),i!==null){t.blockedOn=i,lt(t.priority,function(){Hv(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function nc(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var l=Sf(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);Su=c,l.target.dispatchEvent(c),Su=null}else return i=Wt(l),i!==null&&Bv(i),t.blockedOn=l,!1;i.shift()}return!0}function Gv(t,i,l){nc(t)&&l.delete(i)}function G2(){Cf=!1,Si!==null&&nc(Si)&&(Si=null),ki!==null&&nc(ki)&&(ki=null),Ci!==null&&nc(Ci)&&(Ci=null),ro.forEach(Gv),lo.forEach(Gv)}function ac(t,i){t.blockedOn===i&&(t.blockedOn=null,Cf||(Cf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,G2)))}var ic=null;function Vv(t){ic!==t&&(ic=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){ic===t&&(ic=null);for(var i=0;i<t.length;i+=3){var l=t[i],c=t[i+1],h=t[i+2];if(typeof c!="function"){if(kf(c||l)===null)continue;break}var v=Wt(l);v!==null&&(t.splice(i,3),i-=3,wd(v,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function Xr(t){function i(z){return ac(z,t)}Si!==null&&ac(Si,t),ki!==null&&ac(ki,t),Ci!==null&&ac(Ci,t),ro.forEach(i),lo.forEach(i);for(var l=0;l<Ei.length;l++){var c=Ei[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<Ei.length&&(l=Ei[0],l.blockedOn===null);)Fv(l),l.blockedOn===null&&Ei.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],v=l[c+1],w=h[_e]||null;if(typeof v=="function")w||Vv(l);else if(w){var A=null;if(v&&v.hasAttribute("formAction")){if(h=v,w=v[_e]||null)A=w.formAction;else if(kf(h)!==null)continue}else A=w.action;typeof A=="function"?l[c+1]=A:(l.splice(c,3),c-=3),Vv(l)}}}function Wv(){function t(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(w){return h=w})},focusReset:"manual",scroll:"manual"})}function i(){h!==null&&(h(),h=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),h!==null&&(h(),h=null)}}}function Ef(t){this._internalRoot=t}rc.prototype.render=Ef.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(r(409));var l=i.current,c=Ln();Pv(l,c,t,i,null,null)},rc.prototype.unmount=Ef.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Pv(t.current,2,null,t,null,null),Us(),i[rn]=null}};function rc(t){this._internalRoot=t}rc.prototype.unstable_scheduleHydration=function(t){if(t){var i=Ye();t={blockedOn:null,target:t,priority:i};for(var l=0;l<Ei.length&&i!==0&&i<Ei[l].priority;l++);Ei.splice(l,0,t),l===0&&Fv(t)}};var Yv=n.version;if(Yv!=="19.2.4")throw Error(r(527,Yv,"19.2.4"));ee.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=f(i),t=t!==null?y(t):null,t=t===null?null:t.stateNode,t};var V2={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lc.isDisabled&&lc.supportsFiber)try{Ie=lc.inject(V2),Xe=lc}catch{}}return co.createRoot=function(t,i){if(!o(t))throw Error(r(299));var l=!1,c="",h=ty,v=ny,w=ay;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError)),i=zv(t,1,!1,null,null,l,c,null,h,v,w,Wv),t[rn]=i.current,lf(t),new Ef(i)},co.hydrateRoot=function(t,i,l){if(!o(t))throw Error(r(299));var c=!1,h="",v=ty,w=ny,A=ay,z=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(v=l.onUncaughtError),l.onCaughtError!==void 0&&(w=l.onCaughtError),l.onRecoverableError!==void 0&&(A=l.onRecoverableError),l.formState!==void 0&&(z=l.formState)),i=zv(t,1,!0,i,l??null,c,h,z,v,w,A,Wv),i.context=Iv(null),l=i.current,c=Ln(),c=ke(c),h=ui(c),h.callback=null,di(l,h,c),l=c,i.current.lanes=l,Ui(i,l),xa(i),t[rn]=i.current,lf(t),new rc(i)},co.version="19.2.4",co}var i0;function aC(){if(i0)return Tf.exports;i0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),Tf.exports=nC(),Tf.exports}var iC=aC();/**
|
|
51
|
-
* react-router v7.17.0
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/var r0="popstate";function l0(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function rC(e={}){function n(r,o){var f;let s=(f=o.state)==null?void 0:f.masked,{pathname:u,search:d,hash:p}=s||r.location;return Op("",{pathname:u,search:d,hash:p},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function a(r,o){return typeof o=="string"?o:Oo(o)}return oC(n,a,null,e)}function Et(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function fa(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function lC(){return Math.random().toString(36).substring(2,10)}function o0(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Op(e,n,a=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?cl(n):n,state:a,key:n&&n.key||r||lC(),mask:o}}function Oo({pathname:e="/",search:n="",hash:a=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function cl(e){let n={};if(e){let a=e.indexOf("#");a>=0&&(n.hash=e.substring(a),e=e.substring(0,a));let r=e.indexOf("?");r>=0&&(n.search=e.substring(r),e=e.substring(0,r)),e&&(n.pathname=e)}return n}function oC(e,n,a,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,u=o.history,d="POP",p=null,f=y();f==null&&(f=0,u.replaceState({...u.state,idx:f},""));function y(){return(u.state||{idx:null}).idx}function g(){d="POP";let j=y(),E=j==null?null:j-f;f=j,p&&p({action:d,location:C.location,delta:E})}function x(j,E){d="PUSH";let _=l0(j)?j:Op(C.location,j,E);f=y()+1;let R=o0(_,f),F=C.createHref(_.mask||_);try{u.pushState(R,"",F)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;o.location.assign(F)}s&&p&&p({action:d,location:C.location,delta:1})}function b(j,E){d="REPLACE";let _=l0(j)?j:Op(C.location,j,E);f=y();let R=o0(_,f),F=C.createHref(_.mask||_);u.replaceState(R,"",F),s&&p&&p({action:d,location:C.location,delta:0})}function k(j){return sC(o,j)}let C={get action(){return d},get location(){return e(o,u)},listen(j){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(r0,g),p=j,()=>{o.removeEventListener(r0,g),p=null}},createHref(j){return n(o,j)},createURL:k,encodeLocation(j){let E=k(j);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:x,replace:b,go(j){return u.go(j)}};return C}function sC(e,n,a=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),Et(r,"No window.location.(origin|href) available to create URL");let o=typeof n=="string"?n:Oo(n);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=r+o),new URL(o,r)}function Ux(e,n,a="/"){return cC(e,n,a,!1)}function cC(e,n,a,r,o){let s=typeof n=="string"?cl(n):n,u=Za(s.pathname||"/",a);if(u==null)return null;let d=uC(e),p=null,f=SC(u);for(let y=0;p==null&&y<d.length;++y)p=bC(d[y],f,r);return p}function uC(e){let n=Bx(e);return dC(n),n}function Bx(e,n=[],a=[],r="",o=!1){let s=(u,d,p=o,f)=>{let y={relativePath:f===void 0?u.path||"":f,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Et(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=ua([r,y.relativePath]),x=a.concat(y);u.children&&u.children.length>0&&(Et(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Bx(u.children,n,x,g,p)),!(u.path==null&&!u.index)&&n.push({path:g,score:vC(g,u.index),routesMeta:x})};return e.forEach((u,d)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))s(u,d);else for(let f of Hx(u.path))s(u,d,!0,f)}),n}function Hx(e){let n=e.split("/");if(n.length===0)return[];let[a,...r]=n,o=a.endsWith("?"),s=a.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let u=Hx(r.join("/")),d=[];return d.push(...u.map(p=>p===""?s:[s,p].join("/"))),o&&d.push(...u),d.map(p=>e.startsWith("/")&&p===""?"/":p)}function dC(e){e.sort((n,a)=>n.score!==a.score?a.score-n.score:xC(n.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var fC=/^:[\w-]+$/,pC=3,hC=2,mC=1,gC=10,yC=-2,s0=e=>e==="*";function vC(e,n){let a=e.split("/"),r=a.length;return a.some(s0)&&(r+=yC),n&&(r+=hC),a.filter(o=>!s0(o)).reduce((o,s)=>o+(fC.test(s)?pC:s===""?mC:gC),r)}function xC(e,n){return e.length===n.length&&e.slice(0,-1).every((r,o)=>r===n[o])?e[e.length-1]-n[n.length-1]:0}function bC(e,n,a=!1){let{routesMeta:r}=e,o={},s="/",u=[];for(let d=0;d<r.length;++d){let p=r[d],f=d===r.length-1,y=s==="/"?n:n.slice(s.length)||"/",g=_c({path:p.relativePath,caseSensitive:p.caseSensitive,end:f},y),x=p.route;if(!g&&f&&a&&!r[r.length-1].route.index&&(g=_c({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),u.push({params:o,pathname:ua([s,g.pathname]),pathnameBase:AC(ua([s,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(s=ua([s,g.pathnameBase]))}return u}function _c(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[a,r]=wC(e.path,e.caseSensitive,e.end),o=n.match(a);if(!o)return null;let s=o[0],u=s.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((f,{paramName:y,isOptional:g},x)=>{if(y==="*"){let k=d[x]||"";u=s.slice(0,s.length-k.length).replace(/(.)\/+$/,"$1")}const b=d[x];return g&&!b?f[y]=void 0:f[y]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:u,pattern:e}}function wC(e,n=!1,a=!0){fa(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,p,f,y)=>{if(r.push({paramName:d,isOptional:p!=null}),p){let g=y.charAt(f+u.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),r]}function SC(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return fa(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Za(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let a=n.endsWith("/")?n.length-1:n.length,r=e.charAt(a);return r&&r!=="/"?null:e.slice(a)||"/"}var kC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function CC(e,n="/"){let{pathname:a,search:r="",hash:o=""}=typeof e=="string"?cl(e):e,s;return a?(a=$x(a),a.startsWith("/")?s=c0(a.substring(1),"/"):s=c0(a,n)):s=n,{pathname:s,search:jC(r),hash:TC(o)}}function c0(e,n){let a=Oc(n).split("/");return e.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function Of(e,n,a,r){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function EC(e){return e.filter((n,a)=>a===0||n.route.path&&n.route.path.length>0)}function dh(e){let n=EC(e);return n.map((a,r)=>r===n.length-1?a.pathname:a.pathnameBase)}function tu(e,n,a,r=!1){let o;typeof e=="string"?o=cl(e):(o={...e},Et(!o.pathname||!o.pathname.includes("?"),Of("?","pathname","search",o)),Et(!o.pathname||!o.pathname.includes("#"),Of("#","pathname","hash",o)),Et(!o.search||!o.search.includes("#"),Of("#","search","hash",o)));let s=e===""||o.pathname==="",u=s?"/":o.pathname,d;if(u==null)d=a;else{let g=n.length-1;if(!r&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),g-=1;o.pathname=x.join("/")}d=g>=0?n[g]:"/"}let p=CC(o,d),f=u&&u!=="/"&&u.endsWith("/"),y=(s||u===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(f||y)&&(p.pathname+="/"),p}var $x=e=>e.replace(/\/\/+/g,"/"),ua=e=>$x(e.join("/")),Oc=e=>e.replace(/\/+$/,""),AC=e=>Oc(e).replace(/^\/*/,"/"),jC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,TC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,NC=class{constructor(e,n,a,r=!1){this.status=e,this.statusText=n||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function RC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function _C(e){let n=e.map(a=>a.route.path).filter(Boolean);return ua(n)||"/"}var qx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Fx(e,n){let a=e;if(typeof a!="string"||!kC.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,o=!1;if(qx)try{let s=new URL(window.location.href),u=a.startsWith("//")?new URL(s.protocol+a):new URL(a),d=Za(u.pathname,n);u.origin===s.origin&&d!=null?a=d+u.search+u.hash:o=!0}catch{fa(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:a}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Gx=["POST","PUT","PATCH","DELETE"];new Set(Gx);var OC=["GET",...Gx];new Set(OC);var ul=S.createContext(null);ul.displayName="DataRouter";var nu=S.createContext(null);nu.displayName="DataRouterState";var Vx=S.createContext(!1);function DC(){return S.useContext(Vx)}var Wx=S.createContext({isTransitioning:!1});Wx.displayName="ViewTransition";var MC=S.createContext(new Map);MC.displayName="Fetchers";var LC=S.createContext(null);LC.displayName="Await";var $n=S.createContext(null);$n.displayName="Navigation";var Bo=S.createContext(null);Bo.displayName="Location";var Ea=S.createContext({outlet:null,matches:[],isDataRoute:!1});Ea.displayName="Route";var fh=S.createContext(null);fh.displayName="RouteError";var Yx="REACT_ROUTER_ERROR",zC="REDIRECT",IC="ROUTE_ERROR_RESPONSE";function PC(e){if(e.startsWith(`${Yx}:${zC}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function UC(e){if(e.startsWith(`${Yx}:${IC}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new NC(n.status,n.statusText,n.data)}catch{}}function BC(e,{relative:n}={}){Et(dl(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=S.useContext($n),{hash:o,pathname:s,search:u}=Ho(e,{relative:n}),d=s;return a!=="/"&&(d=s==="/"?a:ua([a,s])),r.createHref({pathname:d,search:u,hash:o})}function dl(){return S.useContext(Bo)!=null}function pa(){return Et(dl(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Bo).location}var Kx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Qx(e){S.useContext($n).static||S.useLayoutEffect(e)}function ph(){let{isDataRoute:e}=S.useContext(Ea);return e?JC():HC()}function HC(){Et(dl(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(ul),{basename:n,navigator:a}=S.useContext($n),{matches:r}=S.useContext(Ea),{pathname:o}=pa(),s=JSON.stringify(dh(r)),u=S.useRef(!1);return Qx(()=>{u.current=!0}),S.useCallback((p,f={})=>{if(fa(u.current,Kx),!u.current)return;if(typeof p=="number"){a.go(p);return}let y=tu(p,JSON.parse(s),o,f.relative==="path");e==null&&n!=="/"&&(y.pathname=y.pathname==="/"?n:ua([n,y.pathname])),(f.replace?a.replace:a.push)(y,f.state,f)},[n,a,s,o,e])}S.createContext(null);function Ho(e,{relative:n}={}){let{matches:a}=S.useContext(Ea),{pathname:r}=pa(),o=JSON.stringify(dh(a));return S.useMemo(()=>tu(e,JSON.parse(o),r,n==="path"),[e,o,r,n])}function $C(e,n){return Xx(e,n)}function Xx(e,n,a){var j;Et(dl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=S.useContext($n),{matches:o}=S.useContext(Ea),s=o[o.length-1],u=s?s.params:{},d=s?s.pathname:"/",p=s?s.pathnameBase:"/",f=s&&s.route;{let E=f&&f.path||"";Jx(d,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
-
|
|
61
|
-
Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let y=pa(),g;if(n){let E=typeof n=="string"?cl(n):n;Et(p==="/"||((j=E.pathname)==null?void 0:j.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${E.pathname}" was given in the \`location\` prop.`),g=E}else g=y;let x=g.pathname||"/",b=x;if(p!=="/"){let E=p.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let k=a&&a.state.matches.length?a.state.matches.map(E=>Object.assign(E,{route:a.manifest[E.route.id]||E.route})):Ux(e,{pathname:b});fa(f||k!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),fa(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=WC(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:ua([p,r.encodeLocation?r.encodeLocation(E.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?p:ua([p,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),o,a);return n&&C?S.createElement(Bo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},C):C}function qC(){let e=ZC(),n=RC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:s},"ErrorBoundary")," or"," ",S.createElement("code",{style:s},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},n),a?S.createElement("pre",{style:o},a):null,u)}var FC=S.createElement(qC,null),Zx=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const a=UC(e.digest);a&&(e=a)}let n=e!==void 0?S.createElement(Ea.Provider,{value:this.props.routeContext},S.createElement(fh.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(GC,{error:e},n):n}};Zx.contextType=Vx;var Df=new WeakMap;function GC({children:e,error:n}){let{basename:a}=S.useContext($n);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let r=PC(n.digest);if(r){let o=Df.get(n);if(o)throw o;let s=Fx(r.location,a);if(qx&&!Df.get(n))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Df.set(n,u),u}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function VC({routeContext:e,match:n,children:a}){let r=S.useContext(ul);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(Ea.Provider,{value:e},a)}function WC(e,n=[],a){let r=a==null?void 0:a.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(n.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,s=r==null?void 0:r.errors;if(s!=null){let y=o.findIndex(g=>g.route.id&&(s==null?void 0:s[g.route.id])!==void 0);Et(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,d=-1;if(a&&r){u=r.renderFallback;for(let y=0;y<o.length;y++){let g=o[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=y),g.route.id){let{loaderData:x,errors:b}=r,k=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||k){a.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let p=a==null?void 0:a.onError,f=r&&p?(y,g)=>{var x,b;p(y,{location:r.location,params:((b=(x=r.matches)==null?void 0:x[0])==null?void 0:b.params)??{},pattern:_C(r.matches),errorInfo:g})}:void 0;return o.reduceRight((y,g,x)=>{let b,k=!1,C=null,j=null;r&&(b=s&&g.route.id?s[g.route.id]:void 0,C=g.route.errorElement||FC,u&&(d<0&&x===0?(Jx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,j=null):d===x&&(k=!0,j=g.route.hydrateFallbackElement||null)));let E=n.concat(o.slice(0,x+1)),_=()=>{let R;return b?R=C:k?R=j:g.route.Component?R=S.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=y,S.createElement(VC,{match:g,routeContext:{outlet:y,matches:E,isDataRoute:r!=null},children:R})};return r&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?S.createElement(Zx,{location:r.location,revalidation:r.revalidation,component:C,error:b,children:_(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):_()},null)}function hh(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YC(e){let n=S.useContext(ul);return Et(n,hh(e)),n}function KC(e){let n=S.useContext(nu);return Et(n,hh(e)),n}function QC(e){let n=S.useContext(Ea);return Et(n,hh(e)),n}function mh(e){let n=QC(e),a=n.matches[n.matches.length-1];return Et(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function XC(){return mh("useRouteId")}function ZC(){var r;let e=S.useContext(fh),n=KC("useRouteError"),a=mh("useRouteError");return e!==void 0?e:(r=n.errors)==null?void 0:r[a]}function JC(){let{router:e}=YC("useNavigate"),n=mh("useNavigate"),a=S.useRef(!1);return Qx(()=>{a.current=!0}),S.useCallback(async(o,s={})=>{fa(a.current,Kx),a.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...s}))},[e,n])}var u0={};function Jx(e,n,a){!n&&!u0[e]&&(u0[e]=!0,fa(!1,a))}S.memo(eE);function eE({routes:e,manifest:n,future:a,state:r,isStatic:o,onError:s}){return Xx(e,void 0,{manifest:n,state:r,isStatic:o,onError:s})}function ko({to:e,replace:n,state:a,relative:r}){Et(dl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=S.useContext($n);fa(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=S.useContext(Ea),{pathname:u}=pa(),d=ph(),p=tu(e,dh(s),u,r==="path"),f=JSON.stringify(p);return S.useEffect(()=>{d(JSON.parse(f),{replace:n,state:a,relative:r})},[d,f,r,n,a]),null}function Ni(e){Et(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function tE({basename:e="/",children:n=null,location:a,navigationType:r="POP",navigator:o,static:s=!1,useTransitions:u}){Et(!dl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:d,navigator:o,static:s,useTransitions:u,future:{}}),[d,o,s,u]);typeof a=="string"&&(a=cl(a));let{pathname:f="/",search:y="",hash:g="",state:x=null,key:b="default",mask:k}=a,C=S.useMemo(()=>{let j=Za(f,d);return j==null?null:{location:{pathname:j,search:y,hash:g,state:x,key:b,mask:k},navigationType:r}},[d,f,y,g,x,b,r,k]);return fa(C!=null,`<Router basename="${d}"> is not able to match the URL "${f}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:S.createElement($n.Provider,{value:p},S.createElement(Bo.Provider,{children:n,value:C}))}function nE({children:e,location:n}){return $C(Dp(e),n)}function Dp(e,n=[]){let a=[];return S.Children.forEach(e,(r,o)=>{if(!S.isValidElement(r))return;let s=[...n,o];if(r.type===S.Fragment){a.push.apply(a,Dp(r.props.children,s));return}Et(r.type===Ni,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Et(!r.props.index||!r.props.children,"An index route cannot have child routes.");let u={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(u.children=Dp(r.props.children,s)),a.push(u)}),a}var Sc="get",kc="application/x-www-form-urlencoded";function au(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function aE(e){return au(e)&&e.tagName.toLowerCase()==="button"}function iE(e){return au(e)&&e.tagName.toLowerCase()==="form"}function rE(e){return au(e)&&e.tagName.toLowerCase()==="input"}function lE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function oE(e,n){return e.button===0&&(!n||n==="_self")&&!lE(e)}var oc=null;function sE(){if(oc===null)try{new FormData(document.createElement("form"),0),oc=!1}catch{oc=!0}return oc}var cE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Mf(e){return e!=null&&!cE.has(e)?(fa(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${kc}"`),null):e}function uE(e,n){let a,r,o,s,u;if(iE(e)){let d=e.getAttribute("action");r=d?Za(d,n):null,a=e.getAttribute("method")||Sc,o=Mf(e.getAttribute("enctype"))||kc,s=new FormData(e)}else if(aE(e)||rE(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||d.getAttribute("action");if(r=p?Za(p,n):null,a=e.getAttribute("formmethod")||d.getAttribute("method")||Sc,o=Mf(e.getAttribute("formenctype"))||Mf(d.getAttribute("enctype"))||kc,s=new FormData(d,e),!sE()){let{name:f,type:y,value:g}=e;if(y==="image"){let x=f?`${f}.`:"";s.append(`${x}x`,"0"),s.append(`${x}y`,"0")}else f&&s.append(f,g)}}else{if(au(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Sc,r=null,o=kc,u=e}return s&&o==="text/plain"&&(u=s,s=void 0),{action:r,method:a.toLowerCase(),encType:o,formData:s,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gh(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function eb(e,n,a,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:n&&Za(o.pathname,n)==="/"?o.pathname=`${Oc(n)}/_root.${r}`:o.pathname=`${Oc(o.pathname)}.${r}`,o}async function dE(e,n){if(e.id in n)return n[e.id];try{let a=await import(e.module);return n[e.id]=a,a}catch(a){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pE(e,n,a){let r=await Promise.all(e.map(async o=>{let s=n.routes[o.route.id];if(s){let u=await dE(s,a);return u.links?u.links():[]}return[]}));return yE(r.flat(1).filter(fE).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function d0(e,n,a,r,o,s){let u=(p,f)=>a[f]?p.route.id!==a[f].route.id:!0,d=(p,f)=>{var y;return a[f].pathname!==p.pathname||((y=a[f].route.path)==null?void 0:y.endsWith("*"))&&a[f].params["*"]!==p.params["*"]};return s==="assets"?n.filter((p,f)=>u(p,f)||d(p,f)):s==="data"?n.filter((p,f)=>{var g;let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(u(p,f)||d(p,f))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=a[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function hE(e,n,{includeHydrateFallback:a}={}){return mE(e.map(r=>{let o=n.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function mE(e){return[...new Set(e)]}function gE(e){let n={},a=Object.keys(e).sort();for(let r of a)n[r]=e[r];return n}function yE(e,n){let a=new Set;return new Set(n),e.reduce((r,o)=>{let s=JSON.stringify(gE(o));return a.has(s)||(a.add(s),r.push({key:s,link:o})),r},[])}function yh(){let e=S.useContext(ul);return gh(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vE(){let e=S.useContext(nu);return gh(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var vh=S.createContext(void 0);vh.displayName="FrameworkContext";function xh(){let e=S.useContext(vh);return gh(e,"You must render this element inside a <HydratedRouter> element"),e}function xE(e,n){let a=S.useContext(vh),[r,o]=S.useState(!1),[s,u]=S.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:f,onMouseLeave:y,onTouchStart:g}=n,x=S.useRef(null);S.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let C=E=>{E.forEach(_=>{u(_.isIntersecting)})},j=new IntersectionObserver(C,{threshold:.5});return x.current&&j.observe(x.current),()=>{j.disconnect()}}},[e]),S.useEffect(()=>{if(r){let C=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(C)}}},[r]);let b=()=>{o(!0)},k=()=>{o(!1),u(!1)};return a?e!=="intent"?[s,x,{}]:[s,x,{onFocus:uo(d,b),onBlur:uo(p,k),onMouseEnter:uo(f,b),onMouseLeave:uo(y,k),onTouchStart:uo(g,b)}]:[!1,x,{}]}function uo(e,n){return a=>{e&&e(a),a.defaultPrevented||n(a)}}function bE({page:e,...n}){let a=DC(),{router:r}=yh(),o=S.useMemo(()=>Ux(r.routes,e,r.basename),[r.routes,e,r.basename]);return o?a?S.createElement(SE,{page:e,matches:o,...n}):S.createElement(kE,{page:e,matches:o,...n}):null}function wE(e){let{manifest:n,routeModules:a}=xh(),[r,o]=S.useState([]);return S.useEffect(()=>{let s=!1;return pE(e,n,a).then(u=>{s||o(u)}),()=>{s=!0}},[e,n,a]),r}function SE({page:e,matches:n,...a}){let r=pa(),{future:o}=xh(),{basename:s}=yh(),u=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let d=eb(e,s,o.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,f=[];for(let y of n)typeof y.route.shouldRevalidate=="function"?p=!0:f.push(y.route.id);return p&&f.length>0&&d.searchParams.set("_routes",f.join(",")),[d.pathname+d.search]},[s,o.v8_trailingSlashAwareDataRequests,e,r,n]);return S.createElement(S.Fragment,null,u.map(d=>S.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...a})))}function kE({page:e,matches:n,...a}){let r=pa(),{future:o,manifest:s,routeModules:u}=xh(),{basename:d}=yh(),{loaderData:p,matches:f}=vE(),y=S.useMemo(()=>d0(e,n,f,s,r,"data"),[e,n,f,s,r]),g=S.useMemo(()=>d0(e,n,f,s,r,"assets"),[e,n,f,s,r]),x=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let C=new Set,j=!1;if(n.forEach(_=>{var F;let R=s.routes[_.route.id];!R||!R.hasLoader||(!y.some(U=>U.route.id===_.route.id)&&_.route.id in p&&((F=u[_.route.id])!=null&&F.shouldRevalidate)||R.hasClientLoader?j=!0:C.add(_.route.id))}),C.size===0)return[];let E=eb(e,d,o.v8_trailingSlashAwareDataRequests,"data");return j&&C.size>0&&E.searchParams.set("_routes",n.filter(_=>C.has(_.route.id)).map(_=>_.route.id).join(",")),[E.pathname+E.search]},[d,o.v8_trailingSlashAwareDataRequests,p,r,s,y,n,e,u]),b=S.useMemo(()=>hE(g,s),[g,s]),k=wE(g);return S.createElement(S.Fragment,null,x.map(C=>S.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...a})),b.map(C=>S.createElement("link",{key:C,rel:"modulepreload",href:C,...a})),k.map(({key:C,link:j})=>S.createElement("link",{key:C,nonce:a.nonce,...j,crossOrigin:j.crossOrigin??a.crossOrigin})))}function CE(...e){return n=>{e.forEach(a=>{typeof a=="function"?a(n):a!=null&&(a.current=n)})}}var EE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{EE&&(window.__reactRouterVersion="7.17.0")}catch{}function AE({basename:e,children:n,useTransitions:a,window:r}){let o=S.useRef();o.current==null&&(o.current=rC({window:r,v5Compat:!0}));let s=o.current,[u,d]=S.useState({action:s.action,location:s.location}),p=S.useCallback(f=>{a===!1?d(f):S.startTransition(()=>d(f))},[a]);return S.useLayoutEffect(()=>s.listen(p),[s,p]),S.createElement(tE,{basename:e,children:n,location:u.location,navigationType:u.action,navigator:s,useTransitions:a})}var tb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nb=S.forwardRef(function({onClick:n,discover:a="render",prefetch:r="none",relative:o,reloadDocument:s,replace:u,mask:d,state:p,target:f,to:y,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:b,...k},C){let{basename:j,navigator:E,useTransitions:_}=S.useContext($n),R=typeof y=="string"&&tb.test(y),F=Fx(y,j);y=F.to;let U=BC(y,{relative:o}),O=pa(),W=null;if(d){let Q=tu(d,[],O.mask?O.mask.pathname:"/",!0);j!=="/"&&(Q.pathname=Q.pathname==="/"?j:ua([j,Q.pathname])),W=E.createHref(Q)}let[P,M,T]=xE(r,k),G=RE(y,{replace:u,mask:d,state:p,target:f,preventScrollReset:g,relative:o,viewTransition:x,defaultShouldRevalidate:b,useTransitions:_});function Y(Q){n&&n(Q),Q.defaultPrevented||G(Q)}let ie=!(F.isExternal||s),B=S.createElement("a",{...k,...T,href:(ie?W:void 0)||F.absoluteURL||U,onClick:ie?Y:n,ref:CE(C,M),target:f,"data-discover":!R&&a==="render"?"true":void 0});return P&&!R?S.createElement(S.Fragment,null,B,S.createElement(bE,{page:U})):B});nb.displayName="Link";var jE=S.forwardRef(function({"aria-current":n="page",caseSensitive:a=!1,className:r="",end:o=!1,style:s,to:u,viewTransition:d,children:p,...f},y){let g=Ho(u,{relative:f.relative}),x=pa(),b=S.useContext(nu),{navigator:k,basename:C}=S.useContext($n),j=b!=null&&LE(g)&&d===!0,E=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,_=x.pathname,R=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(_=_.toLowerCase(),R=R?R.toLowerCase():null,E=E.toLowerCase()),R&&C&&(R=Za(R,C)||R);const F=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let U=_===E||!o&&_.startsWith(E)&&_.charAt(F)==="/",O=R!=null&&(R===E||!o&&R.startsWith(E)&&R.charAt(E.length)==="/"),W={isActive:U,isPending:O,isTransitioning:j},P=U?n:void 0,M;typeof r=="function"?M=r(W):M=[r,U?"active":null,O?"pending":null,j?"transitioning":null].filter(Boolean).join(" ");let T=typeof s=="function"?s(W):s;return S.createElement(nb,{...f,"aria-current":P,className:M,ref:y,style:T,to:u,viewTransition:d},typeof p=="function"?p(W):p)});jE.displayName="NavLink";var TE=S.forwardRef(({discover:e="render",fetcherKey:n,navigate:a,reloadDocument:r,replace:o,state:s,method:u=Sc,action:d,onSubmit:p,relative:f,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:x,...b},k)=>{let{useTransitions:C}=S.useContext($n),j=DE(),E=ME(d,{relative:f}),_=u.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&tb.test(d),F=U=>{if(p&&p(U),U.defaultPrevented)return;U.preventDefault();let O=U.nativeEvent.submitter,W=(O==null?void 0:O.getAttribute("formmethod"))||u,P=()=>j(O||U.currentTarget,{fetcherKey:n,method:W,navigate:a,replace:o,state:s,relative:f,preventScrollReset:y,viewTransition:g,defaultShouldRevalidate:x});C&&a!==!1?S.startTransition(()=>P()):P()};return S.createElement("form",{ref:k,method:_,action:E,onSubmit:r?p:F,...b,"data-discover":!R&&e==="render"?"true":void 0})});TE.displayName="Form";function NE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ab(e){let n=S.useContext(ul);return Et(n,NE(e)),n}function RE(e,{target:n,replace:a,mask:r,state:o,preventScrollReset:s,relative:u,viewTransition:d,defaultShouldRevalidate:p,useTransitions:f}={}){let y=ph(),g=pa(),x=Ho(e,{relative:u});return S.useCallback(b=>{if(oE(b,n)){b.preventDefault();let k=a!==void 0?a:Oo(g)===Oo(x),C=()=>y(e,{replace:k,mask:r,state:o,preventScrollReset:s,relative:u,viewTransition:d,defaultShouldRevalidate:p});f?S.startTransition(()=>C()):C()}},[g,y,x,a,r,o,n,e,s,u,d,p,f])}var _E=0,OE=()=>`__${String(++_E)}__`;function DE(){let{router:e}=ab("useSubmit"),{basename:n}=S.useContext($n),a=XC(),r=e.fetch,o=e.navigate;return S.useCallback(async(s,u={})=>{let{action:d,method:p,encType:f,formData:y,body:g}=uE(s,n);if(u.navigate===!1){let x=u.fetcherKey||OE();await r(x,a,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||p,formEncType:u.encType||f,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:g,formMethod:u.method||p,formEncType:u.encType||f,replace:u.replace,state:u.state,fromRouteId:a,flushSync:u.flushSync,viewTransition:u.viewTransition})},[r,o,n,a])}function ME(e,{relative:n}={}){let{basename:a}=S.useContext($n),r=S.useContext(Ea);Et(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Ho(e||".",{relative:n})},u=pa();if(e==null){s.search=u.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:ua([a,s.pathname])),Oo(s)}function LE(e,{relative:n}={}){let a=S.useContext(Wx);Et(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ab("useViewTransitionState"),o=Ho(e,{relative:n});if(!a.isTransitioning)return!1;let s=Za(a.currentLocation.pathname,r)||a.currentLocation.pathname,u=Za(a.nextLocation.pathname,r)||a.nextLocation.pathname;return _c(o.pathname,u)!=null||_c(o.pathname,s)!=null}var zE=Px();const IE="modulepreload",PE=function(e){return"/ui/"+e},f0={},nt=function(n,a,r){let o=Promise.resolve();if(a&&a.length>0){let u=function(f){return Promise.all(f.map(y=>Promise.resolve(y).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=u(a.map(f=>{if(f=PE(f),f in f0)return;f0[f]=!0;const y=f.endsWith(".css"),g=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${g}`))return;const x=document.createElement("link");if(x.rel=y?"stylesheet":IE,y||(x.as="script"),x.crossOrigin="",x.href=f,p&&x.setAttribute("nonce",p),document.head.appendChild(x),y)return new Promise((b,k)=>{x.addEventListener("load",b),x.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return o.then(u=>{for(const d of u||[])d.status==="rejected"&&s(d.reason);return n().catch(s)})},p0=e=>{let n;const a=new Set,r=(f,y)=>{const g=typeof f=="function"?f(n):f;if(!Object.is(g,n)){const x=n;n=y??(typeof g!="object"||g===null)?g:Object.assign({},n,g),a.forEach(b=>b(n,x))}},o=()=>n,d={setState:r,getState:o,getInitialState:()=>p,subscribe:f=>(a.add(f),()=>a.delete(f))},p=n=e(r,o,d);return d},UE=(e=>e?p0(e):p0),BE=e=>e;function HE(e,n=BE){const a=mn.useSyncExternalStore(e.subscribe,mn.useCallback(()=>n(e.getState()),[e,n]),mn.useCallback(()=>n(e.getInitialState()),[e,n]));return mn.useDebugValue(a),a}const h0=e=>{const n=UE(e),a=r=>HE(n,r);return Object.assign(a,n),a},ur=(e=>e?h0(e):h0),ib="dkg-layout",$E=260,ba={leftCollapsed:!1,rightCollapsed:!1,bottomCollapsed:!0,leftSectionMyProjectsOpen:!0,leftSectionIntegrationsOpen:!1,leftWidth:240,rightWidth:360,bottomHeight:$E},rb=140,lb=400,ob=200,sb=500,cb=120,Dc=600,qE=240;function FE(e,n){if(typeof document>"u")return n;const a=getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=parseFloat(a);return Number.isFinite(r)?r:n}function Mc(){const e=FE("--header-h",44),n=typeof window<"u"&&window.innerHeight?window.innerHeight:0;if(!n)return Dc;const a=n-e-qE;return Math.max(0,Math.min(Dc,a))}function Cc(e,n,a){return Math.max(n,Math.min(a,e))}function Lf(e,n,a,r){return typeof e!="number"||!Number.isFinite(e)?n:Cc(e,a,r)}function GE(){try{const e=localStorage.getItem(ib);if(!e)return ba;const n=JSON.parse(e);return{leftCollapsed:typeof n.leftCollapsed=="boolean"?n.leftCollapsed:ba.leftCollapsed,rightCollapsed:typeof n.rightCollapsed=="boolean"?n.rightCollapsed:ba.rightCollapsed,bottomCollapsed:typeof n.bottomCollapsed=="boolean"?n.bottomCollapsed:ba.bottomCollapsed,leftSectionMyProjectsOpen:typeof n.leftSectionMyProjectsOpen=="boolean"?n.leftSectionMyProjectsOpen:ba.leftSectionMyProjectsOpen,leftSectionIntegrationsOpen:typeof n.leftSectionIntegrationsOpen=="boolean"?n.leftSectionIntegrationsOpen:ba.leftSectionIntegrationsOpen,leftWidth:Lf(n.leftWidth,ba.leftWidth,rb,lb),rightWidth:Lf(n.rightWidth,ba.rightWidth,ob,sb),bottomHeight:Lf(n.bottomHeight,ba.bottomHeight,cb,Dc)}}catch{return ba}}let sc=null;function Ka(e){sc&&clearTimeout(sc),sc=setTimeout(()=>{sc=null;try{localStorage.setItem(ib,JSON.stringify(e))}catch{}},150)}function Qa(e){return{leftCollapsed:e.leftCollapsed,rightCollapsed:e.rightCollapsed,bottomCollapsed:e.bottomCollapsed,leftSectionMyProjectsOpen:e.leftSectionMyProjectsOpen,leftSectionIntegrationsOpen:e.leftSectionIntegrationsOpen,leftWidth:e.leftWidth,rightWidth:e.rightWidth,bottomHeight:e.bottomHeight}}const ji=GE(),aa=ur((e,n)=>({leftCollapsed:ji.leftCollapsed,rightCollapsed:ji.rightCollapsed,bottomCollapsed:ji.bottomCollapsed,bottomMaximised:!1,leftSectionMyProjectsOpen:ji.leftSectionMyProjectsOpen,leftSectionIntegrationsOpen:ji.leftSectionIntegrationsOpen,theme:localStorage.getItem("dkg-theme")||"dark",leftWidth:ji.leftWidth,rightWidth:ji.rightWidth,bottomHeight:ji.bottomHeight,toggleLeft:()=>{e(a=>({leftCollapsed:!a.leftCollapsed})),Ka(Qa(n()))},toggleRight:()=>{e(a=>({rightCollapsed:!a.rightCollapsed})),Ka(Qa(n()))},toggleBottom:()=>{e(a=>({bottomCollapsed:!a.bottomCollapsed,bottomMaximised:!1})),Ka(Qa(n()))},toggleBottomMaximised:()=>{e(a=>({bottomMaximised:!a.bottomMaximised,bottomCollapsed:!1})),Ka(Qa(n()))},toggleLeftSectionMyProjects:()=>{e(a=>({leftSectionMyProjectsOpen:!a.leftSectionMyProjectsOpen})),Ka(Qa(n()))},toggleLeftSectionIntegrations:()=>{e(a=>({leftSectionIntegrationsOpen:!a.leftSectionIntegrationsOpen})),Ka(Qa(n()))},setTheme:a=>{localStorage.setItem("dkg-theme",a),e({theme:a})},setLeftWidth:a=>{e({leftWidth:Cc(a,rb,lb)}),Ka(Qa(n()))},setRightWidth:a=>{e({rightWidth:Cc(a,ob,sb)}),Ka(Qa(n()))},setBottomHeight:a=>{const r=Math.min(cb,Mc());e({bottomHeight:Cc(a,r,Dc)}),Ka(Qa(n()))}})),bh=ur(e=>({agents:[],activeAgentName:null,nodeStatus:null,setAgents:n=>e({agents:n}),setActiveAgent:n=>e({activeAgentName:n}),setNodeStatus:n=>e({nodeStatus:n})})),VE=[{id:"dashboard",label:"Dashboard",closable:!1}],gn=ur((e,n)=>({tabs:VE,activeTabId:"dashboard",openTab:a=>{const{tabs:r}=n();r.find(o=>o.id===a.id)?e({activeTabId:a.id}):e({tabs:[...r,a],activeTabId:a.id})},closeTab:a=>{var d;const{tabs:r,activeTabId:o}=n(),s=r.filter(p=>p.id!==a);if(s.length===0)return;const u=o===a?((d=s[Math.max(0,r.findIndex(p=>p.id===a)-1)])==null?void 0:d.id)??s[0].id:o;e({tabs:s,activeTabId:u})},setActiveTab:a=>e({activeTabId:a})})),Lc="dkg.apiToken",WE="/api/agent/identity";let wh;const Mp=new Set;function ub(){if(!(typeof window>"u"))try{return window.sessionStorage.getItem(Lc)||void 0}catch{return}}function Sh(){if(!(typeof window>"u"))return window.__DKG_TOKEN__||void 0}function db(){return wh??ub()}function dr(){return Sh()??db()}function YE(){return Sh()!==void 0}function KE(){const e=dr();return e!==void 0&&(e===Sh()||e===ub())}function QE(e){const n=e.trim();if(!n||typeof window>"u")return!1;wh=n;try{return window.sessionStorage.setItem(Lc,n),!0}catch{try{window.sessionStorage.removeItem(Lc)}catch{}for(const a of Mp)try{a()}catch{}return!1}}function XE(){if(wh=void 0,!(typeof window>"u"))try{window.sessionStorage.removeItem(Lc)}catch{}}function ZE(e){return Mp.add(e),()=>{Mp.delete(e)}}async function JE(e=fetch){const n=dr();try{const a=await e(WE,{headers:n?{Authorization:`Bearer ${n}`}:{},cache:"no-store"});return a.status===401?"required":a.ok?"accepted":"unknown"}catch{return"unknown"}}const ra="";function $t(){const e=dr();return e?{Authorization:`Bearer ${e}`}:{}}class an extends Error{constructor(a,r,o){super(r??`HTTP ${a}`);Ut(this,"status");Ut(this,"body");this.status=a,this.body=o}}async function kh(e,n={},a=1e4){try{return await fetch(e,{...n,signal:AbortSignal.timeout(a)})}catch(r){throw r instanceof Error&&r.name==="TimeoutError"?new Error(`Request timed out after ${Math.round(a/1e3)}s`):r}}const fb=24e4;class pb extends Error{constructor(a){super(a);Ut(this,"outcomeUnknown",!0);this.name="OutcomeUnknownError"}}async function hb(e,n,a){const r=new AbortController,o=setTimeout(()=>r.abort(),fb);try{const s=await fetch(`${ra}${e}`,{...n,signal:r.signal});if(!s.ok){const u=await s.json().catch(()=>({})),d=(u==null?void 0:u.error)??`HTTP ${s.status}`;throw new an(s.status,d,u)}return await s.json()}catch(s){throw r.signal.aborted&&!(s instanceof an)?new pb(a):s}finally{clearTimeout(o)}}function mb(e,n,a){return hb(e,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify(n)},a)}async function Qe(e){const n=await fetch(`${ra}${e}`,{headers:$t()});if(!n.ok){const a=await n.json().catch(()=>({})),r=(a==null?void 0:a.error)??`HTTP ${n.status}`;throw new an(n.status,r,a)}return n.json()}async function fl(e){const n=await fetch(`${ra}${e}`,{headers:$t()});if(!n.ok){const a=await n.json().catch(()=>({})),r=(a==null?void 0:a.error)??`HTTP ${n.status}`;throw new an(n.status,r,a)}return n.json()}async function gb(e,n){const a=await kh(`${ra}${e}`,{headers:$t()},n);if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new an(a.status,o,r)}return a.json()}async function Xt(e,n){const a=await fetch(`${ra}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify(n)});if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new an(a.status,o,r)}return a.json()}async function Ch(e,n){const a=await fetch(`${ra}${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify(n)});if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new Error(o)}return a.json()}async function eA(e){const n=await fetch(`${ra}${e}`,{method:"DELETE",headers:$t()});if(!n.ok){const a=await n.json().catch(()=>({})),r=(a==null?void 0:a.error)??`HTTP ${n.status}`;throw new an(n.status,r,a)}return n.json()}class m0{constructor(n,a=()=>!0){Ut(this,"maxEntries");Ut(this,"shouldAdmit");Ut(this,"entries",new Map);if(this.maxEntries=n,this.shouldAdmit=a,!Number.isSafeInteger(n)||n<1)throw new RangeError("maxEntries must be a positive safe integer")}get size(){return this.entries.size}has(n){return this.entries.has(n)}get(n){if(!this.entries.has(n))return;const a=this.entries.get(n);return this.entries.delete(n),this.entries.set(n,a),a}delete(n){return this.entries.delete(n)}clear(){this.entries.clear()}set(n,a){if(!this.shouldAdmit(n)||(this.entries.delete(n),this.entries.set(n,a),this.entries.size<=this.maxEntries))return;const r=this.entries.keys().next();r.done||this.entries.delete(r.value)}}const tA=256,Lp=64*1024,nA=4,aA=2*1024*1024;function iA(){return{small:new m0(tA,e=>e.length<=Lp),large:new m0(nA,e=>e.length>Lp&&e.length<=aA)}}class rA{constructor(){Ut(this,"tiers",iA())}tierFor(n){return n.length<=Lp?"small":"large"}get(n){return this.tiers[this.tierFor(n)].get(n)}set(n,a){const r=this.tierFor(n);r==="large"&&!a.largeCacheable||this.tiers[r].set(n,a)}}function lA(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function zp(e){return e<=1114111&&!(e>=55296&&e<=57343)}function Ht(e,n){if(n<0||n>=e.length)return null;const a=e.charCodeAt(n);if(a!==92){const d=e.codePointAt(n);return d===void 0||!zp(d)?null:{codePoint:d,rawWidth:d>65535?2:1}}const r=e[n+1];if(r!=="u"&&r!=="U")return{codePoint:a,rawWidth:1};const o=r==="u"?4:8,s=n+2+o;if(s>e.length)return null;let u=0;for(let d=n+2;d<s;d++){const p=e.charCodeAt(d);if(!lA(p))return null;u=u*16+Number.parseInt(e[d],16)}return zp(u)?{codePoint:u,rawWidth:2+o}:null}function yb(e){return e>=65&&e<=90||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function iu(e){return e===95||yb(e)}function oA(e){return iu(e)||e===45||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}function pl(e,n,a){const r=Ht(e,n);return r&&a(r.codePoint)?r.rawWidth:0}function vb(e,n){return pl(e,n,yb)}function sA(e,n){return pl(e,n,iu)}function zc(e,n){return pl(e,n,oA)}function Ip(e,n){return pl(e,n,a=>a>=48&&a<=57)}function cA(e){return iu(e)||e>=48&&e<=57}function uA(e){return iu(e)||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}function dA(e,n){return pl(e,n,cA)}function g0(e,n){return pl(e,n,uA)}function fA(e,n){const a=Ht(e,n);if(!a||a.codePoint!==63&&a.codePoint!==36)return null;let r=n+a.rawWidth;const o=dA(e,r);if(!o)return null;r+=o;let s=g0(e,r);for(;s;)r+=s,s=g0(e,r);return r}function pA(e,n,a){const r=Ht(e,n);return(r==null?void 0:r.codePoint)===a?r.rawWidth:0}function hA(e,n){const a=Ht(e,n);if(!a||a.codePoint!==34&&a.codePoint!==39)return null;const r=a.codePoint,o=a.rawWidth>1,s=g=>{if(o)return pA(e,g,r);const x=e.codePointAt(g);return x===r?x>65535?2:1:0};let u=n+a.rawWidth;const d=s(u),p=d?s(u+d):0,f=d>0&&p>0;f&&(u+=d+p);let y=!1;for(;u<e.length;){if(!o&&e.charCodeAt(u)===92){if(e[u+1]==="u"||e[u+1]==="U"){const E=Ht(e,u);E||(y=!0),u+=(E==null?void 0:E.rawWidth)??1;continue}const j=e.codePointAt(u+1);u+=1+(j!==void 0&&j>65535?2:1);continue}const g=Ht(e,u);if(!g){y=!0,u++;continue}if(g.codePoint===92){const j=Ht(e,u+g.rawWidth);u+=g.rawWidth+((j==null?void 0:j.rawWidth)??0);continue}const x=s(u);if(!x){u+=g.rawWidth;continue}if(!f)return{end:u+x,closed:!0,malformedUchar:y};const b=u+x,k=s(b),C=k?s(b+k):0;if(k&&C)return{end:b+k+C,closed:!0,malformedUchar:y};u+=g.rawWidth}return{end:e.length,closed:!1,malformedUchar:y}}function y0(e){return e>32&&e!==60&&e!==62&&e!==34&&e!==123&&e!==125&&e!==124&&e!==94&&e!==96&&e!==92}function mA(e,n,a){let r=n;if(!a){let s=null,u=n;for(;r<e.length;){const d=e.charCodeAt(r);if(d===62)return{end:r+1,logicalValue:s===null?e.slice(n,r):[...s,e.slice(u,r)].join("")};if(d===92){const f=Ht(e,r);if(!f||e[r+1]!=="u"&&e[r+1]!=="U")return null;s??(s=[]),s.push(e.slice(u,r),String.fromCodePoint(f.codePoint)),r+=f.rawWidth,u=r;continue}const p=e.codePointAt(r);if(p===void 0||!zp(p)||!y0(p))return null;r+=p>65535?2:1}return null}const o=[];for(;r<e.length;){const s=Ht(e,r);if(!s)return null;if(s.codePoint===62)return{end:r+s.rawWidth,logicalValue:o.join("")};if(!y0(s.codePoint))return null;o.push(String.fromCodePoint(s.codePoint)),r+=s.rawWidth}return null}function gA(e,n){const a=Ht(e,n);return!a||a.codePoint!==60?null:mA(e,n+a.rawWidth,a.rawWidth>1)}function Do(e,n,a){const r=Ht(e,n);return(r==null?void 0:r.codePoint)===a?r.rawWidth:0}function v0(e,n){const a=Ht(e,n);return a&&(a.codePoint>=48&&a.codePoint<=57||a.codePoint>=65&&a.codePoint<=70||a.codePoint>=97&&a.codePoint<=102)?a.rawWidth:0}function xb(e,n){const a=Ht(e,n);if(!a)return 0;if(a.codePoint===37){const s=v0(e,n+a.rawWidth);if(!s)return 0;const u=v0(e,n+a.rawWidth+s);return u?a.rawWidth+s+u:0}if(a.codePoint!==92)return 0;const r=Ht(e,n+a.rawWidth);if(!r)return 0;const o=String.fromCodePoint(r.codePoint);return"_~.-!$&'()*+,;=/?#@%".includes(o)?a.rawWidth+r.rawWidth:0}function yA(e,n){return sA(e,n)||Ip(e,n)||Do(e,n,58)||xb(e,n)}function vA(e,n){return zc(e,n)||Do(e,n,58)||xb(e,n)}function x0(e,n){let a=n,r=yA(e,a);if(!r)return a;a+=r;let o=a;for(;a<e.length;){if(r=vA(e,a),r){a+=r,o=a;continue}const s=Do(e,a,46);if(s){a+=s;continue}break}return o}function xA(e,n){const a=vb(e,n);if(!a)return;let r=n+a,o=r;for(;r<e.length;){const u=zc(e,r);if(u){r+=u,o=r;continue}const d=Do(e,r,46);if(d){r+=d;continue}break}const s=Do(e,r,58);return s&&r===o?{end:r+s}:void 0}function bA(e){return/\s/u.test(String.fromCodePoint(e))}function zf(e,n,a){for(let r=n;r<a;r++)e[r]=" "}function wA(e,n,a){const r=[];let o=n;for(;o<a;){const s=Ht(e,o);if(!s||o+s.rawWidth>a)return null;r.push(String.fromCodePoint(s.codePoint)),o+=s.rawWidth}return r.join("")}function If(e,n){let a=n,r=0,o=Ip(e,a);for(;o>0;)a+=o,r++,o=Ip(e,a);return{end:a,count:r}}function SA(e,n){let a=n;const r=Ht(e,a);((r==null?void 0:r.codePoint)===43||(r==null?void 0:r.codePoint)===45)&&(a+=r.rawWidth);const o=If(e,a);a=o.end;const s=a,u=Ht(e,a);let d=0,p=!1;if((u==null?void 0:u.codePoint)===46){p=!0;const y=If(e,a+u.rawWidth);a=y.end,d=y.count}if(o.count===0&&d===0)return null;const f=Ht(e,a);if((f==null?void 0:f.codePoint)===69||(f==null?void 0:f.codePoint)===101){let y=a+f.rawWidth;const g=Ht(e,y);((g==null?void 0:g.codePoint)===43||(g==null?void 0:g.codePoint)===45)&&(y+=g.rawWidth);const x=If(e,y);if(x.count>0)return x.end}return p&&d===0?o.count>0?s:null:a}function fo(e,n,a,r,o=wA(n,a,r)){if(o===null)return null;const s={raw:n.slice(a,r),logicalValue:o,start:a,end:r};return e==="word"?{kind:e,...s,upper:o.toUpperCase()}:{kind:e,...s}}function kA(e){return e?e.kind==="variable"||e.kind==="prefixed-name"||e.kind==="number"||e.kind==="iri"||e.kind==="string"?!0:e.kind==="word"?e.upper==="TRUE"||e.upper==="FALSE":e.logicalValue===")":!1}function CA(e,n){return!(n[n.length-1]==="("&&kA(e[e.length-1]))}function EA(e,n){if(n==="("||n==="{"){e.push(n);return}const a=n===")"?"(":n==="}"?"{":void 0;a!==void 0&&e[e.length-1]===a&&e.pop()}function AA(e){var r;const n=[];let a=0;for(;a<e.length;){const o=e[a];if((o==null?void 0:o.kind)!=="word")break;if(o.upper==="BASE"&&((r=e[a+1])==null?void 0:r.kind)==="iri"){a+=2;continue}if(o.upper!=="PREFIX")break;const s=e[a+1],u=e[a+2];if((s==null?void 0:s.kind)!=="prefixed-name"||o.end===s.start||(u==null?void 0:u.kind)!=="iri"||s.logicalValue.indexOf(":")!==s.logicalValue.length-1)break;n.push(s.logicalValue.slice(0,-1)),a+=3}return{endTokenIndex:a,declaredPrefixes:n}}function b0(e){const n=e.split(""),a=[],r=[],o=[];let s=!1,u=0;for(;u<e.length;){const f=Ht(e,u);if(!f)return null;if(bA(f.codePoint)){a.push(String.fromCodePoint(f.codePoint)),u+=f.rawWidth;continue}if(f.codePoint===35){const k=u;u+=f.rawWidth;const C=u;for(;u<e.length&&e[u]!==`
|
|
62
|
-
`&&e[u]!=="\r";)u++;a.push(String.fromCodePoint(f.codePoint),e.slice(C,u)),zf(n,k,u);continue}if(f.codePoint===34||f.codePoint===39){const k=u,C=hA(e,k);if(!C){a.push(String.fromCodePoint(f.codePoint)),u+=f.rawWidth;continue}if(C.malformedUchar)return null;u=C.end,a.push(e.slice(k,u)),zf(n,k,u),r.push({kind:"string",raw:e.slice(k,u),start:k,end:u}),C.closed||(s=!0);continue}if(f.codePoint===60&&CA(r,o)){const k=gA(e,u);if(k!==null){const C=u;u=k.end,a.push(e.slice(C,u)),zf(n,C,u),r.push({kind:"iri",raw:e.slice(C,u),logicalValue:k.logicalValue,start:C,end:u});continue}}if(f.codePoint===63||f.codePoint===36){const k=fA(e,u);if(k!==null){const C=u;u=k;const j=fo("variable",e,C,u);if(!j)return null;r.push(j),a.push(j.logicalValue);continue}}const y=SA(e,u);if(y!==null){const k=u;u=y;const C=fo("number",e,k,u);if(!C)return null;r.push(C),a.push(C.logicalValue);continue}if(f.codePoint===58){const k=u;u=x0(e,u+f.rawWidth);const C=fo("prefixed-name",e,k,u);if(!C)return null;r.push(C),a.push(C.logicalValue);continue}const g=vb(e,u);if(g){const k=u,C=xA(e,u);let j;if(C)j="prefixed-name",u=x0(e,C.end);else{j="word",u+=g;let _=zc(e,u);for(;_;)u+=_,_=zc(e,u)}const E=fo(j,e,k,u);if(!E)return null;r.push(E),a.push(E.logicalValue);continue}const x=u;u+=f.rawWidth;const b=fo("symbol",e,x,u,String.fromCodePoint(f.codePoint));if(!b)return null;r.push(b),a.push(b.logicalValue),EA(o,b.logicalValue)}const d=n.join(""),p=new Set;for(const f of r)f.kind==="word"&&p.add(f.upper);return{masked:d,materialized:a.join(""),tokens:r,unterminated:s,wordTokens:p,prologue:AA(r)}}function w0(e){return{status:"malformed-uchar",source:e,masked:" ".repeat(e.length),materialized:e,tokens:[],unterminated:!1,wordTokens:new Set,prologue:{endTokenIndex:0,declaredPrefixes:[]}}}function jA(e,n){return e.unterminated!==n.unterminated||e.tokens.length!==n.tokens.length?!1:e.tokens.every((a,r)=>{const o=n.tokens[r];return(o==null?void 0:o.kind)!==a.kind?!1:a.kind==="string"?o.raw===a.raw:o.kind==="string"?!1:o.logicalValue===a.logicalValue})}function TA(e){const n=b0(e);if(n===null)return w0(e);if(n.materialized!==e){const a=b0(n.materialized);if(a===null||a.materialized!==n.materialized||!jA(n,a))return w0(e)}return{status:"valid",source:e,masked:n.masked,materialized:n.materialized,tokens:n.tokens,unterminated:n.unterminated,wordTokens:new Set(n.wordTokens),prologue:n.prologue}}function Pf(e,n,a){const r=[],o=Array(e.length).fill(-1),s=[],u=[];let d=0,p=!0;for(let f=0;f<e.length;f++){r.push(d);const y=e[f];if(y.kind!=="symbol")continue;if(y.logicalValue===n){u.push(f),d++;continue}if(y.logicalValue!==a)continue;const g=u.pop();g===void 0?p=!1:(o[g]=f,o[f]=g,s.push({openingTokenIndex:g,closingTokenIndex:f,depth:r[g]})),d--}return Object.freeze({depthBefore:Object.freeze(r),matchingTokenIndexes:Object.freeze(o),ranges:Object.freeze(s.sort((f,y)=>f.openingTokenIndex-y.openingTokenIndex)),balanced:p&&u.length===0&&d===0})}function NA(e){const{tokens:n}=e,a=Pf(n,"{","}"),r=Pf(n,"(",")"),o=Pf(n,"[","]");return Object.freeze({braces:a,parentheses:r,brackets:o,balanced:a.balanced&&r.balanced&&o.balanced})}function S0(e,n,a=0,r=e.depthBefore.length){const o=[];for(let s=a;s<r;s++)e.depthBefore[s]===n&&o.push(s);return o}function bb(e){return(e==null?void 0:e.kind)==="iri"?e.logicalValue:null}function RA(e){const n=new Map;for(let a=0;a+2<e.prologue.endTokenIndex;a++){const r=e.tokens[a],o=e.tokens[a+1],s=e.tokens[a+2];if((r==null?void 0:r.kind)!=="word"||r.upper!=="PREFIX"||(o==null?void 0:o.kind)!=="prefixed-name"||!o.logicalValue.endsWith(":"))continue;const u=bb(s);u!==null&&n.set(o.logicalValue.slice(0,-1),u),a+=2}return n}function _A(e,n){const{tokens:a}=e,r=[];let o=-1;for(const f of S0(n.braces,0)){const y=a[f];if((y==null?void 0:y.kind)==="word"&&y.upper==="WHERE"){const g=a[f+1];if((g==null?void 0:g.kind)!=="symbol"||g.logicalValue!=="{")return null;o=f+1;break}(y==null?void 0:y.kind)==="symbol"&&y.logicalValue==="{"&&r.push(f)}const s=o>=0?o:n.braces.balanced?r.at(-1)??-1:-1;if(s<0)return null;const u=n.braces.matchingTokenIndexes[s]??-1;if(u<0)return null;const d=n.braces.depthBefore[s]+1,p=S0(n.braces,d,s+1,u).some(f=>{const y=a[f];return(y==null?void 0:y.kind)==="word"&&y.upper==="UNION"});return{openStart:a[s].start,openEnd:a[s].end,close:a[u].start,hasUnion:p,openingTokenIndex:s,closingTokenIndex:u}}function k0(e,n,a){const r=[],o=new Set;for(let s=n;s<a;s++){const u=e.tokens[s];if((u==null?void 0:u.kind)!=="variable")continue;const d=u.logicalValue.slice(1);o.has(d)||(o.add(d),r.push({source:u.raw,logicalName:d}))}return r}function OA(e){const n=NA(e),a=_A(e,n),r=e.tokens[e.prologue.endTokenIndex],o=RA(e),s=n.braces.depthBefore,u=[],d=[],p=new Set;let f=!1;for(let y=0;y<e.tokens.length;y++){const g=e.tokens[y];if(g.kind!=="word"||(g.upper==="FROM"&&(f=!0),g.upper!=="GRAPH"))continue;const x=e.tokens[y+1];if((x==null?void 0:x.kind)==="variable"){const k={source:x.raw,logicalName:x.logicalValue.slice(1)};u.push({kind:"variable",variable:k,keywordTokenIndex:y,targetTokenIndex:y+1,braceDepth:s[y]}),p.has(k.logicalName)||(p.add(k.logicalName),d.push(k));continue}const b=bb(x);if(b!==null){u.push({kind:"iri",iri:b,keywordTokenIndex:y,targetTokenIndex:y+1,braceDepth:s[y]});continue}if((x==null?void 0:x.kind)==="prefixed-name"){const k=x.logicalValue.indexOf(":"),C=o.get(x.logicalValue.slice(0,k));if(k>=0&&C!==void 0){u.push({kind:"iri",iri:`${C}${x.logicalValue.slice(k+1)}`,keywordTokenIndex:y,targetTokenIndex:y+1,braceDepth:s[y]});continue}}u.push({kind:"invalid",keywordTokenIndex:y,targetTokenIndex:y+1,braceDepth:s[y]})}return{source:e.source,prepared:e,structure:n,operation:(r==null?void 0:r.kind)==="word"?r.upper:null,where:a,queryVariables:k0(e,0,e.tokens.length),whereVariables:a?k0(e,a.openingTokenIndex+1,a.closingTokenIndex):[],prefixes:o,hasDatasetClause:f,hasGraphClause:u.length>0,graphTargets:u,graphVariables:d}}const DA=["SELECT","CONSTRUCT","ASK","DESCRIBE"],wb=["INSERT","DELETE","LOAD","CLEAR","DROP","CREATE","COPY","MOVE","ADD"],MA=[...wb,"WITH"],C0=new rA,LA=new Set(wb),zA=new Set(MA),IA=new Set(DA);function PA(e){const{operation:n}=e;return n===null?"UNKNOWN":Sb(n)||kb(n)?n:"UNKNOWN"}function Sb(e){return IA.has(e)}function kb(e){return zA.has(e)}function UA(e){return Sb(e)?{kind:"read",form:e}:kb(e)?{kind:"update"}:{kind:"unknown"}}function Uf(e){return{operation:UA(e.form),mutatingKeyword:e.mutatingKeyword}}function E0(e){if(e.status!=="valid")return Object.freeze({facts:Object.freeze({form:"UNKNOWN",mutatingKeyword:null}),largeCacheable:!1});const n=OA(e),a=PA(n),r=e.tokens.find(o=>o.kind==="word"&&LA.has(o.upper));return Object.freeze({facts:Object.freeze({form:a,mutatingKeyword:(r==null?void 0:r.kind)==="word"?r.raw:null}),largeCacheable:a!=="UNKNOWN"&&!e.unterminated&&n.structure.balanced})}function BA(e){if(typeof e!="string")return Uf(E0(e).facts);const n=C0.get(e);if(n)return Uf(n.facts);const a=E0(TA(e));return C0.set(e,a),Uf(a.facts)}function HA(e){return BA(e).operation}const A0=(e,n,a)=>{const r=new URLSearchParams;n&&r.set("key",n),a!=null&&a.extended&&r.set("extended","1");const o=r.toString();return fl(`/api/pca/${encodeURIComponent(e)}${o?`?${o}`:""}`).then(s=>a!=null&&a.extended?{...s,extendedRequested:!0}:s)},f8=e=>Xt("/api/pca",{tokens:e.tokens,primaryNode:e.primaryNode}),p8=(e,n)=>Xt(`/api/pca/${encodeURIComponent(e)}/agent`,{agent:n}),h8=(e,n)=>eA(`/api/pca/${encodeURIComponent(e)}/agent/${encodeURIComponent(n)}`),m8=(e,n)=>Xt(`/api/pca/${encodeURIComponent(e)}/funds`,{tokens:n}),g8=e=>Xt(`/api/pca/${encodeURIComponent(e)}/settle`,{}),y8=e=>fl(`/api/pca/${encodeURIComponent(e)}/agents`),v8=e=>fl(`/api/pca/agent/${encodeURIComponent(e)}`),x8=e=>fl("/api/pca/mine?hydrate=1"),b8=e=>fl(`/api/pca/designatable-nodes${e!=null&&e.fresh?"?fresh=1":""}`),$A=()=>fl("/api/pca/contracts");function Cb(e){var a;if(!(e instanceof an))return!1;const n=(a=e.body)==null?void 0:a.code;return typeof n=="string"&&(n.startsWith("RPC_")||n==="TIMEOUT")}function w8(e){return e instanceof an&&e.status===503&&!Cb(e)}function S8(e){if(!(e instanceof an)||e.status!==503)return!1;const n=e.body;return(n==null?void 0:n.code)==="PCA_LOOKUP_READ_FAILED"||(n==null?void 0:n.error)==="PCA_LOOKUP_READ_FAILED"}const qA=["PrimaryNodeNotInShardingTable","PrimaryNodeUnchanged","PrimaryNodeChangeRateLimited","ZeroPrimaryNode","InvalidAmount","ZeroAgentAddress","TokenTransferFailed","NotAccountOwner","AgentAlreadyRegistered","AgentNotRegistered","AgentCapReached","AccountExpired","AccountAlreadyFullySettled","UnknownAccount"];function k8(e,n={}){if(!(e instanceof an))return null;const a=e.status,r=e.body??{},o=typeof r.error=="string"&&r.error.length>0?r.error:e.message,s=n.accountId?`PCA #${n.accountId}`:"this Publisher Conviction Account",u=r.existingAccountId!=null?String(r.existingAccountId):void 0;if(Cb(e))return{code:"ServerError",status:a,message:"The chain RPC is temporarily unavailable — try again."};if(a===503)return{code:"FEATURE_UNAVAILABLE",status:a,message:"Publisher Conviction Accounts aren't available on this network."};const d=qA.find(p=>new RegExp(`\\b${p}\\b`).test(o));if(d){let p;switch(d){case"InvalidAmount":p="Enter a TRAC amount greater than 0.";break;case"PrimaryNodeNotInShardingTable":p="That primary node isn't a staked node in the sharding table.";break;case"ZeroPrimaryNode":p="Choose a staked node as the primary node.";break;case"PrimaryNodeUnchanged":p="That's already this account's primary node.";break;case"PrimaryNodeChangeRateLimited":p="The primary node was changed too recently — try again later.";break;case"ZeroAgentAddress":p="Enter a valid operational wallet address.";break;case"TokenTransferFailed":p="The TRAC transfer failed — check the owner wallet's TRAC balance and allowance.";break;case"NotAccountOwner":p=`This node isn't the owner of ${s}, so it can't manage it.`;break;case"UnknownAccount":p=`${s} doesn't exist.`;break;case"AgentAlreadyRegistered":p=u?`This operational wallet is already an approved publishing wallet on PCA #${u} — deregister it there first.`:"This operational wallet is already approved on another PCA — deregister it there first.";break;case"AgentNotRegistered":p=`This operational wallet isn't an approved publishing wallet on ${s}.`;break;case"AgentCapReached":p=`${s} already has the maximum 100 approved publishing wallets.`;break;case"AccountExpired":p=`${s} has expired.`;break;case"AccountAlreadyFullySettled":p=`${s} is already fully settled.`;break;default:p=o}return{code:d,status:a,message:p,...u?{existingAccountId:u}:{}}}return a===404?{code:"UnknownAccount",status:a,message:`${s} doesn't exist.`}:a===403?{code:"NotAccountOwner",status:a,message:`This node isn't the owner of ${s}, so it can't manage it.`}:a===400?{code:"BadRequest",status:a,message:o}:a===409?{code:"Conflict",status:a,message:o}:a>=500?{code:"ServerError",status:a,message:"Something went wrong talking to the chain — try again."}:{code:"Unknown",status:a,message:o}}const j0="did:dkg:context-graph:",Eb=6e4;function Eh(e){return`${e} got no response within ${fb/6e4} minutes. The outcome is unknown: the node keeps working after the page stops waiting, so it may still complete. Check the Knowledge Asset's history before retrying.`}function Ab(e){const n=e.trim();return n.startsWith(j0)?n.slice(j0.length):n}class Ic extends Error{constructor(a,r={}){super(a);Ut(this,"status");Ut(this,"code");Ut(this,"source");Ut(this,"details");Ut(this,"correlationId");Ut(this,"timeoutMs");Ut(this,"target");Ut(this,"route");Ut(this,"integrationId");Ut(this,"retryable");Ut(this,"text");Ut(this,"timedOut");this.name="LocalAgentApiError",Object.assign(this,r)}}const FA=()=>Qe("/api/status"),C8=()=>Qe("/api/settings/retention"),E8=e=>Ch("/api/settings/retention",{retentionDays:e}),A8=()=>Qe("/api/settings/telemetry"),j8=e=>Ch("/api/settings/telemetry",{enabled:e}),GA=()=>Qe("/api/connections"),VA=(e,n=1e4)=>kh(`${ra}/api/connect`,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify({multiaddr:e})},n).then(async a=>{if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new Error(o)}return a.json()}),WA=(e,n=2e4)=>kh(`${ra}/api/connect`,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify({peerId:e})},n).then(async a=>{if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new Error(o)}return a.json()}),jb=()=>Qe("/api/agents"),YA=()=>Qe("/api/metrics"),T8=(e,n,a=300)=>Qe(`/api/metrics/history?from=${e}&to=${n}&maxPoints=${a}`),KA=(e={})=>{const n=new URLSearchParams({...e,phases:"1"}).toString();return Qe(`/api/operations?${n}`)},N8=e=>Qe(`/api/operations/${e}`),R8=e=>{const n=e?`?periodMs=${e}`:"";return Qe(`/api/error-hotspots${n}`)},_8=(e={})=>{const n=new URLSearchParams;e.phase&&n.set("phase",e.phase),e.operationName&&n.set("operationName",e.operationName),e.periodMs&&n.set("periodMs",String(e.periodMs)),e.q&&n.set("q",e.q),e.limit&&n.set("limit",String(e.limit));const a=n.toString();return Qe(`/api/failed-operations${a?"?"+a:""}`)},O8=e=>Qe(`/api/replication/summary${e?`?periodMs=${e}`:""}`),D8=e=>Qe(`/api/replication/per-cg${e?`?periodMs=${e}`:""}`),M8=(e={})=>{const n=new URLSearchParams;e.periodMs&&n.set("periodMs",String(e.periodMs)),e.bucketMs&&n.set("bucketMs",String(e.bucketMs)),e.cg&&n.set("cg",e.cg);const a=n.toString();return Qe(`/api/replication/timeline${a?"?"+a:""}`)},L8=()=>Qe("/api/replication/cursors"),z8=(e,n=100)=>Qe(`/api/replication/events?cg=${encodeURIComponent(e)}&limit=${n}`),I8=e=>Qe(`/api/success-rates?periodMs=${e}`),P8=(e,n)=>{const a=`periodMs=${e}${n?`&bucketMs=${n}`:""}`;return Qe(`/api/per-type-stats?${a}`)},QA=(e={})=>{const n=new URLSearchParams;e.lines&&n.set("lines",String(e.lines)),e.q&&n.set("q",e.q);const a=n.toString();return Qe(`/api/node-log${a?"?"+a:""}`)};async function Ah(){return{contextGraphs:((await gb("/api/context-graph/list",Eb)).contextGraphs??[]).filter(a=>!a.isSystem)}}const ru=()=>Qe("/api/agent/identity");async function XA(e,n,a,r){const o=new AbortController,s=setTimeout(()=>o.abort(),3e4);try{const u=await fetch(`${ra}/api/context-graph/create`,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify({id:e,name:n,description:a,...r!=null&&r.register?{register:!0}:{},...r!=null&&r.allowedAgents?{allowedAgents:r.allowedAgents}:{},...(r==null?void 0:r.accessPolicy)!==void 0?{accessPolicy:r.accessPolicy}:{},...(r==null?void 0:r.publishPolicy)!==void 0?{publishPolicy:r.publishPolicy}:{}}),signal:o.signal});if(!u.ok){const d=await u.json().catch(()=>({}));throw new Error((d==null?void 0:d.error)??`HTTP ${u.status}`)}return u.json()}catch(u){throw u.name==="AbortError"?new Error("Creating project is taking longer than expected — it may still complete in the background. Refresh the page in a moment."):u}finally{clearTimeout(s)}}const U8=(e,n)=>Xt(`/api/context-graph/${encodeURIComponent(e)}/remove-participant`,{agentAddress:n}),ZA=e=>Qe(`/api/context-graph/${encodeURIComponent(e)}/participants`),JA=e=>Xt(`/api/context-graph/${encodeURIComponent(e)}/sign-join`,{}),ej=(e,n)=>Xt(`/api/context-graph/${encodeURIComponent(e)}/request-join`,n),B8=e=>Qe(`/api/context-graph/${encodeURIComponent(e)}/join-requests`),tj=(e,n)=>Xt(`/api/context-graph/${encodeURIComponent(e)}/approve-join`,{agentAddress:n}),nj=(e,n)=>Xt(`/api/context-graph/${encodeURIComponent(e)}/reject-join`,{agentAddress:n}),aj={md:"text/markdown",markdown:"text/markdown",txt:"text/plain",csv:"text/csv",json:"application/json",xml:"application/xml",yaml:"text/yaml",yml:"text/yaml",pdf:"application/pdf",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",doc:"application/msword",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",epub:"application/epub+zip",ttl:"text/turtle",rdf:"application/rdf+xml",owl:"application/rdf+xml",html:"text/html",htm:"text/html",py:"text/x-python",ts:"text/typescript",js:"text/javascript",tsx:"text/typescript",jsx:"text/javascript",java:"text/x-java",go:"text/x-go",rs:"text/x-rust",c:"text/x-c",cpp:"text/x-c++",h:"text/x-c",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",webp:"image/webp"};function ij(e){var a;if(e.type&&e.type!=="application/octet-stream")return e.type;const n=((a=e.name.split(".").pop())==null?void 0:a.toLowerCase())??"";return aj[n]}async function rj(e,n,a,r){const o=new FormData;o.append("file",a),o.append("contextGraphId",n);const s=ij(a);return s&&o.append("contentType",s),hb(`/api/knowledge-assets/${encodeURIComponent(e)}/wm/import-file`,{method:"POST",headers:$t(),body:o},Eh(`Importing "${a.name}" into "${e}"`))}function lj(e,n){var d;const a=e&&typeof e=="object"&&!Array.isArray(e)?e:{},r=a.result??a.results,o=r&&typeof r=="object"&&!Array.isArray(r)?r:{};if(o.type==="boolean"&&typeof o.value=="boolean")return{result:{type:"boolean",value:o.value}};if(o.type==="quads"&&Array.isArray(o.quads))return{result:{type:"quads",quads:o.quads}};if(o.type==="bindings"&&Array.isArray(o.bindings))return{result:{type:"bindings",bindings:o.bindings}};const s=HA(n),u=Array.isArray(o.bindings)?o.bindings:[];if(s.kind==="read"&&s.form==="ASK"){const p=(d=u[0])==null?void 0:d.result,f=p&&typeof p=="object"&&!Array.isArray(p)?p.value:p;return{result:{type:"boolean",value:String(f).toLowerCase()==="true"}}}return s.kind==="read"&&(s.form==="CONSTRUCT"||s.form==="DESCRIBE")?{result:{type:"quads",quads:Array.isArray(o.quads)?o.quads:[]}}:{result:{type:"bindings",bindings:u}}}const Bf=new Map;function Pc(e){const n=JSON.stringify(e),a=Bf.get(n);if(a)return a;const r=(async()=>{const o=await fetch(`${ra}/api/query`,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:n});if(!o.ok){const s=await o.json().catch(()=>({})),u=(s==null?void 0:s.error)??`HTTP ${o.status}`;throw new an(o.status,u,s)}return lj(await o.json(),String(e.sparql??""))})().finally(()=>{Bf.delete(n)});return Bf.set(n,r),r}const jh=(e,n={})=>Pc({sparql:e,...n});async function H8(e){var s;const a=`SELECT ?name ?ual WHERE {
|
|
63
|
-
GRAPH <${`did:dkg:context-graph:${e}/_meta`}> {
|
|
64
|
-
?lc <http://dkg.io/ontology/assertionName> ?name ;
|
|
65
|
-
<http://dkg.io/ontology/reservedUal> ?ual .
|
|
66
|
-
}
|
|
67
|
-
}`,r=await jh(a,{contextGraphId:e}),o={};for(const u of((s=r==null?void 0:r.result)==null?void 0:s.bindings)??[]){const d=Bc(u.name),p=Bc(u.ual);d&&p&&!o[d]&&(o[d]=p)}return o}const $8=(e,n)=>Xt("/api/profile/query-catalog/write",{contextGraphId:e,quads:n}),q8=e=>Xt("/api/profile/query-catalog/read",{contextGraphId:e}),oj=new Set(["clearAfter","publishEpochs","publisherNodeIdentityIdOverride"]),sj=e=>{if(typeof e=="string"&&/^\d+$/.test(e))return e;throw new Error("publisherNodeIdentityIdOverride must be passed as a decimal string")},cj=(e,n=[])=>{if(!e)return;const a=Object.keys(e).filter(s=>!oj.has(s)&&!n.includes(s));if(a.length>0)throw new Error(`Unsupported finalized publish option(s): ${a.join(", ")}`);const r={};e.clearAfter!==void 0&&(r.clearSharedMemoryAfter=e.clearAfter),e.publishEpochs!==void 0&&(r.publishEpochs=e.publishEpochs);const o=e.publisherNodeIdentityIdOverride;return o!==void 0&&(r.publisherNodeIdentityIdOverride=sj(o)),Object.keys(r).length>0?r:void 0};function uj(e){const n=e;if(Array.isArray(n.entities))throw Object.assign(new Error("Knowledge Assets are shared atomically; root-entity selection is not supported"),{code:"KA_ATOMIC_SHARE_REQUIRED"});if(n.entities!==void 0&&n.entities!=="all")throw Object.assign(new Error("Knowledge Assets are shared atomically; omit entities to share the complete asset"),{code:"KA_ATOMIC_SHARE_REQUIRED"});if(n.skipSeal===!0)throw Object.assign(new Error("Knowledge Assets are always sealed before sharing"),{code:"UNSEALED_SHARE_BLOCKED"});if(n.skipSeal!==void 0&&n.skipSeal!==!1)throw new TypeError("skipSeal must be false or omitted");if(n.awaitCuratorAck!==void 0&&typeof n.awaitCuratorAck!="boolean")throw new TypeError("awaitCuratorAck must be a boolean when supplied");return{...n.subGraphName?{subGraphName:n.subGraphName}:{},awaitCuratorAck:n.awaitCuratorAck??!0}}const dj=(e,n,a={})=>{const r=uj(a);return mb(`/api/knowledge-assets/${encodeURIComponent(n)}/swm/share`,{contextGraphId:Ab(e),...r.subGraphName?{subGraphName:r.subGraphName}:{},awaitCuratorAck:r.awaitCuratorAck},Eh(`Sharing "${n}"`))},fj=(e,n,a={})=>{const r=cj(a,["subGraphName"]);return mb(`/api/knowledge-assets/${encodeURIComponent(n)}/vm/publish`,{contextGraphId:Ab(e),...a.subGraphName?{subGraphName:a.subGraphName}:{},...r?{options:r}:{}},Eh(`Publishing "${n}"`))};async function F8(e,n){let a=0,r=0,o;const s=[],u=[];let d=null,p=0n,f=0n,y=0n,g=0n,x,b=!0,k=!0;for(const j of n)try{const E=await fj(e,j.name,j.subGraph?{subGraphName:j.subGraph}:{});a+=1,E.contextGraphError&&(r+=1,o===void 0&&(o=E.contextGraphError));const _=E;(!d||_.status==="confirmed"&&_.txHash&&!_.contextGraphError)&&(d=_);const R=_.convictionCostCovered;if(R)try{p+=BigInt(R.baseCost),f+=BigInt(R.discountedCost),y+=BigInt(R.drawnFromEpoch),g+=BigInt(R.drawnFromTopUp),x?(R.accountId!==x.accountId&&(b=!1),R.epoch!==x.epoch&&(k=!1)):x=R}catch{}}catch(E){const _=(E==null?void 0:E.message)??"publish failed",R={name:j.name,...j.subGraph?{subGraph:j.subGraph}:{},error:_};E instanceof pb?u.push(R):s.push(R)}const C=x?{...b&&x.accountId?{accountId:x.accountId}:{},...k&&x.epoch!=null?{epoch:x.epoch}:{},baseCost:p.toString(),discountedCost:f.toString(),drawnFromEpoch:y.toString(),drawnFromTopUp:g.toString()}:void 0;return{published:a,total:n.length,partial:r,partialError:o,failures:s,...u.length>0?{outcomeUnknown:u}:{},sample:d,convictionCostCovered:C}}function G8(e){var a;const n=((a=e.outcomeUnknown)==null?void 0:a.length)??0;if(n!==0)return`${n} knowledge asset${n===1?"":"s"}: publish outcome unknown — the node may still publish ${n===1?"it":"them"}. Check the history before publishing again.`}async function V8(e,n="wm",a={}){var _,R,F,U,O,W;const r=a.includeQueryCatalog??!1,o=(P,M)=>P!=="meta"||r&&M.startsWith("query-catalog-");if(n==="swm"){const P=`did:dkg:context-graph:${e}/_meta`,M=`did:dkg:context-graph:${e}/`,T=`urn:dkg:assertion:${e}:`,Y=`SELECT ?g ?vm WHERE {
|
|
68
|
-
GRAPH <${P}> {
|
|
69
|
-
?g <http://dkg.io/ontology/memoryLayer> "SWM"
|
|
70
|
-
OPTIONAL { ?g <http://dkg.io/ontology/vmCurrentAssertion> ?vm }
|
|
71
|
-
}
|
|
72
|
-
${r?"":'FILTER(!CONTAINS(STR(?g), "/meta/assertion/"))'}
|
|
73
|
-
}`,ie=await jh(Y,{contextGraphId:e}),B=((_=ie==null?void 0:ie.result)==null?void 0:_.bindings)??[],Q=new Set,H=[];for(const V of B){const D=typeof V.g=="string"?V.g:(R=V.g)==null?void 0:R.value;if(!D)continue;const L=typeof V.vm=="string"?V.vm:(F=V.vm)==null?void 0:F.value;let X,N;if(D.startsWith(M)){const pe=D.slice(M.length).split("/");if(pe.length===3&&pe[0]==="assertion")N=pe[2];else if(pe.length===4&&pe[1]==="assertion")X=pe[0],N=pe[3];else continue}else if(D.startsWith(T)){const pe=D.slice(T.length);let he=/^(0x[0-9a-fA-F]{40}):(.+)$/.exec(pe);he?N=he[2]:(he=/^([^:]+):(0x[0-9a-fA-F]{40}):(.+)$/.exec(pe),he&&(X=he[1],N=he[3]))}else continue;if(!N||!o(X,N))continue;const ue=`${X??""} ${N}`;H.push({key:ue,name:N,subGraph:X,g:D}),L&&Q.add(ue)}const ee=new Set,ne=[];for(const V of H)Q.has(V.key)||ee.has(V.key)||(ee.add(V.key),ne.push({name:V.name,graphUri:V.g,subGraph:V.subGraph}));return ne}const s=`did:dkg:context-graph:${e}/_meta`,u=`did:dkg:context-graph:${e}/`,d=r?"":'FILTER(!CONTAINS(STR(?g), "/meta/assertion/"))',p=`SELECT ?g WHERE {
|
|
74
|
-
GRAPH <${s}> { ?g <http://dkg.io/ontology/memoryLayer> "WM" }
|
|
75
|
-
${d}
|
|
76
|
-
}`,f=`SELECT ?g (COUNT(*) AS ?cnt) WHERE {
|
|
77
|
-
GRAPH <${s}> {
|
|
78
|
-
?g <http://dkg.io/ontology/memoryLayer> "WM" ;
|
|
79
|
-
<http://dkg.io/ontology/assertionGraph> ?dg
|
|
80
|
-
}
|
|
81
|
-
GRAPH ?dg { ?s ?p ?o }
|
|
82
|
-
${d}
|
|
83
|
-
} GROUP BY ?g`,[y,g]=await Promise.all([Pc({sparql:p,contextGraphId:e,includeContextGraphPartitions:!0}),Pc({sparql:f,contextGraphId:e,includeContextGraphPartitions:!0}).catch(()=>null)]),x=((U=y==null?void 0:y.result)==null?void 0:U.bindings)??[],b=new Map;for(const P of((O=g==null?void 0:g.result)==null?void 0:O.bindings)??[]){const M=Bc(P.g),T=Bc(P.cnt),G=typeof T=="string"?T.match(/^"?(\d+)/):null,Y=G?parseInt(G[1],10):NaN;M&&Number.isFinite(Y)&&b.set(M,Y)}const k=[],C=new Set,j=`urn:dkg:assertion:${e}:`,E=[...x].sort((P,M)=>{var Y,ie;const T=(typeof P.g=="string"?P.g:(Y=P.g)==null?void 0:Y.value)??"",G=(typeof M.g=="string"?M.g:(ie=M.g)==null?void 0:ie.value)??"";return(T.startsWith(u)?0:1)-(G.startsWith(u)?0:1)});for(const P of E){const M=typeof P.g=="string"?P.g:(W=P.g)==null?void 0:W.value;if(!M)continue;let T,G;if(M.startsWith(u)){const B=M.slice(u.length).split("/");if(B.length===3&&B[0]==="assertion")G=B[2];else if(B.length===4&&B[1]==="assertion")T=B[0],G=B[3];else continue}else if(M.startsWith(j)){const B=M.slice(j.length);let Q=/^(0x[0-9a-fA-F]{40}):(.+)$/.exec(B);Q?G=Q[2]:(Q=/^([^:]+):(0x[0-9a-fA-F]{40}):(.+)$/.exec(B),Q&&(T=Q[1],G=Q[3]))}else continue;if(!G||!o(T,G))continue;const Y=`${T??""}\0${G}`;if(C.has(Y))continue;C.add(Y);const ie=b.get(M);k.push({name:G,graphUri:M,tripleCount:ie,subGraph:T})}return k}const W8=(e,n,a,r)=>{if(Array.isArray(a))throw Object.assign(new Error("Knowledge Assets are shared atomically; root-entity selection is not supported"),{code:"KA_ATOMIC_SHARE_REQUIRED"});if(typeof a=="string"&&a!=="all")throw Object.assign(new Error("Knowledge Assets are shared atomically; omit entities to share the complete asset"),{code:"KA_ATOMIC_SHARE_REQUIRED"});const o=a===void 0||typeof a=="string"?{subGraphName:r}:{...a,subGraphName:a.subGraphName??r};return dj(e,n,o)};function Y8(e,n){return n.promotedCount>0?{kind:"success",promotedCount:n.promotedCount,message:`Shared the complete Knowledge Asset ${e} to Shared Working Memory (${n.promotedCount} triple${n.promotedCount===1?"":"s"}).`}:{kind:"noop",message:`${e} was not newly shared. Its complete Knowledge Asset may already be in Shared Working Memory, or its content is still being committed — refresh and try again.`}}function K8(e,n){if(n instanceof an&&n.status===413){const a=n.body;if((a==null?void 0:a.code)==="SWM_GOSSIP_PAYLOAD_TOO_LARGE")return{kind:"payload-too-large",actualBytes:typeof a.actualBytes=="number"?a.actualBytes:void 0,limitBytes:typeof a.limitBytes=="number"?a.limitBytes:void 0,message:`${e} is too large to share atomically. Split its content into smaller Knowledge Assets before sharing.`}}if(n instanceof an&&n.status===409){const a=n.body;if((a==null?void 0:a.code)==="ASSERTION_NOT_PERSISTED"){const r=typeof a.expectedTripleCount=="number"?a.expectedTripleCount:void 0;return{kind:"not-persisted",expectedTripleCount:r,message:r?`${e} was imported with ${r} extracted triple${r===1?"":"s"} but the data graph is empty. Re-import the source file (or re-write the assertion) before promoting.`:`${e}'s data graph is empty but its extraction metadata says it should hold content. Re-import the source file before promoting.`}}}return null}const Q8=(e,n,a)=>{const r=new URLSearchParams({contextGraphId:n});return a&&r.set("subGraphName",a),Qe(`/api/knowledge-assets/${encodeURIComponent(e)}/wm/extraction-status?${r}`)};function pj(e,n){const a=e.startsWith("sha256:")||e.startsWith("keccak256:")?e:`sha256:${e}`,r=n?`?contentType=${encodeURIComponent(n)}`:"";return`${ra}/api/file/${encodeURIComponent(a)}${r}`}const X8="binding incomplete";function Z8(e){const n="Published on-chain, but linking it into the context graph did not complete, so context-graph views may be incomplete.";return e?`${n} (${e})`:n}const hj=(e=20)=>Qe(`/api/memory/sessions?limit=${e}`),mj=(e,n={})=>{const a=new URLSearchParams;n.limit&&Number.isInteger(n.limit)&&n.limit>0&&a.set("limit",String(n.limit)),(n.order==="desc"||n.order==="asc")&&a.set("order",n.order);const r=a.toString();return Qe(`/api/memory/sessions/${encodeURIComponent(e)}${r?`?${r}`:""}`)};function Tb(e,n){var a,r,o;return{text:e,correlationId:(n==null?void 0:n.correlationId)??crypto.randomUUID(),...n!=null&&n.identity?{identity:n.identity}:{},...n!=null&&n.sessionId?{sessionId:n.sessionId}:{},...n!=null&&n.profile?{profile:n.profile}:{},...n!=null&&n.persistUserMessage?{persistUserMessage:n.persistUserMessage}:{},...(a=n==null?void 0:n.attachments)!=null&&a.length?{attachmentRefs:n.attachments}:{},...(r=n==null?void 0:n.attachmentImportResults)!=null&&r.length?{attachmentImportResults:n.attachmentImportResults}:{},...(o=n==null?void 0:n.contextEntries)!=null&&o.length?{contextEntries:n.contextEntries}:{},...n!=null&&n.contextGraphId?{contextGraphId:n.contextGraphId}:{}}}async function gj(e,n={}){var g;const a=await fetch("/api/openclaw-channel/stream",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...$t()},body:JSON.stringify(Tb(e,n)),signal:n.signal});if(!a.ok){const x=await a.json().catch(()=>({}));throw Mo(x,`Request failed (${a.status})`,a.status)}const r=(a.headers.get("content-type")??"").toLowerCase();if(!a.body||!r.includes("text/event-stream")){const x=await a.json();return(g=n.onEvent)==null||g.call(n,{type:"final",...x}),x}const o=a.body.getReader(),s=new TextDecoder;let u="",d,p;const f=x=>{var b;(b=n.onEvent)==null||b.call(n,x),x.type==="error"?p=Mo(x,x.error||"Stream failed"):x.type==="final"&&(d={text:x.text,correlationId:x.correlationId,...x.sessionId?{sessionId:x.sessionId}:{},...x.turnId?{turnId:x.turnId}:{}})},y=x=>{let b=u.indexOf(`
|
|
84
|
-
`);for(;b!==-1;){const k=u.slice(0,b).trim();if(u=u.slice(b+1),b=u.indexOf(`
|
|
85
|
-
`),!k.startsWith("data:"))continue;const C=k.slice(5).trim();if(C){try{f(JSON.parse(C))}catch{}if(p)return}}if(x&&u.trim().startsWith("data:")){const k=u.trim().slice(5).trim();if(!k)return;try{f(JSON.parse(k))}catch{}u=""}};for(;;){const{done:x,value:b}=await o.read();if(x||(u+=s.decode(b,{stream:!0}),y(!1),p))break;if(d)return o.cancel().catch(()=>{}),d}if(u+=s.decode(),y(!0),p)throw p;if(!d)throw new Error("Stream ended without final payload");return d}const yj=()=>Qe("/api/openclaw-channel/health");async function Nb(e,n,a={}){var b;const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream",...$t()},body:JSON.stringify(Tb(n,a)),signal:a.signal});if(!r.ok){const k=await r.json().catch(()=>({}));throw Mo(k,`Request failed (${r.status})`,r.status)}const o=(r.headers.get("content-type")??"").toLowerCase();if(!r.body||!o.includes("text/event-stream")){const k=await r.json();return(b=a.onEvent)==null||b.call(a,{type:"final",...k}),k}const s=r.body.getReader(),u=new TextDecoder;let d="",p,f;const y=k=>k.type==="delta"?{type:"text_delta",delta:k.text??""}:k,g=k=>{var C;(C=a.onEvent)==null||C.call(a,k),k.type==="error"?f=Mo(k,k.error||"Stream failed"):k.type==="final"&&(p={text:k.text,correlationId:k.correlationId,...k.sessionId?{sessionId:k.sessionId}:{},...k.turnId?{turnId:k.turnId}:{}})},x=k=>{let C=d.indexOf(`
|
|
86
|
-
`);for(;C!==-1;){const j=d.slice(0,C).trim();if(d=d.slice(C+1),C=d.indexOf(`
|
|
87
|
-
`),!j.startsWith("data:"))continue;const E=j.slice(5).trim();if(E){try{g(y(JSON.parse(E)))}catch{}if(f)return}}if(k&&d.trim().startsWith("data:")){const j=d.trim().slice(5).trim();if(!j)return;try{g(y(JSON.parse(j)))}catch{}d=""}};for(;;){const{done:k,value:C}=await s.read();if(k||(d+=u.decode(C,{stream:!0}),x(!1),f))break;if(p)return s.cancel().catch(()=>{}),p}if(d+=u.decode(),x(!0),f)throw f;if(!p)throw new Error("Stream ended without final payload");return p}const vj=(e,n={})=>Nb("/api/hermes-channel/stream",e,n),xj=()=>Qe("/api/hermes-channel/health"),bj=(e,n={})=>Nb("/api/prime-agent-channel/stream",e,n),wj=()=>Qe("/api/prime-agent-channel/health");function Sj(e){return{...e,detected:typeof e.detected=="boolean"?e.detected:e.ready===!0}}const kj=async()=>Sj(await Qe("/api/local-llm/health"));async function Cj(e,n){const a=(n==null?void 0:n.correlationId)??crypto.randomUUID(),r=await fetch("/api/local-llm/chat",{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify({message:e,sessionId:"local-llm:dkg-ui",...n!=null&&n.contextGraphId?{contextGraphId:n.contextGraphId}:{}}),signal:n==null?void 0:n.signal});if(!r.ok){const s=await r.json().catch(()=>({}));throw Mo(s,`Request failed (${r.status})`,r.status)}return{...await r.json(),correlationId:a,turnId:a}}async function Ej(e,n={}){var r;const a=await Cj(e,n);return(r=n.onEvent)==null||r.call(n,{type:"final",...a}),a}const Aj=()=>Xt("/api/local-llm/session/clear",{});function jj(e,n){if(!e||typeof e!="object"||Array.isArray(e))return n;const a=e,r=typeof a.error=="string"&&a.error.trim()?a.error.trim():n;if(a.details===void 0||a.details===null)return r;const o=typeof a.details=="string"?a.details.trim():JSON.stringify(a.details);return!o||o===r?r:`${r}: ${o}`}function Mo(e,n,a){if(!e||typeof e!="object"||Array.isArray(e))return new Ic(n,{status:a});const r=e,o=jj(r,n),s=f=>{const y=r[f];return typeof y=="string"&&y.trim()?y.trim():void 0},u=f=>{const y=r[f];return typeof y=="number"&&Number.isFinite(y)?y:void 0},d=f=>{const y=r[f];return typeof y=="boolean"?y:void 0},p=typeof r.text=="string"&&r.text.trim()?r.text:void 0;return new Ic(o,{status:a,code:s("code"),source:s("source"),details:s("details"),correlationId:s("correlationId"),timeoutMs:u("timeoutMs"),target:s("target"),route:s("route"),integrationId:s("integrationId"),retryable:d("retryable"),text:p,timedOut:d("timedOut")})}const lu={"local-llm":{connectSupported:!1,chatSupported:!0,defaultSessionId:()=>"local-llm:dkg-ui",resolveChatContext:()=>({}),fetchHealth:kj,isVisible:({health:e})=>e===null||e.configured!==!1||e.detected===!0,streamChat:Ej},openclaw:{connectSupported:!0,chatSupported:!0,defaultSessionId:({integrationId:e})=>`${e}:dkg-ui`,resolveChatContext:({integrationId:e,sessionId:n})=>{if(!n)return{};const a=`${e}:dkg-ui:`;if(!n.startsWith(a))return{};const r=n.slice(a.length).trim();return r?{identity:r}:{}},fetchHealth:yj,streamChat:gj},hermes:{connectSupported:!0,chatSupported:!0,defaultSessionId:({integrationId:e,record:n,health:a})=>Oj(e,n,a),resolveChatContext:({sessionId:e,profile:n})=>({...e?{sessionId:e}:{},...n?{profile:n}:{}}),fetchHealth:xj,streamChat:vj},"prime-agent":{connectSupported:!0,chatSupported:!0,defaultSessionId:({record:e,health:n})=>Mj(e,n),resolveChatContext:({sessionId:e,liveSession:n})=>{if(!n)return{};if(e&&n.sessionId!==e)throw new Error("Prime Agent live session does not match the selected conversation");return{sessionId:n.rawSessionId}},fetchHealth:wj,streamChat:bj}};function rr(e){var a,r;const n=e.trim().toLowerCase();return((r=(a=lu[n])==null?void 0:a.defaultSessionId)==null?void 0:r.call(a,{integrationId:n}))??null}function Tj(e,n){return n!=null&&n.trim()?n.trim():rr(e)}async function Nj(e,n=50){const a=r=>{if(r.turnId)return`urn:dkg:chat:turn:${encodeURIComponent(r.turnId)}:${encodeURIComponent(r.author)}`;const o=`${e}
|
|
88
|
-
${r.author}
|
|
89
|
-
${r.ts}
|
|
90
|
-
${r.text}`;let s=2166136261;for(let u=0;u<o.length;u+=1)s^=o.charCodeAt(u),s=Math.imul(s,16777619);return`urn:dkg:chat:session:${encodeURIComponent(e)}:message:${(s>>>0).toString(16)}`};try{return[...(await mj(e,{limit:n,order:"desc"})).messages].reverse().map(o=>({uri:o.uri||a(o),text:o.text,author:o.author,ts:o.ts,turnId:o.turnId,persistStatus:o.persistStatus,failureReason:o.failureReason,attachmentRefs:o.attachmentRefs,toolCalls:o.toolCalls}))}catch(r){if(r instanceof an&&r.status===404)return[];throw r}}function Rj(e){var n,a,r;return!!((n=e.transport)!=null&&n.bridgeUrl||(a=e.transport)!=null&&a.gatewayUrl||(r=e.transport)!=null&&r.healthUrl)}function Uc(...e){for(const n of e)if(typeof n=="string"&&n.trim())return n.trim();return null}function _j(e){return e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g,"-").replace(/^-+|-+$/g,"")||Th(e)}function Th(e){let n=2166136261;for(let a=0;a<e.length;a+=1)n^=e.charCodeAt(a),n=Math.imul(n,16777619);return(n>>>0).toString(36)}function Oj(e,n,a){const r=(n==null?void 0:n.metadata)??{},o=Uc(a==null?void 0:a.profile,r.profileName,r.profile),s=Uc(r.hermesHome),u=s?null:Dj(n),d=[o?`profile-${_j(o)}`:null,s?`home-${Th(s)}`:null,u].filter(p=>p!=null);return d.length?`${e}:dkg-ui:${d.join(":")}`:`${e}:dkg-ui`}function Dj(e){const n=e==null?void 0:e.transport;if(!n)return null;const a=[n.kind,n.bridgeUrl,n.gatewayUrl,n.healthUrl].filter(r=>typeof r=="string"&&r.trim().length>0);return a.length?`transport-${Th(a.join("|"))}`:null}function Mj(e,n){var a,r,o;return Uc((a=e==null?void 0:e.metadata)==null?void 0:a.activeMemorySessionId,(o=(r=n==null?void 0:n.sessions)==null?void 0:r[0])==null?void 0:o.memorySessionId)??void 0}function Lj(e){return e?typeof e=="string"?e:[e.provider,e.mode,e.status].filter(Boolean).join(" / ")||null:null}function zj(e,n){if(e==="degraded")return!0;const a=String((n==null?void 0:n.status)??"").toLowerCase(),r=n==null?void 0:n.memory;return a.includes("degraded")||a.includes("conflict")||typeof r=="object"&&r!=null&&r.conflict===!0}function Rb(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function T0(e){if(!Rb(e))return-1;let n=e.ok===!1?100:0;return e.profile&&(n+=10),e.memory&&(n+=10),e.status&&(n+=10),e.error&&(n+=10),e.ok===!0&&(n+=1),n}function Ij(e){if(e.target==="bridge")return{target:"bridge",details:e.bridge};if(e.target==="gateway")return{target:"gateway",details:e.gateway};const n=T0(e.bridge),a=T0(e.gateway);return n<0&&a<0?{}:n>=a?{target:"bridge",details:e.bridge}:{target:"gateway",details:e.gateway}}function Pj(e){if(!e)return null;const{target:n,details:a}=Ij(e);if(!Rb(a))return e;const r=typeof a.ok=="boolean"?a.ok:void 0;return{...a,...e,ok:e.ok===!1?!1:r??e.ok,target:e.target??n,profile:e.profile??a.profile,memory:e.memory??a.memory,status:e.status??a.status,error:e.error??a.error}}function Uj(e,n){if(String(e.id??"").toLowerCase()!=="hermes")return null;const a=n==null?void 0:n.profile,r=a?`profile ${a}`:"the configured profile",o=Lj(n==null?void 0:n.memory),s=typeof(n==null?void 0:n.memory)=="object"&&n.memory!=null?n.memory:null;return(s==null?void 0:s.conflict)===!0||String((n==null?void 0:n.status)??"").toLowerCase().includes("conflict")?`${e.name} ${r} has a memory provider conflict${o?` (${o})`:""}.`:n!=null&&n.ok?`${e.name} ${r} is connected${o?` with ${o} memory`:""}.`:n!=null&&n.status?`${e.name} ${r} reports ${n.status}${o?` (${o})`:""}.`:null}async function Nh(e){var W,P,M,T,G,Y,ie,B,Q,H,ee,ne,V,D,L,X,N;const n=String(e.id??"").toLowerCase(),a=lu[n],r=((W=e.capabilities)==null?void 0:W.localChat)===!0&&(a==null?void 0:a.chatSupported)===!0,o=r&&((P=e.capabilities)==null?void 0:P.chatAttachments)===!0,s=((M=e.capabilities)==null?void 0:M.connectFromUi)===!0&&(a==null?void 0:a.connectSupported)===!0,u=e.enabled===!0,d=(T=e.runtime)==null?void 0:T.status,p=u&&r&&(a!=null&&a.fetchHealth)?Pj(await a.fetchHealth().catch(()=>null)):null;if(((G=a==null?void 0:a.isVisible)==null?void 0:G.call(a,{health:p}))===!1)return null;const f=zj(d,p),y=(p==null?void 0:p.ok)===!0&&!f,g=y,b=u&&r&&(n==="local-llm"&&u&&r||y||d==="connecting"||d==="degraded"||((Y=e.runtime)==null?void 0:Y.ready)===!0||Rj(e)),k=Uj(e,p),C=(ie=a==null?void 0:a.defaultSessionId)==null?void 0:ie.call(a,{integrationId:n,record:e,health:p}),j=n==="prime-agent"&&(p==null?void 0:p.busy)===!0&&p.clientConnected===!1,E=n==="prime-agent"&&Array.isArray(p==null?void 0:p.sessions)?p.sessions.filter(ue=>typeof(ue==null?void 0:ue.rawSessionId)=="string"&&ue.rawSessionId.trim()&&typeof ue.memorySessionId=="string"&&ue.memorySessionId.trim()).map(ue=>({...ue,sessionId:ue.memorySessionId.trim(),rawSessionId:ue.rawSessionId.trim()})):void 0,_=n==="hermes"?Uc(p==null?void 0:p.profile,(B=e.metadata)==null?void 0:B.profileName,(Q=e.metadata)==null?void 0:Q.profile)??void 0:void 0;let R,F,U;b&&f?(R="degraded",F="Degraded",U=k??(p==null?void 0:p.error)??((H=e.runtime)==null?void 0:H.lastError)??`${e.name} is attached to this node, but one capability is degraded.`):b&&((ee=e.runtime)==null?void 0:ee.status)==="connecting"?(R="connecting",F="Connecting",U=((ne=e.runtime)==null?void 0:ne.lastError)??`${e.name} is registered and still starting up.`):g?(R="chat_ready",F=j?"Still working":p!=null&&p.busy?"Working":"Chat ready",U=j?`${e.name} is still working after the browser stream disconnected. Wait for it to finish before sending another message.`:p!=null&&p.busy?`${e.name} is working on the current turn.`:`${e.name} is connected to this node and ready for chat.`):b?(R="bridge_offline",F="Bridge offline",U=k??(p==null?void 0:p.error)??((V=e.runtime)==null?void 0:V.lastError)??`${e.name} is attached to this node, but it is not responding right now.`):a?(R="available",F=s?"Ready to connect":"Awaiting chat bridge",U=u?`${e.name} is registered, but this panel is waiting for the framework chat bridge.`:((D=e.runtime)==null?void 0:D.lastError)??`Use the node-served skill plus ${e.name} onboarding to attach an existing local agent.`):(R="coming_soon",F=u?"Registered, panel pending":"Next integration",U=u?`${e.name} is registered on the node, but the right-panel chat bridge is not wired yet.`:"The local-agent registry is in place so this framework can plug into the same side-panel flow next.");const O=g?"Connected":R==="connecting"?"Connecting":R==="degraded"?"Degraded":b?"Unavailable":s?"Ready to connect":"Coming next";return{id:n,name:e.name,framework:e.name,description:e.description,defaultSessionId:C,profile:_,chatSupported:r,chatAttachments:o,connectSupported:s,configured:u,detected:u||(p==null?void 0:p.detected)===!0||y,persistentChat:b,chatReady:y,bridgeOnline:g,bridgeStatusLabel:O,status:R,statusLabel:F,detail:U,error:y?void 0:(p==null?void 0:p.error)??((L=e.runtime)==null?void 0:L.lastError)??void 0,target:p==null?void 0:p.target,source:u||a?"live":"planned",...typeof((X=e.metadata)==null?void 0:X.sessionCount)=="number"?{sessionCount:e.metadata.sessionCount}:{},...typeof((N=e.metadata)==null?void 0:N.activeSessionId)=="string"?{activeSessionId:e.metadata.activeSessionId}:{},...E!=null&&E.length?{liveSessions:E}:{},...typeof(p==null?void 0:p.busy)=="boolean"?{busy:p.busy}:{}}}async function ou(){const e=await Qe("/api/local-agent-integrations"),a=(await Promise.all((e.integrations??[]).map(Nh))).filter(r=>r!==null);return a.sort((r,o)=>{const s=r.id==="openclaw"?0:1,u=o.id==="openclaw"?0:1;return s!==u?s-u:r.persistentChat!==o.persistentChat?r.persistentChat?-1:1:r.name.localeCompare(o.name)}),{integrations:a}}async function Bj(e){const n=e.trim().toLowerCase(),a=lu[n];if(!(a!=null&&a.connectSupported))throw new Error(`${e} local connect is not available yet.`);const r=await Xt("/api/local-agent-integrations/connect",{id:n,metadata:{source:"node-ui"}}),o=r.integration?await Nh(r.integration):(await ou()).integrations.find(s=>s.id===n);if(!o)throw new Error(`Missing local agent integration: ${n}`);return{integration:o,notice:r.notice}}async function Hj(e){const n=e.trim().toLowerCase();await Ch(`/api/local-agent-integrations/${encodeURIComponent(n)}`,{enabled:!1,runtime:{status:"disconnected",ready:!1,lastError:null}})}async function $j(e){const n=e.trim().toLowerCase(),a=await Xt(`/api/local-agent-integrations/${encodeURIComponent(n)}/refresh`,{}),r=a.integration?await Nh(a.integration):(await ou()).integrations.find(o=>o.id===n);if(!r)throw new Error(`Missing local agent integration: ${n}`);return{integration:r,notice:a.notice}}async function N0(e,n=50,a={}){if(e.trim().toLowerCase()==="local-llm")return[];const r=Tj(e,a.sessionId);return r?Nj(r,n):[]}async function qj(e){var a;const n=(a=e.sessionId)==null?void 0:a.trim();if(!n)throw new Error("Missing Hermes session id");return Xt("/api/hermes-channel/persist-turn",{sessionId:n,userMessage:e.userMessage,assistantReply:e.assistantReply??"",correlationId:e.correlationId,attachmentRefs:e.attachments,persistenceState:"failed",failureReason:e.failureReason,contextGraphId:e.contextGraphId,profile:e.profile,metadata:{source:"node-ui-failed-turn"}})}async function Fj(e,n){if(e.trim().toLowerCase()==="hermes")return qj(n);throw new Error(`${e} local chat persistence is not available yet.`)}async function Gj(e,n,a={}){const r=e.trim().toLowerCase(),o=lu[r];if(o!=null&&o.streamChat){const{sessionId:s,liveSession:u,profile:d,...p}=a,f=(y,g)=>{var x;return{...p,...(x=o.resolveChatContext)==null?void 0:x.call(o,{integrationId:r,sessionId:y,liveSession:g,profile:d})}};try{return await o.streamChat(n,f(s,u))}catch(y){if(r==="prime-agent"&&u&&y instanceof Ic&&y.code==="PRIME_AGENT_NO_SESSION")return o.streamChat(n,f());throw y}}throw new Error(`${e} local chat is not available yet.`)}function Bc(e){if(e!=null){if(typeof e=="object"&&"value"in e)return String(e.value);if(typeof e=="string"){let n=e;const a=n.match(/^(".*")\^\^<[^>]+>$/);a&&(n=a[1]);const r=n.match(/^(".*")@[a-z-]+$/i);return r&&(n=r[1]),n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1).replace(/\\"/g,'"').replace(/\\n/g,`
|
|
91
|
-
`).replace(/\\r/g,"\r").replace(/\\t/g," "):e}return String(e)}}const Vj=()=>Qe("/api/economics"),_b=()=>Qe("/api/wallets/balances"),J8=()=>Xt("/api/shutdown",{}),Wj=(e,n)=>Xt("/api/subscribe",{contextGraphId:e,syncMode:(n==null?void 0:n.syncMode)??"on-demand"}),Yj=()=>Qe("/api/notifications"),Ob=e=>Xt("/api/notifications/read",e?{ids:e}:{}),Kj=e=>gb(`/api/sub-graph/list?contextGraphId=${encodeURIComponent(e)}`,Eb),Qj={name:"my-dkg-node",networkName:"DKG Mainnet",connectedPeers:12,synced:!0,version:"10.0.0-rc"},Xj={total_kcs:1842,confirmed_kcs:1623,tentative_kcs:219},Zj={agents:[{name:"my-dkg-node",peerId:"QmYourNode123",connectionStatus:"self"},{name:"research-agent",peerId:"QmResearch456",connectionStatus:"connected",lastSeen:Date.now()},{name:"data-curator",peerId:"QmCurator789",connectionStatus:"connected",lastSeen:Date.now()-6e4},{name:"pharma-bot",peerId:"QmPharma012",connectionStatus:"discovered",lastSeen:Date.now()-3e5}]},Jj={contextGraphs:[{id:"cg:pharma-drug-interactions",name:"Pharma Drug Interactions",description:"Drug interaction knowledge graph for clinical decision support",assetCount:227,agentCount:3,callerInvolved:!0,curator:"did:dkg:agent:0x1111111111111111111111111111111111111111"},{id:"cg:climate-science",name:"Climate Science",description:"Climate research data and projections",assetCount:45,agentCount:2,callerInvolved:!0,curator:"did:dkg:agent:0x1111111111111111111111111111111111111111"},{id:"cg:supply-chain-eu",name:"EU Supply Chain",description:"European supply chain provenance tracking",assetCount:89,agentCount:1,callerInvolved:!0,curator:"did:dkg:agent:0x5555555555555555555555555555555555555555"}]},eT={"cg:pharma-drug-interactions":{contextGraphId:"cg:pharma-drug-interactions",allowedAgents:["0x2222222222222222222222222222222222222222","0x3333333333333333333333333333333333333333"]},"cg:climate-science":{contextGraphId:"cg:climate-science",allowedAgents:["0x4444444444444444444444444444444444444444"]},"cg:supply-chain-eu":{contextGraphId:"cg:supply-chain-eu",allowedAgents:[]}},tT={operations:[{id:"op-1",name:"publish",status:"completed",startedAt:Date.now()-12e4},{id:"op-2",name:"query",status:"completed",startedAt:Date.now()-3e5},{id:"op-3",name:"publish",status:"completed",startedAt:Date.now()-6e5},{id:"op-4",name:"chat",status:"completed",startedAt:Date.now()-9e5},{id:"op-5",name:"sync",status:"failed",startedAt:Date.now()-18e5},{id:"op-6",name:"publish",status:"completed",startedAt:Date.now()-36e5}],total:6},nT={periods:[{label:"24h",publishCount:3,successCount:3,totalGasEth:7e-4,totalTrac:9.1,avgGasEth:23e-5,avgTrac:3.03},{label:"7d",publishCount:14,successCount:12,totalGasEth:.0034,totalTrac:42.5,avgGasEth:24e-5,avgTrac:3.04},{label:"30d",publishCount:47,successCount:43,totalGasEth:.012,totalTrac:156.8,avgGasEth:26e-5,avgTrac:3.34}]},aT={agentAddress:"0x1111111111111111111111111111111111111111",agentDid:"did:dkg:agent:0x1111111111111111111111111111111111111111",name:"mock-node-agent",framework:"mock",peerId:"QmMockNodeAgentPeer000000000000000000000000",nodeIdentityId:"mock-node-identity"},iT={wallets:["0xA1b2C3d4E5f60718293a4B5c6D7e8F9012345678","0xB2c3D4e5F60718293a4B5c6D7e8F90123456789a","0xC3d4E5f60718293a4B5c6D7e8F90123456789aB1"],balances:[{address:"0xA1b2C3d4E5f60718293a4B5c6D7e8F9012345678",eth:"0.842",trac:"1250.50",symbol:"TRAC"},{address:"0xB2c3D4e5F60718293a4B5c6D7e8F90123456789a",eth:"0.310",trac:"480.00",symbol:"TRAC"},{address:"0xC3d4E5f60718293a4B5c6D7e8F90123456789aB1",eth:"0.005",trac:"0.00",symbol:"TRAC"}],chainId:"8453",rpcUrl:"https://mock.rpc",symbol:"TRAC"},rT={notifications:[{type:"join_request",id:101,ts:Date.now()-12e4,read:0,contextGraphId:"cg:pharma-drug-interactions",meta:{contextGraphName:"Pharma Drug Interactions",agentAddress:"0xab12cd34ef56ab78cd90ab12cd34ef56ab78cd90",agentName:"research-agent"}},{type:"assertion_activity",id:"activity:cg:pharma-drug-interactions:promoted:29812",ts:Date.now()-3e5,read:0,contextGraphId:"cg:pharma-drug-interactions",meta:{contextGraphName:"Pharma Drug Interactions",kind:"promoted",count:3,actorAgentDid:"did:dkg:agent:0xdana00000000000000000000000000000000dana",actorAgentName:"Dana",soleAuthor:!0}},{type:"join_approved",id:102,ts:Date.now()-9e5,read:1,contextGraphId:"cg:climate-arctic",meta:{contextGraphName:"Arctic Climate",agentAddress:"0x0000000000000000000000000000000000000001"}}],badgeCount:2},lT={lines:["[2026-04-11 10:30:01] INFO Node started on port 8900","[2026-04-11 10:30:02] INFO Connected to DKG mainnet","[2026-04-11 10:30:03] INFO Discovered 12 peers","[2026-04-11 10:30:05] INFO Syncing context graph cg:pharma-drug-interactions","[2026-04-11 10:30:08] INFO Sync complete: 227 assets, 3 agents","[2026-04-11 10:30:15] INFO Agent research-agent connected via libp2p","[2026-04-11 10:31:00] INFO Publish operation started: warfarin-aspirin-001","[2026-04-11 10:31:12] INFO Triple store updated: +34 triples","[2026-04-11 10:31:15] INFO Publish complete: warfarin-aspirin-001 → Verifiable Memory","[2026-04-11 10:32:00] DEBUG SPARQL query executed in 23ms (42 results)","[2026-04-11 10:33:00] INFO Gossip: received 3 proposals from data-curator","[2026-04-11 10:34:00] INFO SWM cleanup: 0 expired triples removed","[2026-04-11 10:35:00] INFO Heartbeat: 12 peers, 1842 KAs, memory 245MB"],totalSize:13},oT={sessions:[{session:"sess-abc123",messages:[{author:"user",text:"What drug interactions should I know about warfarin?",ts:"2026-04-11T10:00:00Z"},{author:"assistant",text:"Warfarin has significant interactions with aspirin, NSAIDs, and several antibiotics. The most critical ones involve...",ts:"2026-04-11T10:00:05Z"}]},{session:"sess-def456",messages:[{author:"user",text:"Summarize the latest climate data for Arctic ice",ts:"2026-04-10T14:00:00Z"},{author:"assistant",text:"Based on the latest projections in the verifiable memory...",ts:"2026-04-10T14:00:03Z"}]}]},sT={"cg:pharma-drug-interactions":{contextGraphId:"cg:pharma-drug-interactions",subGraphs:[{name:"interactions",uri:"did:dkg:context-graph:cg:pharma-drug-interactions/interactions",description:"Pairwise drug interaction records",createdBy:"did:dkg:agent:0x1111111111111111111111111111111111111111",createdAt:"2026-04-02T09:15:00Z",entityCount:148,tripleCount:1721},{name:"contraindications",uri:"did:dkg:context-graph:cg:pharma-drug-interactions/contraindications",createdBy:"did:dkg:agent:0x2222222222222222222222222222222222222222",createdAt:"2026-04-05T16:40:00Z",entityCount:79,tripleCount:604}]},"cg:climate-science":{contextGraphId:"cg:climate-science",subGraphs:[{name:"arctic-ice",uri:"did:dkg:context-graph:cg:climate-science/arctic-ice",description:"Sea-ice extent projections",createdBy:"did:dkg:agent:0x3333333333333333333333333333333333333333",createdAt:"2026-04-11T08:05:00Z",entityCount:32,tripleCount:410}]}};function zn(e,n=50){return new Promise(a=>setTimeout(()=>a(e),n))}const In={fetchStatus:()=>zn(Qj),fetchMetrics:()=>zn(Xj),fetchAgents:()=>zn(Zj),fetchContextGraphs:()=>zn(Jj),fetchOperationsWithPhases:()=>zn(tT),fetchEconomics:()=>zn(nT),fetchWalletsBalances:()=>zn(iT),fetchCurrentAgent:()=>zn(aT),listParticipants:e=>zn(eT[e]??{contextGraphId:e,allowedAgents:[]}),fetchSubGraphs:e=>zn(sT[e]??{contextGraphId:e,subGraphs:[]}),fetchNotificationsFeed:()=>zn(rT),fetchNodeLog:()=>zn(lT),fetchMemorySessions:()=>zn(oT)};let Xa=null,po=null;const cT=5e3,R0=2,uT=250,Pp=new Set;function dT(){return Xa===!0}function fT(e){return Pp.add(e),e(Xa===!0),()=>{Pp.delete(e)}}function pT(){const e=dr();return e?{Authorization:`Bearer ${e}`}:{}}function hT(e){return new Promise(n=>setTimeout(n,e))}async function mT(){for(let e=1;e<=R0;e+=1){try{const n=await fetch("/api/status",{cache:"no-store",headers:pT(),signal:AbortSignal.timeout(cT)});if(n.ok||n.status===401)return!1}catch{}e<R0&&await hT(uT)}return!0}async function gT(){if(Xa!==null)return Xa;if(po)return po;po=(async()=>(Xa=await mT(),typeof window<"u"&&(window.__DKG_USING_MOCKS__=Xa,Xa&&console.warn("[dkg-ui] /api/status unreachable (timeout/5xx/network) — falling back to demo (mock) data. The UI is NOT showing live node state.")),Pp.forEach(e=>e(Xa)),Xa))();try{return await po}finally{po=null}}async function Pn(e,n){return await gT()?n():e()}const Bn={fetchStatus:()=>Pn(FA,In.fetchStatus),fetchMetrics:()=>Pn(YA,In.fetchMetrics),fetchAgents:()=>Pn(jb,In.fetchAgents),fetchContextGraphs:()=>Pn(Ah,In.fetchContextGraphs),fetchOperationsWithPhases:e=>Pn(()=>KA(e),In.fetchOperationsWithPhases),fetchEconomics:()=>Pn(Vj,In.fetchEconomics),fetchWalletsBalances:()=>Pn(_b,In.fetchWalletsBalances),fetchCurrentAgent:()=>Pn(ru,In.fetchCurrentAgent),listParticipants:e=>Pn(()=>ZA(e),()=>In.listParticipants(e)),fetchSubGraphs:e=>Pn(()=>Kj(e),()=>In.fetchSubGraphs(e)),fetchNotificationsFeed:()=>Pn(Yj,In.fetchNotificationsFeed),fetchNodeLog:e=>Pn(()=>QA(e),In.fetchNodeLog),fetchMemorySessions:e=>Pn(()=>hj(e),In.fetchMemorySessions),markNotificationsRead:Ob,executeQuery:jh},yT=6e4;let Di={data:null,loading:!0,error:null},Sa=null,Eo=null,Co=0,Oi="";const Hc=new Set;function lr(){const e=dr();return e?`Bearer ${e}`:""}function Ec(e){Oi=e,Di={data:null,loading:!0,error:null}}function Hf(){const e=lr();return e!==Oi&&Ec(e),Di}function Ac(){for(const e of Hc)e()}function $f(e){Di=e,Ac()}function $c(){const e=Co,n=lr();if((Sa==null?void 0:Sa.authKey)===n)return Sa.promise;n!==Oi?(Ec(n),Ac()):$f({...Di,loading:!0,error:null});const a=Bn.fetchCurrentAgent().then(r=>{if(e===Co){if(n!==lr()){const o=lr(),s=Oi!==o||Di.loading;Oi!==o&&(Ec(o),Ac()),s&&$c();return}$f({data:r,loading:!1,error:null})}}).catch(r=>{if(e===Co){if(n!==lr()){const o=lr(),s=Oi!==o||Di.loading;Oi!==o&&(Ec(o),Ac()),s&&$c();return}$f({data:Di.data,loading:!1,error:r instanceof Error?r.message:"Failed to load current agent"})}}).finally(()=>{e===Co&&(Sa==null?void 0:Sa.promise)===a&&(Sa=null)});return Sa={authKey:n,promise:a},a}function vT(){$c(),!Eo&&(Eo=setInterval(()=>{$c()},yT))}function xT(){Hc.size>0||!Eo||(clearInterval(Eo),Eo=null,Co+=1,Sa=null,Di={data:null,loading:!0,error:null},Oi=lr())}function Rh(){const[e,n]=S.useState(Hf);return S.useEffect(()=>{const a=()=>n(Hf());return Hc.add(a),n(Hf()),vT(),()=>{Hc.delete(a),xT()}},[]),e}const ca=ur(e=>({contextGraphs:[],loading:!1,activeProjectId:null,setContextGraphs:n=>e({contextGraphs:n}),setLoading:n=>e({loading:n}),setActiveProject:n=>e({activeProjectId:n})})),nl=new Set;let Kt=null,jc=null;const bT=350;function _0(e){return e==="wm"||e==="swm"||e==="vm"}function wT(e){const n=e.layers;return Array.isArray(n)?n.filter(_0):_0(e.layer)?[e.layer]:[]}function ST(e,n,a){if(!n||e.contextGraphId!==n)return!1;if(!a||a.length===0)return!0;const r=wT(e);return r.length===0?!0:a.some(o=>r.includes(o))}function Db(){if(Kt)return;const e=dr(),n=e?`/api/events?token=${encodeURIComponent(e)}`:"/api/events";Kt=new EventSource(n);const a=r=>o=>{let s={};try{s=JSON.parse(o.data)}catch{}const u={type:r,data:s};for(const d of nl)try{d(u)}catch{}};Kt.addEventListener("join_request",a("join_request")),Kt.addEventListener("join_approved",a("join_approved")),Kt.addEventListener("join_rejected",a("join_rejected")),Kt.addEventListener("project_synced",a("project_synced")),Kt.addEventListener("memory_graph_changed",a("memory_graph_changed")),Kt.addEventListener("notification",a("notification")),Kt.addEventListener("connected",a("connected")),Kt.onerror=()=>{Kt==null||Kt.close(),Kt=null,nl.size>0&&(jc=setTimeout(Db,3e3))}}function kT(){jc&&(clearTimeout(jc),jc=null),Kt==null||Kt.close(),Kt=null}function CT(e){return nl.add(e),nl.size===1&&Db(),()=>{nl.delete(e),nl.size===0&&kT()}}function hl(e){const n=S.useRef(e);n.current=e,S.useEffect(()=>CT(a=>n.current(a)),[])}function ET(e,n,a={}){var p;const r=S.useRef(n),o=S.useRef(null);r.current=n;const s=a.debounceMs??bT,u=S.useMemo(()=>a.layers??[],[(p=a.layers)==null?void 0:p.join("|")]),d=S.useCallback(()=>{o.current&&(clearTimeout(o.current),o.current=null)},[]);hl(S.useCallback(f=>{f.type==="memory_graph_changed"&&ST(f.data,e,u)&&(d(),o.current=setTimeout(()=>{o.current=null,r.current(f.data)},s))},[d,e,s,u])),S.useEffect(()=>d,[d])}function $o(e,n,a={}){const r=S.useRef(e);r.current=e;const o=S.useRef(a);o.current=a,S.useEffect(()=>{if(n<=0)return;let s=null,u=!1;const d=()=>{s||u||(s=setInterval(()=>r.current(),n))},p=()=>{s&&(clearInterval(s),s=null)},f=()=>{if(document.hidden){p();return}r.current(),d()};return o.current.runImmediately!==!1&&!document.hidden&&r.current(),document.hidden||d(),document.addEventListener("visibilitychange",f),()=>{u=!0,document.removeEventListener("visibilitychange",f),p()}},[n])}const AT="No pending join request found";function jT(e){const n=[];for(const a of e)a.type==="join_request"&&n.push({id:a.id,cgId:a.contextGraphId,contextGraphName:a.meta.contextGraphName,agentAddress:a.meta.agentAddress,agentName:a.meta.agentName,ts:a.ts,read:a.read===1});return n.sort((a,r)=>r.ts-a.ts),n}function TT(e){const n=[];for(const a of e)a.type==="assertion_activity"?n.push({kind:"digest",id:a.id,cgId:a.contextGraphId,contextGraphName:a.meta.contextGraphName,event:a.meta.kind,count:a.meta.count,...a.meta.soleAuthor&&a.meta.actorAgentDid?{actorAgentDid:a.meta.actorAgentDid,actorAgentName:a.meta.actorAgentName}:{},...a.meta.bySelf?{bySelf:!0}:{},ts:a.ts,read:a.read===1}):a.type==="join_approved"||a.type==="join_rejected"?n.push({kind:a.type,id:a.id,cgId:a.contextGraphId,contextGraphName:a.meta.contextGraphName,ts:a.ts,read:a.read===1}):a.type==="pca_cost_covered"&&n.push({kind:"pca_cost_covered",id:a.id,cgId:a.contextGraphId,contextGraphName:a.meta.contextGraphName,covered:a.meta,publisherAddress:a.meta.publisherAddress,ts:a.ts,read:a.read===1});return n.sort((a,r)=>r.ts-a.ts),n}function O0(e){return e.filter(n=>n.type!=="join_request"&&n.read===0).map(n=>n.id)}function D0(e){const n=e instanceof Error?e.message:String(e);if(n.includes(AT))return{ok:!0,alreadyHandled:!0};const a=/context graph creator|manage (invitations|join requests)|curator/i.test(n);return{ok:!1,error:n,roleError:a}}function NT(){const[e,n]=S.useState(null),[a,r]=S.useState("loading"),[o,s]=S.useState(!1),u=S.useRef(!1),d=S.useCallback(()=>{Bn.fetchNotificationsFeed().then(R=>{u.current=!0,n(R),s(!1),r(R.scopeUnknown?"identity-pending":"ready")}).catch(()=>{u.current?s(!0):r("error")})},[]);$o(d,6e4);const p=S.useRef(null),f=S.useCallback(()=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,d()},400)},[d]);S.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),hl(S.useCallback(R=>{R.type==="notification"&&f()},[f]));const y=S.useMemo(()=>jT((e==null?void 0:e.notifications)??[]),[e]),g=S.useMemo(()=>TT((e==null?void 0:e.notifications)??[]),[e]),x=(e==null?void 0:e.badgeCount)??0,b=S.useMemo(()=>O0((e==null?void 0:e.notifications)??[]).length>0,[e]),k=S.useCallback(R=>{R.length!==0&&(n(F=>{if(!F)return F;const U=new Set(R.map(String));return{...F,notifications:F.notifications.map(O=>U.has(String(O.id))?{...O,read:1}:O)}}),Ob(R).then(d).catch(()=>{}))},[d]),C=S.useCallback(()=>{k(O0((e==null?void 0:e.notifications)??[]))},[e,k]),j=S.useCallback(async(R,F)=>{try{return await tj(R,F),d(),{ok:!0}}catch(U){const O=D0(U);return O.ok&&O.alreadyHandled&&d(),O}},[d]),E=S.useCallback(async(R,F)=>{try{return await nj(R,F),d(),{ok:!0}}catch(U){const O=D0(U);return O.ok&&O.alreadyHandled&&d(),O}},[d]),_=S.useCallback(()=>{s(!1),r(u.current?"ready":"loading"),d()},[d]);return{joinRequests:y,activity:g,unread:x,hasInformationalUnread:b,status:a,refreshError:o,partialActivityError:!1,approve:j,deny:E,markSeen:k,markAllInformationalSeen:C,retry:_}}const RT="dkg-pca",_T=150;function OT(e){return[String(e.chainId).toLowerCase(),e.nft.toLowerCase(),e.token.toLowerCase()].join(":")}function Ri(e){return e?`${RT}:${e}`:null}const qf={trackedIds:[],createPending:null,topUpPending:{}};function Ao(e){return typeof e=="string"&&/^\d+$/.test(e)}function DT(e){if(!Array.isArray(e))return[];const n=new Set,a=[];for(const r of e)Ao(r)&&!n.has(r)&&(n.add(r),a.push(r));return a}function MT(e){if(e==null||typeof e!="object")return null;const n=e;return typeof n.ownerEoa!="string"||n.ownerEoa.length===0||typeof n.submittedAt!="number"||!Number.isFinite(n.submittedAt)?null:{ownerEoa:n.ownerEoa,submittedAt:n.submittedAt,...typeof n.txHash=="string"&&n.txHash.length>0?{txHash:n.txHash}:{}}}function LT(e){if(e==null||typeof e!="object")return{};const n={};for(const[a,r]of Object.entries(e)){if(!Ao(a)||r==null||typeof r!="object")continue;const o=r;o.accountId===a&&(typeof o.ownerEoa!="string"||o.ownerEoa.length===0||typeof o.txHash!="string"||o.txHash.length===0||typeof o.submittedAt!="number"||!Number.isFinite(o.submittedAt)||(n[a]={accountId:a,ownerEoa:o.ownerEoa,txHash:o.txHash,submittedAt:o.submittedAt,...typeof o.tokens=="string"?{tokens:o.tokens}:{},...typeof o.previousTopUpBufferTrac=="string"?{previousTopUpBufferTrac:o.previousTopUpBufferTrac}:{}}))}return n}function Mb(e){const n=Ri(e);if(!n)return{...qf};try{const a=localStorage.getItem(n);if(!a)return{...qf};const r=JSON.parse(a);return{trackedIds:DT(r.trackedIds),createPending:MT(r.createPending),topUpPending:LT(r.topUpPending)}}catch{return{...qf}}}let Ca=null;function cc(e,n){e&&(Ca&&clearTimeout(Ca),Ca=setTimeout(()=>{Ca=null;try{localStorage.setItem(e,JSON.stringify(n))}catch{}},_T))}function Ff(e,n){if(Ca&&(clearTimeout(Ca),Ca=null),!e)return!1;try{return localStorage.setItem(e,JSON.stringify(n)),!0}catch{return!1}}function ar(e){return{trackedIds:e.trackedIds,createPending:e.createPending,topUpPending:e.topUpPending}}const uc=Mb(null),Up=ur((e,n)=>({scopeKey:null,trackedIds:uc.trackedIds,createPending:uc.createPending,topUpPending:uc.topUpPending,createPendingPersisted:uc.createPending!=null,setScope:a=>{if(n().scopeKey===a)return;Ca&&(clearTimeout(Ca),Ca=null);const r=Mb(a);e({scopeKey:a,trackedIds:r.trackedIds,createPending:r.createPending,topUpPending:r.topUpPending,createPendingPersisted:r.createPending!=null})},trackAccount:a=>{Ao(a)&&(e(r=>r.trackedIds.includes(a)?r:{trackedIds:[...r.trackedIds,a]}),cc(Ri(n().scopeKey),ar(n())))},untrackAccount:a=>{e(r=>r.trackedIds.includes(a)?{trackedIds:r.trackedIds.filter(o=>o!==a)}:r),cc(Ri(n().scopeKey),ar(n()))},isTracked:a=>n().trackedIds.includes(a),setCreatePending:a=>{e({createPending:a});const r=Ff(Ri(n().scopeKey),ar(n()));return e({createPendingPersisted:r}),r},clearCreatePending:()=>{e({createPending:null,createPendingPersisted:!1}),cc(Ri(n().scopeKey),ar(n()))},setTopUpPending:a=>{Ao(a.accountId)&&(e(r=>({topUpPending:{...r.topUpPending,[a.accountId]:a}})),Ff(Ri(n().scopeKey),ar(n())))},clearTopUpPending:a=>{e(r=>{if(!r.topUpPending[a])return r;const o={...r.topUpPending};return delete o[a],{topUpPending:o}}),cc(Ri(n().scopeKey),ar(n()))},finishCreate:a=>{e(r=>({createPending:null,createPendingPersisted:!1,trackedIds:Ao(a)&&!r.trackedIds.includes(a)?[...r.trackedIds,a]:r.trackedIds})),Ff(Ri(n().scopeKey),ar(n()))}}));function Gf(e){if(!e)return!1;try{return BigInt(e)>0n}catch{return!1}}function Lb(e,n=Math.floor(Date.now()/1e3)){const{expiresAtTimestamp:a}=e;return typeof a=="number"&&a>0&&n>=a}function zb(e,n){return Lb(e,n)||!!e.fullySwept}function _h(e){return Gf(e.topUpBuffer)?!0:e.remainingAllowance!==void 0?Gf(e.remainingAllowance):e.extendedRequested?null:Gf(e.baseEpochAllowance)}function zT(e){return _h(e)===!0}function IT(e){return e.remainingAllowance!==void 0&&_h(e)===!1}const Ib=90,Pb=10080*60;function PT(e,n=Math.floor(Date.now()/1e3)){const{expiresAtTimestamp:a,fullySwept:r,agentCount:o}=e,s=typeof a=="number"&&a>0;return Lb(e,n)?"expired":r?"swept":IT(e)?"insolvent":typeof o=="number"&&o>=Ib?"cap-near":s&&a-n<=Pb?"expiring":"healthy"}function UT(e,n){return!zb(e,n)&&zT(e)}function BT(e){return(e==null?void 0:e.adapterSupported)===!1?null:(e==null?void 0:e.registered)??null}function HT(e,n){var u;const a=BT(e.probedKey);if(a===null)return{outcome:"inconclusive",registered:null,adapterUnsupported:((u=e.probedKey)==null?void 0:u.adapterSupported)===!1};if(a===!1)return{outcome:"unregistered",registered:!1};const r=zb(e,n),o=_h(e);if(o===null)return{outcome:"inconclusive",registered:null,adapterUnsupported:!1};const s=o;return!r&&s?{outcome:"covers",registered:!0}:{outcome:"uncovered",registered:!0,dead:r,hasBudget:s}}const M0=(e,n)=>!!e&&!!n&&e.toLowerCase()===n.toLowerCase();async function $T(e,n){const a={accountId:e,snapshot:null,error:null,notFound:!1,classification:"unknown",ownerIsPrimaryWallet:!1,health:null,walletProbes:[],approvedCount:0,walletCount:n.length,probesInconclusive:!1};let r;try{r=await A0(e,void 0,{extended:!0})}catch(f){return{...a,error:f,notFound:f instanceof an&&f.status===404}}const o=await Promise.all(n.map(f=>A0(e,f,{extended:!0}).then(y=>({wallet:f,registered:HT(y).registered})).catch(()=>({wallet:f,registered:null})))),s=o.filter(f=>f.registered===!0).length,u=o.some(f=>f.registered===null),p=n.some(f=>M0(f,r.owner))?"owned":s>0?"approved":"unknown";return{accountId:e,snapshot:r,error:null,notFound:!1,classification:p,ownerIsPrimaryWallet:M0(n[0],r.owner),health:PT(r),walletProbes:o,approvedCount:s,walletCount:n.length,probesInconclusive:u}}const al=new Map;function L0(e){for(const n of e.subs)n()}async function qc(e){const n=++e.seq;if(e.ids.length===0){if(n!==e.seq)return;e.data={wallets:[],walletsError:!1,accounts:[]},e.error=null,e.loading=!1,L0(e);return}try{const a=await _b().catch(()=>null),r=(a==null?void 0:a.wallets)??[],o=!a||!!a.error,s=await Promise.all(e.ids.map(u=>$T(u,r)));if(n!==e.seq)return;e.data={wallets:r,walletsError:o,accounts:s},e.error=null}catch(a){if(n!==e.seq)return;e.error=(a==null?void 0:a.message)??"Failed to resolve PCAs."}finally{n===e.seq&&(e.loading=!1,L0(e))}}function Vf(e){e.timer||e.intervalMs<=0||typeof document<"u"&&document.hidden||(e.timer=setInterval(()=>qc(e),e.intervalMs))}function Wf(e){e.timer&&(clearInterval(e.timer),e.timer=null)}function qT(e,n,a,r){let o=al.get(e);const s=!o;if(o||(o={ids:n,data:null,loading:!0,error:null,subs:new Set,timer:null,intervalMs:a,onVisibility:null,seq:0},al.set(e,o)),o.subs.add(r),s){const u=o,d=()=>{typeof document>"u"||(document.hidden?Wf(u):(qc(u),Vf(u)))};o.onVisibility=d,typeof document<"u"&&document.addEventListener("visibilitychange",d),qc(o),Vf(o)}else a<o.intervalMs&&(o.intervalMs=a,Wf(o),Vf(o));return()=>{const u=al.get(e);u&&(u.subs.delete(r),u.subs.size===0&&(Wf(u),u.onVisibility&&typeof document<"u"&&document.removeEventListener("visibilitychange",u.onVisibility),al.delete(e)))}}const FT=[];function Ub(e=3e4,n=[]){var C,j,E;const a=Up(_=>_.trackedIds),r=n.join(","),o=S.useMemo(()=>[...a,...n.filter(_=>!a.includes(_))],[a.join(","),r]),s=o.join(","),[,u]=S.useReducer(_=>_+1,0);S.useEffect(()=>qT(s,o,e,u),[s,e]);const d=al.get(s),p=((C=d==null?void 0:d.data)==null?void 0:C.accounts)??FT,f=d?d.loading:!0,y=(d==null?void 0:d.error)??null,{bestCoveringDiscountBps:g,covered:x}=S.useMemo(()=>{let _=null;for(const R of p){if(!R.snapshot||R.approvedCount<=0||!UT(R.snapshot))continue;const F=R.snapshot.discountBps;typeof F=="number"&&(_==null||F>_)&&(_=F)}return{bestCoveringDiscountBps:_,covered:_!=null}},[p]),b=((j=d==null?void 0:d.data)==null?void 0:j.wallets)??[],k=((E=d==null?void 0:d.data)==null?void 0:E.walletsError)??!1;return{accounts:p,wallets:b,walletsError:k,walletsInconclusive:k&&b.length===0,loading:f,error:y,refresh:()=>{const _=al.get(s);_&&qc(_)},bestCoveringDiscountBps:g,covered:x}}let Yf=null;function Bb(){const e=Up(a=>a.scopeKey),n=Up(a=>a.setScope);S.useEffect(()=>{e||Yf||(Yf=$A().then(a=>{n(OT(a))}).catch(()=>{}).finally(()=>{Yf=null}))},[e,n])}function GT(){Bb();const{accounts:e}=Ub(3e4);return S.useMemo(()=>{const n=[],a=Math.floor(Date.now()/1e3);for(const r of e){const o=r.snapshot;if(!o)continue;const s=r.accountId,u=typeof o.expiresAtTimestamp=="number"&&o.expiresAtTimestamp>0,d=u&&a>=o.expiresAtTimestamp;d?n.push({id:`pca-${s}-expired`,accountId:s,kind:"expired",severity:"danger",title:`PCA #${s} has expired`,message:"Publishes no longer get its discount. Create a replacement account to keep saving."}):u&&o.expiresAtTimestamp-a<=Pb&&n.push({id:`pca-${s}-expiring`,accountId:s,kind:"expiring",severity:"warn",title:`PCA #${s} is expiring soon`,message:"Top-up can’t extend the lock period — plan a replacement before it expires."}),o.fullySwept&&n.push({id:`pca-${s}-swept`,accountId:s,kind:"swept",severity:"warn",title:`PCA #${s} is fully swept`,message:"Its epoch budgets have been swept to the staker reward pool."}),typeof o.agentCount=="number"&&o.agentCount>=Ib&&n.push({id:`pca-${s}-cap`,accountId:s,kind:"cap-near",severity:"warn",title:`PCA #${s} is near the 100-wallet cap`,message:"Deregister unused wallets to make room before approving more."}),r.classification==="owned"&&r.approvedCount===0&&!r.probesInconclusive&&!d&&n.push({id:`pca-${s}-fallthrough`,accountId:s,kind:"fallthrough",severity:"warn",title:`PCA #${s} discounts nothing yet`,message:"Publishes from this node pay the direct cost until you approve this node’s operational wallets."})}return n},[e])}function Lo(e,n=new Date){if(e==null||e==="")return"";const a=e instanceof Date?e:new Date(e);if(Number.isNaN(a.getTime()))return"";if(a.toDateString()===n.toDateString())return a.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"});const o=new Date(n);if(o.setDate(n.getDate()-1),a.toDateString()===o.toDateString())return`Yesterday ${a.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}`;const s=n.getTime()-a.getTime();return s>=0&&s<10080*60*1e3?`${a.toLocaleDateString(void 0,{weekday:"short"})} ${a.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}`:a.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}/**
|
|
92
|
-
* @license lucide-react v1.14.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const Hb=(...e)=>e.filter((n,a,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===a).join(" ").trim();/**
|
|
97
|
-
* @license lucide-react v1.14.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const VT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
102
|
-
* @license lucide-react v1.14.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const WT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
|
|
107
|
-
* @license lucide-react v1.14.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const z0=e=>{const n=WT(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
112
|
-
* @license lucide-react v1.14.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/var Kf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
117
|
-
* @license lucide-react v1.14.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const YT=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},KT=S.createContext({}),QT=()=>S.useContext(KT),XT=S.forwardRef(({color:e,size:n,strokeWidth:a,absoluteStrokeWidth:r,className:o="",children:s,iconNode:u,...d},p)=>{const{size:f=24,strokeWidth:y=2,absoluteStrokeWidth:g=!1,color:x="currentColor",className:b=""}=QT()??{},k=r??g?Number(a??y)*24/Number(n??f):a??y;return S.createElement("svg",{ref:p,...Kf,width:n??f??Kf.width,height:n??f??Kf.height,stroke:e??x,strokeWidth:k,className:Hb("lucide",b,o),...!s&&!YT(d)&&{"aria-hidden":"true"},...d},[...u.map(([C,j])=>S.createElement(C,j)),...Array.isArray(s)?s:[s]])});/**
|
|
122
|
-
* @license lucide-react v1.14.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const qt=(e,n)=>{const a=S.forwardRef(({className:r,...o},s)=>S.createElement(XT,{ref:s,iconNode:n,className:Hb(`lucide-${VT(z0(e))}`,`lucide-${e}`,r),...o}));return a.displayName=z0(e),a};/**
|
|
127
|
-
* @license lucide-react v1.14.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const ZT=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],JT=qt("arrow-down",ZT);/**
|
|
132
|
-
* @license lucide-react v1.14.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const eN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],tN=qt("arrow-up",eN);/**
|
|
137
|
-
* @license lucide-react v1.14.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const nN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]],aN=qt("ban",nN);/**
|
|
142
|
-
* @license lucide-react v1.14.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const iN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rN=qt("check",iN);/**
|
|
147
|
-
* @license lucide-react v1.14.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const lN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],oN=qt("chevron-down",lN);/**
|
|
152
|
-
* @license lucide-react v1.14.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const sN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bp=qt("chevron-right",sN);/**
|
|
157
|
-
* @license lucide-react v1.14.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const cN=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],uN=qt("copy",cN);/**
|
|
162
|
-
* @license lucide-react v1.14.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const dN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],fN=qt("ellipsis",dN);/**
|
|
167
|
-
* @license lucide-react v1.14.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const pN=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],hN=qt("folder",pN);/**
|
|
172
|
-
* @license lucide-react v1.14.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const mN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],gN=qt("globe",mN);/**
|
|
177
|
-
* @license lucide-react v1.14.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const yN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],vN=qt("loader-circle",yN);/**
|
|
182
|
-
* @license lucide-react v1.14.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const xN=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],bN=qt("lock",xN);/**
|
|
187
|
-
* @license lucide-react v1.14.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const wN=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],SN=qt("paperclip",wN);/**
|
|
192
|
-
* @license lucide-react v1.14.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const kN=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],I0=qt("share-2",kN);/**
|
|
197
|
-
* @license lucide-react v1.14.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const CN=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],EN=qt("square",CN);/**
|
|
202
|
-
* @license lucide-react v1.14.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const AN=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],jN=qt("trending-up",AN);/**
|
|
207
|
-
* @license lucide-react v1.14.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const TN=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],NN=qt("upload",TN);/**
|
|
212
|
-
* @license lucide-react v1.14.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const RN=[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]],_N=qt("users-round",RN);/**
|
|
217
|
-
* @license lucide-react v1.14.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const ON=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],DN=qt("wallet",ON);/**
|
|
222
|
-
* @license lucide-react v1.14.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const MN=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],LN=qt("x",MN),Qf={1:"ETH",8453:"ETH",84532:"ETH",11155111:"ETH",31337:"ETH",100:"xDAI",10200:"xDAI",2043:"NEURO",20430:"NEURO"};function $b(e){var r;if(e==null)return"ETH";const n=String(e);if(Qf[n])return Qf[n];const a=(r=n.match(/(\d+)\s*$/))==null?void 0:r[1];return a&&Qf[a]||"ETH"}const Xf="—";function zN(e,n=2){if(e==null)return Xf;let a;if(typeof e=="number")a=e;else{const s=String(e).trim();if(!/^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/.test(s))return Xf;a=Number(s)}if(!Number.isFinite(a))return Xf;const r=Math.abs(a),o=r>0&&r<10?n:0;return new Intl.NumberFormat("en-US",{minimumFractionDigits:0,maximumFractionDigits:o}).format(a)}function IN(e,n=2){if(e==null||e==="")return"—";let a;try{a=BigInt(e)}catch{return"—"}const r=a<0n;r&&(a=-a);const o=10n**18n,s=a/o,u=(a%o+o).toString().slice(1).slice(0,n);return zN(`${r?"-":""}${s}.${u||"0"}`,n)}const PN=new Set(["84532","11155111","31337","10200","20430"]);function e9(e){if(e==null)return!1;const n=String(e),a=n.includes(":")?n.split(":").pop():n;return PN.has(a)}function t9(e,n=Math.floor(Date.now()/1e3)){if(!e||e<=0)return"Expiry unknown";const a=e-n,r=Math.round(Math.abs(a)/86400);return a<=0?r===0?"Expired today":`Expired ~${r} day${r===1?"":"s"} ago`:`Expires in ~${r} day${r===1?"":"s"}`}function qb(e){if(!e)return null;let n,a;try{n=BigInt(e.baseCost),a=BigInt(e.discountedCost)}catch{return null}return n<=0n||a<0n||a>=n?null:Number(((n-a)*10000n+n/2n)/n)}function n9({convictionCostCovered:e,className:n=""}){const a=qb(e);if(e==null||a==null)return null;const r=(a/100).toFixed(a%100===0?0:1),o=e.accountId?`via PCA #${e.accountId}`:"across multiple PCAs";return m.jsxs("span",{className:["badge","badge-success","v10-pca-discount-applied",n].filter(Boolean).join(" "),"data-testid":"pca-discount-badge",role:"status",children:[m.jsx("span",{"aria-hidden":"true",children:"◉ "}),"Discount applied — −",r,"% ",o]})}const Fc=new Map,Hp=new Set;let P0=!1;function UN(){const e=[...Fc.values()];for(const n of Hp)n(e)}function BN(e){const n=e.detail;Fc.has(n.info.uuid)||(Fc.set(n.info.uuid,n),UN())}function HN(){P0||typeof window>"u"||(P0=!0,window.addEventListener("eip6963:announceProvider",BN),window.dispatchEvent(new Event("eip6963:requestProvider")))}function $N(e){return Hp.add(e),e([...Fc.values()]),()=>{Hp.delete(e)}}function Oh(e){var r;if(typeof e=="number")return e;const n=(r=String(e).match(/(\d+)\s*$/))==null?void 0:r[1],a=n?Number(n):NaN;if(!Number.isFinite(a))throw new Error(`Unrecognized chainId: ${e}`);return a}function qN(e){return`0x${Oh(e).toString(16)}`}const Dh="dkg-node-ui:wallet-provider-rdns";function FN(e){var n;try{(n=globalThis.localStorage)==null||n.setItem(Dh,e)}catch{}}function GN(){var e;try{return((e=globalThis.localStorage)==null?void 0:e.getItem(Dh))??null}catch{return null}}function U0(){var e;try{(e=globalThis.localStorage)==null||e.removeItem(Dh)}catch{}}function VN(e){return(e.walletRpcUrls??[]).filter(n=>/^https?:\/\//i.test(n))}async function WN(e,n){const a=qN(n.chainId);try{await e.request({method:"wallet_switchEthereumChain",params:[{chainId:a}]})}catch(r){if((r==null?void 0:r.code)!==4902)throw r;const o=$b(n.chainId),s=VN(n);if(s.length===0)throw new Error("Wallet does not know this chain and the node did not provide wallet-public RPC URLs. Add the network in your wallet, then try again.");await e.request({method:"wallet_addEthereumChain",params:[{chainId:a,chainName:`chain-${Oh(n.chainId)}`,nativeCurrency:{name:o,symbol:o,decimals:18},rpcUrls:s}]}),await e.request({method:"wallet_switchEthereumChain",params:[{chainId:a}]})}}const Fb=new Set(["app.phantom"]),YN=300;function KN(e){return e.filter(n=>!Fb.has(n.info.rdns))}function QN(e,n){if(!n)return null;const a=e.filter(r=>r.info.rdns===n);return a.length===1?a[0]:null}function a9(e){return e.address!=null&&e.expectedChainId!=null&&e.chainId!==e.expectedChainId}let dc=!1,fc=null,B0=!1;const i9=ur((e,n)=>{function a(o){o.on&&(o.on("accountsChanged",(...s)=>{const u=s[0],d=(u==null?void 0:u[0])??null;if(d===null){n().disconnect();return}e({address:d})}),o.on("chainChanged",(...s)=>{e({chainId:parseInt(s[0],16)})}),o.on("disconnect",()=>n().disconnect()))}async function r(o){const s=o.provider;try{const u=await s.request({method:"eth_accounts"});if(u.length===0){U0();return}const d=await s.request({method:"eth_chainId"});a(s),e({provider:s,providerInfo:o.info,address:u[0],chainId:parseInt(d,16)})}catch(u){console.warn("[wallet] silent reconnect failed",u)}}return{discovered:[],unsupported:[],provider:null,providerInfo:null,address:null,chainId:null,expectedChainId:null,bootstrap:null,setBootstrap(o){e({bootstrap:o,expectedChainId:Oh(o.chainId)})},initWallet(){if(typeof window>"u"||(HN(),B0))return;B0=!0;const o=GN();$N(s=>{e({discovered:KN(s),unsupported:s.filter(u=>Fb.has(u.info.rdns))}),!(!o||dc)&&(fc&&clearTimeout(fc),fc=setTimeout(()=>{if(fc=null,dc)return;const u=QN(n().discovered,o);u&&(dc=!0,r(u))},YN))})},async connect(o){const s=o.provider,u=await s.request({method:"eth_requestAccounts"}),d=await s.request({method:"eth_chainId"});a(s),e({provider:s,providerInfo:o.info,address:u[0]??null,chainId:parseInt(d,16)}),FN(o.info.rdns),dc=!1},disconnect(){e({provider:null,providerInfo:null,address:null,chainId:null}),U0()},async switchToExpectedChain(){const{provider:o,bootstrap:s}=n();if(!o)throw new Error("Wallet not connected.");if(!s)throw new Error("Chain not bootstrapped.");await WN(o,s)}}});function Mh(e,n){return e&&e.trim()?e:n.length>20?`${n.slice(0,16)}…`:n}function H0(e){return e.length>12?`${e.slice(0,6)}…${e.slice(-4)}`:e}function XN({item:e,onApprove:n,onDeny:a,onOpen:r}){var y;const[o,s]=S.useState({kind:"idle"}),u=Mh(e.contextGraphName,e.cgId),d=((y=e.agentName)==null?void 0:y.trim())||H0(e.agentAddress),p=async g=>{s({kind:"working",action:g});const b=await(g==="approve"?n:a)(e.cgId,e.agentAddress);if(b.ok){const k=b.alreadyHandled?"Already handled":g==="approve"?`Approved — ${d} can now access ${u}`:`Request from ${d} declined`;s({kind:"done",label:k})}else{const k=b.roleError?`You're no longer the curator of ${u}`:g==="approve"?"Couldn’t approve":"Couldn’t deny";s({kind:"error",action:g,message:k})}};if(o.kind==="done")return m.jsxs("div",{className:"v10-notif-row v10-notif-row-terminal",role:"status","aria-live":"polite",children:[m.jsx("span",{className:"v10-notif-glyph","aria-hidden":"true",children:"✓"}),m.jsx("span",{className:"v10-notif-terminal-text",children:o.label})]});const f=o.kind==="working";return m.jsxs("div",{className:"v10-notif-row v10-notif-row-join",children:[m.jsx("span",{className:"v10-notif-glyph v10-notif-glyph-join","aria-hidden":"true",children:"🔑"}),m.jsxs("div",{className:"v10-notif-row-body",children:[m.jsx("div",{className:"v10-notif-row-title",children:"Join request"}),m.jsxs("div",{className:"v10-notif-row-detail",children:[m.jsx("span",{className:"v10-notif-actor",children:d})," wants to join"," ",m.jsx("button",{type:"button",className:"v10-notif-cg-link",onClick:()=>r(e.cgId),title:`Open ${u}`,children:u})]}),m.jsxs("div",{className:"v10-notif-row-sub",children:[m.jsx("span",{className:"v10-notif-addr",title:e.agentAddress,children:H0(e.agentAddress)}),m.jsx("span",{className:"v10-notif-dot",children:"·"}),m.jsx("span",{className:"v10-notif-time",title:new Date(e.ts).toLocaleString(),children:Lo(e.ts)})]}),o.kind==="error"&&m.jsxs("div",{className:"v10-notif-row-error",role:"status","aria-live":"polite",children:[o.message," ",m.jsx("button",{type:"button",className:"v10-notif-retry",onClick:()=>p(o.action),children:"Retry"})]}),m.jsx("span",{className:"v10-sr-only",role:"status","aria-live":"polite",children:f?o.action==="approve"?"Approving…":"Denying…":""})]}),m.jsx("div",{className:"v10-notif-row-actions",children:o.kind==="confirming-deny"?m.jsxs("span",{className:"v10-notif-deny-confirm",role:"group","aria-label":"Confirm deny",onKeyDown:g=>{g.key==="Escape"&&(g.stopPropagation(),s({kind:"idle"}))},onBlur:g=>{g.currentTarget.contains(g.relatedTarget)||s({kind:"idle"})},children:[m.jsx("span",{className:"v10-notif-deny-confirm-label",children:"Deny?"}),m.jsx("button",{type:"button",className:"v10-notif-btn v10-notif-btn-deny",onClick:()=>p("deny"),"aria-label":`Confirm deny join request from ${d} for ${u}`,children:"Yes"}),m.jsx("button",{type:"button",className:"v10-notif-btn v10-notif-btn-ghost",onClick:()=>s({kind:"idle"}),autoFocus:!0,children:"Cancel"})]}):m.jsxs(m.Fragment,{children:[m.jsx("button",{type:"button",className:"v10-notif-btn v10-notif-btn-approve",onClick:()=>p("approve"),disabled:f,"aria-label":`Approve join request from ${d} for ${u}`,children:f&&o.action==="approve"?"…":"Approve"}),m.jsx("button",{type:"button",className:"v10-notif-btn v10-notif-btn-ghost",onClick:()=>s({kind:"confirming-deny"}),disabled:f,"aria-label":`Deny join request from ${d} for ${u}`,children:f&&o.action==="deny"?"…":"Deny"})]})})]})}const ZN={created:"+",promoted:"⇡",published:"◉"};function JN(e,n,a){const r=n,o=r===1?"assertion":"assertions";return e==="created"?a?`${a} added ${r} ${o}`:`${r} new ${o} added`:e==="promoted"?a?`${a} promoted ${r} ${o}`:`${r} ${o} promoted`:a?`${a} published ${r} ${o} to Verifiable Memory`:`${r} ${o} published to Verifiable Memory`}function eR({item:e,onOpen:n}){var d;const a=Mh(e.contextGraphName,e.cgId),r=e.bySelf?"You":((d=e.actorAgentName)==null?void 0:d.trim())||void 0,o=JN(e.event,e.count,r),s=Lo(e.ts),u=`${o} in ${a}${s?`, ${s}`:""}. Open ${a} recent activity.`;return m.jsxs("button",{type:"button",className:`v10-notif-row v10-notif-row-activity v10-notif-activity-${e.event}${e.bySelf?" v10-notif-by-self":""}${e.read?"":" v10-notif-unread"}`,onClick:()=>n(e.cgId),title:`Open ${a} · recent activity`,"aria-label":u,children:[m.jsx("span",{className:`v10-notif-glyph v10-notif-glyph-${e.event}`,"aria-hidden":"true",children:ZN[e.event]}),m.jsx("span",{className:"v10-notif-row-body","aria-hidden":"true",children:m.jsxs("span",{className:"v10-notif-row-detail",children:[o," in ",m.jsx("span",{className:"v10-notif-cg-name",children:a})]})}),m.jsx("span",{className:"v10-notif-time","aria-hidden":"true",title:new Date(e.ts).toLocaleString(),children:s})]})}function tR({item:e,onOpen:n}){const a=Mh(e.contextGraphName,e.cgId),r=e.kind==="join_approved",o=m.jsxs(m.Fragment,{children:[m.jsx("span",{className:`v10-notif-glyph ${r?"v10-notif-glyph-approved":"v10-notif-glyph-rejected"}`,"aria-hidden":"true",children:r?"✓":"✕"}),m.jsxs("span",{className:"v10-notif-row-body",children:[m.jsx("span",{className:"v10-notif-row-title",children:r?"Request approved":"Request declined"}),m.jsx("span",{className:"v10-notif-row-detail",children:r?m.jsxs(m.Fragment,{children:["You can now access ",m.jsx("span",{className:"v10-notif-cg-name",children:a})]}):m.jsxs(m.Fragment,{children:["Your request to join ",m.jsx("span",{className:"v10-notif-cg-name",children:a})," wasn’t approved"]})})]}),m.jsx("span",{className:"v10-notif-time",title:new Date(e.ts).toLocaleString(),children:Lo(e.ts)})]});if(r){const s=Lo(e.ts);return m.jsx("button",{type:"button",className:`v10-notif-row v10-notif-row-confirm v10-notif-confirm-approved${e.read?"":" v10-notif-unread"}`,onClick:()=>n(e.cgId),title:`Open ${a}`,"aria-label":`Request approved: you can now access ${a}${s?`, ${s}`:""}. Open ${a}.`,children:o})}return m.jsx("div",{className:`v10-notif-row v10-notif-row-confirm v10-notif-confirm-rejected${e.read?"":" v10-notif-unread"}`,"aria-disabled":"true",children:o})}function nR({item:e}){var f;const n=qb(e.covered),a=n!=null?(n/100).toFixed(n%100===0?0:1):null;let r=null;try{const y=BigInt(e.covered.baseCost),g=BigInt(e.covered.discountedCost);y>0n&&g>=0n&&g<y&&(r=IN((y-g).toString()))}catch{r=null}const o=`PCA #${e.covered.accountId}`,s=(f=e.contextGraphName)!=null&&f.trim()?` in ${e.contextGraphName.trim()}`:"",u=a!=null?"Publishing discount applied":"Publishing fee covered",d=a!=null?`−${a}% via ${o}${r?` · saved ${r} TRAC`:""}${s}`:`via ${o}${s}`,p=Lo(e.ts);return m.jsxs("div",{className:`v10-notif-row v10-notif-row-confirm v10-notif-pca-discount${e.read?"":" v10-notif-unread"}`,role:"status","aria-label":`${u}, ${d}${p?`, ${p}`:""}.`,children:[m.jsx("span",{className:"v10-notif-glyph v10-notif-glyph-approved","aria-hidden":"true",children:"◉"}),m.jsxs("span",{className:"v10-notif-row-body","aria-hidden":"true",children:[m.jsx("span",{className:"v10-notif-row-title",children:u}),m.jsx("span",{className:"v10-notif-row-detail",children:d})]}),m.jsx("span",{className:"v10-notif-time","aria-hidden":"true",title:new Date(e.ts).toLocaleString(),children:p})]})}function aR({feed:e,onOpenContextGraph:n,pcaAlerts:a=[],onOpenPca:r,id:o,paneRef:s}){const{joinRequests:u,activity:d,status:p,refreshError:f,partialActivityError:y,hasInformationalUnread:g,approve:x,deny:b,markSeen:k,markAllInformationalSeen:C}=e,j=(U,O)=>{k([O]),n(U)},E=u.length>0,_=d.length>0,R=a.length>0,F=!E&&!_&&!R;return m.jsxs("div",{className:"v10-notif-pane",role:"region","aria-label":"Notifications",id:o,ref:s,tabIndex:-1,children:[m.jsxs("div",{className:"v10-notif-pane-titlebar",children:[m.jsx("div",{className:"v10-notif-pane-title",children:"Notifications"}),g&&m.jsx("button",{type:"button",className:"v10-notif-pane-markread",onClick:C,title:"Mark informational notifications as read",children:"Mark all read"})]}),m.jsxs("div",{className:"v10-notif-pane-body",children:[R&&m.jsxs("section",{className:"v10-notif-section v10-notif-section-pca","aria-label":"Publisher Conviction",children:[m.jsxs("div",{className:"v10-notif-section-head",children:[m.jsx("span",{className:"v10-notif-section-label",children:"Publisher Conviction"}),m.jsx("span",{className:"v10-notif-section-count",children:a.length})]}),m.jsx("div",{className:"v10-notif-section-rows",children:a.map(U=>m.jsxs("div",{className:"v10-pca-alert-row","data-severity":U.severity,"data-testid":"pca-bell-alert",role:U.severity==="danger"?"alert":"status",children:[m.jsx("div",{className:"v10-pca-alert-title",children:U.title}),m.jsx("div",{className:"v10-pca-alert-msg",children:U.message}),r&&m.jsxs("button",{type:"button",className:"v10-pca-alert-action",onClick:()=>r(U.accountId),children:["Manage PCA #",U.accountId]})]},U.id))})]}),p==="identity-pending"?m.jsx("div",{className:"v10-notif-pane-state",role:"status",children:"Verifying access…"}):p==="loading"&&F?m.jsx("div",{className:"v10-notif-pane-state",role:"status",children:"Loading notifications…"}):p==="error"&&F?m.jsxs("div",{className:"v10-notif-pane-error",role:"status","aria-live":"polite",children:["Couldn’t load notifications."," ",m.jsx("button",{type:"button",className:"v10-notif-retry",onClick:e.retry,children:"Retry"})]}):F?m.jsxs("div",{className:"v10-notif-pane-empty",role:"status",children:[m.jsx("div",{className:"v10-notif-pane-empty-lead",children:"You’re all caught up."}),m.jsx("div",{className:"v10-notif-pane-empty-sub",children:"Join requests, approvals, and new activity in your context graphs will show up here."})]}):m.jsxs(m.Fragment,{children:[f&&m.jsxs("div",{className:"v10-notif-pane-error v10-notif-pane-error-inline",role:"status","aria-live":"polite",children:["Couldn’t refresh notifications."," ",m.jsx("button",{type:"button",className:"v10-notif-retry",onClick:e.retry,children:"Retry"})]}),E&&m.jsxs("section",{className:"v10-notif-section v10-notif-section-action","aria-label":"Needs your action",children:[m.jsxs("div",{className:"v10-notif-section-head",children:[m.jsx("span",{className:"v10-notif-section-label",children:"Needs your action"}),m.jsx("span",{className:"v10-notif-section-count",children:u.length})]}),m.jsx("div",{className:"v10-notif-section-rows",children:u.map(U=>m.jsx(XN,{item:U,onApprove:x,onDeny:b,onOpen:n},U.id))})]}),m.jsxs("section",{className:"v10-notif-section v10-notif-section-activity","aria-label":"Activity",children:[m.jsx("div",{className:"v10-notif-section-head",children:m.jsx("span",{className:"v10-notif-section-label",children:"Activity"})}),y&&m.jsx("div",{className:"v10-notif-pane-error v10-notif-pane-error-inline",role:"status","aria-live":"polite",children:"Recent activity couldn’t load."}),_?m.jsx("div",{className:"v10-notif-section-rows",children:d.map(U=>U.kind==="digest"?m.jsx(eR,{item:U,onOpen:O=>j(O,U.id)},U.id):U.kind==="pca_cost_covered"?m.jsx(nR,{item:U},U.id):m.jsx(tR,{item:U,onOpen:O=>j(O,U.id)},U.id))}):!y&&m.jsx("div",{className:"v10-notif-section-empty",children:"No recent activity."})]})]})]})]})}const iR=m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),m.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]}),$0="v10-notifications-pane";function rR(){const e=NT(),n=GT(),[a,r]=S.useState(!1),o=S.useRef(null),s=S.useRef(null),u=ca(b=>b.setActiveProject),{openTab:d}=gn(),p=S.useRef(null),f=S.useCallback((b=!1)=>{var k;r(!1),b&&((k=s.current)==null||k.focus())},[]);S.useEffect(()=>{if(!a)return;const b=k=>{o.current&&!o.current.contains(k.target)&&f()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[a,f]),S.useEffect(()=>{if(!a)return;const b=p.current;if(!b)return;const k=b.querySelector(".v10-notif-section-action .v10-notif-btn-approve"),C=b.querySelector(".v10-notif-section-rows button, .v10-notif-section-rows a[href]"),j=b.querySelector('button:not(.v10-notif-pane-markread), [href], [tabindex]:not([tabindex="-1"])');(k??C??j??b).focus()},[a]);const y=S.useCallback(b=>{u(b),d({id:`project:${b}`,label:b.slice(0,16),closable:!0}),f()},[u,d,f]),g=S.useCallback(b=>{d({id:`conviction:${b}`,label:`PCA #${b}`,closable:!0}),f()},[d,f]),x=e.unread+n.length;return m.jsxs("div",{className:"v10-header-notif-wrap",ref:o,onKeyDown:a?b=>{b.key==="Escape"&&(b.stopPropagation(),f(!0))}:void 0,children:[m.jsxs("button",{ref:s,className:"v10-header-icon-btn",onClick:()=>r(b=>!b),title:x>0?`Notifications (${x} unread)`:"Notifications","aria-label":x>0?`Notifications, ${x} unread`:"Notifications","aria-haspopup":"dialog","aria-expanded":a,"aria-controls":a?$0:void 0,children:[iR,x>0&&m.jsx("span",{className:"v10-header-notif-badge",children:x})]}),a&&m.jsx(aR,{id:$0,paneRef:p,feed:e,onOpenContextGraph:y,pcaAlerts:n,onOpenPca:g})]})}function lR(e,n,a,r,o){const s=[e?"Synced with the network":"Syncing with the network",`${n} peer${n===1?"":"s"} (${a} direct, ${r} relayed)`];return o>0&&s.push(`Uptime ${oR(o)}`),s.join(`
|
|
227
|
-
`)}function oR(e){const n=Math.max(0,Math.floor(e/1e3)),a=Math.floor(n/86400),r=Math.floor(n%86400/3600),o=Math.floor(n%3600/60),s=[];return a>0&&s.push(`${a}d`),(r>0||a>0)&&s.push(`${r}h`),s.push(`${o}m`),s.join(" ")}const sR=m.jsx("span",{className:"v10-header-ot-wordmark",children:m.jsxs("svg",{width:"60",height:"13",viewBox:"0 0 180 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[m.jsx("path",{d:"M55.0428 28.0111C59.7903 28.0111 62.6388 24.531 62.6388 20.3908C62.6388 16.2806 59.7903 12.8005 55.0428 12.8005C50.325 12.8005 47.4766 16.2806 47.4766 20.3908C47.4766 24.531 50.325 28.0111 55.0428 28.0111ZM55.0428 24.621C52.6988 24.621 51.3932 22.6709 51.3932 20.3908C51.3932 18.1407 52.6988 16.1906 55.0428 16.1906C57.3869 16.1906 58.7221 18.1407 58.7221 20.3908C58.7221 22.6709 57.3869 24.621 55.0428 24.621Z",fill:"currentColor"}),m.jsx("path",{d:"M65.4344 27.6511H69.2027V18.0807C69.8258 17.1507 71.4874 16.4606 72.7336 16.4606C73.149 16.4606 73.5051 16.4906 73.7721 16.5507V12.8305C71.9918 12.8305 70.2115 13.8505 69.2027 15.1406V13.1605H65.4344V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M77.9959 11.0304C79.2421 11.0304 80.251 10.0104 80.251 8.75031C80.251 7.49026 79.2421 6.47021 77.9959 6.47021C76.7794 6.47021 75.7409 7.49026 75.7409 8.75031C75.7409 10.0104 76.7794 11.0304 77.9959 11.0304ZM76.1266 27.6511H79.8949V13.1605H76.1266V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M83.3347 31.3713C85.115 32.9614 87.0437 33.5314 89.5064 33.5314C93.0373 33.5314 97.2507 32.1813 97.2507 26.6611V13.1605H93.4527V15.0206C92.2955 13.5505 90.7526 12.8005 89.0317 12.8005C85.4117 12.8005 82.7116 15.4406 82.7116 20.1808C82.7116 25.011 85.4414 27.5611 89.0317 27.5611C90.7823 27.5611 92.3252 26.7211 93.4527 25.281V26.7511C93.4527 29.6012 91.3164 30.4113 89.5064 30.4113C87.6964 30.4113 86.1832 29.9012 85.026 28.6112L83.3347 31.3713ZM93.4527 22.5209C92.8296 23.4509 91.4647 24.171 90.2185 24.171C88.0822 24.171 86.5986 22.6709 86.5986 20.1808C86.5986 17.6907 88.0822 16.1906 90.2185 16.1906C91.4647 16.1906 92.8296 16.8807 93.4527 17.8407V22.5209Z",fill:"currentColor"}),m.jsx("path",{d:"M102.857 11.0304C104.104 11.0304 105.113 10.0104 105.113 8.75031C105.113 7.49026 104.104 6.47021 102.857 6.47021C101.641 6.47021 100.602 7.49026 100.602 8.75031C100.602 10.0104 101.641 11.0304 102.857 11.0304ZM100.988 27.6511H104.756V13.1605H100.988V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M118.166 27.6511H121.934V17.4207C121.934 14.6006 120.421 12.8005 117.276 12.8005C114.932 12.8005 113.181 13.9405 112.261 15.0506V13.1605H108.493V27.6511H112.261V17.9007C112.884 17.0307 114.042 16.1906 115.525 16.1906C117.127 16.1906 118.166 16.8807 118.166 18.8908V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M130.483 28.0111C132.055 28.0111 133.064 27.5911 133.628 27.0811L132.827 24.201C132.619 24.411 132.085 24.621 131.521 24.621C130.69 24.621 130.216 23.931 130.216 23.0309V16.4906H133.123V13.1605H130.216V9.20033H126.418V13.1605H124.044V16.4906H126.418V24.051C126.418 26.6311 127.842 28.0111 130.483 28.0111Z",fill:"currentColor"}),m.jsx("path",{d:"M135.702 27.6511H139.47V18.0807C140.093 17.1507 141.755 16.4606 143.001 16.4606C143.416 16.4606 143.772 16.4906 144.039 16.5507V12.8305C142.259 12.8305 140.479 13.8505 139.47 15.1406V13.1605H135.702V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M156.245 27.6511H160.043V13.1605H156.245V15.0206C155.117 13.5505 153.515 12.8005 151.824 12.8005C148.174 12.8005 145.474 15.6806 145.474 20.4208C145.474 25.251 148.204 28.0111 151.824 28.0111C153.545 28.0111 155.117 27.2311 156.245 25.8211V27.6511ZM156.245 22.9709C155.592 23.931 154.257 24.621 152.981 24.621C150.845 24.621 149.361 22.9109 149.361 20.4208C149.361 17.9007 150.845 16.2206 152.981 16.2206C154.257 16.2206 155.592 16.9107 156.245 17.8707V22.9709Z",fill:"currentColor"}),m.jsx("path",{d:"M165.649 11.0304C166.895 11.0304 167.904 10.0104 167.904 8.75031C167.904 7.49026 166.895 6.47021 165.649 6.47021C164.432 6.47021 163.394 7.49026 163.394 8.75031C163.394 10.0104 164.432 11.0304 165.649 11.0304ZM163.78 27.6511H167.548V13.1605H163.78V27.6511Z",fill:"currentColor"}),m.jsx("path",{d:"M175.32 28.0111C176.863 28.0111 177.871 27.5911 178.435 27.0811L177.634 24.201C177.456 24.411 176.922 24.621 176.358 24.621C175.527 24.621 175.053 23.931 175.053 23.0309V7.64026H171.284V24.051C171.284 26.6311 172.679 28.0111 175.32 28.0111Z",fill:"currentColor"}),m.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.781 9.94781C14.2903 9.94781 9.8385 14.4484 9.8385 20.0008C9.8385 25.5525 14.2903 30.0531 19.781 30.0531C22.833 30.0531 25.5632 28.6622 27.3869 26.4736L34.9141 32.8796C31.2855 37.2341 25.8532 40.0016 19.781 40.0016C8.85592 40.0016 0 31.0467 0 20.0008C0 8.95432 8.85592 0 19.781 0V9.94781ZM36.8737 30.0724L28.3719 25.0628C28.662 24.5606 28.9105 24.0308 29.112 23.4781L38.3464 26.9194C37.9453 28.0192 37.4508 29.0732 36.8737 30.0724ZM29.7216 20.0007H39.5609C39.5609 18.8159 39.4583 17.6554 39.2628 16.5272L29.5719 18.2549C29.6701 18.822 29.7216 19.4053 29.7216 20.0007ZM34.988 7.20831L27.425 13.5712C27.0546 13.1215 26.646 12.7054 26.2045 12.3272L32.5596 4.73338C33.4381 5.4858 34.251 6.31374 34.988 7.20831Z",fill:"currentColor"})]})}),cR=m.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("circle",{cx:"12",cy:"12",r:"5"}),m.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),m.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),m.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),m.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),m.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),m.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),m.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),m.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}),uR=m.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:m.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),dR=m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),m.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]}),fR=m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),m.jsx("line",{x1:"15",y1:"3",x2:"15",y2:"21"})]}),pR=m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("circle",{cx:"12",cy:"12",r:"3"}),m.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09a1.65 1.65 0 0 0-1-1.51 1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09a1.65 1.65 0 0 0 1.51-1 1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),hR=m.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:m.jsx("polyline",{points:"22 12 18 12 15 21 9 3 6 12 2 12"})}),mR=m.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[m.jsx("path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.78 4.78 4 4 0 0 1-6.74 0 4 4 0 0 1-4.78-4.78 4 4 0 0 1 0-6.75z"}),m.jsx("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),m.jsx("circle",{cx:"9.5",cy:"9.5",r:".5"}),m.jsx("circle",{cx:"14.5",cy:"14.5",r:".5"})]});function gR(){var j,E;const{theme:e,setTheme:n,leftCollapsed:a,toggleLeft:r,rightCollapsed:o,toggleRight:s}=aa(),u=bh(_=>_.nodeStatus),d=Rh().data,{openTab:p}=gn(),f=(u==null?void 0:u.connectedPeers)??(u==null?void 0:u.peerCount)??0,y=((j=u==null?void 0:u.connections)==null?void 0:j.direct)??0,g=((E=u==null?void 0:u.connections)==null?void 0:E.relayed)??0,x=(u==null?void 0:u.uptimeMs)??0,k=u!=null&&(u==null?void 0:u.synced)!==!1,C=lR(k,f,y,g,x);return m.jsxs("header",{className:"v10-header",children:[m.jsxs("div",{className:"v10-header-logo",children:[m.jsxs("span",{className:"v10-header-logo-text",children:["DKG ",m.jsx("span",{className:"v10-header-logo-version",children:"v10"})]}),m.jsxs("div",{className:"v10-header-logo-ot","aria-label":"Powered by OriginTrail",children:[m.jsx("span",{className:"v10-header-logo-ot-by",children:"powered by"}),sR]})]}),m.jsx("button",{className:`v10-header-icon-btn ${a?"":"active-toggle"}`,onClick:r,title:"Toggle sidebar",children:dR}),m.jsx("div",{className:"v10-header-sep"}),m.jsxs("div",{className:"v10-header-agent-switcher",title:d?`${d.agentDid}
|
|
228
|
-
${d.agentAddress}`:void 0,children:[m.jsx("span",{className:"v10-header-agent-dot"}),m.jsx("span",{className:"v10-header-agent-name",children:(d!=null&&d.name&&d.name!=="**"?d.name:null)||(u==null?void 0:u.name)||"Agent"}),(d==null?void 0:d.agentAddress)&&m.jsxs("span",{className:"v10-header-agent-addr",children:[d.agentAddress.slice(0,6),"…",d.agentAddress.slice(-4)]})]}),m.jsx("div",{className:"v10-header-spacer"}),m.jsxs("div",{className:"v10-header-meta",title:C,children:[m.jsx("span",{className:`v10-header-status-dot ${k?"online":"offline"}`}),m.jsx("span",{children:k?"synced":"syncing"}),m.jsx("span",{className:"v10-header-meta-sep",children:"·"}),m.jsxs("span",{children:[f," peer",f!==1?"s":""]})]}),m.jsxs("div",{className:"v10-header-actions",children:[m.jsx(rR,{}),m.jsx("button",{className:"v10-header-icon-btn",onClick:()=>p({id:"operations",label:"Observability",closable:!0}),title:"Observability",children:hR}),m.jsx("button",{className:"v10-header-icon-btn","data-testid":"pca-launch-btn",onClick:()=>p({id:"conviction",label:"Publisher Conviction",closable:!0}),title:"Publisher Conviction - publishing discounts",children:mR}),m.jsx("button",{className:"v10-header-icon-btn",onClick:()=>p({id:"settings",label:"Settings",closable:!0}),title:"Settings",children:pR}),m.jsx("button",{className:"v10-header-icon-btn",onClick:()=>n(e==="dark"?"light":"dark"),title:e==="dark"?"Switch to light mode":"Switch to dark mode",children:e==="dark"?cR:uR}),m.jsx("button",{className:`v10-header-icon-btn ${o?"":"active-toggle"}`,onClick:s,title:"Toggle agent panel",children:fR})]})]})}function yR(){const e=localStorage.getItem("dkg-journey-stage");return e==="1"?1:e==="2"?2:0}const Lh=ur((e,n)=>({stage:yR(),setStage:a=>{localStorage.setItem("dkg-journey-stage",String(a)),e({stage:a})},advance:()=>{const a=Math.min(n().stage+1,2);localStorage.setItem("dkg-journey-stage",String(a)),e({stage:a})}})),vR=`@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
229
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
230
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
231
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
232
|
-
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
233
|
-
@prefix schema: <http://schema.org/> .
|
|
234
|
-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
235
|
-
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
236
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
237
|
-
@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
238
|
-
@prefix fabio: <http://purl.org/spar/fabio/> .
|
|
239
|
-
@prefix cito: <http://purl.org/spar/cito/> .
|
|
240
|
-
@prefix frbr: <http://purl.org/vocab/frbr/core#> .
|
|
241
|
-
|
|
242
|
-
@prefix chat: <http://dkg.io/ontology/chat/> .
|
|
243
|
-
@prefix dkg: <http://dkg.io/ontology/> .
|
|
244
|
-
@prefix : <http://dkg.io/ontology/book-research/> .
|
|
245
|
-
|
|
246
|
-
<http://dkg.io/ontology/book-research/>
|
|
247
|
-
a owl:Ontology ;
|
|
248
|
-
dcterms:title "DKG Book Research Project Ontology (v1)" ;
|
|
249
|
-
dcterms:description """Starter ontology for projects that research and
|
|
250
|
-
write books, papers, or long-form non-fiction. Built on schema.org +
|
|
251
|
-
BIBO + the SPAR family (FaBiO, CiTO) + FRBR + SKOS so it composes with
|
|
252
|
-
existing scholarly publishing infrastructure.""" ;
|
|
253
|
-
owl:versionInfo "1.0.0" ;
|
|
254
|
-
dcterms:created "2026-04-18"^^xsd:date ;
|
|
255
|
-
owl:imports
|
|
256
|
-
<http://schema.org/> , <http://purl.org/dc/terms/> ,
|
|
257
|
-
<http://www.w3.org/ns/prov#> , <http://xmlns.com/foaf/0.1/> ,
|
|
258
|
-
<http://www.w3.org/2004/02/skos/core#> ,
|
|
259
|
-
<http://purl.org/ontology/bibo/> ,
|
|
260
|
-
<http://purl.org/spar/fabio/> ,
|
|
261
|
-
<http://purl.org/spar/cito/> ,
|
|
262
|
-
<http://purl.org/vocab/frbr/core#> .
|
|
263
|
-
|
|
264
|
-
# ─── Universal annotation predicates (shared across all starters) ───
|
|
265
|
-
chat:topic a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
266
|
-
chat:mentions a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:subPropertyOf schema:mentions .
|
|
267
|
-
chat:examines a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range owl:Thing .
|
|
268
|
-
chat:proposes a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range owl:Thing .
|
|
269
|
-
chat:concludes a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Finding .
|
|
270
|
-
chat:asks a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Question .
|
|
271
|
-
|
|
272
|
-
# ─── Universal annotation entities ──────────────────────────────────
|
|
273
|
-
:Concept rdfs:subClassOf skos:Concept .
|
|
274
|
-
:Topic rdfs:subClassOf skos:Concept .
|
|
275
|
-
:Question rdfs:subClassOf schema:Question .
|
|
276
|
-
:Finding rdfs:subClassOf prov:Entity .
|
|
277
|
-
|
|
278
|
-
# ─── Book-research specific ─────────────────────────────────────────
|
|
279
|
-
|
|
280
|
-
:Hypothesis a owl:Class ;
|
|
281
|
-
rdfs:label "Hypothesis" ;
|
|
282
|
-
rdfs:comment "A claim under investigation. Supersedes when refuted; promotes to a Finding when supported." ;
|
|
283
|
-
rdfs:subClassOf prov:Entity .
|
|
284
|
-
|
|
285
|
-
:Argument a owl:Class ;
|
|
286
|
-
rdfs:label "Argument" ;
|
|
287
|
-
rdfs:comment "A reasoned position taken on a Hypothesis or other entity." ;
|
|
288
|
-
rdfs:subClassOf prov:Entity .
|
|
289
|
-
|
|
290
|
-
:Counterexample a owl:Class ;
|
|
291
|
-
rdfs:label "Counterexample" ;
|
|
292
|
-
rdfs:comment "Evidence that refutes a Hypothesis or Argument." ;
|
|
293
|
-
rdfs:subClassOf prov:Entity .
|
|
294
|
-
|
|
295
|
-
:Quote a owl:Class ;
|
|
296
|
-
rdfs:label "Quote" ;
|
|
297
|
-
rdfs:comment "Verbatim passage extracted from a source. Subclass of bibo:Quote so it composes with bibliographic tools." ;
|
|
298
|
-
rdfs:subClassOf bibo:Quote .
|
|
299
|
-
|
|
300
|
-
:supports a owl:ObjectProperty ;
|
|
301
|
-
rdfs:label "supports" ;
|
|
302
|
-
rdfs:comment "An Argument or Quote supports a Hypothesis." ;
|
|
303
|
-
rdfs:subPropertyOf cito:agreesWith .
|
|
304
|
-
|
|
305
|
-
:refutes a owl:ObjectProperty ;
|
|
306
|
-
rdfs:label "refutes" ;
|
|
307
|
-
rdfs:comment "An Argument, Counterexample, or Quote refutes a Hypothesis." ;
|
|
308
|
-
rdfs:subPropertyOf cito:disagreesWith .
|
|
309
|
-
|
|
310
|
-
:cites a owl:ObjectProperty ;
|
|
311
|
-
rdfs:label "cites" ;
|
|
312
|
-
rdfs:subPropertyOf cito:cites ;
|
|
313
|
-
rdfs:range bibo:Document .
|
|
314
|
-
|
|
315
|
-
# ─── URI patterns ───────────────────────────────────────────────────
|
|
316
|
-
:UriPattern rdfs:label "URI minting pattern" .
|
|
317
|
-
|
|
318
|
-
:concept-pattern a :UriPattern ; skos:notation "urn:dkg:concept:<slug>" .
|
|
319
|
-
:topic-pattern a :UriPattern ; skos:notation "urn:dkg:topic:<slug>" .
|
|
320
|
-
:question-pattern a :UriPattern ; skos:notation "urn:dkg:question:<slug>" .
|
|
321
|
-
:finding-pattern a :UriPattern ; skos:notation "urn:dkg:finding:<slug>" .
|
|
322
|
-
:hypothesis-pattern a :UriPattern ; skos:notation "urn:dkg:hypothesis:<slug>" .
|
|
323
|
-
:argument-pattern a :UriPattern ; skos:notation "urn:dkg:argument:<slug>" .
|
|
324
|
-
:quote-pattern a :UriPattern ; skos:notation "urn:dkg:quote:<slug>" .
|
|
325
|
-
:citation-pattern a :UriPattern ; skos:notation "urn:dkg:citation:<slug>" ;
|
|
326
|
-
skos:definition "Bibliographic citation; aligned with bibo:Document via cito:cites." .
|
|
327
|
-
|
|
328
|
-
:slug-normalisation a skos:Note ;
|
|
329
|
-
skos:definition "Lowercase → ASCII-fold → strip stopwords (the/a/an/of/for/and/or/to/in/on/with) → hyphenate → ≤60 chars. Apply BEFORE comparing free-text recall results (\`dkg_memory_search\`) to decide reuse-vs-mint." .
|
|
330
|
-
`,xR=`@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
331
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
332
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
333
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
334
|
-
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
335
|
-
@prefix schema: <http://schema.org/> .
|
|
336
|
-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
337
|
-
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
338
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
339
|
-
@prefix doap: <http://usefulinc.com/ns/doap#> .
|
|
340
|
-
|
|
341
|
-
# DKG project namespaces — v1 ontology for any "coding project"
|
|
342
|
-
# context graph. Imports widely-adopted Linked Data vocabs first;
|
|
343
|
-
# only declares extensions for genuinely net-new concepts.
|
|
344
|
-
@prefix chat: <http://dkg.io/ontology/chat/> .
|
|
345
|
-
@prefix code: <http://dkg.io/ontology/code/> .
|
|
346
|
-
@prefix github: <http://dkg.io/ontology/github/> .
|
|
347
|
-
@prefix decisions: <http://dkg.io/ontology/decisions/> .
|
|
348
|
-
@prefix tasks: <http://dkg.io/ontology/tasks/> .
|
|
349
|
-
@prefix agent: <http://dkg.io/ontology/agent/> .
|
|
350
|
-
@prefix dkg: <http://dkg.io/ontology/> .
|
|
351
|
-
|
|
352
|
-
@prefix : <http://dkg.io/ontology/coding-project/> .
|
|
353
|
-
|
|
354
|
-
# ─── Ontology header ────────────────────────────────────────────────
|
|
355
|
-
<http://dkg.io/ontology/coding-project/>
|
|
356
|
-
a owl:Ontology ;
|
|
357
|
-
dcterms:title "DKG Coding Project Ontology (v1)" ;
|
|
358
|
-
dcterms:description """The starter ontology for any DKG context graph that
|
|
359
|
-
represents a software project — its decisions, tasks, code structure, GitHub
|
|
360
|
-
activity, agents, and chat. Designed to be \`owl:imports\`-ed by per-project
|
|
361
|
-
ontologies, which add their own extensions on top.
|
|
362
|
-
|
|
363
|
-
Every predicate is either reused from a globally-adopted vocabulary
|
|
364
|
-
(schema.org, DCTerms, PROV-O, FOAF, SKOS, DOAP) or declared here as a
|
|
365
|
-
project-specific extension. Companion document \`agent-guide.md\` translates
|
|
366
|
-
this formal model into operational instructions for AI coding agents.""" ;
|
|
367
|
-
dcterms:creator "branarakic" ;
|
|
368
|
-
owl:versionInfo "1.0.0" ;
|
|
369
|
-
dcterms:created "2026-04-18"^^xsd:date ;
|
|
370
|
-
owl:imports
|
|
371
|
-
<http://schema.org/> ,
|
|
372
|
-
<http://purl.org/dc/terms/> ,
|
|
373
|
-
<http://www.w3.org/ns/prov#> ,
|
|
374
|
-
<http://xmlns.com/foaf/0.1/> ,
|
|
375
|
-
<http://www.w3.org/2004/02/skos/core#> ,
|
|
376
|
-
<http://usefulinc.com/ns/doap#> .
|
|
377
|
-
|
|
378
|
-
# ─── Section 1 — Universal annotation primitives ────────────────────
|
|
379
|
-
# Predicates expressing what each chat turn was ABOUT — written into
|
|
380
|
-
# the project's \`chat\` sub-graph by the capture-chat hook (and later
|
|
381
|
-
# read by \`dkg_query\` / \`dkg_memory_search\`). These predicates apply
|
|
382
|
-
# to ANY project type, not just coding.
|
|
383
|
-
|
|
384
|
-
chat:topic
|
|
385
|
-
a owl:DatatypeProperty ;
|
|
386
|
-
rdfs:label "topic" ;
|
|
387
|
-
rdfs:comment "Free-text topical bucket the chat turn lives under. Multiple per turn; emit liberally. Renderer can use these to cluster the activity feed." ;
|
|
388
|
-
rdfs:domain chat:Turn ;
|
|
389
|
-
rdfs:range xsd:string .
|
|
390
|
-
|
|
391
|
-
chat:mentions
|
|
392
|
-
a owl:ObjectProperty ;
|
|
393
|
-
rdfs:label "mentions" ;
|
|
394
|
-
rdfs:comment "An entity the chat turn referenced. The most common edge in the graph. To find existing entities to reuse before minting fresh URIs, use \`dkg_memory_search\` (free-text recall across WM/SWM/VM)." ;
|
|
395
|
-
rdfs:domain chat:Turn ;
|
|
396
|
-
rdfs:range owl:Thing ;
|
|
397
|
-
rdfs:subPropertyOf schema:mentions .
|
|
398
|
-
|
|
399
|
-
chat:examines
|
|
400
|
-
a owl:ObjectProperty ;
|
|
401
|
-
rdfs:label "examines" ;
|
|
402
|
-
rdfs:comment "Entity the chat turn walked through in detail (vs just mentioning in passing). Implies the agent or operator is ANALYSING the entity, not merely citing it." ;
|
|
403
|
-
rdfs:domain chat:Turn ;
|
|
404
|
-
rdfs:range owl:Thing .
|
|
405
|
-
|
|
406
|
-
chat:proposes
|
|
407
|
-
a owl:ObjectProperty ;
|
|
408
|
-
rdfs:label "proposes" ;
|
|
409
|
-
rdfs:comment "An idea/decision/task the chat turn put forward. Often points at a freshly-minted Decision or Task entity created in the same write batch." ;
|
|
410
|
-
rdfs:domain chat:Turn ;
|
|
411
|
-
rdfs:range owl:Thing .
|
|
412
|
-
|
|
413
|
-
chat:concludes
|
|
414
|
-
a owl:ObjectProperty ;
|
|
415
|
-
rdfs:label "concludes" ;
|
|
416
|
-
rdfs:comment "A Finding entity the chat turn produced — a claim worth preserving as a first-class node, separate from the turn body." ;
|
|
417
|
-
rdfs:domain chat:Turn ;
|
|
418
|
-
rdfs:range :Finding .
|
|
419
|
-
|
|
420
|
-
chat:asks
|
|
421
|
-
a owl:ObjectProperty ;
|
|
422
|
-
rdfs:label "asks" ;
|
|
423
|
-
rdfs:comment "A Question entity the chat turn left open. Tracking these lets a future query surface 'what did we never resolve?'." ;
|
|
424
|
-
rdfs:domain chat:Turn ;
|
|
425
|
-
rdfs:range :Question .
|
|
426
|
-
|
|
427
|
-
# ─── Section 2 — Universal annotation entity classes ────────────────
|
|
428
|
-
|
|
429
|
-
:Concept
|
|
430
|
-
a owl:Class ;
|
|
431
|
-
rdfs:label "Concept" ;
|
|
432
|
-
rdfs:comment "A free-text concept emerging from chat that doesn't fit into a more specific class. Aligned with skos:Concept so it composes with any knowledge organisation system." ;
|
|
433
|
-
rdfs:subClassOf skos:Concept .
|
|
434
|
-
|
|
435
|
-
:Topic
|
|
436
|
-
a owl:Class ;
|
|
437
|
-
rdfs:label "Topic" ;
|
|
438
|
-
rdfs:comment "A broad topical bucket grouping related concepts/turns/entities. URI pattern: urn:dkg:topic:<slug>." ;
|
|
439
|
-
rdfs:subClassOf skos:Concept .
|
|
440
|
-
|
|
441
|
-
:Question
|
|
442
|
-
a owl:Class ;
|
|
443
|
-
rdfs:label "Question" ;
|
|
444
|
-
rdfs:comment "An open question raised in chat that hasn't been answered yet. URI pattern: urn:dkg:question:<slug>. Resolved by linking a chat:Turn or :Finding via :answers." ;
|
|
445
|
-
rdfs:subClassOf schema:Question .
|
|
446
|
-
|
|
447
|
-
:Finding
|
|
448
|
-
a owl:Class ;
|
|
449
|
-
rdfs:label "Finding" ;
|
|
450
|
-
rdfs:comment "A claim or observation worth preserving as a first-class entity, separate from the chat turn that produced it. URI pattern: urn:dkg:finding:<slug>. Findings can be cited by future Decisions, Tasks, and chat turns." ;
|
|
451
|
-
rdfs:subClassOf prov:Entity .
|
|
452
|
-
|
|
453
|
-
:answers
|
|
454
|
-
a owl:ObjectProperty ;
|
|
455
|
-
rdfs:label "answers" ;
|
|
456
|
-
rdfs:comment "Links a Finding (or chat turn) to the Question it resolves." ;
|
|
457
|
-
rdfs:domain owl:Thing ;
|
|
458
|
-
rdfs:range :Question .
|
|
459
|
-
|
|
460
|
-
:supersedes
|
|
461
|
-
a owl:ObjectProperty ;
|
|
462
|
-
rdfs:label "supersedes" ;
|
|
463
|
-
rdfs:comment "This entity replaces an older one (e.g. a revised Finding supersedes an earlier one)." ;
|
|
464
|
-
rdfs:range owl:Thing ;
|
|
465
|
-
owl:inverseOf prov:wasRevisionOf .
|
|
466
|
-
|
|
467
|
-
# ─── Section 3 — Coding-project-specific classes ────────────────────
|
|
468
|
-
# Formalises the predicates already used informally in
|
|
469
|
-
# scripts/lib/ontology.mjs, anchoring them in PROV-O and schema.org.
|
|
470
|
-
|
|
471
|
-
decisions:Decision
|
|
472
|
-
a owl:Class ;
|
|
473
|
-
rdfs:label "Decision" ;
|
|
474
|
-
rdfs:comment "An architectural decision the project made — context, outcome, consequences. Modelled as a prov:Activity because it represents a deliberate act of choosing." ;
|
|
475
|
-
rdfs:subClassOf prov:Activity, schema:Action .
|
|
476
|
-
|
|
477
|
-
decisions:context
|
|
478
|
-
a owl:DatatypeProperty ;
|
|
479
|
-
rdfs:label "context" ;
|
|
480
|
-
rdfs:domain decisions:Decision ;
|
|
481
|
-
rdfs:range xsd:string ;
|
|
482
|
-
rdfs:comment "Why this decision was being made — problem, constraints, alternatives considered." .
|
|
483
|
-
|
|
484
|
-
decisions:outcome
|
|
485
|
-
a owl:DatatypeProperty ;
|
|
486
|
-
rdfs:label "outcome" ;
|
|
487
|
-
rdfs:domain decisions:Decision ;
|
|
488
|
-
rdfs:range xsd:string ;
|
|
489
|
-
rdfs:comment "The chosen direction — the decision itself, in one paragraph." .
|
|
490
|
-
|
|
491
|
-
decisions:consequences
|
|
492
|
-
a owl:DatatypeProperty ;
|
|
493
|
-
rdfs:label "consequences" ;
|
|
494
|
-
rdfs:domain decisions:Decision ;
|
|
495
|
-
rdfs:range xsd:string ;
|
|
496
|
-
rdfs:comment "What this implies going forward — trade-offs, follow-ups." .
|
|
497
|
-
|
|
498
|
-
decisions:status
|
|
499
|
-
a owl:DatatypeProperty ;
|
|
500
|
-
rdfs:label "status" ;
|
|
501
|
-
rdfs:domain decisions:Decision ;
|
|
502
|
-
rdfs:range xsd:string ;
|
|
503
|
-
rdfs:comment "One of: proposed | accepted | rejected | superseded." .
|
|
504
|
-
|
|
505
|
-
tasks:Task
|
|
506
|
-
a owl:Class ;
|
|
507
|
-
rdfs:label "Task" ;
|
|
508
|
-
rdfs:comment "A piece of planned or in-flight work on the project." ;
|
|
509
|
-
rdfs:subClassOf schema:Action .
|
|
510
|
-
|
|
511
|
-
tasks:status
|
|
512
|
-
a owl:DatatypeProperty ;
|
|
513
|
-
rdfs:label "status" ;
|
|
514
|
-
rdfs:domain tasks:Task ;
|
|
515
|
-
rdfs:range xsd:string ;
|
|
516
|
-
rdfs:comment "One of: todo | in_progress | blocked | done | cancelled." .
|
|
517
|
-
|
|
518
|
-
tasks:priority
|
|
519
|
-
a owl:DatatypeProperty ;
|
|
520
|
-
rdfs:label "priority" ;
|
|
521
|
-
rdfs:domain tasks:Task ;
|
|
522
|
-
rdfs:range xsd:string ;
|
|
523
|
-
rdfs:comment "One of: p0 | p1 | p2 | p3." .
|
|
524
|
-
|
|
525
|
-
tasks:relatedDecision
|
|
526
|
-
a owl:ObjectProperty ;
|
|
527
|
-
rdfs:label "related decision" ;
|
|
528
|
-
rdfs:domain tasks:Task ;
|
|
529
|
-
rdfs:range decisions:Decision ;
|
|
530
|
-
rdfs:comment "The Decision this task implements or follows from." .
|
|
531
|
-
|
|
532
|
-
tasks:dependsOn
|
|
533
|
-
a owl:ObjectProperty ;
|
|
534
|
-
rdfs:label "depends on" ;
|
|
535
|
-
rdfs:domain tasks:Task ;
|
|
536
|
-
rdfs:range tasks:Task .
|
|
537
|
-
|
|
538
|
-
tasks:touches
|
|
539
|
-
a owl:ObjectProperty ;
|
|
540
|
-
rdfs:label "touches" ;
|
|
541
|
-
rdfs:domain tasks:Task ;
|
|
542
|
-
rdfs:range owl:Thing ;
|
|
543
|
-
rdfs:comment "A code:File or code:Package this task edits." .
|
|
544
|
-
|
|
545
|
-
# Code structure — aligned with schema:SoftwareSourceCode + DOAP.
|
|
546
|
-
|
|
547
|
-
code:Package
|
|
548
|
-
a owl:Class ;
|
|
549
|
-
rdfs:label "Package" ;
|
|
550
|
-
rdfs:subClassOf doap:Project, schema:SoftwareApplication .
|
|
551
|
-
|
|
552
|
-
code:File
|
|
553
|
-
a owl:Class ;
|
|
554
|
-
rdfs:label "Source file" ;
|
|
555
|
-
rdfs:subClassOf schema:SoftwareSourceCode .
|
|
556
|
-
|
|
557
|
-
code:Function a owl:Class ; rdfs:label "Function" .
|
|
558
|
-
code:Class a owl:Class ; rdfs:label "Class" .
|
|
559
|
-
code:Interface a owl:Class ; rdfs:label "Interface" .
|
|
560
|
-
|
|
561
|
-
# GitHub — minimal aliasing onto schema.org where sensible.
|
|
562
|
-
|
|
563
|
-
github:Repository
|
|
564
|
-
a owl:Class ;
|
|
565
|
-
rdfs:label "GitHub repository" ;
|
|
566
|
-
rdfs:subClassOf schema:SoftwareSourceCode, doap:Project .
|
|
567
|
-
|
|
568
|
-
github:PullRequest
|
|
569
|
-
a owl:Class ;
|
|
570
|
-
rdfs:label "Pull request" ;
|
|
571
|
-
rdfs:subClassOf schema:CreativeWork .
|
|
572
|
-
|
|
573
|
-
github:Issue
|
|
574
|
-
a owl:Class ;
|
|
575
|
-
rdfs:label "GitHub issue" ;
|
|
576
|
-
rdfs:subClassOf schema:Question, schema:CreativeWork .
|
|
577
|
-
|
|
578
|
-
# ─── Section 4 — Chat sub-graph classes ─────────────────────────────
|
|
579
|
-
|
|
580
|
-
chat:Session
|
|
581
|
-
a owl:Class ;
|
|
582
|
-
rdfs:label "Chat session" ;
|
|
583
|
-
rdfs:comment "One conversation between an operator and their coding assistant (Cursor window, Claude Code thread, etc.)." ;
|
|
584
|
-
rdfs:subClassOf schema:Conversation .
|
|
585
|
-
|
|
586
|
-
chat:Turn
|
|
587
|
-
a owl:Class ;
|
|
588
|
-
rdfs:label "Chat turn" ;
|
|
589
|
-
rdfs:comment "One user-prompt + assistant-response pair within a Session. Carries provenance via prov:wasAttributedTo." ;
|
|
590
|
-
rdfs:subClassOf schema:Message, prov:Entity .
|
|
591
|
-
|
|
592
|
-
chat:userPrompt a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
593
|
-
chat:assistantResponse a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
594
|
-
chat:turnIndex a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:integer .
|
|
595
|
-
chat:inSession a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range chat:Session .
|
|
596
|
-
chat:speakerTool a owl:DatatypeProperty ; rdfs:range xsd:string ;
|
|
597
|
-
rdfs:comment "Identifier of the coding assistant that produced the turn (e.g. 'cursor', 'claude-code')." .
|
|
598
|
-
chat:privacy a owl:DatatypeProperty ; rdfs:domain chat:Session ; rdfs:range xsd:string ;
|
|
599
|
-
rdfs:comment "One of: private | team | public. Controls auto-promote behaviour of the capture hook." .
|
|
600
|
-
|
|
601
|
-
# ─── Section 5 — Agent identity ─────────────────────────────────────
|
|
602
|
-
|
|
603
|
-
agent:Agent
|
|
604
|
-
a owl:Class ;
|
|
605
|
-
rdfs:label "Agent" ;
|
|
606
|
-
rdfs:subClassOf prov:Agent, foaf:Agent .
|
|
607
|
-
|
|
608
|
-
agent:HumanAgent rdfs:subClassOf agent:Agent, foaf:Person .
|
|
609
|
-
agent:AIAgent rdfs:subClassOf agent:Agent, schema:SoftwareApplication .
|
|
610
|
-
|
|
611
|
-
agent:framework
|
|
612
|
-
a owl:DatatypeProperty ;
|
|
613
|
-
rdfs:label "framework" ;
|
|
614
|
-
rdfs:domain agent:AIAgent ;
|
|
615
|
-
rdfs:range xsd:string ;
|
|
616
|
-
rdfs:comment "Name of the agent runtime — 'cursor', 'claude-code', 'openclaw', 'hermes', etc." .
|
|
617
|
-
|
|
618
|
-
agent:operator
|
|
619
|
-
a owl:ObjectProperty ;
|
|
620
|
-
rdfs:label "operator" ;
|
|
621
|
-
rdfs:domain agent:AIAgent ;
|
|
622
|
-
rdfs:range agent:HumanAgent ;
|
|
623
|
-
rdfs:comment "The human operator who runs and is responsible for this AI agent." .
|
|
624
|
-
|
|
625
|
-
# ─── Section 6 — URI minting conventions (machine-readable) ─────────
|
|
626
|
-
# These are encoded as SKOS notes so an agent reading the ontology can
|
|
627
|
-
# pull them out programmatically. The agent guide repeats them in
|
|
628
|
-
# prose for human readability.
|
|
629
|
-
|
|
630
|
-
:UriPattern
|
|
631
|
-
a owl:Class ;
|
|
632
|
-
rdfs:label "URI minting pattern" ;
|
|
633
|
-
rdfs:comment "Documents the URI shape the agent should produce when minting a new entity of a given type." .
|
|
634
|
-
|
|
635
|
-
:concept-pattern a :UriPattern ;
|
|
636
|
-
skos:notation "urn:dkg:concept:<slug>" ;
|
|
637
|
-
skos:definition "Free-text concept; aligned with skos:Concept." .
|
|
638
|
-
:topic-pattern a :UriPattern ;
|
|
639
|
-
skos:notation "urn:dkg:topic:<slug>" ;
|
|
640
|
-
skos:definition "Broad topical bucket grouping related entities." .
|
|
641
|
-
:question-pattern a :UriPattern ;
|
|
642
|
-
skos:notation "urn:dkg:question:<slug>" ;
|
|
643
|
-
skos:definition "An open question awaiting an answer." .
|
|
644
|
-
:finding-pattern a :UriPattern ;
|
|
645
|
-
skos:notation "urn:dkg:finding:<slug>" ;
|
|
646
|
-
skos:definition "A claim or observation worth preserving as a first-class node." .
|
|
647
|
-
:decision-pattern a :UriPattern ;
|
|
648
|
-
skos:notation "urn:dkg:decision:<slug>" ;
|
|
649
|
-
skos:definition "An architectural decision (coding-project specific)." .
|
|
650
|
-
:task-pattern a :UriPattern ;
|
|
651
|
-
skos:notation "urn:dkg:task:<slug>" ;
|
|
652
|
-
skos:definition "A piece of planned or in-flight work (coding-project specific)." .
|
|
653
|
-
|
|
654
|
-
# ─── Section 7 — Slug normalisation rule (deterministic) ────────────
|
|
655
|
-
|
|
656
|
-
:slug-normalisation a skos:Note ;
|
|
657
|
-
skos:prefLabel "slug normalisation" ;
|
|
658
|
-
skos:definition """To compute the canonical slug from a free-text label:
|
|
659
|
-
1. Lowercase.
|
|
660
|
-
2. Apply Unicode NFKD then strip combining marks (ASCII fold).
|
|
661
|
-
3. Strip common stopwords (the / a / an / of / for / and / or / to / in / on / with).
|
|
662
|
-
4. Replace any run of non-[a-z0-9] with a single hyphen.
|
|
663
|
-
5. Trim leading/trailing hyphens.
|
|
664
|
-
6. Truncate to 60 characters max.
|
|
665
|
-
|
|
666
|
-
Example: "the Tree-Sitter library", "Tree sitter", "TREE_SITTER" all
|
|
667
|
-
normalise to "tree-sitter". Always apply this BEFORE comparing free-text
|
|
668
|
-
recall results (\`dkg_memory_search\`) in the look-before-mint protocol.""" .
|
|
669
|
-
`,bR=`@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
670
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
671
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
672
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
673
|
-
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
674
|
-
@prefix schema: <http://schema.org/> .
|
|
675
|
-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
676
|
-
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
677
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
678
|
-
@prefix bibo: <http://purl.org/ontology/bibo/> .
|
|
679
|
-
|
|
680
|
-
@prefix chat: <http://dkg.io/ontology/chat/> .
|
|
681
|
-
@prefix : <http://dkg.io/ontology/narrative-writing/> .
|
|
682
|
-
|
|
683
|
-
<http://dkg.io/ontology/narrative-writing/>
|
|
684
|
-
a owl:Ontology ;
|
|
685
|
-
dcterms:title "DKG Narrative Writing Project Ontology (v1)" ;
|
|
686
|
-
dcterms:description """Starter for fiction or narrative non-fiction
|
|
687
|
-
projects: novels, screenplays, biographies. Tracks Characters, Scenes,
|
|
688
|
-
Plot Points, Themes, and the relationships between them.""" ;
|
|
689
|
-
owl:versionInfo "1.0.0" ;
|
|
690
|
-
dcterms:created "2026-04-18"^^xsd:date ;
|
|
691
|
-
owl:imports
|
|
692
|
-
<http://schema.org/> , <http://purl.org/dc/terms/> ,
|
|
693
|
-
<http://xmlns.com/foaf/0.1/> ,
|
|
694
|
-
<http://www.w3.org/2004/02/skos/core#> ,
|
|
695
|
-
<http://purl.org/ontology/bibo/> .
|
|
696
|
-
|
|
697
|
-
# ─── Universal annotation predicates ────────────────────────────────
|
|
698
|
-
chat:topic a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
699
|
-
chat:mentions a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:subPropertyOf schema:mentions .
|
|
700
|
-
chat:examines a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
701
|
-
chat:proposes a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
702
|
-
chat:concludes a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Finding .
|
|
703
|
-
chat:asks a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Question .
|
|
704
|
-
|
|
705
|
-
# ─── Universal annotation entities ──────────────────────────────────
|
|
706
|
-
:Concept rdfs:subClassOf skos:Concept .
|
|
707
|
-
:Topic rdfs:subClassOf skos:Concept .
|
|
708
|
-
:Question rdfs:subClassOf schema:Question .
|
|
709
|
-
:Finding rdfs:subClassOf prov:Entity .
|
|
710
|
-
|
|
711
|
-
# ─── Narrative-writing-specific ─────────────────────────────────────
|
|
712
|
-
|
|
713
|
-
:Character a owl:Class ;
|
|
714
|
-
rdfs:label "Character" ;
|
|
715
|
-
rdfs:comment "A character in the narrative — fictional or historical." ;
|
|
716
|
-
rdfs:subClassOf foaf:Person, schema:Person .
|
|
717
|
-
|
|
718
|
-
:Scene a owl:Class ;
|
|
719
|
-
rdfs:label "Scene" ;
|
|
720
|
-
rdfs:comment "A discrete unit of narrative action — a single place/time/event in the story." ;
|
|
721
|
-
rdfs:subClassOf schema:Event .
|
|
722
|
-
|
|
723
|
-
:PlotPoint a owl:Class ;
|
|
724
|
-
rdfs:label "Plot point" ;
|
|
725
|
-
rdfs:comment "A structural moment in the narrative arc (inciting incident, climax, resolution, etc.)." .
|
|
726
|
-
|
|
727
|
-
:Theme a owl:Class ;
|
|
728
|
-
rdfs:label "Theme" ;
|
|
729
|
-
rdfs:comment "A unifying idea explored across the narrative." ;
|
|
730
|
-
rdfs:subClassOf skos:Concept .
|
|
731
|
-
|
|
732
|
-
:Setting a owl:Class ;
|
|
733
|
-
rdfs:label "Setting" ;
|
|
734
|
-
rdfs:comment "A place + time context within which Scenes occur." .
|
|
735
|
-
|
|
736
|
-
:appearsIn a owl:ObjectProperty ;
|
|
737
|
-
rdfs:label "appears in" ;
|
|
738
|
-
rdfs:domain :Character ;
|
|
739
|
-
rdfs:range :Scene .
|
|
740
|
-
|
|
741
|
-
:setIn a owl:ObjectProperty ;
|
|
742
|
-
rdfs:label "set in" ;
|
|
743
|
-
rdfs:domain :Scene ;
|
|
744
|
-
rdfs:range :Setting .
|
|
745
|
-
|
|
746
|
-
:develops a owl:ObjectProperty ;
|
|
747
|
-
rdfs:label "develops" ;
|
|
748
|
-
rdfs:comment "A Scene or PlotPoint develops a Theme or a Character arc." ;
|
|
749
|
-
rdfs:range owl:Thing .
|
|
750
|
-
|
|
751
|
-
:precedes a owl:ObjectProperty ;
|
|
752
|
-
rdfs:label "precedes" ;
|
|
753
|
-
rdfs:domain :Scene ;
|
|
754
|
-
rdfs:range :Scene .
|
|
755
|
-
|
|
756
|
-
# ─── URI patterns ───────────────────────────────────────────────────
|
|
757
|
-
:UriPattern rdfs:label "URI minting pattern" .
|
|
758
|
-
|
|
759
|
-
:concept-pattern a :UriPattern ; skos:notation "urn:dkg:concept:<slug>" .
|
|
760
|
-
:topic-pattern a :UriPattern ; skos:notation "urn:dkg:topic:<slug>" .
|
|
761
|
-
:question-pattern a :UriPattern ; skos:notation "urn:dkg:question:<slug>" .
|
|
762
|
-
:character-pattern a :UriPattern ; skos:notation "urn:dkg:character:<slug>" .
|
|
763
|
-
:scene-pattern a :UriPattern ; skos:notation "urn:dkg:scene:<slug>" .
|
|
764
|
-
:plotpoint-pattern a :UriPattern ; skos:notation "urn:dkg:plotpoint:<slug>" .
|
|
765
|
-
:theme-pattern a :UriPattern ; skos:notation "urn:dkg:theme:<slug>" .
|
|
766
|
-
:setting-pattern a :UriPattern ; skos:notation "urn:dkg:setting:<slug>" .
|
|
767
|
-
|
|
768
|
-
:slug-normalisation a skos:Note ;
|
|
769
|
-
skos:definition "Lowercase → ASCII-fold → strip stopwords → hyphenate → ≤60 chars." .
|
|
770
|
-
`,wR=`@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
771
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
772
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
773
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
774
|
-
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
775
|
-
@prefix schema: <http://schema.org/> .
|
|
776
|
-
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
|
|
777
|
-
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
778
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
779
|
-
@prefix time: <http://www.w3.org/2006/time#> .
|
|
780
|
-
|
|
781
|
-
@prefix chat: <http://dkg.io/ontology/chat/> .
|
|
782
|
-
@prefix : <http://dkg.io/ontology/pkm/> .
|
|
783
|
-
|
|
784
|
-
<http://dkg.io/ontology/pkm/>
|
|
785
|
-
a owl:Ontology ;
|
|
786
|
-
dcterms:title "DKG Personal Knowledge Management Ontology (v1)" ;
|
|
787
|
-
dcterms:description """Starter for personal/team knowledge gardens.
|
|
788
|
-
Notes, highlights, questions, insights — the daily-driver vocabulary
|
|
789
|
-
of an Obsidian/Roam-style PKM workflow, but graph-native and shareable
|
|
790
|
-
with teammates' agents.""" ;
|
|
791
|
-
owl:versionInfo "1.0.0" ;
|
|
792
|
-
dcterms:created "2026-04-18"^^xsd:date ;
|
|
793
|
-
owl:imports
|
|
794
|
-
<http://schema.org/> , <http://purl.org/dc/terms/> ,
|
|
795
|
-
<http://xmlns.com/foaf/0.1/> ,
|
|
796
|
-
<http://www.w3.org/2004/02/skos/core#> ,
|
|
797
|
-
<http://www.w3.org/2006/time#> .
|
|
798
|
-
|
|
799
|
-
# ─── Universal annotation predicates ────────────────────────────────
|
|
800
|
-
chat:topic a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
801
|
-
chat:mentions a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:subPropertyOf schema:mentions .
|
|
802
|
-
chat:examines a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
803
|
-
chat:proposes a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
804
|
-
chat:concludes a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Insight .
|
|
805
|
-
chat:asks a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Question .
|
|
806
|
-
|
|
807
|
-
# ─── Universal annotation entities ──────────────────────────────────
|
|
808
|
-
:Concept rdfs:subClassOf skos:Concept .
|
|
809
|
-
:Topic rdfs:subClassOf skos:Concept .
|
|
810
|
-
:Question rdfs:subClassOf schema:Question .
|
|
811
|
-
:Finding rdfs:subClassOf prov:Entity .
|
|
812
|
-
|
|
813
|
-
# ─── PKM-specific ────────────────────────────────────────────────────
|
|
814
|
-
|
|
815
|
-
:Note a owl:Class ;
|
|
816
|
-
rdfs:label "Note" ;
|
|
817
|
-
rdfs:comment "An atomic note — a single self-contained thought worth capturing. The fundamental unit of a PKM graph." ;
|
|
818
|
-
rdfs:subClassOf schema:CreativeWork .
|
|
819
|
-
|
|
820
|
-
:Highlight a owl:Class ;
|
|
821
|
-
rdfs:label "Highlight" ;
|
|
822
|
-
rdfs:comment "A passage of text marked as significant from a source (article, book, transcript). Carries provenance back to the source." ;
|
|
823
|
-
rdfs:subClassOf schema:Quotation .
|
|
824
|
-
|
|
825
|
-
:Insight a owl:Class ;
|
|
826
|
-
rdfs:label "Insight" ;
|
|
827
|
-
rdfs:comment "A connection or realisation that synthesises across multiple Notes/Highlights. Promotes from a chat turn via chat:concludes." ;
|
|
828
|
-
rdfs:subClassOf prov:Entity .
|
|
829
|
-
|
|
830
|
-
:relatedTo a owl:ObjectProperty ;
|
|
831
|
-
rdfs:label "related to" ;
|
|
832
|
-
rdfs:subPropertyOf skos:related .
|
|
833
|
-
|
|
834
|
-
:references a owl:ObjectProperty ;
|
|
835
|
-
rdfs:label "references" ;
|
|
836
|
-
rdfs:subPropertyOf dcterms:references .
|
|
837
|
-
|
|
838
|
-
:source a owl:ObjectProperty ;
|
|
839
|
-
rdfs:label "source" ;
|
|
840
|
-
rdfs:domain :Highlight ;
|
|
841
|
-
rdfs:range schema:CreativeWork ;
|
|
842
|
-
rdfs:comment "Where a Highlight was extracted from." ;
|
|
843
|
-
rdfs:subPropertyOf dcterms:source .
|
|
844
|
-
|
|
845
|
-
# ─── URI patterns ───────────────────────────────────────────────────
|
|
846
|
-
:UriPattern rdfs:label "URI minting pattern" .
|
|
847
|
-
|
|
848
|
-
:concept-pattern a :UriPattern ; skos:notation "urn:dkg:concept:<slug>" .
|
|
849
|
-
:topic-pattern a :UriPattern ; skos:notation "urn:dkg:topic:<slug>" .
|
|
850
|
-
:question-pattern a :UriPattern ; skos:notation "urn:dkg:question:<slug>" .
|
|
851
|
-
:finding-pattern a :UriPattern ; skos:notation "urn:dkg:finding:<slug>" .
|
|
852
|
-
:note-pattern a :UriPattern ; skos:notation "urn:dkg:note:<slug>" .
|
|
853
|
-
:highlight-pattern a :UriPattern ; skos:notation "urn:dkg:highlight:<slug>" .
|
|
854
|
-
:insight-pattern a :UriPattern ; skos:notation "urn:dkg:insight:<slug>" .
|
|
855
|
-
|
|
856
|
-
:slug-normalisation a skos:Note ;
|
|
857
|
-
skos:definition "Lowercase → ASCII-fold → strip stopwords → hyphenate → ≤60 chars." .
|
|
858
|
-
`,SR=`@prefix owl: <http://www.w3.org/2002/07/owl#> .
|
|
859
|
-
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
|
|
860
|
-
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
|
|
861
|
-
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
|
|
862
|
-
@prefix dcterms: <http://purl.org/dc/terms/> .
|
|
863
|
-
@prefix schema: <http://schema.org/> .
|
|
864
|
-
@prefix prov: <http://www.w3.org/ns/prov#> .
|
|
865
|
-
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
|
|
866
|
-
@prefix dcat: <http://www.w3.org/ns/dcat#> .
|
|
867
|
-
@prefix fabio: <http://purl.org/spar/fabio/> .
|
|
868
|
-
@prefix time: <http://www.w3.org/2006/time#> .
|
|
869
|
-
|
|
870
|
-
@prefix chat: <http://dkg.io/ontology/chat/> .
|
|
871
|
-
@prefix : <http://dkg.io/ontology/scientific-research/> .
|
|
872
|
-
|
|
873
|
-
<http://dkg.io/ontology/scientific-research/>
|
|
874
|
-
a owl:Ontology ;
|
|
875
|
-
dcterms:title "DKG Scientific Research Project Ontology (v1)" ;
|
|
876
|
-
dcterms:description """Starter for empirical scientific research:
|
|
877
|
-
hypotheses → experiments → results → reproducibility chains. Composes
|
|
878
|
-
with FaBiO for scholarly works, DCAT for datasets, PROV-O for
|
|
879
|
-
provenance, OWL Time for sequencing.""" ;
|
|
880
|
-
owl:versionInfo "1.0.0" ;
|
|
881
|
-
dcterms:created "2026-04-18"^^xsd:date ;
|
|
882
|
-
owl:imports
|
|
883
|
-
<http://schema.org/> , <http://purl.org/dc/terms/> ,
|
|
884
|
-
<http://www.w3.org/ns/prov#> ,
|
|
885
|
-
<http://www.w3.org/2004/02/skos/core#> ,
|
|
886
|
-
<http://www.w3.org/ns/dcat#> ,
|
|
887
|
-
<http://purl.org/spar/fabio/> ,
|
|
888
|
-
<http://www.w3.org/2006/time#> .
|
|
889
|
-
|
|
890
|
-
# ─── Universal annotation predicates ────────────────────────────────
|
|
891
|
-
chat:topic a owl:DatatypeProperty ; rdfs:domain chat:Turn ; rdfs:range xsd:string .
|
|
892
|
-
chat:mentions a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:subPropertyOf schema:mentions .
|
|
893
|
-
chat:examines a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
894
|
-
chat:proposes a owl:ObjectProperty ; rdfs:domain chat:Turn .
|
|
895
|
-
chat:concludes a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Result .
|
|
896
|
-
chat:asks a owl:ObjectProperty ; rdfs:domain chat:Turn ; rdfs:range :Question .
|
|
897
|
-
|
|
898
|
-
# ─── Universal annotation entities ──────────────────────────────────
|
|
899
|
-
:Concept rdfs:subClassOf skos:Concept .
|
|
900
|
-
:Topic rdfs:subClassOf skos:Concept .
|
|
901
|
-
:Question rdfs:subClassOf schema:Question .
|
|
902
|
-
:Finding rdfs:subClassOf prov:Entity .
|
|
903
|
-
|
|
904
|
-
# ─── Scientific-research-specific ───────────────────────────────────
|
|
905
|
-
|
|
906
|
-
:Hypothesis a owl:Class ;
|
|
907
|
-
rdfs:label "Hypothesis" ;
|
|
908
|
-
rdfs:comment "A testable claim. Linked to Experiments via :testedBy and to Results via :supportedBy / :refutedBy." ;
|
|
909
|
-
rdfs:subClassOf prov:Entity .
|
|
910
|
-
|
|
911
|
-
:Experiment a owl:Class ;
|
|
912
|
-
rdfs:label "Experiment" ;
|
|
913
|
-
rdfs:comment "A defined procedure executed to test a Hypothesis. Subclass of prov:Activity for full provenance." ;
|
|
914
|
-
rdfs:subClassOf prov:Activity .
|
|
915
|
-
|
|
916
|
-
:Method a owl:Class ;
|
|
917
|
-
rdfs:label "Method" ;
|
|
918
|
-
rdfs:comment "A reusable methodology applied within Experiments." ;
|
|
919
|
-
rdfs:subClassOf prov:Plan .
|
|
920
|
-
|
|
921
|
-
:Result a owl:Class ;
|
|
922
|
-
rdfs:label "Result" ;
|
|
923
|
-
rdfs:comment "An outcome produced by an Experiment — quantitative or qualitative." ;
|
|
924
|
-
rdfs:subClassOf prov:Entity .
|
|
925
|
-
|
|
926
|
-
:Dataset a owl:Class ;
|
|
927
|
-
rdfs:label "Dataset" ;
|
|
928
|
-
rdfs:comment "An input or output dataset for an Experiment. Aligned with DCAT." ;
|
|
929
|
-
rdfs:subClassOf dcat:Dataset .
|
|
930
|
-
|
|
931
|
-
:testedBy a owl:ObjectProperty ;
|
|
932
|
-
rdfs:label "tested by" ;
|
|
933
|
-
rdfs:domain :Hypothesis ;
|
|
934
|
-
rdfs:range :Experiment .
|
|
935
|
-
|
|
936
|
-
:supportedBy a owl:ObjectProperty ;
|
|
937
|
-
rdfs:label "supported by" ;
|
|
938
|
-
rdfs:domain :Hypothesis ;
|
|
939
|
-
rdfs:range :Result .
|
|
940
|
-
|
|
941
|
-
:refutedBy a owl:ObjectProperty ;
|
|
942
|
-
rdfs:label "refuted by" ;
|
|
943
|
-
rdfs:domain :Hypothesis ;
|
|
944
|
-
rdfs:range :Result .
|
|
945
|
-
|
|
946
|
-
:usesDataset a owl:ObjectProperty ;
|
|
947
|
-
rdfs:label "uses dataset" ;
|
|
948
|
-
rdfs:domain :Experiment ;
|
|
949
|
-
rdfs:range :Dataset .
|
|
950
|
-
|
|
951
|
-
:reproducedBy a owl:ObjectProperty ;
|
|
952
|
-
rdfs:label "reproduced by" ;
|
|
953
|
-
rdfs:domain :Experiment ;
|
|
954
|
-
rdfs:range :Experiment ;
|
|
955
|
-
rdfs:comment "An Experiment that successfully reproduced this one's Results." .
|
|
956
|
-
|
|
957
|
-
# ─── URI patterns ───────────────────────────────────────────────────
|
|
958
|
-
:UriPattern rdfs:label "URI minting pattern" .
|
|
959
|
-
|
|
960
|
-
:concept-pattern a :UriPattern ; skos:notation "urn:dkg:concept:<slug>" .
|
|
961
|
-
:topic-pattern a :UriPattern ; skos:notation "urn:dkg:topic:<slug>" .
|
|
962
|
-
:question-pattern a :UriPattern ; skos:notation "urn:dkg:question:<slug>" .
|
|
963
|
-
:finding-pattern a :UriPattern ; skos:notation "urn:dkg:finding:<slug>" .
|
|
964
|
-
:hypothesis-pattern a :UriPattern ; skos:notation "urn:dkg:hypothesis:<slug>" .
|
|
965
|
-
:experiment-pattern a :UriPattern ; skos:notation "urn:dkg:experiment:<slug>" .
|
|
966
|
-
:method-pattern a :UriPattern ; skos:notation "urn:dkg:method:<slug>" .
|
|
967
|
-
:result-pattern a :UriPattern ; skos:notation "urn:dkg:result:<slug>" .
|
|
968
|
-
:dataset-pattern a :UriPattern ; skos:notation "urn:dkg:dataset:<slug>" .
|
|
969
|
-
|
|
970
|
-
:slug-normalisation a skos:Note ;
|
|
971
|
-
skos:definition "Lowercase → ASCII-fold → strip stopwords → hyphenate → ≤60 chars." .
|
|
972
|
-
`,kR=`# Book-research agent guide
|
|
973
|
-
|
|
974
|
-
This starter ships an RDF ontology for **book-research projects** —
|
|
975
|
-
research notebooks anchored in scholarly sources (citations, quotes,
|
|
976
|
-
arguments, hypotheses). The formal schema lives in \`ontology.ttl\`
|
|
977
|
-
alongside this guide.
|
|
978
|
-
|
|
979
|
-
For V10 MCP tool usage, see
|
|
980
|
-
[\`packages/cli/skills/dkg-node/SKILL.md\`](../../../../cli/skills/dkg-node/SKILL.md).
|
|
981
|
-
The tool surface to use against this ontology:
|
|
982
|
-
|
|
983
|
-
- \`dkg_knowledge_asset_create\` + \`dkg_knowledge_asset_write\` — populate (WM)
|
|
984
|
-
- \`dkg_knowledge_asset_finalize\` — seal the draft (the "git commit")
|
|
985
|
-
- \`dkg_knowledge_asset_share\` — share with peers (SWM)
|
|
986
|
-
- \`dkg_knowledge_asset_publish\` — mint on chain (VM); returns the asset's UAL
|
|
987
|
-
- \`dkg_query\` — SPARQL read; \`dkg_memory_search\` — free-text recall
|
|
988
|
-
|
|
989
|
-
The longer per-domain agent-guide walkthrough format will return when
|
|
990
|
-
the V10 ontology endpoint and per-project annotation workflow stabilise.
|
|
991
|
-
`,CR=`# Coding-project agent guide
|
|
992
|
-
|
|
993
|
-
This starter ships an RDF ontology for **coding projects** —
|
|
994
|
-
shared project memory for AI coding agents (decisions, tasks, code
|
|
995
|
-
references, GitHub activity, chat turns). The formal schema lives in
|
|
996
|
-
\`ontology.ttl\` alongside this guide.
|
|
997
|
-
|
|
998
|
-
For V10 MCP tool usage, see
|
|
999
|
-
[\`packages/cli/skills/dkg-node/SKILL.md\`](../../../../cli/skills/dkg-node/SKILL.md).
|
|
1000
|
-
The tool surface to use against this ontology:
|
|
1001
|
-
|
|
1002
|
-
- \`dkg_knowledge_asset_create\` + \`dkg_knowledge_asset_write\` — populate (WM)
|
|
1003
|
-
- \`dkg_knowledge_asset_finalize\` — seal the draft (the "git commit")
|
|
1004
|
-
- \`dkg_knowledge_asset_share\` — share with peers (SWM)
|
|
1005
|
-
- \`dkg_knowledge_asset_publish\` — mint on chain (VM); returns the asset's UAL
|
|
1006
|
-
- \`dkg_query\` — SPARQL read; \`dkg_memory_search\` — free-text recall
|
|
1007
|
-
|
|
1008
|
-
The longer per-domain agent-guide walkthrough format will return when
|
|
1009
|
-
the V10 ontology endpoint and per-project annotation workflow stabilise.
|
|
1010
|
-
`,ER=`# Narrative-writing agent guide
|
|
1011
|
-
|
|
1012
|
-
This starter ships an RDF ontology for **narrative-writing projects** —
|
|
1013
|
-
the structural elements of long-form narrative (Characters, Scenes,
|
|
1014
|
-
PlotPoints, Themes, Settings) and their relationships. The formal
|
|
1015
|
-
schema lives in \`ontology.ttl\` alongside this guide.
|
|
1016
|
-
|
|
1017
|
-
For V10 MCP tool usage, see
|
|
1018
|
-
[\`packages/cli/skills/dkg-node/SKILL.md\`](../../../../cli/skills/dkg-node/SKILL.md).
|
|
1019
|
-
The tool surface to use against this ontology:
|
|
1020
|
-
|
|
1021
|
-
- \`dkg_knowledge_asset_create\` + \`dkg_knowledge_asset_write\` — populate (WM)
|
|
1022
|
-
- \`dkg_knowledge_asset_finalize\` — seal the draft (the "git commit")
|
|
1023
|
-
- \`dkg_knowledge_asset_share\` — share with peers (SWM)
|
|
1024
|
-
- \`dkg_knowledge_asset_publish\` — mint on chain (VM); returns the asset's UAL
|
|
1025
|
-
- \`dkg_query\` — SPARQL read; \`dkg_memory_search\` — free-text recall
|
|
1026
|
-
|
|
1027
|
-
The longer per-domain agent-guide walkthrough format will return when
|
|
1028
|
-
the V10 ontology endpoint and per-project annotation workflow stabilise.
|
|
1029
|
-
`,AR=`# PKM agent guide
|
|
1030
|
-
|
|
1031
|
-
This starter ships an RDF ontology for **PKM (Personal Knowledge
|
|
1032
|
-
Management) projects** — Notes, Highlights, Insights, and the links
|
|
1033
|
-
that grow a knowledge garden organically. The formal schema lives in
|
|
1034
|
-
\`ontology.ttl\` alongside this guide.
|
|
1035
|
-
|
|
1036
|
-
For V10 MCP tool usage, see
|
|
1037
|
-
[\`packages/cli/skills/dkg-node/SKILL.md\`](../../../../cli/skills/dkg-node/SKILL.md).
|
|
1038
|
-
The tool surface to use against this ontology:
|
|
1039
|
-
|
|
1040
|
-
- \`dkg_knowledge_asset_create\` + \`dkg_knowledge_asset_write\` — populate (WM)
|
|
1041
|
-
- \`dkg_knowledge_asset_finalize\` — seal the draft (the "git commit")
|
|
1042
|
-
- \`dkg_knowledge_asset_share\` — share with peers (SWM)
|
|
1043
|
-
- \`dkg_knowledge_asset_publish\` — mint on chain (VM); returns the asset's UAL
|
|
1044
|
-
- \`dkg_query\` — SPARQL read; \`dkg_memory_search\` — free-text recall
|
|
1045
|
-
|
|
1046
|
-
The longer per-domain agent-guide walkthrough format will return when
|
|
1047
|
-
the V10 ontology endpoint and per-project annotation workflow stabilise.
|
|
1048
|
-
`,jR=`# Scientific-research agent guide
|
|
1049
|
-
|
|
1050
|
-
This starter ships an RDF ontology for **scientific-research projects** —
|
|
1051
|
-
the empirical research arc (Hypotheses → Experiments → Results →
|
|
1052
|
-
Reproducibility chains), anchored in PROV-O and FaBiO so the graph
|
|
1053
|
-
composes with existing scholarly publishing infrastructure. The formal
|
|
1054
|
-
schema lives in \`ontology.ttl\` alongside this guide.
|
|
1055
|
-
|
|
1056
|
-
For V10 MCP tool usage, see
|
|
1057
|
-
[\`packages/cli/skills/dkg-node/SKILL.md\`](../../../../cli/skills/dkg-node/SKILL.md).
|
|
1058
|
-
The tool surface to use against this ontology:
|
|
1059
|
-
|
|
1060
|
-
- \`dkg_knowledge_asset_create\` + \`dkg_knowledge_asset_write\` — populate (WM)
|
|
1061
|
-
- \`dkg_knowledge_asset_finalize\` — seal the draft (the "git commit")
|
|
1062
|
-
- \`dkg_knowledge_asset_share\` — share with peers (SWM)
|
|
1063
|
-
- \`dkg_knowledge_asset_publish\` — mint on chain (VM); returns the asset's UAL
|
|
1064
|
-
- \`dkg_query\` — SPARQL read; \`dkg_memory_search\` — free-text recall
|
|
1065
|
-
|
|
1066
|
-
The longer per-domain agent-guide walkthrough format will return when
|
|
1067
|
-
the V10 ontology endpoint and per-project annotation workflow stabilise.
|
|
1068
|
-
`,TR=/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>"{}|\\^`\x00-\x20]+$/;function NR(e){return e?TR.test(e):!1}function zh(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}function r9(e){return`"${zh(e)}"`}const ft={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",dcterms:"http://purl.org/dc/terms/",xsd:"http://www.w3.org/2001/XMLSchema#",prov:"http://www.w3.org/ns/prov#",owl:"http://www.w3.org/2002/07/owl#"};function _i(e){if(!NR(e))throw new Error(`Invalid /wm/write IRI object: ${e}`);return e}function ta(e){return`"${zh(e)}"`}function pc(e,n){return`"${zh(e)}"^^<${_i(n)}>`}function RR({contextGraphId:e,starterSlug:n,ttl:a,guide:r,nowIso:o=new Date().toISOString()}){if(!e)throw new Error("contextGraphId is required");if(!n)throw new Error("starterSlug is required");const s=_i(`urn:dkg:project:${e}:ontology`),u=_i(`${s}:agent-guide`),d=[{subject:s,predicate:ft.rdf+"type",object:_i(ft.owl+"Ontology")},{subject:s,predicate:ft.rdf+"type",object:_i(ft.prov+"Entity")},{subject:s,predicate:ft.rdfs+"label",object:ta(`Project ontology — ${e}`)},{subject:s,predicate:ft.schema+"name",object:ta(`Project ontology — ${e}`)},{subject:s,predicate:ft.dcterms+"title",object:ta(`Project ontology — ${e}`)},{subject:s,predicate:ft.dcterms+"description",object:ta(`The active ontology for context graph ${e}, derived from the '${n}' starter.`)},{subject:s,predicate:ft.dcterms+"created",object:pc(o,ft.xsd+"dateTime")},{subject:s,predicate:ft.dcterms+"modified",object:pc(o,ft.xsd+"dateTime")},{subject:s,predicate:ft.dcterms+"source",object:ta(n)},{subject:s,predicate:ft.schema+"encodingFormat",object:ta("text/turtle")},{subject:s,predicate:ft.schema+"text",object:ta(a)},{subject:s,predicate:ft.dcterms+"references",object:_i(u)},{subject:u,predicate:ft.rdf+"type",object:_i(ft.schema+"DigitalDocument")},{subject:u,predicate:ft.rdfs+"label",object:ta(`Agent guide — ${e} ontology`)},{subject:u,predicate:ft.schema+"name",object:ta(`Agent guide — ${e} ontology`)},{subject:u,predicate:ft.dcterms+"title",object:ta(`Agent guide — ${e} ontology`)},{subject:u,predicate:ft.dcterms+"created",object:pc(o,ft.xsd+"dateTime")},{subject:u,predicate:ft.dcterms+"modified",object:pc(o,ft.xsd+"dateTime")},{subject:u,predicate:ft.schema+"encodingFormat",object:ta("text/markdown")},{subject:u,predicate:ft.schema+"text",object:ta(r)},{subject:u,predicate:ft.schema+"about",object:_i(s)}];return{ontologyUri:s,guideUri:u,quads:d}}async function hc(e,n){const a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify(n)});if(!a.ok){const r=await a.json().catch(()=>({})),o=(r==null?void 0:r.error)??`HTTP ${a.status}`;throw new Error(o)}return a.json()}const _R=Object.assign({"../../../../mcp-dkg/templates/ontologies/book-research/ontology.ttl":vR,"../../../../mcp-dkg/templates/ontologies/coding-project/ontology.ttl":xR,"../../../../mcp-dkg/templates/ontologies/narrative-writing/ontology.ttl":bR,"../../../../mcp-dkg/templates/ontologies/pkm/ontology.ttl":wR,"../../../../mcp-dkg/templates/ontologies/scientific-research/ontology.ttl":SR}),OR=Object.assign({"../../../../mcp-dkg/templates/ontologies/book-research/agent-guide.md":kR,"../../../../mcp-dkg/templates/ontologies/coding-project/agent-guide.md":CR,"../../../../mcp-dkg/templates/ontologies/narrative-writing/agent-guide.md":ER,"../../../../mcp-dkg/templates/ontologies/pkm/agent-guide.md":AR,"../../../../mcp-dkg/templates/ontologies/scientific-research/agent-guide.md":jR});function DR(){const e={};for(const[n,a]of Object.entries(_R)){const r=n.match(/ontologies\/([^/]+)\/ontology\.ttl$/);if(!r)continue;const o=r[1];e[o]={ttl:a,guide:""}}for(const[n,a]of Object.entries(OR)){const r=n.match(/ontologies\/([^/]+)\/agent-guide\.md$/);if(!r)continue;const o=r[1];e[o]&&(e[o].guide=a)}return e}const Ih=DR(),MR=[{slug:"coding-project",displayName:"Coding project",description:"Software projects: decisions, tasks, code, GitHub. The v1 reference ontology."},{slug:"book-research",displayName:"Book / paper research",description:"Long-form non-fiction: hypotheses, arguments, citations, quotes. Built on BIBO + SPAR."},{slug:"pkm",displayName:"Personal knowledge management",description:"Notes, highlights, insights — daily-driver PKM workflow. Composes with SKOS."},{slug:"scientific-research",displayName:"Scientific research",description:"Empirical research: hypotheses → experiments → results → reproducibility. Built on PROV-O + DCAT + FaBiO."},{slug:"narrative-writing",displayName:"Narrative writing",description:"Fiction or narrative non-fiction: characters, scenes, plot points, themes."}];function LR(){return MR.filter(e=>Ih[e.slug])}function zR(e){return Ih[e]??null}async function IR(e,n){const a=zR(n);if(!a)throw new Error(`Unknown ontology starter '${n}'. Available: ${Object.keys(Ih).join(", ")}`);if(!a.ttl||!a.guide)throw new Error(`Starter '${n}' is missing ontology.ttl or agent-guide.md.`);await hc("/api/sub-graph/create",{contextGraphId:e,subGraphName:"meta"}).catch(d=>{if(!String((d==null?void 0:d.message)??d).includes("already exists"))throw d});const{ontologyUri:r,guideUri:o,quads:s}=RR({contextGraphId:e,starterSlug:n,ttl:a.ttl,guide:a.guide});await hc("/api/knowledge-assets/project-ontology/wm/discard",{contextGraphId:e,subGraphName:"meta"}).catch(d=>{const p=String((d==null?void 0:d.message)??d);if(!/404|not found/i.test(p))throw d}),await hc("/api/knowledge-assets/project-ontology/wm/write",{contextGraphId:e,subGraphName:"meta",quads:s});const u=await hc("/api/knowledge-assets/project-ontology/swm/share",{contextGraphId:e,subGraphName:"meta"});if(!u.swmShared||!u.sealed||!u.publishReady)throw new Error("Project ontology atomic share did not reach Shared Working Memory");return{ontologyUri:r,guideUri:o,tripleCount:s.length}}async function Ph(e,n){const a=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify(n)}),r=await a.text();let o;if(r)try{o=JSON.parse(r)}catch{o={raw:r}}if(!a.ok){const s=(o==null?void 0:o.error)??`HTTP ${a.status}`;throw new Error(typeof s=="string"?s:JSON.stringify(s))}return o}function PR(e,n={}){return Ph(`/api/context-graph/${encodeURIComponent(e)}/manifest/publish`,n)}function UR(e,n){return Ph(`/api/context-graph/${encodeURIComponent(e)}/manifest/plan-install`,n)}function BR(e,n){return Ph(`/api/context-graph/${encodeURIComponent(e)}/manifest/install`,n)}const q0="dkg.wireWorkspace.parentDir",F0="dkg.wireWorkspace.nickname",G0="dkg.wireWorkspace.tools",Zf=[{value:"cursor",label:"Cursor",description:"Wires .cursor/mcp.json + hooks + rules into the workspace."},{value:"claude-code",label:"Claude Code",description:"Merges hooks into ~/.claude/settings.json. Requires Claude Code installed."},{value:"both",label:"Both Cursor and Claude Code",description:"Wires both tools so either can operate on this project."},{value:"cursor",label:"Codex (coming soon)",description:"Codex CLI integration isn't shipped yet — pick another tool for now.",disabled:!0,comingSoon:!0}];function HR(e,n){const a=n.split("/"),r=a[a.length-1]??"";return r||(e??"project").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function $R(e){if(!e)return"";const n=e.hostname.replace(/\.local$/,"").replace(/-/g," ");return`${e.username} @ ${n}`}function V0(e){return e==="both"?["cursor","claude-code"]:[e]}function Gb({contextGraphId:e,projectName:n,defaultAgentNickname:a,onDone:r,onCancel:o,variant:s}){var ie;const u=S.useMemo(()=>HR(n,e),[n,e]),[d,p]=S.useState(null),[f,y]=S.useState(null),[g,x]=S.useState(""),[b,k]=S.useState(""),[C,j]=S.useState("cursor"),[E,_]=S.useState(!1),[R,F]=S.useState(null),[U,O]=S.useState(null),[W,P]=S.useState(null);S.useEffect(()=>{let B=!1;return(async()=>{try{const[Q,H]=await Promise.all([fetch("/api/host/info",{headers:$t()}).then(V=>V.ok?V.json():null),ru().catch(()=>null)]);if(B)return;if(Q){p(Q);const V=typeof window<"u"&&window.localStorage.getItem(q0)||Q.defaultWorkspaceParent;x(`${V}/${u}`)}H&&y(H);const ee=typeof window<"u"&&window.localStorage.getItem(F0);a?k(a):ee?k(ee):Q&&k($R(Q));const ne=typeof window<"u"&&window.localStorage.getItem(G0);ne&&(ne==="cursor"||ne==="claude-code"||ne==="both")&&j(ne)}catch(Q){B||console.warn("[WireWorkspacePanel] host info / identity fetch failed:",Q)}})(),()=>{B=!0}},[u,a]);function M(B){typeof window>"u"||(window.localStorage.setItem(q0,B),b&&window.localStorage.setItem(F0,b),window.localStorage.setItem(G0,C))}async function T(){_(!0),F(null);try{const B=g.trim();if(!B||B.startsWith("~"))throw new Error("Workspace path must be an absolute path (start with `/`). The daemon will create the directory if it does not exist.");const Q=await UR(e,{workspaceRoot:B,agentNickname:b.trim(),tools:V0(C)});O(Q);const H=B.lastIndexOf("/");H>0&&M(B.slice(0,H))}catch(B){F((B==null?void 0:B.message)||"Preview failed")}finally{_(!1)}}async function G(){_(!0),F(null);try{const B=g.trim(),Q=await BR(e,{workspaceRoot:B,agentNickname:b.trim(),tools:V0(C)});P(Q)}catch(B){F((B==null?void 0:B.message)||"Install failed")}finally{_(!1)}}if(W)return m.jsxs("div",{children:[m.jsxs("div",{style:{padding:"12px 14px",borderRadius:8,marginBottom:14,fontSize:12,background:"rgba(34, 197, 94, 0.08)",border:"1px solid rgba(34, 197, 94, 0.25)",color:"var(--accent-green)"},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:6},children:"Workspace wired."}),"Open ",m.jsx("code",{style:{fontFamily:"var(--font-mono)"},children:g})," in ",C==="claude-code"?"Claude Code":C==="both"?"Cursor or Claude Code":"Cursor",". On the first chat, your agent will see the project ontology",s==="join"?", tasks, and decisions":" you publish via the canonical assertion-write flow","."]}),m.jsx("div",{style:{fontSize:11,color:"var(--text-secondary)",marginBottom:8},children:"Files written:"}),m.jsxs("pre",{style:{fontSize:10,fontFamily:"var(--font-mono)",maxHeight:200,overflow:"auto",padding:10,borderRadius:6,background:"var(--bg-secondary)",border:"1px solid var(--border-primary)",margin:0},children:[W.written.map(B=>`${B.action.padEnd(9)} ${B.absPath} (${B.bytesWritten.toLocaleString()} bytes)`).join(`
|
|
1069
|
-
`),W.skipped.length?`
|
|
1070
|
-
|
|
1071
|
-
Skipped:
|
|
1072
|
-
`+W.skipped.map(B=>` - ${B}`).join(`
|
|
1073
|
-
`):"",W.warnings.length?`
|
|
1074
|
-
|
|
1075
|
-
Warnings:
|
|
1076
|
-
`+W.warnings.map(B=>` - ${B}`).join(`
|
|
1077
|
-
`):""]}),m.jsx("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:14},children:m.jsx("button",{className:"v10-modal-btn primary",onClick:r,children:"Done"})})]});if(U)return m.jsxs("div",{children:[R&&m.jsx("div",{className:"v10-modal-error",style:{marginBottom:12},children:R}),m.jsx("div",{style:{marginBottom:10,fontSize:11,color:"var(--text-secondary)"},children:"Review the install plan. Files are only written when you click Install."}),m.jsx("pre",{style:{fontSize:10,fontFamily:"var(--font-mono)",maxHeight:320,overflow:"auto",padding:12,borderRadius:6,background:"var(--bg-secondary)",border:"1px solid var(--border-primary)",margin:0,whiteSpace:"pre-wrap"},children:U.markdown}),m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:14,gap:10},children:[m.jsx("button",{className:"v10-modal-btn",onClick:()=>{O(null),F(null)},disabled:E,children:"← Back"}),m.jsxs("div",{style:{display:"flex",gap:8},children:[m.jsx("button",{className:"v10-modal-btn",onClick:r,disabled:E,children:"Skip for now"}),m.jsx("button",{className:"v10-modal-btn primary",onClick:G,disabled:E,children:E?"Installing…":"Install"})]})]})]});const Y=((ie=Zf.find(B=>B.value===C&&!B.disabled))==null?void 0:ie.description)??Zf[0].description;return m.jsxs("div",{children:[m.jsxs("div",{style:{padding:"10px 14px",borderRadius:8,marginBottom:14,fontSize:12,background:"rgba(59, 130, 246, 0.08)",border:"1px solid rgba(59, 130, 246, 0.25)",color:"var(--accent-primary, #3b82f6)"},children:[m.jsx("div",{style:{fontWeight:600,marginBottom:4},children:s==="create"?"Wire your local workspace":"Wire this project locally"}),s==="create"?"Choose a directory for the new project and which coding tool you want it wired for. The daemon will populate the workspace with the right config files so your agent can join the project from turn one.":"Choose a local directory for this project and which coding tool you want it wired for. The daemon will populate the workspace with the right config files so your agent can collaborate on this project."]}),R&&m.jsx("div",{className:"v10-modal-error",style:{marginBottom:12},children:R}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Workspace path"}),m.jsx("input",{className:"v10-form-input",type:"text",value:g,onChange:B=>x(B.target.value),placeholder:d?`${d.defaultWorkspaceParent}/${u}`:"/Users/you/code/project",spellCheck:!1,style:{fontFamily:"var(--font-mono)",fontSize:12}}),m.jsxs("div",{style:{fontSize:10,color:"var(--text-tertiary)",marginTop:4},children:["Absolute path. Created if it doesn't exist. Daemon writes only inside this dir (plus optionally ",m.jsx("code",{children:"~/.claude/settings.json"})," if Claude Code is selected).",d&&m.jsxs(m.Fragment,{children:[" Defaulted from your ",m.jsx("code",{children:"$HOME"})," = ",m.jsx("code",{children:d.homedir}),"."]})]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Coding tool to wire"}),m.jsx("select",{className:"v10-form-select",value:C,onChange:B=>j(B.target.value),children:Zf.map((B,Q)=>m.jsx("option",{value:B.disabled?"__disabled__":B.value,disabled:B.disabled,children:B.label},`${B.label}-${Q}`))}),m.jsx("div",{style:{fontSize:10,color:"var(--text-tertiary)",marginTop:4},children:Y})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Your agent identity"}),m.jsx("input",{className:"v10-form-input",type:"text",value:f?`urn:dkg:agent:${f.agentAddress.toLowerCase()}`:"fetching…",disabled:!0,spellCheck:!1,style:{fontFamily:"var(--font-mono)",fontSize:11,opacity:.75}}),m.jsxs("div",{style:{fontSize:10,color:"var(--text-tertiary)",marginTop:4},children:["Cryptographic URI derived from this node's wallet address. Same on every project on this machine. Attribution (",m.jsx("code",{children:"prov:wasAttributedTo"}),") on every chat turn uses this URI."]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Nickname for this agent"}),m.jsx("input",{className:"v10-form-input",type:"text",value:b,onChange:B=>k(B.target.value),placeholder:"e.g. Alice on laptop 1",spellCheck:!1,maxLength:80}),m.jsx("div",{style:{fontSize:10,color:"var(--text-tertiary)",marginTop:4},children:"Free-form human label rendered as the agent's name in chips, lists, and rdfs:label triples. Doesn't affect attribution — only changes how you appear to others."})]}),m.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:14,gap:10},children:[o?m.jsx("button",{className:"v10-modal-btn",onClick:o,disabled:E,children:"Cancel"}):m.jsx("button",{className:"v10-modal-btn",onClick:r,disabled:E,children:"Skip for now"}),m.jsx("button",{className:"v10-modal-btn primary",onClick:T,disabled:E||!g.trim()||!b.trim(),children:E?"Loading preview…":"Preview install"})]})]})}const W0='button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), iframe, [tabindex]:not([tabindex="-1"])';function Gc(e,n){const a=S.useRef(null),r=S.useRef(null);S.useEffect(()=>{if(e)return r.current=document.activeElement??null,queueMicrotask(()=>{const s=a.current;if(!s)return;const u=s.querySelector(W0),p=s.querySelector("[autofocus]")??u;p?p.focus():(s.hasAttribute("tabindex")||s.setAttribute("tabindex","-1"),s.focus())}),()=>{var s,u;(u=(s=r.current)==null?void 0:s.focus)==null||u.call(s)}},[e]),S.useEffect(()=>{if(!e)return;const s=u=>{if(u.key==="Escape"){u.stopPropagation(),n();return}if(u.key!=="Tab")return;const d=a.current;if(!d)return;const p=Array.from(d.querySelectorAll(W0)).filter(x=>x.offsetParent!==null||x===document.activeElement);if(p.length===0){u.preventDefault(),d.hasAttribute("tabindex")||d.setAttribute("tabindex","-1"),d.focus();return}const f=p[0],y=p[p.length-1],g=document.activeElement;if(g===d){u.preventDefault(),(u.shiftKey?y:f).focus();return}u.shiftKey&&g===f?(u.preventDefault(),y.focus()):!u.shiftKey&&g===y&&(u.preventDefault(),f.focus())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,n]);const o=S.useCallback(s=>{s.target===s.currentTarget&&n()},[n]);return{dialogRef:a,onBackdropClick:o}}const ll=80,qR=/<\/?[a-z][^>]*>/i,FR=/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g,GR=/[a-z0-9]/i;function VR(e){let n="",a=0;for(;a<e.length;){if(e.charCodeAt(a)===60){const o=e.charCodeAt(a+1);if(o>=65&&o<=90||o>=97&&o<=122||o===47){const u=e.indexOf(">",a+1);if(u===-1)break;a=u+1;continue}}n+=e[a],a+=1}return n}function Vb(e){if(typeof e!="string")return"";let n=VR(e);return n=n.replace(/[<>]/g,""),n=n.replace(FR,""),n=n.replace(/\s+/g," "),n=n.trim(),n.length>ll&&(n=n.slice(0,ll)),n}function Y0(e){const n=Vb(e);return n?GR.test(n)?qR.test(e)?"HTML tags are not allowed in the name — they have been stripped automatically.":/[<>]/.test(e)?"Angle brackets (< or >) are not allowed in the name — they and any text consumed by an unclosed tag have been stripped automatically.":e.length>ll?`Name was trimmed to ${ll} characters (was ${e.length}).`:null:"Name must contain at least one letter or digit.":"Enter a name with at least one letter or digit."}function K0(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function WR({open:e,onClose:n}){var it,fe;const[a,r]=S.useState(""),[o,s]=S.useState(""),[u,d]=S.useState("curated"),[p,f]=S.useState("curator-only"),[y,g]=S.useState(!1),[x,b]=S.useState("community"),k=LR(),[C,j]=S.useState(((it=k[0])==null?void 0:it.slug)??"coding-project"),[E,_]=S.useState(!1),[R,F]=S.useState("off"),[U,O]=S.useState("7d"),[W,P]=S.useState("100k"),[M,T]=S.useState(!1),[G,Y]=S.useState(""),[ie,B]=S.useState(null),[Q,H]=S.useState(null),[ee,ne]=S.useState(null),[V,D]=S.useState(null),[L,X]=S.useState(""),[N,ue]=S.useState(!0),[pe,he]=S.useState(!1),{setContextGraphs:Ee,contextGraphs:Ue,setActiveProject:Ne}=ca(),{openTab:et}=gn(),{setStage:Ot,stage:xt}=Lh(),bt=()=>{ue(!0),he(!1),ru().then($=>{ne($.agentAddress),he(!1)}).catch(()=>{ne(null),he(!0)}).finally(()=>ue(!1))};S.useEffect(()=>{e&&(H(null),bt())},[e]);const yt=Gc(e&&!V,n),Zt=Gc(e&&!!V,()=>{D(null),X(""),H(null),r(""),s(""),n()});if(!e)return null;const Pe=Vb(a),pt=K0(Pe),Dt=ee&&pt?`${ee}/${pt}`:pt?`<agent-address>/${pt}`:"",Nt=a?Y0(a):null,ge=$=>{r($)},Mt=async()=>{const $=Pe;if(!$||Nt)return;T(!0),B(null),H(null),Y(y?"Registering context graph on the network…":"Creating context graph locally…");const le=K0($);if(!ee){B("Agent identity is still loading. Please wait a moment and try again."),T(!1);return}const me=`${ee}/${le}`;try{const ye=setTimeout(()=>Y(y?"On-chain registration in progress — this can take up to 30s…":"Setting up local context graph…"),5e3),I=u==="curated"?1:0,Te=p==="curator-only"?0:1,at=u==="curated"?{accessPolicy:I,publishPolicy:Te,allowedAgents:ee?[ee]:[],register:y}:{accessPolicy:I,publishPolicy:Te,register:y},Ie=await XA(me,$,o.trim()||void 0,at);if(clearTimeout(ye),y&&Ie.registered===!1){const Se=`On-chain registration failed: ${Ie.registerError??"unknown error"}. Project is created locally and usable for everything except Verifiable Memory publishing. Retry registration from the project's Settings when ready.`;console.warn("[CreateProjectModal]",Se),H(Se)}if(x==="community"||x==="agent")try{Y(`Installing '${C}' ontology…`),await IR(Ie.created,C)}catch(Se){console.warn("[CreateProjectModal] ontology install failed:",Se),Y(`Context graph created, but ontology install failed: ${(Se==null?void 0:Se.message)??Se}`)}let Xe=!0;try{Y("Publishing context graph manifest…"),await PR(Ie.created,{})}catch(Se){Xe=!1,console.warn("[CreateProjectModal] manifest publish failed:",Se),Y(`Context graph created, but manifest publish failed: ${(Se==null?void 0:Se.message)??Se}`)}Y("Refreshing context graph list…");const{contextGraphs:Ve}=await Ah();Ee(Ve??[]),Ne(Ie.created),et({id:`project:${Ie.created}`,label:$,closable:!0}),xt<2&&Ot(2),Xe?(X($),D(Ie.created),Y("")):setTimeout(()=>{r(""),s(""),Y(""),n()},2500)}catch(ye){const I=(ye==null?void 0:ye.message)||"Failed to create context graph";I.includes("already exists")||I.includes("409")?B("A context graph with this ID already exists. Try a different name."):(I.includes("taking longer"),B(I)),Y("")}finally{T(!1)}},qn=Ue.length===0;function yn(){D(null),X(""),H(null),r(""),s(""),n()}return V?m.jsx("div",{className:"v10-modal-overlay",onClick:Zt.onBackdropClick,role:"presentation",children:m.jsxs("div",{className:"v10-modal-box",ref:Zt.dialogRef,role:"dialog","aria-modal":"true","aria-labelledby":"dkg-wire-modal-title",children:[m.jsx("button",{type:"button",className:"v10-modal-close",onClick:yn,"aria-label":"Close wire workspace dialog",title:"Close (Esc)",style:{position:"absolute",top:12,right:12,background:"none",border:"none",color:"var(--text-tertiary)",cursor:"pointer",fontSize:18,lineHeight:1,padding:4},children:"×"}),m.jsxs("div",{className:"v10-modal-header",children:[m.jsxs("div",{id:"dkg-wire-modal-title",className:"v10-modal-title",children:["Wire workspace for ",L]}),m.jsx("div",{className:"v10-modal-subtitle",children:"Context graph created. Now wire a local workspace so you can plan it from your own Cursor."})]}),m.jsxs("div",{className:"v10-modal-body",children:[Q&&m.jsx("div",{className:"v10-modal-warning",children:Q}),m.jsx(Gb,{contextGraphId:V,projectName:L,variant:"create",onDone:yn})]})]})}):m.jsx("div",{className:"v10-modal-overlay",onClick:yt.onBackdropClick,role:"presentation",children:m.jsxs("div",{className:"v10-modal-box",ref:yt.dialogRef,role:"dialog","aria-modal":"true","aria-labelledby":"dkg-create-cg-title","aria-describedby":"dkg-create-cg-subtitle",children:[m.jsx("button",{type:"button",className:"v10-modal-close",onClick:n,"aria-label":"Close create context graph dialog",title:"Close (Esc)",style:{position:"absolute",top:12,right:12,background:"none",border:"none",color:"var(--text-tertiary)",cursor:"pointer",fontSize:18,lineHeight:1,padding:4,zIndex:1},children:"×"}),m.jsxs("div",{className:"v10-modal-header",children:[m.jsx("div",{id:"dkg-create-cg-title",className:"v10-modal-title",children:"Create New Context Graph"}),m.jsx("div",{id:"dkg-create-cg-subtitle",className:"v10-modal-subtitle",children:"A context graph gives your agent structured memory — a place to draft, share, and publish knowledge."})]}),m.jsxs("div",{className:"v10-modal-body",children:[ie&&m.jsx("div",{className:"v10-modal-error",children:ie}),Q&&m.jsx("div",{className:"v10-modal-warning",children:Q}),qn&&m.jsxs("div",{className:"v10-modal-tip",children:[m.jsx("div",{className:"v10-modal-tip-title",children:"First context graph tip"}),"This is your agent's first memory space. Consider importing any existing knowledge your agent has — notes, documents, conversation logs — so it can build on what it already knows."]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",htmlFor:"dkg-cg-name",children:"Context Graph Name"}),m.jsx("input",{id:"dkg-cg-name",name:"dkg-cg-name",className:"v10-form-input",type:"text",placeholder:"e.g. Pharma Drug Interactions",value:a,onChange:$=>ge($.target.value),autoFocus:!0,maxLength:ll,"aria-invalid":Nt?"true":"false","aria-describedby":"dkg-cg-name-help",autoComplete:"off",spellCheck:!0}),m.jsx("div",{id:"dkg-cg-name-help",style:{marginTop:4,fontSize:11,color:Nt?"var(--red, #f87171)":"var(--text-tertiary)",fontFamily:"var(--font-mono)"},children:Nt||(Dt?`ID: did:dkg:context-graph:${Dt}`:`${a.length}/${ll} characters`)})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",htmlFor:"dkg-cg-description",children:"Description"}),m.jsx("textarea",{id:"dkg-cg-description",name:"dkg-cg-description",className:"v10-form-textarea",placeholder:"What should your agent remember? Describe the domain, goals, or context...",value:o,onChange:$=>s($.target.value),"aria-label":"Context graph description"})]}),m.jsx("div",{className:"v10-form-divider"}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Sharing"}),m.jsxs("div",{className:"v10-form-radio-group",children:[m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:u==="curated",onChange:()=>d("curated")}),"Invite-only — only invited agents can read and subscribe"]}),m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:u==="public",onChange:()=>d("public")}),"Open — publicly discoverable; anyone can subscribe"]})]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Contribution"}),m.jsxs("div",{className:"v10-form-radio-group",children:[m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:p==="curator-only",onChange:()=>f("curator-only")}),"Curators-only — only the curator may publish to Verifiable Memory"]}),m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:p==="open",onChange:()=>f("open")}),"Open — any wallet may publish to Verifiable Memory (not just members)"]})]}),u==="curated"&&p==="open"&&m.jsxs("div",{style:{marginTop:6,fontSize:11,color:"var(--text-tertiary)"},children:["Note: an invite-only sharing graph with open contribution still lets ",m.jsx("em",{children:"any"})," wallet publish to Verifiable Memory — the on-chain publish check is not gated by the allowlist. See SPEC_CG_MEMORY_MODEL §2.5."]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"On-chain registration"}),m.jsxs("label",{className:"v10-form-radio",style:{display:"flex",alignItems:"flex-start",gap:8},children:[m.jsx("input",{type:"checkbox",checked:y,onChange:$=>g($.target.checked),style:{marginTop:3}}),m.jsxs("span",{children:["Register on chain now (required for Verifiable Memory publishing)",m.jsx("div",{style:{fontSize:11,color:"var(--text-tertiary)",marginTop:4},children:"Off by default — the project is created locally and can be registered later from its Settings tab when your wallet is funded and a working RPC is configured."})]})]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",children:"Ontology"}),m.jsxs("div",{className:"v10-form-radio-group",children:[m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:x==="community",onChange:()=>b("community")}),"Choose a starter — install one of the bundled context-graph-type ontologies"]}),x==="community"&&m.jsxs("div",{style:{marginLeft:24,marginTop:4,marginBottom:8},children:[m.jsx("select",{className:"v10-form-select",value:C,onChange:$=>j($.target.value),children:k.map($=>m.jsx("option",{value:$.slug,children:$.displayName},$.slug))}),m.jsx("div",{style:{marginTop:6,fontSize:11,color:"var(--text-tertiary)"},children:(fe=k.find($=>$.slug===C))==null?void 0:fe.description})]}),m.jsxs("label",{className:"v10-form-radio",children:[m.jsx("input",{type:"radio",checked:x==="agent",onChange:()=>b("agent")}),"Let agent decide — defaults to the closest starter (v1)"]}),x==="agent"&&m.jsxs("div",{className:"v10-form-radio-desc",style:{marginLeft:24,marginTop:4,marginBottom:8},children:["v1 installs the ",m.jsx("code",{children:C})," starter as a sensible default. A future release will have the agent draft a context-graph-specific ontology by extending the closest starter from the context graph description."]}),m.jsxs("label",{className:"v10-form-radio",style:{opacity:.5},children:[m.jsx("input",{type:"radio",checked:x==="upload",onChange:()=>b("upload"),disabled:!0}),"Upload an ontology file (.ttl, .owl, .rdf) ",m.jsx("span",{style:{fontSize:10,fontWeight:400,color:"var(--text-tertiary)"},children:"(coming soon)"})]})]})]}),m.jsxs("div",{className:"v10-form-advanced-toggle",onClick:()=>_(!E),children:[m.jsx("span",{className:`v10-form-adv-chevron ${E?"open":""}`,children:"▸"}),m.jsx("span",{children:"Advanced settings"})]}),E&&m.jsxs("div",{className:"v10-form-advanced-body",style:{opacity:.5,pointerEvents:"none"},children:[m.jsxs("div",{className:"v10-form-group",children:[m.jsxs("label",{className:"v10-form-label",children:["Consensus Quorum ",m.jsx("span",{style:{fontSize:10,fontWeight:400,color:"var(--text-tertiary)"},children:"(coming soon)"})]}),m.jsxs("select",{className:"v10-form-select",value:R,disabled:!0,children:[m.jsx("option",{value:"off",children:"Off — no consensus verification required"}),m.jsx("option",{value:"2of3",children:"2 of 3 — lightweight consensus"}),m.jsx("option",{value:"3of5",children:"3 of 5 — standard consensus (recommended for teams)"}),m.jsx("option",{value:"custom",children:"Custom — set your own M of N"})]})]}),m.jsxs("div",{className:"v10-form-group",children:[m.jsxs("label",{className:"v10-form-label",children:["SWM TTL ",m.jsx("span",{style:{fontSize:10,fontWeight:400,color:"var(--text-tertiary)"},children:"(coming soon)"})]}),m.jsxs("select",{className:"v10-form-select",value:U,disabled:!0,children:[m.jsx("option",{value:"7d",children:"7 days (default)"}),m.jsx("option",{value:"1h",children:"1 hour"}),m.jsx("option",{value:"1d",children:"1 day"}),m.jsx("option",{value:"30d",children:"30 days"})]})]}),m.jsxs("div",{className:"v10-form-group",style:{marginBottom:0},children:[m.jsxs("label",{className:"v10-form-label",children:["SWM Size Cap ",m.jsx("span",{style:{fontSize:10,fontWeight:400,color:"var(--text-tertiary)"},children:"(coming soon)"})]}),m.jsxs("select",{className:"v10-form-select",value:W,disabled:!0,children:[m.jsx("option",{value:"100k",children:"100K triples (default)"}),m.jsx("option",{value:"10k",children:"10K triples"}),m.jsx("option",{value:"1m",children:"1M triples"})]})]})]})]}),m.jsxs("div",{className:"v10-modal-footer",children:[m.jsx("button",{className:"v10-modal-btn",onClick:n,children:"Cancel"}),pe&&m.jsx("button",{className:"v10-modal-btn",onClick:bt,disabled:N,children:N?"Retrying…":"Retry Loading Agent"}),m.jsx("button",{className:"v10-modal-btn primary",onClick:Mt,disabled:!a.trim()||!!Y0(a)||M||!ee||N,children:M?G||"Creating…":ee?"Create Context Graph":pe?"Agent unavailable":"Loading agent…"})]})]})})}function Uh(e){return{agentDid:e.agentDid,peerId:e.peerId}}function Vc(e){if(!(e!=null&&e.trim()))return"unknown";const n=e.trim().replace(/^["']|["']$/g,"").toLowerCase();return n==="private"?"private":n==="public"?"public":"unknown"}function Mi(e){let n=e.trim().replace(/^["']|["']$/g,"");n.startsWith("<")&&n.endsWith(">")&&(n=n.slice(1,-1));const a="did:dkg:agent:";if(n.length>=a.length&&n.slice(0,a.length).toLowerCase()===a.toLowerCase()){const o=n.slice(a.length),s=/^(0x[a-fA-F0-9]{40})$/i.exec(o);return s?`${a}${s[1].toLowerCase()}`:`${a}${o}`}return/^0x[a-fA-F0-9]{40}$/.exec(n)?`${a}${n.toLowerCase()}`:n.toLowerCase()}function su(e,n){var a,r;return e.callerInvolved===!0?!0:e.callerInvolved===!1||!((a=n==null?void 0:n.agentDid)!=null&&a.trim())?!1:!!((r=e.curator)!=null&&r.trim()&&Mi(e.curator)===Mi(n.agentDid))}function YR(e,n,a){const r=e.filter(o=>su(o,n));if(a&&!r.some(o=>o.id===a)){const o=e.find(s=>s.id===a);if(o)return[o,...r]}return r}function KR(e,n){return!(su(e,n)||Vc(e.accessPolicy)!=="public")}function QR(e){return e.subscribed===!0||e.synced===!0?"project":"catalogue"}function XR(e){return e.alreadyMember===!0||e.autoApproved===!0||e.status==="approved"||e.status==="already-member"}const Q0=/^(?:Qm[1-9A-HJ-NP-Za-km-z]{44}|12D3Koo[1-9A-HJ-NP-Za-km-z]{45,53})$/;function ZR(e){var b;const n=e.trim().replace(/\\n/g,`
|
|
1078
|
-
`),a=n.split(`
|
|
1079
|
-
`).map(k=>k.trim()).filter(Boolean),r=a[0]??"",o=a.slice(1).join(" ").trim(),s=n.match(/(?:^|\s)(\/(?:ip4|ip6|dns|dns4|dns6|dnsaddr)\/\S+)/),u=((b=s==null?void 0:s[1])==null?void 0:b.replace(/\s+/g,""))??null,d=o.replace(/\s+/g,""),p=d.startsWith("/")?d:u;let f=null;if(p){const k=p.match(/\/p2p\/([^/]+)$/);k&&Q0.test(k[1])&&(f=k[1])}else for(const k of[o,...a.slice(1)]){const C=k.trim();if(Q0.test(C)){f=C;break}}let y=r;u&&y.includes(u)&&(y=y.replace(u,"")),y=y.replace(/\s*@\s*$/,"").trim();const x=(a.length>1||o.length>0)&&f===null&&p===null;return{cgId:y,curatorPeerId:f,legacyMultiaddr:p,hasUnparsedExtra:x}}function JR(e,n){return!e.hasUnparsedExtra&&n.some(a=>a.id===e.cgId&&Vc(a.accessPolicy)==="public")}function X0(e,n){const a=ZR(e);return JR(a,n)?{kind:"publicSubscribe",invite:a,validationError:J0(a,{allowBareContextGraphId:!0}),idleLabel:"Subscribe",sendingLabel:"Subscribing…"}:{kind:"privateJoin",invite:a,validationError:J0(a),idleLabel:"Request to Join",sendingLabel:"Sending request…"}}async function Z0(e){if(e.curatorPeerId){await WA(e.curatorPeerId).catch(()=>{});return}e.legacyMultiaddr&&(console.warn("[DKG] This invite uses a legacy multiaddr (deprecated). Ask the curator to regenerate using the current Share Context Graph modal — V10 invites carry a peer id and resolve via DHT, so they survive relay rotations."),await VA(e.legacyMultiaddr).catch(()=>{}))}function J0(e,n={}){if(!e.cgId)return"Missing context graph ID";if(e.hasUnparsedExtra)return"Invite contains a second line that is not a valid peer ID (12D3Koo…) or multiaddr (/ip4/…). Check for typos.";if(!e.curatorPeerId&&!e.legacyMultiaddr&&!n.allowBareContextGraphId)return"This invite is missing the curator peer id. Ask the curator to regenerate the invite from the Share Context Graph dialog.";if(e.legacyMultiaddr){if(!e.legacyMultiaddr.startsWith("/"))return"Invalid curator multiaddr";if(!e.legacyMultiaddr.includes("/p2p/"))return"Curator multiaddr is missing peer ID"}return null}function e4(e){if(e instanceof an&&e.status===502){const n=t4(e.body);if(n.length===0)return"Request signed, but we couldn't deliver it to any reachable curator. Try again in a moment once your node has discovered more peers, or ask the curator for an updated invite.";const a=n.join("; "),r=n.some(n4),o=r?"Curator rejected this join request.":"Couldn't deliver this join request to the curator.",s=a4(a,r);return s?`${o} Reason: ${a}. ${s}`:`${o} Reason: ${a}.`}return e instanceof Error&&e.message?e.message:"Failed to send join request"}function t4(e){if(!e||typeof e!="object")return[];const n=e.errors;return Array.isArray(n)?n.filter(a=>typeof a=="string"&&a.length>0):[]}function n4(e){const n=e.replace(/^[^:]+:\s*/,"").trim();return!(!n||/^dial failed\b/i.test(n)||/^not curator$/i.test(n))}function a4(e,n){return n?/scope mismatch/i.test(e)?"This usually means your daemon's network config has a stale ContextGraphsHub address — pull the latest release (or `git pull && pnpm install && pnpm run build:runtime`) and try again.":/unknown CG/i.test(e)?"The curator doesn't recognise this context graph id — double-check the invite, or ask the curator to share an updated one.":null:/not curator/i.test(e)?"Your node reached other peers, but none of them curate this context graph. Make sure the curator's daemon is online and the invite carries the right curator peer id.":null}function i4({open:e,onClose:n,initialContextGraphId:a}){const[r,o]=S.useState(a??""),[s,u]=S.useState("idle"),[d,p]=S.useState(null),[f,y]=S.useState(null),[g,x]=S.useState(!1),[b,k]=S.useState(null),[C,j]=S.useState(""),{contextGraphs:E,setContextGraphs:_,setActiveProject:R}=ca(),{openTab:F}=gn();S.useEffect(()=>{a&&o(a)},[a]),S.useEffect(()=>{e||(o(a??""),p(null),u("idle"),y(null),x(!1))},[e,a]);const U=S.useCallback(ne=>{R(ne.id),F({id:`project:${ne.id}`,label:ne.name||ne.id,closable:!0})},[R,F]),O=S.useCallback(async(ne,V)=>{const{contextGraphs:D}=await Ah(),L=D??[];_(L);const X=L.find(N=>N.id===ne)??V;return X&&U(X),X},[_,U]),W=S.useCallback(async ne=>{u("approved");try{const V=await O(ne);V&&(j(V.name??ne),k(ne))}catch{}},[O]),P=S.useCallback(ne=>{var D;if(!(!f||ne.type!=="join_approved"&&ne.type!=="join_rejected"||((D=ne.data)==null?void 0:D.contextGraphId)!==f)){if(ne.type==="join_rejected"){u("rejected");return}W(f)}},[f,W]);hl(P);const M=Gc(e&&!b,n),T=Gc(e&&!!b,()=>{k(null),j(""),n()});if(!e)return null;const G=async()=>{const ne=X0(r,E);if(ne.validationError){p(ne.validationError);return}const{cgId:V,curatorPeerId:D}=ne.invite;if(p(null),ne.kind==="publicSubscribe"){u("sending");try{const X=E.find(N=>N.id===V);await Z0(ne.invite),await Wj(V,{syncMode:g?"always-on":"on-demand"}),await O(V,X),n()}catch(X){p(X instanceof Error?X.message:"Could not subscribe to this public context graph."),u("idle")}return}const L=E.find(X=>X.id===V);if(L){U(L),n();return}u("sending");try{await Z0(ne.invite);const X=await JA(V),N=await ru().then(pe=>pe.name).catch(()=>{}),ue=await ej(V,{delegation:X.delegation,agentName:N,curatorPeerId:D??void 0});if(y(V),XR(ue)){await W(V);return}u("pending")}catch(X){p(e4(X)),u("idle")}};function Y(){k(null),j(""),n()}if(b)return m.jsx("div",{className:"v10-modal-overlay",onClick:T.onBackdropClick,role:"presentation",children:m.jsxs("div",{className:"v10-modal-box",ref:T.dialogRef,role:"dialog","aria-modal":"true","aria-labelledby":"dkg-join-wire-title",children:[m.jsx("button",{type:"button",className:"v10-modal-close",onClick:Y,"aria-label":"Close wire workspace dialog",title:"Close (Esc)",style:{position:"absolute",top:12,right:12,background:"none",border:"none",color:"var(--text-tertiary)",cursor:"pointer",fontSize:18,lineHeight:1,padding:4,zIndex:1},children:"×"}),m.jsxs("div",{className:"v10-modal-header",children:[m.jsxs("div",{id:"dkg-join-wire-title",className:"v10-modal-title",children:["Wire workspace for ",C]}),m.jsx("div",{className:"v10-modal-subtitle",children:"Curator approved. Now wire a local workspace so this Cursor can collaborate on the context graph."})]}),m.jsx("div",{className:"v10-modal-body",children:m.jsx(Gb,{contextGraphId:b,projectName:C,variant:"join",onDone:Y})})]})});const ie=s==="sending",B=s==="pending",Q=s==="approved",H=s==="rejected",ee=X0(r,E);return m.jsx("div",{className:"v10-modal-overlay",onClick:M.onBackdropClick,role:"presentation",children:m.jsxs("div",{className:"v10-modal-box",ref:M.dialogRef,role:"dialog","aria-modal":"true","aria-labelledby":"dkg-join-cg-title","aria-describedby":"dkg-join-cg-subtitle",children:[m.jsx("button",{type:"button",className:"v10-modal-close",onClick:n,"aria-label":"Close join context graph dialog",title:"Close (Esc)",style:{position:"absolute",top:12,right:12,background:"none",border:"none",color:"var(--text-tertiary)",cursor:"pointer",fontSize:18,lineHeight:1,padding:4,zIndex:1},children:"×"}),m.jsxs("div",{className:"v10-modal-header",children:[m.jsx("div",{id:"dkg-join-cg-title",className:"v10-modal-title",children:"Join a Context Graph"}),m.jsx("div",{id:"dkg-join-cg-subtitle",className:"v10-modal-subtitle",children:"Enter a discovered public Context Graph ID to subscribe, or paste a curator invite for a private graph."})]}),m.jsxs("div",{className:"v10-modal-body",children:[d&&m.jsx("div",{className:"v10-modal-error",children:d}),B&&m.jsx("div",{style:{padding:"10px 14px",borderRadius:8,marginBottom:16,fontSize:12,background:"rgba(59, 130, 246, 0.08)",border:"1px solid rgba(59, 130, 246, 0.25)",color:"var(--accent-primary, #3b82f6)"},children:"Join request sent. Waiting for the curator to approve — this modal will move forward automatically once they do."}),Q&&m.jsx("div",{style:{padding:"10px 14px",borderRadius:8,marginBottom:16,fontSize:12,background:"rgba(34, 197, 94, 0.08)",border:"1px solid rgba(34, 197, 94, 0.25)",color:"var(--accent-green)"},children:"Approved! Loading context graph…"}),H&&m.jsx("div",{style:{padding:"10px 14px",borderRadius:8,marginBottom:16,fontSize:12,background:"rgba(245, 158, 11, 0.08)",border:"1px solid rgba(245, 158, 11, 0.25)",color:"var(--accent-warning, #f59e0b)"},children:"The curator declined this join request."}),m.jsxs("div",{className:"v10-form-group",children:[m.jsx("label",{className:"v10-form-label",htmlFor:"dkg-cg-invite",children:"Context Graph ID or Invite Code"}),m.jsx("textarea",{id:"dkg-cg-invite",name:"dkg-cg-invite",className:"v10-form-textarea",placeholder:`Public: paste a Context Graph ID
|
|
1080
|
-
|
|
1081
|
-
Private: paste the curator invite
|
|
1082
|
-
my-context-graph-abc123
|
|
1083
|
-
12D3KooW...`,value:r,onChange:ne=>o(ne.target.value),autoFocus:!0,rows:3,disabled:ie||B||Q,style:{fontFamily:"var(--font-mono)",fontSize:11},"aria-label":"Context graph invite code",autoComplete:"off",spellCheck:!1})]}),ee.kind==="publicSubscribe"&&m.jsxs("label",{style:{display:"flex",alignItems:"flex-start",gap:8,fontSize:12,color:"var(--text-secondary)",cursor:ie?"default":"pointer"},children:[m.jsx("input",{type:"checkbox",checked:g,onChange:ne=>x(ne.target.checked),disabled:ie,"aria-label":"Keep this Context Graph synchronized after restart"}),m.jsxs("span",{children:["Keep synchronized after restart",m.jsx("span",{style:{display:"block",color:"var(--text-tertiary)",marginTop:2},children:"Off by default. This node otherwise syncs the graph only when you open it."})]})]})]}),m.jsxs("div",{className:"v10-modal-footer",children:[m.jsx("button",{className:"v10-modal-btn",onClick:n,children:B||Q?"Close":"Cancel"}),m.jsx("button",{className:"v10-modal-btn primary",onClick:G,disabled:!r.trim()||ie||B||Q,children:ie?ee.sendingLabel:B?"Awaiting approval…":Q?"Approved":ee.idleLabel})]})]})})}const Wb="v10:hiddenProjectIds",$p="v10:hidden-projects-change";function Jf(){try{const e=localStorage.getItem(Wb);if(!e)return new Set;const n=JSON.parse(e);return new Set(Array.isArray(n)?n:[])}catch{return new Set}}function e1(e){try{localStorage.setItem(Wb,JSON.stringify([...e])),window.dispatchEvent(new Event($p))}catch{}}function Yb(){const[e,n]=S.useState(()=>Jf());S.useEffect(()=>{const o=()=>n(Jf());return window.addEventListener($p,o),window.addEventListener("storage",o),()=>{window.removeEventListener($p,o),window.removeEventListener("storage",o)}},[]);const a=S.useCallback(o=>{const s=new Set(Jf());s.add(o),e1(s)},[]),r=S.useCallback(()=>{e1(new Set)},[]);return{hidden:e,hide:a,unhideAll:r}}function t1({cg:e,isActive:n,onSelect:a,onHide:r}){return m.jsx("div",{className:"v10-tree-section",children:m.jsxs("div",{className:`v10-tree-section-header ${n?"active":""}`,onClick:a,children:[m.jsx("span",{className:"v10-tree-project-dot"}),m.jsx("span",{className:"v10-tree-section-label",children:e.name||e.id.slice(0,16)}),m.jsx("button",{type:"button",className:"v10-tree-hide-btn",title:"Hide this context graph from the sidebar (reversible)",onClick:o=>{o.stopPropagation(),r()},children:"×"})]})})}function r4({cg:e,isBrowsing:n,onBrowse:a,onSubscribe:r,onHide:o}){const s=e.name||e.id.slice(0,16);return m.jsx("div",{className:"v10-tree-section",children:m.jsxs("div",{className:`v10-tree-section-header catalogue ${n?"active":""}`,children:[m.jsx("span",{className:"v10-tree-project-dot"}),m.jsx("span",{className:"v10-tree-section-label",children:s}),m.jsx("button",{type:"button",className:"v10-tree-catalogue-btn","aria-label":`Browse ${s}`,onClick:a,children:"Browse"}),m.jsx("button",{type:"button",className:"v10-tree-catalogue-btn primary","aria-label":`Subscribe to ${s}`,onClick:r,children:"Subscribe"}),m.jsx("button",{type:"button",className:"v10-tree-hide-btn",title:"Hide this context graph from the sidebar (reversible)",onClick:o,children:"×"})]})})}function l4(e){switch(e){case"chat_ready":return"var(--accent-green, #22c55e)";case"connecting":return"var(--accent-yellow, #eab308)";case"degraded":case"bridge_offline":return"var(--accent-orange, #f97316)";case"available":case"coming_soon":default:return"var(--text-tertiary, #6b7280)"}}function o4(){const[e,n]=S.useState([]),[a,r]=S.useState(null),o=S.useCallback(()=>{ou().then(s=>{n(s.integrations),r(null)}).catch(s=>r(s.message))},[]);return $o(o,3e4),m.jsxs("div",{className:"v10-tree-items",style:{display:"block"},children:[m.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-tertiary)",textTransform:"uppercase",letterSpacing:.5,padding:"6px 12px 2px 24px"},children:"Agents"}),a&&m.jsx("div",{style:{fontSize:11,color:"var(--accent-orange, #f97316)",padding:"4px 12px 4px 24px"},children:a}),!a&&e.length===0&&m.jsx("div",{style:{fontSize:11,color:"var(--text-tertiary)",padding:"4px 12px 4px 24px",fontStyle:"italic"},children:"No agents detected."}),e.map(s=>m.jsxs("div",{className:"v10-tree-item",title:s.detail,style:{cursor:"default"},children:[m.jsx("span",{"aria-label":s.statusLabel,style:{width:7,height:7,borderRadius:"50%",background:l4(s.status),flexShrink:0}}),m.jsx("span",{className:"v10-tree-item-label",children:s.name}),m.jsx("span",{style:{fontSize:11,color:"var(--text-tertiary)",marginLeft:4},children:s.statusLabel})]},s.id))]})}function s4(){const e=aa(V=>V.leftSectionMyProjectsOpen),n=aa(V=>V.leftSectionIntegrationsOpen),a=aa(V=>V.toggleLeftSectionMyProjects),r=aa(V=>V.toggleLeftSectionIntegrations),o=S.useId(),s=S.useId(),{openTab:u,activeTabId:d,setActiveTab:p}=gn(),{contextGraphs:f,setContextGraphs:y,setLoading:g,activeProjectId:x,setActiveProject:b}=ca(),k=Lh(V=>V.stage),[C,j]=S.useState("explorer"),{hidden:E,hide:_,unhideAll:R}=Yb(),F=Rh().data,U=F?Uh(F):null,O=f.filter(V=>!E.has(V.id)),W=O.filter(V=>su(V,U)),P=O.filter(V=>KR(V,U)),M=f.length-O.length,[T,G]=S.useState(!1),[Y,ie]=S.useState(!1),[B,Q]=S.useState(),H=S.useCallback(V=>{Q(V),ie(!0)},[]),ee=S.useCallback(()=>{ie(!1),Q(void 0)},[]),ne=S.useCallback(()=>{g(!0),Bn.fetchContextGraphs().then(({contextGraphs:V})=>y(V??[])).catch(()=>{}).finally(()=>g(!1))},[y,g]);return $o(ne,6e4),hl(S.useCallback(V=>{(V.type==="join_approved"||V.type==="project_synced")&&ne()},[ne])),m.jsxs("div",{className:"v10-panel-left",children:[m.jsxs("div",{style:{display:"flex",gap:4,padding:"8px 8px 4px"},children:[m.jsx("button",{className:"v10-new-project-btn",onClick:()=>G(!0),children:"+ New Context Graph"}),m.jsx("button",{className:"v10-new-project-btn",onClick:()=>H(),children:"↗ Join Context Graph"})]}),m.jsxs("div",{className:"v10-tree-header",children:[m.jsx("button",{className:`v10-tree-mode-btn ${C==="explorer"?"active":""}`,onClick:()=>j("explorer"),children:"Context Graphs"}),m.jsx("button",{className:`v10-tree-mode-btn ${C==="oracle"?"active":""}`,onClick:()=>j("oracle"),children:"Context Oracle"})]}),C==="explorer"&&m.jsxs("div",{className:"v10-tree-content",children:[m.jsxs("div",{className:`v10-tree-dashboard ${d==="dashboard"?"active":""}`,onClick:()=>{p("dashboard"),b(null)},children:[m.jsx("span",{children:"▦"})," Dashboard"]}),f.length===0&&k<=1&&m.jsxs("div",{className:"v10-journey-empty-card",children:[m.jsx("div",{className:"v10-jec-title",children:"No context graphs yet"}),m.jsx("div",{className:"v10-jec-hint",children:k===0?"Connect an agent to get started.":"Create your first context graph to give your agent structured memory."}),k===1&&m.jsx("button",{className:"v10-new-project-btn",style:{margin:0},onClick:()=>G(!0),children:"+ Create First Context Graph"})]}),(f.length>0||k>=2)&&m.jsxs("div",{className:"v10-peer-group",children:[m.jsxs("button",{type:"button",className:"v10-peer-group-header","aria-expanded":e,"aria-controls":o,onClick:a,children:[m.jsx(Bp,{size:14,className:`v10-peer-group-chevron ${e?"expanded":""}`,"aria-hidden":"true"}),m.jsx("span",{className:"v10-peer-group-label",children:"My Context Graphs"})]}),e&&m.jsx("div",{id:o,className:"v10-peer-group-body",children:W.length===0?m.jsx("div",{className:"v10-tree-item",style:{cursor:"default",color:"var(--text-tertiary)",fontStyle:"italic"},children:m.jsx("span",{className:"v10-tree-item-label",children:"No context graphs in this view yet."})}):W.map(V=>m.jsx(t1,{cg:V,isActive:x===V.id,onSelect:()=>{b(V.id),u({id:`project:${V.id}`,label:V.name||V.id.slice(0,16),closable:!0})},onHide:()=>{_(V.id),x===V.id&&b(null)}},V.id))})]}),M>0&&m.jsxs("button",{type:"button",className:"v10-tree-show-hidden",onClick:R,title:"Restore all context graphs dismissed from the sidebar",children:["↺ Show ",M," hidden context graph",M!==1?"s":""]}),k>=1&&m.jsxs("div",{className:"v10-peer-group",children:[m.jsxs("button",{type:"button",className:"v10-peer-group-header","aria-expanded":n,"aria-controls":s,onClick:r,children:[m.jsx(Bp,{size:14,className:`v10-peer-group-chevron ${n?"expanded":""}`,"aria-hidden":"true"}),m.jsx("span",{className:"v10-peer-group-label",children:"Integrations"})]}),n&&m.jsx("div",{id:s,className:"v10-peer-group-body",children:m.jsx(o4,{})})]})]}),C==="oracle"&&m.jsxs("div",{className:"v10-tree-content",children:[P.length>0&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"v10-tree-group-label",children:"Context Oracle"}),P.map(V=>{const D=()=>{_(V.id),x===V.id&&b(null)};return QR(V)==="catalogue"?m.jsx(r4,{cg:V,isBrowsing:d===`project:${V.id}`,onBrowse:()=>{b(null),u({id:`project:${V.id}`,label:V.name||V.id.slice(0,16),closable:!0})},onSubscribe:()=>H(V.id),onHide:D},V.id):m.jsx(t1,{cg:V,isActive:x===V.id,onSelect:()=>{b(V.id),u({id:`project:${V.id}`,label:V.name||V.id.slice(0,16),closable:!0})},onHide:D},V.id)})]}),P.length===0&&m.jsxs("p",{style:{fontSize:12,color:"var(--text-tertiary)",padding:"20px 12px",textAlign:"center",lineHeight:1.5},children:["No discovered public Context Graphs yet. Public graphs appear here as soon as your node discovers them; use ",m.jsx("strong",{children:"Join Context Graph"})," to subscribe by ID."]}),M>0&&m.jsxs("button",{type:"button",className:"v10-tree-show-hidden",onClick:R,title:"Restore all context graphs dismissed from the sidebar",children:["↺ Show ",M," hidden context graph",M!==1?"s":""]})]}),m.jsx(WR,{open:T,onClose:()=>G(!1)}),m.jsx(i4,{open:Y,onClose:ee,initialContextGraphId:B})]})}const c4=[/failed to fetch dynamically imported module/i,/error loading dynamically imported module/i,/importing a module script failed/i,/loading (?:css )?chunk [^ ]+ failed/i];function Kb(e,n=0){if(!(!(e instanceof Error)||n>4))return e.name==="ChunkLoadError"||e.code==="CSS_CHUNK_LOAD_FAILED"||c4.some(a=>a.test(e.message))?e:Kb(e.cause,n+1)}function u4(){return m.jsxs("div",{className:"lazy-spinner",role:"alert",children:[m.jsx("p",{children:"This view could not be opened. Reload the page to try again."}),m.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Reload page"})]})}function Ja(e,n){function a(s){return m.jsx(u4,{})}const r=mn.lazy(async()=>{try{return{default:await e()}}catch(s){const u=Kb(s);if(!u)throw s;return console.error("Failed to load a lazy view chunk.",u),{default:a}}});function o(s){const u=typeof n=="function"?n(s):n;return m.jsx(S.Suspense,{fallback:m.jsxs("div",{className:"lazy-spinner",children:["Loading ",u,"..."]}),children:m.jsx(r,{...s})})}return o}const Qb="__dkg_401_reloaded";function d4(){try{return window.sessionStorage.getItem(Qb)==="1"}catch{return!0}}function f4(){try{return window.sessionStorage.setItem(Qb,"1"),!0}catch{return!1}}function ep(e,n=[],a=0){const[r,o]=S.useState(null),[s,u]=S.useState(!0),[d,p]=S.useState(null),f=S.useRef(!0),y=S.useCallback(async()=>{try{const g=await e();f.current&&(o(g),p(null))}catch(g){if(f.current){if((g==null?void 0:g.status)===401){const x=dr()!==void 0;if(x&&KE()&&!d4()&&f4()){window.location.reload();return}p(x?"Authentication expired — please refresh the page.":"API token required — enter it at the top of the page.");return}p(g.message)}}finally{f.current&&u(!1)}},n);return S.useEffect(()=>{f.current=!0,u(!0),y();let g=null;const x=()=>{a<=0||g||(g=setInterval(y,a))},b=()=>{g&&(clearInterval(g),g=null)},k=()=>{typeof document>"u"||(document.hidden?b():(y(),x()))};return(typeof document>"u"||!document.hidden)&&x(),typeof document<"u"&&document.addEventListener("visibilitychange",k),()=>{f.current=!1,b(),typeof document<"u"&&document.removeEventListener("visibilitychange",k)}},[y,a]),{data:r,loading:s,error:d,refresh:y}}function l9(e){return e==null?"—":e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:e<1073741824?`${(e/1048576).toFixed(1)} MB`:`${(e/1073741824).toFixed(2)} GB`}function n1(e){if(e==null)return"—";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;if(e<36e5)return`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`;const n=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4);return`${n}h ${a}m`}function p4(e,n=new Date){if(e==null||e==="")return"—";const a=e instanceof Date?e:new Date(e);if(Number.isNaN(a.getTime()))return"—";if(a.toDateString()===n.toDateString())return a.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"});const r=new Date(n);if(r.setDate(n.getDate()-1),a.toDateString()===r.toDateString())return`Yesterday ${a.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`;const o=n.getTime()-a.getTime();return o>=0&&o<10080*60*1e3?`${a.toLocaleDateString(void 0,{weekday:"short"})} ${a.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}`:a.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function a1(e,n=8){return e?e.length<=n*2?e:e.slice(0,n)+"..."+e.slice(-4):"—"}function h4(){const e=ca(g=>g.contextGraphs),n=ca(g=>g.setContextGraphs),{hidden:a}=Yb(),[r,o]=S.useState(null),[s,u]=S.useState(!0),[d,p]=S.useState(()=>e.length===0),f=S.useCallback(()=>{Bn.fetchContextGraphs().then(({contextGraphs:g})=>n(g??[])).catch(()=>{}).finally(()=>p(!1))},[n]);return S.useEffect(()=>{f();const g=setInterval(f,6e4);return()=>clearInterval(g)},[f]),hl(S.useCallback(g=>{g.type!=="join_approved"&&g.type!=="join_rejected"&&g.type!=="project_synced"||f()},[f])),S.useEffect(()=>{let g=!0;return u(!0),Bn.fetchCurrentAgent().then(x=>{g&&o(Uh(x))}).catch(()=>{}).finally(()=>{g&&u(!1)}),()=>{g=!1}},[e]),{myCgs:S.useMemo(()=>e.filter(g=>!a.has(g.id)).filter(g=>su(g,r)),[e,a,r]),identity:r,identityLoading:s,cgsLoading:d}}const Xb=["http://schema.org/name","http://www.w3.org/2000/01/rdf-schema#label","http://purl.org/dc/terms/title","http://purl.org/dc/elements/1.1/title","http://xmlns.com/foaf/0.1/name"];function m4(e={}){const n={predicates:[...e.extraPredicates??[],...Xb]};return e.minZoomForLabels!==void 0&&(n.minZoomForLabels=e.minZoomForLabels),n}function Zb(e){if(!e)return"";const n=e.match(/^"([\s\S]*)"(?:\^\^<[^>]+>)?(?:@[A-Za-z0-9-]+)?$/);if(!n)return e;try{return JSON.parse(`"${n[1]}"`)}catch{return n[1]}}const i1="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",g4="http://dkg.io/ontology/profile/QueryCatalog";function mc(e){if(e!=null)return typeof e=="string"?e:typeof e=="object"&&"value"in e?String(e.value):String(e)}function Tc(e){const n=Qt(e);return!n||n.startsWith('"')||/\s/.test(n)?!1:n.startsWith("_:")?!0:/^[A-Za-z][A-Za-z0-9+.-]*:/.test(n)}function Qt(e){const n=e.trim();return n.startsWith('"')?n:n.startsWith("<")&&n.endsWith(">")?n.slice(1,-1):n}function il(e){if(!e)return"—";if(e.startsWith('"'))return Zb(e);const n=e.lastIndexOf("#"),a=e.lastIndexOf("/"),r=Math.max(n,a);return r>=0?e.slice(r+1):e}function y4(e){const n=e.lastIndexOf("#"),a=e.lastIndexOf("/"),r=e.lastIndexOf(":"),o=Math.max(n,a,r),s=o>=0?e.slice(o+1):e;try{return decodeURIComponent(s)}catch{return s}}function v4(e){const n=y4(e).trim();return n?(/^[0-9a-f-]{16,}$/i.test(n)?n.replace(/-/g,"").slice(0,12):n).replace(/[_-]+/g," ").trim():""}function x4(e,n){return e===n&&/^urn:dkg:extraction:[^\s]+$/i.test(n)}function b4(e,n){return e===n&&Tc(n)}function w4(e){const n=v4(e.uri),a=e.types.map(il).find(r=>r&&r!=="Thing"&&r!=="Entity");return/^urn:dkg:extraction:[^\s]+$/i.test(e.uri)?n?`Extraction ${n}`:"Extraction":a?n&&n!==a?`${a} ${n}`:a:n||il(e.uri)}function S4(e){for(const a of Xb){const r=e.properties.get(a),o=r==null?void 0:r.find(s=>s.trim().length>0);if(o)return o}const n=il(e.uri);return e.label&&(e.label!==n||!b4(e.label,e.uri))&&!x4(e.label,e.uri)?e.label:w4(e)}const Jb=5e4,jo=2e4,ew=2e4;function r1(e,n){const a=`did:dkg:context-graph:${e}`,r=n==="wm"?`(
|
|
1084
|
-
STRSTARTS(STR(?g), "${a}/meta/assertion/") ||
|
|
1085
|
-
STRSTARTS(STR(?g), "${a}/meta/_working_memory/")
|
|
1086
|
-
)`:`STRSTARTS(STR(?g), "${a}/meta/_shared_memory/")`;return`SELECT ?s ?p ?o ?g WHERE {
|
|
1087
|
-
GRAPH ?g {
|
|
1088
|
-
?catalog a <${g4}> .
|
|
1089
|
-
?s ?p ?o
|
|
1090
|
-
}
|
|
1091
|
-
FILTER(${r})
|
|
1092
|
-
} LIMIT ${jo}`}function k4(e){const n=`did:dkg:context-graph:${e}`;return`SELECT ?s ?p ?o ?g WHERE {
|
|
1093
|
-
GRAPH ?g { ?s ?p ?o }
|
|
1094
|
-
FILTER(
|
|
1095
|
-
STRSTARTS(STR(?g), "${n}/") &&
|
|
1096
|
-
(CONTAINS(STR(?g), "/assertion/") || CONTAINS(STR(?g), "/_working_memory/")) &&
|
|
1097
|
-
STR(?g) != "${n}/meta" &&
|
|
1098
|
-
!CONTAINS(STR(?g), "/meta/") &&
|
|
1099
|
-
!STRENDS(STR(?g), "/_meta")
|
|
1100
|
-
)
|
|
1101
|
-
} LIMIT ${Jb}`}function C4(e){const n=`did:dkg:context-graph:${e}`;return`SELECT ?s ?p ?o ?g WHERE {
|
|
1102
|
-
GRAPH ?g { ?s ?p ?o }
|
|
1103
|
-
FILTER(
|
|
1104
|
-
STRSTARTS(STR(?g), "${n}") &&
|
|
1105
|
-
(STRENDS(STR(?g), "/_shared_memory") || CONTAINS(STR(?g), "/_shared_memory/")) &&
|
|
1106
|
-
STR(?g) != "${n}/meta/_shared_memory" &&
|
|
1107
|
-
!CONTAINS(STR(?g), "/meta/") &&
|
|
1108
|
-
!CONTAINS(STR(?g), "/_shared_memory/staging/") &&
|
|
1109
|
-
?p != <http://dkg.io/ontology/workspaceOwner>
|
|
1110
|
-
)
|
|
1111
|
-
} LIMIT ${jo}`}function E4(e){const n=`did:dkg:context-graph:${e}`;return`SELECT ?s ?p ?o ?g WHERE {
|
|
1112
|
-
GRAPH ?g { ?s ?p ?o }
|
|
1113
|
-
FILTER(
|
|
1114
|
-
STRSTARTS(STR(?g), "${n}") &&
|
|
1115
|
-
!CONTAINS(STR(?g), "/assertion/") &&
|
|
1116
|
-
!CONTAINS(STR(?g), "/_working_memory") &&
|
|
1117
|
-
!CONTAINS(STR(?g), "/_shared_memory") &&
|
|
1118
|
-
!CONTAINS(STR(?g), "_verifiable_memory_meta") &&
|
|
1119
|
-
!STRENDS(STR(?g), "/_meta") &&
|
|
1120
|
-
STR(?g) != "${n}/meta" &&
|
|
1121
|
-
!CONTAINS(STR(?g), "/meta/") &&
|
|
1122
|
-
!CONTAINS(STR(?g), "/_private") &&
|
|
1123
|
-
!CONTAINS(STR(?g), "/_rules")
|
|
1124
|
-
)
|
|
1125
|
-
} LIMIT ${ew}`}function A4(e,n){const a=`did:dkg:context-graph:${n}/`;if(!e.startsWith(a))return;const r=e.slice(a.length),o=r.indexOf("/"),s=o>=0?r.slice(0,o):r;if(!(!s||s.startsWith("_")||s==="assertion"||s==="meta"))return s}const l1={wm:"loading",swm:"loading",vm:"loading"},j4={wm:"error",swm:"error",vm:"error"};async function ho(e,n,a){var r,o;try{const{layerLimit:s,...u}=a??{},d={sparql:e,contextGraphId:n,...u},p=await Pc(d),f=((r=p==null?void 0:p.result)==null?void 0:r.bindings)??((o=p==null?void 0:p.results)==null?void 0:o.bindings)??[],y=typeof s=="number"&&f.length>=s;return{triples:f.map(x=>{const b=mc(x.g);return{subject:mc(x.s)??"",predicate:mc(x.p)??"",object:mc(x.o)??"",subGraph:b?A4(b,n):void 0}}).filter(x=>x.subject&&x.predicate&&x.object),ok:!0,truncated:y}}catch{return{triples:[],ok:!1,truncated:!1}}}function T4(e){var p;const n=new Map,a=new Map,r=new Map,o=new Map,s=new Map;function u(f,y,g){let x=o.get(f);x||(x=new Map,o.set(f,x));let b=x.get(y);if(b||(b=new Set,x.set(y,b)),b.has(g))return!1;b.add(g);let k=s.get(f);return k||(k={working:0,shared:0,verified:0},s.set(f,k)),k[y]++,!0}function d(f){const y=Qt(f);let g=n.get(y);return g||(g={uri:y,label:il(y),types:[],trustLevel:"working",layers:new Set,subGraphs:new Set,properties:new Map,connections:[],tripleCount:0},n.set(y,g)),g}for(const f of e){const y=d(f.subject);if(y.layers.add(f.layer),f.subGraph&&y.subGraphs.add(f.subGraph),f.predicate===i1){const g=Qt(f.object);y.types.includes(g)||y.types.push(g)}else if(Tc(f.object)){const g=Qt(f.object),x=d(g);x.layers.add(f.layer),f.subGraph&&x.subGraphs.add(f.subGraph);const b=a.get(y.uri)??new Set,k=`${f.predicate}\0${g}`;b.has(k)||(b.add(k),a.set(y.uri,b),y.connections.push({predicate:f.predicate,targetUri:g,targetLabel:il(g)}))}else{const g=r.get(y.uri)??new Set,x=`${f.predicate}\0${f.object}`;if(!g.has(x)){g.add(x),r.set(y.uri,g);const b=y.properties.get(f.predicate)??[];b.push(Zb(f.object)),y.properties.set(f.predicate,b)}}}for(const f of n.values())f.label=S4(f),f.layers.has("verified")?f.trustLevel="verified":f.layers.has("shared")?f.trustLevel="shared":f.trustLevel="working";for(const f of e){const y=Qt(f.subject),g=n.get(y);if(g&&g.trustLevel!==f.layer)continue;const x=Tc(f.object)?Qt(f.object):f.object,b=Tc(f.object);if(b){const C=n.get(x);if(C&&C.trustLevel!==f.layer)continue}const k=`${y}\0${f.predicate}\0${x}`;if(g&&u(g.uri,f.layer,k),f.predicate===i1){if(x!==y){const C=n.get(x);C&&u(C.uri,f.layer,k)}}else if(b&&x!==y){const C=n.get(x);C&&u(C.uri,f.layer,k)}}for(const f of n.values()){const y=s.get(f.uri);f.tripleCount=y?y[f.trustLevel]:0}for(const f of n.values())for(const y of f.connections)y.targetLabel=((p=n.get(y.targetUri))==null?void 0:p.label)??il(y.targetUri);return n}const N4=T4;function R4(e){return e.types.length>0||e.properties.size>0||e.connections.length>0}function _4(e,n){const a=(n==null?void 0:n.signalErrors)??!1,r=(n==null?void 0:n.includeQueryCatalog)??!1,[o,s]=S.useState([]),[u,d]=S.useState(!0),[p,f]=S.useState(null),[y,g]=S.useState(!1),[x,b]=S.useState(l1),k=S.useRef(0),C=S.useCallback(async()=>{if(!e)return;const U=++k.current;d(!0),f(null),g(!1),b(l1);try{const O={includeContextGraphPartitions:!0},W={triples:[],ok:!0,truncated:!1},[P,M,T,G,Y]=await Promise.all([ho(k4(e),e,{...O,layerLimit:Jb}),ho(C4(e),e,{...O,layerLimit:jo}),ho(E4(e),e,{...O,layerLimit:ew}),r?ho(r1(e,"wm"),e,{...O,layerLimit:jo}):Promise.resolve(W),r?ho(r1(e,"swm"),e,{...O,layerLimit:jo}):Promise.resolve(W)]);if(U!==k.current)return;const ie=[...P.triples.map(V=>({...V,layer:"working"})),...G.triples.map(V=>({...V,layer:"working"})),...M.triples.map(V=>({...V,layer:"shared"})),...Y.triples.map(V=>({...V,layer:"shared"})),...T.triples.map(V=>({...V,layer:"verified"}))],B=P.ok&&G.ok,Q=M.ok&&Y.ok;s(ie),b({wm:B?"ok":"error",swm:Q?"ok":"error",vm:T.ok?"ok":"error"});const H=[{ok:B,truncated:P.truncated||G.truncated},{ok:Q,truncated:M.truncated||Y.truncated},T],ee=H.filter(V=>!V.ok).length,ne=H.some(V=>V.truncated);g(ee>0&&ee<3||ne),f(a&&ee===3?"Failed to load memory data":null)}catch(O){U===k.current&&(f(O.message??"Failed to load memory data"),b(j4))}finally{U===k.current&&d(!1)}},[e,r,a]);ET(e,C),S.useEffect(()=>{C()},[C]);const j=S.useMemo(()=>N4(o),[o]),E=S.useMemo(()=>[...j.values()].filter(R4).sort((U,O)=>{const W={verified:0,shared:1,working:2},P=W[U.trustLevel]-W[O.trustLevel];if(P!==0)return P;const M=U.tripleCount??0,T=O.tripleCount??0;return T!==M?T-M:U.label.localeCompare(O.label)}),[j]),_=S.useMemo(()=>{const U=new Set;return o.filter(O=>{const W=`${O.subject}|${O.predicate}|${O.object}`;return U.has(W)?!1:(U.add(W),!0)}).map(({subject:O,predicate:W,object:P,subGraph:M})=>({subject:O,predicate:W,object:P,subGraph:M}))},[o]),R=S.useMemo(()=>{const U=new Map;for(const[O,W]of j)U.set(O,W.trustLevel);return U},[j]),F=S.useMemo(()=>{let U=0,O=0,W=0;for(const P of E)P.trustLevel==="verified"?W++:P.trustLevel==="shared"?O++:U++;return{wm:U,swm:O,vm:W,total:E.length}},[E]);return{entities:j,entityList:E,allTriples:o,graphTriples:_,trustMap:R,counts:F,loading:u,error:p,partial:y,layerStatus:x,refresh:C}}const qo="http://dkg.io/viz/",tw=`${qo}OnChainAnchor`,nw=`${qo}AgentIdentity`,aw=`${qo}anchoredIn`,iw=`${qo}signedBy`,rw=`${qo}consensus`,o1="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",s1="http://schema.org/name",c1="http://schema.org/description";function mo(e){if(e!=null)return typeof e=="string"?e.startsWith('"')?e.replace(/^"/,"").replace(/"(\^\^<[^>]*>)?$/,""):e:typeof e=="object"&&e!==null&&"value"in e?String(e.value):String(e)}function O4(e){const n=e.opId.slice(0,10);try{const r=new Date(e.publishedAt).toISOString().slice(11,16);return`anchor ${n} · ${r}UTC`}catch{return`anchor ${n}`}}function D4(e){if(e.startsWith("did:dkg:agent:")){const n=e.slice(14);return n.startsWith("0x")?n.slice(0,6)+"…"+n.slice(-4):n.slice(0,6)+"…"+n.slice(-6)}return e.length>18?e.slice(0,8)+"…"+e.slice(-6):e}function M4(e){return`PREFIX dkg: <http://dkg.io/ontology/>
|
|
1126
|
-
PREFIX prov: <http://www.w3.org/ns/prov#>
|
|
1127
|
-
SELECT ?op ?root ?agent ?publishedAt ?g WHERE {
|
|
1128
|
-
GRAPH ?g {
|
|
1129
|
-
?op a dkg:WorkspaceOperation ;
|
|
1130
|
-
dkg:rootEntity ?root ;
|
|
1131
|
-
dkg:publishedAt ?publishedAt ;
|
|
1132
|
-
prov:wasAttributedTo ?agent .
|
|
1133
|
-
}
|
|
1134
|
-
FILTER(
|
|
1135
|
-
STRSTARTS(STR(?g), "${`did:dkg:context-graph:${e}/`}") &&
|
|
1136
|
-
CONTAINS(STR(?g), "_shared_memory_meta")
|
|
1137
|
-
)
|
|
1138
|
-
} ORDER BY ?publishedAt LIMIT 2000`}function L4(e,n){const a=`did:dkg:context-graph:${n}/`;if(!e.startsWith(a))return;const r=e.slice(a.length),o=r.indexOf("/");if(o<0)return;const s=r.slice(0,o);if(!(!s||s.startsWith("_")))return s}function z4(e){const n=e.lastIndexOf(":");return n>=0?e.slice(n+1):e}function I4(e,n){const a=[],r=new Set;for(const o of e){const s=n?o.roots.filter(d=>n.has(d)):o.roots;if(s.length===0)continue;const u=`urn:dkg:viz:anchor:${o.opId}`;a.push({subject:u,predicate:o1,object:tw,subGraph:o.subGraph}),a.push({subject:u,predicate:s1,object:`"${O4(o)}"`,subGraph:o.subGraph}),a.push({subject:u,predicate:c1,object:`"Published ${o.roots.length} KA${o.roots.length===1?"":"s"} · ${new Date(o.publishedAt).toISOString()}"`,subGraph:o.subGraph});for(const d of s)a.push({subject:d,predicate:aw,object:u,subGraph:o.subGraph}),a.push({subject:d,predicate:rw,object:`"${o.agents.length}-of-${o.agents.length}"`,subGraph:o.subGraph});for(const d of o.agents){const p=d.startsWith("did:")||d.startsWith("12D3")?d:`did:dkg:agent:${d}`,f=`urn:dkg:viz:agent:${encodeURIComponent(p)}`;a.push({subject:u,predicate:iw,object:f,subGraph:o.subGraph}),r.has(f)||(r.add(f),a.push({subject:f,predicate:o1,object:nw,subGraph:o.subGraph}),a.push({subject:f,predicate:s1,object:`"${D4(p)}"`,subGraph:o.subGraph}),a.push({subject:f,predicate:c1,object:`"${p}"`,subGraph:o.subGraph}))}}return a}function o9(e,n){const[a,r]=S.useState([]),[o,s]=S.useState(!1),[u,d]=S.useState(null),p=S.useRef(0);S.useEffect(()=>{if(!e){r([]),s(!1);return}const x=++p.current;s(!0),d(null),(async()=>{var b;try{const k=await fetch("/api/query",{method:"POST",headers:{"Content-Type":"application/json",...$t()},body:JSON.stringify({sparql:M4(e)})});if(!k.ok)throw new Error(`SPARQL query failed: ${k.status}`);const C=await k.json(),j=((b=C==null?void 0:C.result)==null?void 0:b.bindings)??[],E=new Map;for(const _ of j){const R=mo(_.op),F=mo(_.root),U=mo(_.agent),O=mo(_.publishedAt),W=mo(_.g);if(!R||!F||!U||!O)continue;let P=E.get(R);P||(P={opId:z4(R),opUri:R,agents:[],roots:[],publishedAt:O,subGraph:W?L4(W,e):void 0},E.set(R,P)),P.roots.includes(F)||P.roots.push(F),P.agents.includes(U)||P.agents.push(U)}if(x!==p.current)return;r([...E.values()].sort((_,R)=>R.publishedAt.localeCompare(_.publishedAt)))}catch(k){if(x!==p.current)return;d((k==null?void 0:k.message)??"Failed to load anchors"),r([])}finally{x===p.current&&s(!1)}})()},[e]);const f=S.useMemo(()=>{if(!n)return null;const x=[];if(n instanceof Set)for(const b of n)x.push(b);else for(const b of n)x.push(b);return x.sort(),x.join("|")},[n]),y=S.useMemo(()=>f==null?null:new Set(f.length===0?[]:f.split("|")),[f]),g=S.useMemo(()=>I4(a,y),[a,y]);return{anchors:a,decorationTriples:g,loading:o,error:u}}function s9(e){return e.activeSubGraph?!1:e.activeLayer==="swm"}const c9={verified:"#22c55e",shared:"#f59e0b",working:"#64748b"},Zr={Person:{icon:"👤",group:"People"},SoftwareApplication:{icon:"💻",group:"Software"},SoftwareSourceCode:{icon:"📦",group:"Code"},Organization:{icon:"🏢",group:"Organizations"},Event:{icon:"📅",group:"Events"},ChooseAction:{icon:"⚡",group:"Decisions"},DefinedTerm:{icon:"📘",group:"Concepts"},CreativeWork:{icon:"📄",group:"Documents"},Product:{icon:"🪙",group:"Products"},ConversationTurn:{icon:"💬",group:"Conversations"},Thing:{icon:"◆",group:"Other"},Package:{icon:"📦",group:"Packages"},File:{icon:"📄",group:"Files"},Class:{icon:"🔷",group:"Classes"},Interface:{icon:"🔶",group:"Interfaces"},Function:{icon:"ƒ",group:"Functions"},TypeAlias:{icon:"🏷️",group:"Types"},Enum:{icon:"🔢",group:"Enums"},ExternalModule:{icon:"🌐",group:"External Modules"}},P4="http://www.w3.org/ns/prov#wasAttributedTo",ml="http://dkg.io/ontology/agent/",U4=ml+"createdBy",B4=ml+"promotedBy",H4=ml+"publishedBy",$4=ml+"createdAt",q4=ml+"promotedAt",F4=ml+"publishedAt";function G4(e){for(const n of e.connections)if(n.predicate===P4)return n.targetUri;return null}function u9(e,n){const a=n==="created"?U4:n==="promoted"?B4:H4;for(const r of e.connections)if(r.predicate===a)return r.targetUri;return G4(e)}function d9(e,n){const a=n==="created"?$4:n==="promoted"?q4:F4,r=e.properties.get(a);return(r==null?void 0:r[0])??null}function u1(e){const n=e.lastIndexOf("#"),a=e.lastIndexOf("/"),r=Math.max(n,a);return r>=0?e.slice(r+1):e}function f9(e){const n=e.lastIndexOf("#"),a=e.lastIndexOf("/"),r=Math.max(n,a);return(r>=0?e.slice(r+1):e).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ")}function p9(e,n){var o,s;if(n)for(const u of e.types){const d=n.forType(u),p=u1(u),f=d.label??p;if(d.icon||d.color||d.label)return{icon:d.icon??((o=Zr[p])==null?void 0:o.icon)??Zr.Thing.icon,group:d.label??((s=Zr[p])==null?void 0:s.group)??Zr.Thing.group,color:d.color,type:f}}const a=e.types[0]?u1(e.types[0]):"Entity";return{...Zr[a]??Zr.Thing,type:a}}const lw={wm:{icon:"◇",color:"#64748b",title:"Working Memory",desc:"Private agent scratchpad — ephemeral, fast local storage",trustLabel:"Working",trustLevel:"working"},swm:{icon:"◈",color:"#f59e0b",title:"Shared Working Memory",desc:"Team workspace — shared proposals, TTL-bounded",trustLabel:"Shared",trustLevel:"shared"},vm:{icon:"◉",color:"#22c55e",title:"Verifiable Memory",desc:"Endorsed, published, on-chain knowledge",trustLabel:"Verifiable",trustLevel:"verified"}};function h9(e,n=2){const a=e==="working"?"wm":e==="shared"?"swm":e==="verified"?"vm":e,r=n!==1;return a==="vm"?r?"Knowledge Assets":"Knowledge Asset":r?"Entities":"Entity"}const jn="http://dkg.io/ontology/code/",V4={[jn+"Package"]:"#a855f7",[jn+"File"]:"#3b82f6",[jn+"Class"]:"#22c55e",[jn+"Interface"]:"#06b6d4",[jn+"Function"]:"#f59e0b",[jn+"TypeAlias"]:"#ec4899",[jn+"Enum"]:"#ef4444",[jn+"ExternalModule"]:"#64748b",[tw]:"#f5a524",[nw]:"#c084fc"},W4={[jn+"imports"]:"#60a5fa",[jn+"contains"]:"#a855f7",[jn+"definedIn"]:"#3b82f6",[jn+"exports"]:"#f59e0b",[jn+"extends"]:"#22c55e",[jn+"implements"]:"#06b6d4",[aw]:"#f5a524",[iw]:"#c084fc",[rw]:"#22c55e"};function Y4(e){return{"https://schema.org/":e,"http://www.w3.org/ns/prov#":e,"http://xmlns.com/foaf/0.1/":e,"http://purl.org/dc/terms/":e}}function m9(e,n){const{color:a}=lw[e],r=e==="vm";return{labelMode:"humanized",renderer:"2d",labels:m4({minZoomForLabels:r?.2:.3}),style:{classColors:V4,predicateColors:W4,namespaceColors:Y4(a),...n&&Object.keys(n).length>0?{nodeColors:n}:{},defaultNodeColor:a,defaultEdgeColor:r?"#4ade80":"#64748b",edgeWidth:r?1.8:1.2,fontSize:r?12:11,gradient:!0,gradientIntensity:r?.65:.4},hexagon:{baseSize:r?13:11,minSize:r?8:7,maxSize:r?42:28,scaleWithDegree:!0},focus:{maxNodes:3e3,hops:999}}}function g9(e){const n=["http://schema.org/description","http://schema.org/text"];for(const a of n){const r=e.properties.get(a);if(r!=null&&r[0])return r[0]}return null}function y9(e,n,a=2){const r=d=>Qt(d.subject),o=d=>Qt(d.object),s=new Set([e]);let u=new Set([e]);for(let d=0;d<a;d++){const p=new Set;for(const f of n){const y=r(f),g=o(f);u.has(y)&&!s.has(g)&&p.add(g),u.has(g)&&!s.has(y)&&p.add(y)}for(const f of p)s.add(f);if(u=p,u.size===0)break}return n.filter(d=>s.has(r(d))&&s.has(o(d)))}function v9(e,n){const a=n.lastIndexOf("/"),r=n.lastIndexOf("#"),o=n.lastIndexOf(":"),s=Math.max(a,r,o),u=s>=0?n.slice(s+1):n,d=(()=>{try{return decodeURIComponent(u)}catch{return u}})();if(/^urn:dkg:extraction:[^\s]+$/i.test(n)){const p=d.replace(/-/g,"").replace(/_+/g," ").slice(0,12).trim();return p?`Extraction ${p}`:"Extraction"}return d||n}function Bh(e){const n=e.trim();return!n||n.startsWith('"')?!1:n.startsWith("_:")||n.startsWith("<")&&n.endsWith(">")?!0:/\s/.test(n)?!1:/^[A-Za-z][A-Za-z0-9+.-]*:/.test(n)}function x9(e,n){return!n.isRoot&&e.subGraph===n.slug?!0:e.subGraph?!1:n.scopedUris.has(e.subject)?!0:n.requireResourceObject?Bh(e.object)&&n.scopedUris.has(e.object):n.scopedUris.has(e.object)}function ow(e,n){const a=n.get(Qt(e.subject));return a!==void 0&&a.trustLevel!==e.layer}function sw(e,n){if(!Bh(e.object))return!1;const a=n.get(Qt(e.object));return a!==void 0&&a.trustLevel!==e.layer}function cw(e,n){return ow(e,n)||sw(e,n)}function uw(e,n){return ow(e,n)&&sw(e,n)}function K4(e,n){const a=new Set,r=[];for(const o of e){if(uw(o,n))continue;const s=`${Qt(o.subject)}|${o.predicate}|${Qt(o.object)}`;a.has(s)||(a.add(s),r.push(o))}return r}function b9(e){return S.useMemo(()=>{const n=K4(e.allTriples,e.entities);return{triples:n,total:n.length}},[e.allTriples,e.entities])}function Q4(e){return S.useMemo(()=>{const n=new Set,a=new Set,r=new Set,o=new Set;let s=0,u=0,d=0,p=0;for(const f of e.allTriples){const y=`${Qt(f.subject)}|${f.predicate}|${Qt(f.object)}`;!uw(f,e.entities)&&!o.has(y)&&(o.add(y),p++),cw(f,e.entities)||(f.layer==="working"&&!n.has(y)?(n.add(y),s++):f.layer==="shared"&&!a.has(y)?(a.add(y),u++):f.layer==="verified"&&!r.has(y)&&(r.add(y),d++))}return{wm:s,swm:u,vm:d,canonical:p}},[e.allTriples,e.entities])}function w9(e,n){const a=lw[n].trustLevel;return S.useMemo(()=>{const r=new Set,o=[];for(const s of e.allTriples){if(s.layer!==a||cw(s,e.entities))continue;const u=`${Qt(s.subject)}|${s.predicate}|${Qt(s.object)}`;r.has(u)||(r.add(u),o.push(s))}return o},[e.allTriples,e.entities,a])}const X4="http://www.w3.org/1999/02/22-rdf-syntax-ns#type";function Z4(e){const n=e.trim();return(n.startsWith("<")&&n.endsWith(">")?n.slice(1,-1):n)===X4}function S9(e,n,a){const r=[],o=a==null?void 0:a.focalSubjects;for(const s of e){const u=Qt(s.subject);!n.has(u)&&!(o!=null&&o.has(u))||Bh(s.object)&&!Z4(s.predicate)&&!n.has(Qt(s.object))||r.push(s)}return r}const k9="http://dkg.io/ontology/sourceContentType",C9="http://dkg.io/ontology/markdownForm",E9="http://dkg.io/ontology/sourceFile",A9="http://dkg.io/ontology/size";function j9(e){const n=e.replace(/^"|"$/g,"").replace(/^"(.+)"(?:@\w+|\^\^.+)?$/,"$1"),a=new Date(n);return Number.isFinite(a.getTime())?a.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):n}function T9(e){const[n,a]=e.split("-"),r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],o=Math.max(0,Math.min(11,parseInt(a,10)-1));return`${r[o]} ${n}`}function N9(e,n){const a=e.properties.get(n),r=a==null?void 0:a[0];if(!r)return null;const o=r.replace(/^"|"$/g,"").replace(/^"(.+)"(?:@\w+|\^\^.+)?$/,"$1"),s=Date.parse(o);return Number.isNaN(s)?null:s}function R9(e){const n=Date.now()-e;if(n<0)return"just now";const a=Math.floor(n/1e3);if(a<45)return"just now";const r=Math.floor(a/60);if(r<60)return`${r}m ago`;const o=Math.floor(r/60);if(o<24)return`${o}h ago`;const s=Math.floor(o/24);return s<30?`${s}d ago`:new Date(e).toISOString().slice(0,10)}function J4(e,n=6){if(e==null||e==="")return"—";const a=typeof e=="number"?e:parseFloat(String(e));if(!Number.isFinite(a))return"—";if(a===0)return"0";const o=a.toFixed(n).replace(/\.?0+$/,"");return a>0&&Number(o)===0?`< ${1/Math.pow(10,n)}`:o}function e3(e){if(!(e==null||e===""))return`Exact balance: ${e} (full precision from chain)`}function t3(e){if(e==null)return"—";const n=e/100;return`${n%1===0?n.toFixed(0):n.toFixed(1)}%`}function n3(){Bb();const e=bh(s=>{var u;return(u=s.nodeStatus)==null?void 0:u.nodeRole}),n=gn(s=>s.openTab),{covered:a,bestCoveringDiscountBps:r,walletsInconclusive:o}=Ub();return m.jsxs("div",{className:"v10-ws-pca",children:[m.jsx("span",{className:"v10-ws-pca-label",children:"Publishing discount"}),m.jsx("span",{className:"v10-ws-pca-value","data-covered":a,children:o?"Couldn’t verify your wallets — retry":a?`${t3(r)} discount`:"None — publishing at the direct cost"}),m.jsxs("button",{type:"button",className:"v10-ws-pca-cta",onClick:()=>n({id:"conviction",label:"Publisher Conviction",closable:!0}),children:[e==="edge"?"Get added to a PCA":"Set up PCA"," ->"]})]})}const a3="Context graphs you created or joined — scoped knowledge domains with configurable access (private, curated and peer-shared, or public) where agents build and collaborate on shared context with verifiable provenance.",qp=[{key:"wm",label:"Working Memory",short:"WM",color:"var(--layer-working)",desc:"Private agent drafts — free, self-attested, persists locally."},{key:"swm",label:"Shared Working Memory",short:"SWM",color:"var(--layer-shared)",desc:"Team proposals — free, gossip-replicated across context-graph peers."},{key:"vm",label:"Verifiable Memory",short:"VM",color:"var(--layer-verified)",desc:"On-chain knowledge — permanent, verifiable, requires TRAC to publish."}],gc={1:"Ethereum",8453:"Base",84532:"Base Sepolia",100:"Gnosis",10200:"Chiado",2043:"NeuroWeb",20430:"NeuroWeb Testnet"};function tp(e){var o;const n=$b(e);if(e==null)return{name:"Unknown chain",gas:n};const a=String(e);if(gc[a])return{name:gc[a],gas:n};const r=(o=a.match(/(\d+)\s*$/))==null?void 0:o[1];return r&&gc[r]?{name:gc[r],gas:n}:{name:r?`Chain ${r}`:`Chain ${a}`,gas:n}}function go(e){return e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}k`.replace(".0",""):`${(e/1e6).toFixed(1)}M`.replace(".0","")}function np({label:e,value:n,sub:a,accentColor:r,children:o,icon:s,className:u}){return m.jsxs("div",{className:`stat-card v10-anim-mount${u?` ${u}`:""}`,children:[r&&m.jsx("div",{className:"accent",style:{background:r}}),m.jsxs("div",{className:"stat-label",children:[s,e]}),n!=null&&n!==""&&m.jsx("div",{className:"stat-value",children:n}),o,a!=null&&a!==""&&m.jsx("div",{className:"stat-sub",children:a})]})}function d1({counts:e}){const n=e.wm+e.swm+e.vm,a=qp.map(r=>`${r.short} ${e[r.key]}`).join(" · ");return m.jsx("div",{className:"v10-layerbar","aria-label":a,children:n===0?m.jsx("span",{className:"v10-layerbar-empty"}):qp.map(r=>{const o=e[r.key]/n*100;return o<=0?null:m.jsx("span",{className:"v10-layerbar-seg",title:`${r.label} (${e[r.key]}) — ${r.desc}`,style:{width:`${o}%`,background:r.color}},r.key)})})}function i3(){return m.jsx("div",{className:"v10-layer-legend",children:qp.map(e=>m.jsxs("span",{className:"v10-layer-legend-item",title:`${e.label} — ${e.desc}`,children:[m.jsx("span",{className:"v10-layer-legend-dot",style:{background:e.color}}),e.short]},e.key))})}function r3({curator:e,joined:n,refreshing:a}){const r=e+n,o=`Curator ${e} · Joined ${n}`,s="var(--accent-green)",u="var(--text-secondary)";return m.jsxs("div",{className:`v10-cg-rolesplit${a?" is-refreshing":""}`,title:a?"Refreshing — agent identity is being re-checked":void 0,"aria-busy":a||void 0,children:[m.jsx("div",{className:"v10-layerbar","aria-label":o,children:r===0?m.jsx("span",{className:"v10-layerbar-empty"}):m.jsxs(m.Fragment,{children:[e>0&&m.jsx("span",{className:"v10-layerbar-seg",title:`Curator (${e}) — context graphs you created and curate`,style:{width:`${e/r*100}%`,background:s}}),n>0&&m.jsx("span",{className:"v10-layerbar-seg",title:`Joined (${n}) — context graphs you joined as a member`,style:{width:`${n/r*100}%`,background:u}})]})}),m.jsxs("div",{className:"v10-layer-legend",children:[m.jsxs("span",{className:"v10-layer-legend-item",title:"Curator — context graphs you created and curate",children:[m.jsx("span",{className:"v10-layer-legend-dot",style:{background:s}}),"Curator ",e]}),m.jsxs("span",{className:"v10-layer-legend-item",title:"Joined — context graphs you joined as a member",children:[m.jsx("span",{className:"v10-layer-legend-dot",style:{background:u}}),"Joined ",n]})]})]})}function l3({cg:e,identity:n,onReport:a,onOpen:r}){var W,P;const o=_4(e.id,{signalErrors:!0}),[s,u]=S.useState(null),[d,p]=S.useState(!1),f=s===null&&!d,y=S.useRef(!0),g=S.useRef(0),x=S.useCallback(()=>{const M=++g.current;Bn.listParticipants(e.id).then(T=>{y.current&&M===g.current&&(u((T.allowedAgents??[]).map(Mi)),p(!1))}).catch(()=>{y.current&&M===g.current&&(u(null),p(!0))})},[e.id]);S.useEffect(()=>{y.current=!0,u(null),p(!1),x();const M=setInterval(x,3e4);return()=>{y.current=!1,clearInterval(M)}},[x]),hl(S.useCallback(M=>{var G,Y;if(M.type!=="join_approved"&&M.type!=="join_rejected"&&M.type!=="project_synced")return;const T=((G=M.data)==null?void 0:G.contextGraphId)??((Y=M.data)==null?void 0:Y.projectId);T&&T!==e.id||x()},[e.id,x]));const b=Vc(e.accessPolicy)==="public",k=S.useMemo(()=>{var Y;if(b)return null;const M=(Y=e.curator)==null?void 0:Y.trim(),T=M?Mi(M):null;if(s===null)return d&&T?[T]:null;const G=new Set(s);return T&&G.add(T),[...G]},[s,d,e.curator,b]),C=Number.isFinite(e.assetCount??e.assets)?e.assetCount??e.assets:0,j=S.useMemo(()=>{if(o.error)return{wm:0,swm:0,vm:0,total:C};const M=new Set(o.allTriples.map(T=>T.subject)).size;return{wm:o.counts.wm,swm:o.counts.swm,vm:o.counts.vm,total:M}},[o.error,o.allTriples,o.counts.wm,o.counts.swm,o.counts.vm,C]),E=Q4(o),_=S.useMemo(()=>({wm:E.wm,swm:E.swm,vm:E.vm,total:E.canonical}),[E]),R=[o.loading?1:0,o.error?1:0,o.partial?1:0,f?1:0,d?1:0,b?1:0,j.wm,j.swm,j.vm,j.total,_.wm,_.swm,_.vm,_.total,k?k.slice().sort().join(","):"∅"].join("|");S.useEffect(()=>{a(e.id,{entities:j,triples:_,agents:k??[],sizeLoading:o.loading,sizeError:!!o.error||o.partial,sizeFallback:!!o.error,agentsLoading:f,agentsError:d,agentsUnknown:b,sig:R})},[e.id,R]);const F=Vc(e.accessPolicy),U=F==="private"?"Curated":F==="public"?"Public":"Unknown",O=!!((W=e.curator)!=null&&W.trim()&&((P=n==null?void 0:n.agentDid)!=null&&P.trim())&&Mi(e.curator)===Mi(n.agentDid));return m.jsxs("button",{className:"v10-cg-row",onClick:()=>r(e),children:[m.jsx("span",{className:"v10-cg-cell v10-cg-name",children:e.name||e.id.slice(0,16)}),m.jsx("span",{className:"v10-cg-cell v10-cg-type",title:`${U} context graph`,"aria-label":`${U} context graph`,children:F==="private"?m.jsx(bN,{size:13,"aria-hidden":"true"}):F==="public"?m.jsx(gN,{size:13,"aria-hidden":"true"}):m.jsx("span",{className:"v10-cg-dim",children:"—"})}),m.jsx("span",{className:"v10-cg-cell v10-cg-size",children:o.loading?m.jsx("span",{className:"v10-stat-loading",children:"loading…"}):o.error?m.jsxs("span",{title:"Live entity count unavailable — showing the published Knowledge-Asset summary, not the full WM/SWM/VM entity total",children:[go(j.total)," ",m.jsx("span",{className:"v10-cg-dim",children:"KA (summary)"})," · ",m.jsx("span",{className:"v10-cg-dim",children:"— triples"})]}):o.partial?m.jsxs("span",{title:"Partial — one or more memory layers were unavailable; counts are a lower bound",children:["~",go(j.total)," ",m.jsx("span",{className:"v10-cg-dim",children:"entities"})," · ~",go(_.total)," ",m.jsx("span",{className:"v10-cg-dim",children:"triples"})]}):m.jsxs(m.Fragment,{children:[go(j.total)," ",m.jsx("span",{className:"v10-cg-dim",children:"entities"})," · ",go(_.total)," ",m.jsx("span",{className:"v10-cg-dim",children:"triples"})]})}),m.jsx("span",{className:"v10-cg-cell v10-cg-agents",children:k===null?m.jsx("span",{className:"v10-cg-dim",children:"—"}):d?m.jsxs("span",{title:"Participant list unavailable — curator-only lower bound",children:["~",k.length]}):k.length}),m.jsx("span",{className:"v10-cg-cell v10-cg-role",children:m.jsx("span",{className:`v10-cg-badge v10-cg-badge-${O?"curator":"joined"}`,children:O?"CURATOR":"JOINED"})})]})}const f1={wm:0,swm:0,vm:0,total:0};function o3(){var O,W;const{data:e}=ep(Bn.fetchStatus,[],1e4),{data:n}=ep(Bn.fetchEconomics,[],6e4),{data:a,loading:r,error:o}=ep(Bn.fetchWalletsBalances,[],3e4),{openTab:s}=gn(),{setActiveProject:u}=ca(),{myCgs:d,identity:p,identityLoading:f,cgsLoading:y}=h4(),g=(f||y)&&d.length===0,[x,b]=S.useState({}),k=S.useCallback((P,M)=>{b(T=>{var G;return((G=T[P])==null?void 0:G.sig)===M.sig?T:{...T,[P]:M}})},[]);S.useEffect(()=>{const P=new Set(d.map(M=>M.id));b(M=>{const T=Object.keys(M);if(T.every(Y=>P.has(Y)))return M;const G={};for(const Y of T)P.has(Y)&&(G[Y]=M[Y]);return G})},[d]);const C=S.useMemo(()=>{const P={...f1},M={...f1},T=new Set;let G=!1,Y=!1,ie=!1,B=!1,Q=!1;for(const ee of d){const ne=x[ee.id];if(!ne){G=!0,Y=!0;continue}ne.sizeLoading&&(G=!0),ne.agentsLoading&&(Y=!0),ne.sizeError&&(ie=!0),ne.sizeFallback&&(Q=!0),(ne.agentsError||ne.agentsUnknown)&&(B=!0);for(const V of["wm","swm","vm","total"])P[V]+=ne.entities[V],M[V]+=ne.triples[V];for(const V of ne.agents)T.add(V)}const H=d.length>0;return{entities:P,triples:M,agentCount:T.size,sizeLoading:H&&G,agentsLoading:H&&Y,sizePartial:ie,agentsPartial:B,triplesUnknown:H&&ie&&M.total===0,sizeApprox:H&&Q,hasCgs:H}},[d,x]),j=S.useMemo(()=>{var G,Y;const P=(G=p==null?void 0:p.agentDid)!=null&&G.trim()?Mi(p.agentDid):null;let M=0,T=0;for(const ie of d)!!(P&&((Y=ie.curator)!=null&&Y.trim())&&Mi(ie.curator)===P)?M++:T++;return{curator:M,joined:T}},[d,p]),E=[{label:"24h",display:"Last 24h"},{label:"7d",display:"Last 7d"},{label:"30d",display:"Last 30d"}],_=P=>{if(P==null||typeof P=="string"&&P.trim()==="")return"—";const M=Number(P);return isFinite(M)?M.toLocaleString(void 0,{maximumFractionDigits:M>=1e3?0:2}):String(P)},R=E.map(P=>{var T;const M=(T=n==null?void 0:n.periods)==null?void 0:T.find(G=>G.label===P.label);return{display:P.display,publishes:M?String(M.publishCount):"—",trac:M?_(M.totalTrac):"—"}});a!=null&&a.symbol;const F=(a==null?void 0:a.balances)??[],U=P=>P.length>12?`${P.slice(0,6)}…${P.slice(-4)}`:P;return m.jsxs("div",{className:"v10-dashboard",children:[m.jsxs("div",{className:"v10-dash-header",children:[m.jsx("h1",{className:"v10-dash-title",children:"Dashboard"}),m.jsxs("p",{className:"v10-dash-subtitle",children:[(e==null?void 0:e.name)||"DKG Node"," · ",(e==null?void 0:e.networkName)||"network",(a==null?void 0:a.chainId)!=null?` · ${tp(a.chainId).name}`:""]})]}),m.jsxs("div",{className:"v10-dash-stats v10-dash-stats-3",children:[m.jsx(np,{label:"My Context Graphs",className:"v10-stat-tight",icon:m.jsx(I0,{size:13,"aria-hidden":!0}),value:g?m.jsx("span",{className:"v10-stat-loading",children:"loading…"}):d.length,accentColor:"var(--accent-blue)",sub:a3,children:C.hasCgs&&!g?m.jsx(r3,{curator:j.curator,joined:j.joined,refreshing:f}):null}),m.jsxs(np,{label:"Context Graph Size",icon:m.jsx(jN,{size:13,"aria-hidden":!0}),className:"v10-stat-tight",accentColor:"var(--accent-green)",children:[C.hasCgs?C.sizeLoading?m.jsx("div",{className:"v10-stat-loading",children:"loading…"}):m.jsxs("div",{className:"v10-cg-size-detail",children:[m.jsxs("div",{className:"v10-cg-size-metric",children:[m.jsxs("div",{className:"v10-cg-size-num",children:[m.jsxs("span",{className:"v10-cg-size-big",children:[C.sizeApprox&&!C.triplesUnknown?"~":"",C.entities.total.toLocaleString()]}),C.triplesUnknown?m.jsx("span",{className:"v10-cg-dim",title:"Live entity count unavailable — showing the published Knowledge-Asset summary (not the full WM/SWM/VM entity total)",children:"Knowledge Assets (summary)"}):C.sizeApprox?m.jsx("span",{className:"v10-cg-dim",title:"Some context graphs reported only their Knowledge-Asset summary — this total mixes summary and live counts and is approximate",children:"entities / KA · approx."}):m.jsx("span",{className:"v10-cg-dim",children:"entities / Knowledge Assets"})]}),C.triplesUnknown||C.sizeApprox?null:m.jsx(d1,{counts:C.entities})]}),m.jsxs("div",{className:"v10-cg-size-metric",children:[m.jsxs("div",{className:"v10-cg-size-num",children:[m.jsx("span",{className:"v10-cg-size-big",children:C.triplesUnknown?"—":`${C.sizeApprox?"~":""}${C.triples.total.toLocaleString()}`}),m.jsx("span",{className:"v10-cg-dim",children:"triples"})]}),C.triplesUnknown||C.sizeApprox?null:m.jsx(d1,{counts:C.triples})]}),m.jsx(i3,{})]}):m.jsx("div",{className:"v10-stat-empty",children:"—"}),m.jsx("div",{className:"stat-sub",children:C.hasCgs?C.sizePartial?"Some context graphs could not report size; total is partial.":"Totals across all your context graphs, summed over Working, Shared Working & Verifiable Memory. Knowledge Assets are entities that have been published to Verifiable Memory.":"No context graphs yet."})]}),m.jsx(np,{label:"Collaborating Agents",icon:m.jsx(_N,{size:13,"aria-hidden":!0}),value:C.hasCgs?C.agentsLoading?m.jsx("span",{className:"v10-stat-loading",children:"loading…"}):C.agentsPartial?`~${C.agentCount}`:C.agentCount:m.jsx("span",{className:"v10-stat-empty",children:"—"}),sub:C.hasCgs?C.agentsPartial?"Some context graphs could not report agents; count is partial.":"Unique agents — your own and others' — allow-listed and collaborating across your context graphs.":"No context graphs yet.",accentColor:"var(--purple)"})]}),m.jsxs("div",{className:"v10-dash-grid v10-dash-grid-2",children:[m.jsxs("div",{className:"v10-dash-section v10-dash-section-wide v10-anim-mount",children:[m.jsxs("div",{className:"v10-dash-section-header",children:[m.jsxs("div",{className:"v10-dash-section-title",children:[m.jsx(I0,{size:13,"aria-hidden":!0}),m.jsx("h3",{children:"My Context Graphs"})]}),m.jsx("span",{className:"v10-dash-section-badge",children:d.length})]}),g?m.jsx("p",{className:"v10-cg-empty",children:"Loading context graphs…"}):d.length===0?m.jsx("p",{className:"v10-cg-empty",children:"No context graphs yet — create or join one from the sidebar."}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"v10-cg-colhead",children:[m.jsx("span",{className:"v10-cg-cell v10-cg-name",children:"Name"}),m.jsx("span",{className:"v10-cg-cell v10-cg-type",children:"Type"}),m.jsx("span",{className:"v10-cg-cell v10-cg-size",children:"Size"}),m.jsx("span",{className:"v10-cg-cell v10-cg-agents",title:"Agents allow-listed with access to this context graph",children:"Agents"}),m.jsx("span",{className:"v10-cg-cell v10-cg-role",children:"Role"})]}),m.jsx("div",{className:"v10-cg-list",children:d.map(P=>m.jsx(l3,{cg:P,identity:p,onReport:k,onOpen:M=>{u(M.id),s({id:`project:${M.id}`,label:M.name||M.id.slice(0,12),closable:!0})}},P.id))})]})]}),m.jsxs("div",{className:"v10-dash-section v10-anim-mount",children:[m.jsx("div",{className:"v10-dash-section-header",children:m.jsxs("div",{className:"v10-dash-section-title",children:[m.jsx(DN,{size:13,"aria-hidden":!0}),m.jsx("h3",{children:"Wallets and Spending"})]})}),(a==null?void 0:a.chainId)!=null?m.jsxs("div",{className:"v10-ws-chain-row",children:[m.jsx("span",{className:"v10-ws-chain-label",children:"Chain"}),m.jsx("span",{className:"v10-ws-chain-value",children:tp(a.chainId).name})]}):null,m.jsx("div",{className:"v10-ws-subhead",children:"Node wallets"}),r&&!a?m.jsx("p",{className:"v10-cg-empty",children:"Loading wallets…"}):F.length>0?m.jsxs("div",{className:"v10-ws-wtable",children:[m.jsxs("div",{className:"v10-ws-wrow v10-ws-whead",children:[m.jsx("span",{children:"Wallet"}),m.jsx("span",{children:"TRAC"}),m.jsxs("span",{children:["Gas (",tp(a==null?void 0:a.chainId).gas,")"]})]}),F.map(P=>m.jsxs("div",{className:"v10-ws-wrow",children:[m.jsx("span",{className:"v10-ws-addr",title:P.address,children:U(P.address)}),m.jsx("span",{className:"v10-ws-bal",children:_(P.trac)}),m.jsx("span",{className:"v10-ws-bal-sec",title:e3(P.eth),children:J4(P.eth)})]},P.address))]}):(((O=a==null?void 0:a.wallets)==null?void 0:O.length)??0)>0?m.jsx("ul",{className:"v10-ws-wallets",children:((a==null?void 0:a.wallets)??[]).map(P=>m.jsxs("li",{className:"v10-ws-wallet",children:[m.jsx("span",{className:"v10-ws-addr",title:P,children:U(P)}),m.jsx("span",{className:"v10-cg-dim",children:"—"})]},P))}):a!=null&&a.error||o?m.jsx("p",{className:"v10-cg-empty",children:"Wallet balances unavailable."}):m.jsx("p",{className:"v10-cg-empty",children:"No node wallets found."}),(a!=null&&a.error||o)&&(F.length>0||(((W=a==null?void 0:a.wallets)==null?void 0:W.length)??0)>0)?m.jsx("p",{className:"v10-ws-note",children:"Balances may be stale — the chain/RPC reported an error."}):null,m.jsx("div",{className:"v10-ws-subhead",children:"Spending"}),m.jsxs("div",{className:"v10-ws-spend",children:[m.jsxs("div",{className:"v10-ws-spend-head",children:[m.jsx("span",{children:"Period"}),m.jsx("span",{title:"Publishes to Verifiable Memory that spent TRAC on-chain. Free SWM/local/testnet publishes are not counted (they don't burn TRAC).",children:"Publishes to VM"}),m.jsx("span",{children:"TRAC"})]}),R.map(P=>m.jsxs("div",{className:"v10-ws-spend-row",children:[m.jsx("span",{className:"v10-cg-dim",children:P.display}),m.jsx("span",{className:"v10-ws-spend-val",children:P.publishes}),m.jsx("span",{className:"v10-ws-spend-val",children:P.trac})]},P.display))]}),m.jsx(n3,{})]})]})]})}const Hh="context-graph-primer",s3={id:Hh,label:"What is a Context Graph?",closable:!0},c3=[{title:"Memory layers",body:"Working Memory is private staging, Shared Working Memory is the collaborative review layer, and Verifiable Memory is the published on-chain layer. Counts show where entities live now."},{title:"Subgraphs",body:"Subgraphs organize the same Context Graph by topic or source. They cut across memory layers, so a subgraph can contain Working, Shared Working, and Verifiable Memory at the same time."},{title:"Entities and Knowledge Assets",body:"Working Memory and Shared Working Memory contain entities. When published, an assertion/triple bundle is anchored as a Knowledge Asset in Verifiable Memory, giving included entities on-chain provenance."},{title:"Assertions",body:"Assertions are batches of triples that explain how entities entered or moved through the Context Graph. They are useful for reviewing provenance and lifecycle state."},{title:"Roles",body:"A curator controls access and publication policy. A participant can collaborate inside the Context Graph according to that policy."}];function u3(){const e=gn(a=>a.closeTab),n=mn.useCallback(()=>e(Hh),[e]);return mn.useEffect(()=>{const a=r=>{r.key==="Escape"&&(r.preventDefault(),n())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]),m.jsxs("div",{className:"v10-primer-view",children:[m.jsxs("header",{className:"v10-primer-header",children:[m.jsx("button",{type:"button",className:"v10-primer-back",onClick:n,"aria-label":"Close primer and return to the previous tab",children:"← Back"}),m.jsx("p",{className:"v10-primer-kicker",children:"Context Graph Primer"}),m.jsx("h1",{children:"What is a Context Graph?"}),m.jsx("p",{children:"A Context Graph is a shared knowledge workspace where agents stage, review, organize, and publish structured memory."})]}),m.jsxs("section",{className:"v10-primer-pipeline","aria-label":"Context Graph pipeline",children:[m.jsx("span",{className:"wm",children:"Working Memory"}),m.jsx("span",{className:"connector","aria-hidden":"true"}),m.jsx("span",{className:"swm",children:"Shared Working Memory"}),m.jsx("span",{className:"connector","aria-hidden":"true"}),m.jsx("span",{className:"vm",children:"Verifiable Memory"})]}),m.jsx("div",{className:"v10-primer-sections",children:c3.map(a=>m.jsxs("section",{className:"v10-primer-section",children:[m.jsx("h2",{children:a.title}),m.jsx("p",{children:a.body})]},a.title))})]})}const $h="doc:";function _9(e,n,a){return`${$h}${e}|${n}|${a}`}function O9(e,n,a){return e?{ref:e,contentType:"text/markdown"}:n?{ref:n,contentType:a}:{ref:void 0,contentType:a}}function d3(e){const n=e.slice($h.length),a=n.indexOf("|"),r=n.lastIndexOf("|");return a<0?{docRef:n,contentType:""}:{docRef:n.slice(a+1,r),contentType:n.slice(r+1)}}function f3(e,n){const a=n||{};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const p3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,h3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,m3={};function p1(e,n){return(m3.jsx?h3:p3).test(e)}const g3=/[ \t\n\f\r]/g;function y3(e){return typeof e=="object"?e.type==="text"?h1(e.value):!1:h1(e)}function h1(e){return e.replace(g3,"")===""}class Fo{constructor(n,a,r){this.normal=a,this.property=n,r&&(this.space=r)}}Fo.prototype.normal={};Fo.prototype.property={};Fo.prototype.space=void 0;function dw(e,n){const a={},r={};for(const o of e)Object.assign(a,o.property),Object.assign(r,o.normal);return new Fo(a,r,n)}function Fp(e){return e.toLowerCase()}class Tn{constructor(n,a){this.attribute=a,this.property=n}}Tn.prototype.attribute="";Tn.prototype.booleanish=!1;Tn.prototype.boolean=!1;Tn.prototype.commaOrSpaceSeparated=!1;Tn.prototype.commaSeparated=!1;Tn.prototype.defined=!1;Tn.prototype.mustUseProperty=!1;Tn.prototype.number=!1;Tn.prototype.overloadedBoolean=!1;Tn.prototype.property="";Tn.prototype.spaceSeparated=!1;Tn.prototype.space=void 0;let v3=0;const ze=fr(),Bt=fr(),Gp=fr(),de=fr(),vt=fr(),rl=fr(),Un=fr();function fr(){return 2**++v3}const Vp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Bt,commaOrSpaceSeparated:Un,commaSeparated:rl,number:de,overloadedBoolean:Gp,spaceSeparated:vt},Symbol.toStringTag,{value:"Module"})),ap=Object.keys(Vp);class qh extends Tn{constructor(n,a,r,o){let s=-1;if(super(n,a),m1(this,"space",o),typeof r=="number")for(;++s<ap.length;){const u=ap[s];m1(this,ap[s],(r&Vp[u])===Vp[u])}}}qh.prototype.defined=!0;function m1(e,n,a){a&&(e[n]=a)}function gl(e){const n={},a={};for(const[r,o]of Object.entries(e.properties)){const s=new qh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),n[r]=s,a[Fp(r)]=r,a[Fp(s.attribute)]=r}return new Fo(n,a,e.space)}const fw=gl({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:vt,ariaCurrent:null,ariaDescribedBy:vt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:vt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:vt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vt,ariaLevel:de,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:vt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:vt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Bt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function pw(e,n){return n in e?e[n]:n}function hw(e,n){return pw(e,n.toLowerCase())}const x3=gl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:rl,acceptCharset:vt,accessKey:vt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:vt,autoFocus:ze,autoPlay:ze,blocking:vt,capture:null,charSet:null,checked:ze,cite:null,className:vt,cols:de,colSpan:null,content:null,contentEditable:Bt,controls:ze,controlsList:vt,coords:de|rl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:Gp,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:vt,height:de,hidden:Gp,high:de,href:null,hrefLang:null,htmlFor:vt,httpEquiv:vt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:vt,itemRef:vt,itemScope:ze,itemType:vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ze,optimum:de,pattern:null,ping:vt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:vt,required:ze,reversed:ze,rows:de,rowSpan:de,sandbox:vt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Bt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ze,disableRemotePlayback:ze,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:hw}),b3=gl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Un,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:rl,g2:rl,glyphName:rl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:de,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pw}),mw=gl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),gw=gl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hw}),yw=gl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),w3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},S3=/[A-Z]/g,g1=/-[a-z]/g,k3=/^data[-\w.:]+$/i;function C3(e,n){const a=Fp(n);let r=n,o=Tn;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&k3.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(g1,A3);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!g1.test(s)){let u=s.replace(S3,E3);u.charAt(0)!=="-"&&(u="-"+u),n="data"+u}}o=qh}return new o(r,n)}function E3(e){return"-"+e.toLowerCase()}function A3(e){return e.charAt(1).toUpperCase()}const j3=dw([fw,x3,mw,gw,yw],"html"),Fh=dw([fw,b3,mw,gw,yw],"svg");function T3(e){return e.join(" ").trim()}var Jr={},ip,y1;function N3(){if(y1)return ip;y1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
1139
|
-
`,f="/",y="*",g="",x="comment",b="declaration";function k(j,E){if(typeof j!="string")throw new TypeError("First argument must be a string");if(!j)return[];E=E||{};var _=1,R=1;function F(B){var Q=B.match(n);Q&&(_+=Q.length);var H=B.lastIndexOf(p);R=~H?B.length-H:R+B.length}function U(){var B={line:_,column:R};return function(Q){return Q.position=new O(B),M(),Q}}function O(B){this.start=B,this.end={line:_,column:R},this.source=E.source}O.prototype.content=j;function W(B){var Q=new Error(E.source+":"+_+":"+R+": "+B);if(Q.reason=B,Q.filename=E.source,Q.line=_,Q.column=R,Q.source=j,!E.silent)throw Q}function P(B){var Q=B.exec(j);if(Q){var H=Q[0];return F(H),j=j.slice(H.length),Q}}function M(){P(a)}function T(B){var Q;for(B=B||[];Q=G();)Q!==!1&&B.push(Q);return B}function G(){var B=U();if(!(f!=j.charAt(0)||y!=j.charAt(1))){for(var Q=2;g!=j.charAt(Q)&&(y!=j.charAt(Q)||f!=j.charAt(Q+1));)++Q;if(Q+=2,g===j.charAt(Q-1))return W("End of comment missing");var H=j.slice(2,Q-2);return R+=2,F(H),j=j.slice(Q),R+=2,B({type:x,comment:H})}}function Y(){var B=U(),Q=P(r);if(Q){if(G(),!P(o))return W("property missing ':'");var H=P(s),ee=B({type:b,property:C(Q[0].replace(e,g)),value:H?C(H[0].replace(e,g)):g});return P(u),ee}}function ie(){var B=[];T(B);for(var Q;Q=Y();)Q!==!1&&(B.push(Q),T(B));return B}return M(),ie()}function C(j){return j?j.replace(d,g):g}return ip=k,ip}var v1;function R3(){if(v1)return Jr;v1=1;var e=Jr&&Jr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.default=a;const n=e(N3());function a(r,o){let s=null;if(!r||typeof r!="string")return s;const u=(0,n.default)(r),d=typeof o=="function";return u.forEach(p=>{if(p.type!=="declaration")return;const{property:f,value:y}=p;d?o(f,y,p):y&&(s=s||{},s[f]=y)}),s}return Jr}var yo={},x1;function _3(){if(x1)return yo;x1=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(f){return!f||a.test(f)||e.test(f)},u=function(f,y){return y.toUpperCase()},d=function(f,y){return"".concat(y,"-")},p=function(f,y){return y===void 0&&(y={}),s(f)?f:(f=f.toLowerCase(),y.reactCompat?f=f.replace(o,d):f=f.replace(r,d),f.replace(n,u))};return yo.camelCase=p,yo}var vo,b1;function O3(){if(b1)return vo;b1=1;var e=vo&&vo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(R3()),a=_3();function r(o,s){var u={};return!o||typeof o!="string"||(0,n.default)(o,function(d,p){d&&p&&(u[(0,a.camelCase)(d,s)]=p)}),u}return r.default=r,vo=r,vo}var D3=O3();const M3=Uo(D3),vw=xw("end"),Gh=xw("start");function xw(e){return n;function n(a){const r=a&&a.position&&a.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function L3(e){const n=Gh(e),a=vw(e);if(n&&a)return{start:n,end:a}}function To(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?w1(e.position):"start"in e||"end"in e?w1(e):"line"in e||"column"in e?Wp(e):""}function Wp(e){return S1(e&&e.line)+":"+S1(e&&e.column)}function w1(e){return Wp(e&&e.start)+"-"+Wp(e&&e.end)}function S1(e){return e&&typeof e=="number"?e:1}class sn extends Error{constructor(n,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let o="",s={},u=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof n=="string"?o=n:!s.cause&&n&&(u=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=To(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}sn.prototype.file="";sn.prototype.name="";sn.prototype.reason="";sn.prototype.message="";sn.prototype.stack="";sn.prototype.column=void 0;sn.prototype.line=void 0;sn.prototype.ancestors=void 0;sn.prototype.cause=void 0;sn.prototype.fatal=void 0;sn.prototype.place=void 0;sn.prototype.ruleId=void 0;sn.prototype.source=void 0;const Vh={}.hasOwnProperty,z3=new Map,I3=/[A-Z]/g,P3=new Set(["table","tbody","thead","tfoot","tr"]),U3=new Set(["td","th"]),bw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function B3(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Y3(a,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=W3(a,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Fh:j3,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=ww(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function ww(e,n,a){if(n.type==="element")return H3(e,n,a);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return $3(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return F3(e,n,a);if(n.type==="mdxjsEsm")return q3(e,n);if(n.type==="root")return G3(e,n,a);if(n.type==="text")return V3(e,n)}function H3(e,n,a){const r=e.schema;let o=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Fh,e.schema=o),e.ancestors.push(n);const s=kw(e,n.tagName,!1),u=K3(e,n);let d=Yh(e,n);return P3.has(n.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!y3(p):!0})),Sw(e,u,s,n),Wh(u,d),e.ancestors.pop(),e.schema=r,e.create(n,s,u,a)}function $3(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}zo(e,n.position)}function q3(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);zo(e,n.position)}function F3(e,n,a){const r=e.schema;let o=r;n.name==="svg"&&r.space==="html"&&(o=Fh,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:kw(e,n.name,!0),u=Q3(e,n),d=Yh(e,n);return Sw(e,u,s,n),Wh(u,d),e.ancestors.pop(),e.schema=r,e.create(n,s,u,a)}function G3(e,n,a){const r={};return Wh(r,Yh(e,n)),e.create(n,e.Fragment,r,a)}function V3(e,n){return n.value}function Sw(e,n,a,r){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(n.node=r)}function Wh(e,n){if(n.length>0){const a=n.length>1?n:n[0];a&&(e.children=a)}}function W3(e,n,a){return r;function r(o,s,u,d){const f=Array.isArray(u.children)?a:n;return d?f(s,u,d):f(s,u)}}function Y3(e,n){return a;function a(r,o,s,u){const d=Array.isArray(s.children),p=Gh(r);return n(o,s,u,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function K3(e,n){const a={};let r,o;for(o in n.properties)if(o!=="children"&&Vh.call(n.properties,o)){const s=X3(e,o,n.properties[o]);if(s){const[u,d]=s;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&U3.has(n.tagName)?r=d:a[u]=d}}if(r){const s=a.style||(a.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function Q3(e,n){const a={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const u=s.expression;u.type;const d=u.properties[0];d.type,Object.assign(a,e.evaluater.evaluateExpression(d.argument))}else zo(e,n.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const d=r.value.data.estree.body[0];d.type,s=e.evaluater.evaluateExpression(d.expression)}else zo(e,n.position);else s=r.value===null?!0:r.value;a[o]=s}return a}function Yh(e,n){const a=[];let r=-1;const o=e.passKeys?new Map:z3;for(;++r<n.children.length;){const s=n.children[r];let u;if(e.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const f=o.get(p)||0;u=p+"-"+f,o.set(p,f+1)}}const d=ww(e,s,u);d!==void 0&&a.push(d)}return a}function X3(e,n,a){const r=C3(e.schema,n);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?f3(a):T3(a)),r.property==="style"){let o=typeof a=="object"?a:Z3(e,String(a));return e.stylePropertyNameCase==="css"&&(o=J3(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?w3[r.property]||r.property:r.attribute,a]}}function Z3(e,n){try{return M3(n,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const r=a,o=new sn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=bw+"#cannot-parse-style-attribute",o}}function kw(e,n,a){let r;if(!a)r={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,u;for(;++s<o.length;){const d=p1(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=u}else r=p1(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const o=r.value;return Vh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);zo(e)}function zo(e,n){const a=new sn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=bw+"#cannot-handle-mdx-estrees-without-createevaluater",a}function J3(e){const n={};let a;for(a in e)Vh.call(e,a)&&(n[e_(a)]=e[a]);return n}function e_(e){let n=e.replace(I3,t_);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function t_(e){return"-"+e.toLowerCase()}const rp={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},n_={};function Kh(e,n){const a=n_,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Cw(e,r,o)}function Cw(e,n,a){if(a_(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return k1(e.children,n,a)}return Array.isArray(e)?k1(e,n,a):""}function k1(e,n,a){const r=[];let o=-1;for(;++o<e.length;)r[o]=Cw(e[o],n,a);return r.join("")}function a_(e){return!!(e&&typeof e=="object")}const C1=document.createElement("i");function Qh(e){const n="&"+e+";";C1.innerHTML=n;const a=C1.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===n?!1:a}function Hn(e,n,a,r){const o=e.length;let s=0,u;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,a=a>0?a:0,r.length<1e4)u=Array.from(r),u.unshift(n,a),e.splice(...u);else for(a&&e.splice(n,a);s<r.length;)u=r.slice(s,s+1e4),u.unshift(n,0),e.splice(...u),s+=1e4,n+=1e4}function na(e,n){return e.length>0?(Hn(e,e.length,0,n),e):n}const E1={}.hasOwnProperty;function Ew(e){const n={};let a=-1;for(;++a<e.length;)i_(n,e[a]);return n}function i_(e,n){let a;for(a in n){const o=(E1.call(e,a)?e[a]:void 0)||(e[a]={}),s=n[a];let u;if(s)for(u in s){E1.call(o,u)||(o[u]=[]);const d=s[u];r_(o[u],Array.isArray(d)?d:d?[d]:[])}}}function r_(e,n){let a=-1;const r=[];for(;++a<n.length;)(n[a].add==="after"?e:r).push(n[a]);Hn(e,0,0,r)}function Aw(e,n){const a=Number.parseInt(e,n);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function da(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const hn=Li(/[A-Za-z]/),on=Li(/[\dA-Za-z]/),l_=Li(/[#-'*+\--9=?A-Z^-~]/);function Wc(e){return e!==null&&(e<32||e===127)}const Yp=Li(/\d/),o_=Li(/[\dA-Fa-f]/),s_=Li(/[!-/:-@[-`{-~]/);function Ae(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function qe(e){return e===-2||e===-1||e===32}const cu=Li(new RegExp("\\p{P}|\\p{S}","u")),cr=Li(/\s/);function Li(e){return n;function n(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function yl(e){const n=[];let a=-1,r=0,o=0;for(;++a<e.length;){const s=e.charCodeAt(a);let u="";if(s===37&&on(e.charCodeAt(a+1))&&on(e.charCodeAt(a+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const d=e.charCodeAt(a+1);s<56320&&d>56319&&d<57344?(u=String.fromCharCode(s,d),o=1):u="�"}else u=String.fromCharCode(s);u&&(n.push(e.slice(r,a),encodeURIComponent(u)),r=a+o+1,u=""),o&&(a+=o,o=0)}return n.join("")+e.slice(r)}function Ke(e,n,a,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(p){return qe(p)?(e.enter(a),d(p)):n(p)}function d(p){return qe(p)&&s++<o?(e.consume(p),d):(e.exit(a),n(p))}}const c_={tokenize:u_};function u_(e){const n=e.attempt(this.parser.constructs.contentInitial,r,o);let a;return n;function r(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ke(e,n,"linePrefix")}function o(d){return e.enter("paragraph"),s(d)}function s(d){const p=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return Ae(d)?(e.consume(d),e.exit("chunkText"),s):(e.consume(d),u)}}const d_={tokenize:f_},A1={tokenize:p_};function f_(e){const n=this,a=[];let r=0,o,s,u;return d;function d(R){if(r<a.length){const F=a[r];return n.containerState=F[1],e.attempt(F[0].continuation,p,f)(R)}return f(R)}function p(R){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&_();const F=n.events.length;let U=F,O;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){O=n.events[U][1].end;break}E(r);let W=F;for(;W<n.events.length;)n.events[W][1].end={...O},W++;return Hn(n.events,U+1,0,n.events.slice(F)),n.events.length=W,f(R)}return d(R)}function f(R){if(r===a.length){if(!o)return x(R);if(o.currentConstruct&&o.currentConstruct.concrete)return k(R);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(A1,y,g)(R)}function y(R){return o&&_(),E(r),x(R)}function g(R){return n.parser.lazy[n.now().line]=r!==a.length,u=n.now().offset,k(R)}function x(R){return n.containerState={},e.attempt(A1,b,k)(R)}function b(R){return r++,a.push([n.currentConstruct,n.containerState]),x(R)}function k(R){if(R===null){o&&_(),E(0),e.consume(R);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(R)}function C(R){if(R===null){j(e.exit("chunkFlow"),!0),E(0),e.consume(R);return}return Ae(R)?(e.consume(R),j(e.exit("chunkFlow")),r=0,n.interrupt=void 0,d):(e.consume(R),C)}function j(R,F){const U=n.sliceStream(R);if(F&&U.push(null),R.previous=s,s&&(s.next=R),s=R,o.defineSkip(R.start),o.write(U),n.parser.lazy[R.start.line]){let O=o.events.length;for(;O--;)if(o.events[O][1].start.offset<u&&(!o.events[O][1].end||o.events[O][1].end.offset>u))return;const W=n.events.length;let P=W,M,T;for(;P--;)if(n.events[P][0]==="exit"&&n.events[P][1].type==="chunkFlow"){if(M){T=n.events[P][1].end;break}M=!0}for(E(r),O=W;O<n.events.length;)n.events[O][1].end={...T},O++;Hn(n.events,P+1,0,n.events.slice(W)),n.events.length=O}}function E(R){let F=a.length;for(;F-- >R;){const U=a[F];n.containerState=U[1],U[0].exit.call(n,e)}a.length=R}function _(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function p_(e,n,a){return Ke(e,e.attempt(this.parser.constructs.document,n,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ol(e){if(e===null||gt(e)||cr(e))return 1;if(cu(e))return 2}function uu(e,n,a){const r=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!r.includes(s)&&(n=s(n,a),r.push(s))}return n}const Kp={name:"attention",resolveAll:h_,tokenize:m_};function h_(e,n){let a=-1,r,o,s,u,d,p,f,y;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(r=a;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[r][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;p=e[r][1].end.offset-e[r][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const g={...e[r][1].end},x={...e[a][1].start};j1(g,-p),j1(x,p),u={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:x},s={type:p>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[a][1].start}},o={type:p>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[r][1].end={...u.start},e[a][1].start={...d.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=na(f,[["enter",e[r][1],n],["exit",e[r][1],n]])),f=na(f,[["enter",o,n],["enter",u,n],["exit",u,n],["enter",s,n]]),f=na(f,uu(n.parser.constructs.insideSpan.null,e.slice(r+1,a),n)),f=na(f,[["exit",s,n],["enter",d,n],["exit",d,n],["exit",o,n]]),e[a][1].end.offset-e[a][1].start.offset?(y=2,f=na(f,[["enter",e[a][1],n],["exit",e[a][1],n]])):y=0,Hn(e,r-1,a-r+3,f),a=r+f.length-y-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function m_(e,n){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ol(r);let s;return u;function u(p){return s=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===s)return e.consume(p),d;const f=e.exit("attentionSequence"),y=ol(p),g=!y||y===2&&o||a.includes(p),x=!o||o===2&&y||a.includes(r);return f._open=!!(s===42?g:g&&(o||!x)),f._close=!!(s===42?x:x&&(y||!g)),n(p)}}function j1(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const g_={name:"autolink",tokenize:y_};function y_(e,n,a){let r=0;return o;function o(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return hn(b)?(e.consume(b),u):b===64?a(b):f(b)}function u(b){return b===43||b===45||b===46||on(b)?(r=1,d(b)):f(b)}function d(b){return b===58?(e.consume(b),r=0,p):(b===43||b===45||b===46||on(b))&&r++<32?(e.consume(b),d):(r=0,f(b))}function p(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):b===null||b===32||b===60||Wc(b)?a(b):(e.consume(b),p)}function f(b){return b===64?(e.consume(b),y):l_(b)?(e.consume(b),f):a(b)}function y(b){return on(b)?g(b):a(b)}function g(b){return b===46?(e.consume(b),r=0,y):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),n):x(b)}function x(b){if((b===45||on(b))&&r++<63){const k=b===45?x:g;return e.consume(b),k}return a(b)}}const Go={partial:!0,tokenize:v_};function v_(e,n,a){return r;function r(s){return qe(s)?Ke(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ae(s)?n(s):a(s)}}const jw={continuation:{tokenize:b_},exit:w_,name:"blockQuote",tokenize:x_};function x_(e,n,a){const r=this;return o;function o(u){if(u===62){const d=r.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return a(u)}function s(u){return qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(u))}}function b_(e,n,a){const r=this;return o;function o(u){return qe(u)?Ke(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(jw,n,a)(u)}}function w_(e){e.exit("blockQuote")}const Tw={name:"characterEscape",tokenize:S_};function S_(e,n,a){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return s_(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):a(s)}}const Nw={name:"characterReference",tokenize:k_};function k_(e,n,a){const r=this;let o=0,s,u;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),s=31,u=on,y(g))}function f(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=o_,y):(e.enter("characterReferenceValue"),s=7,u=Yp,y(g))}function y(g){if(g===59&&o){const x=e.exit("characterReferenceValue");return u===on&&!Qh(r.sliceSerialize(x))?a(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return u(g)&&o++<s?(e.consume(g),y):a(g)}}const T1={partial:!0,tokenize:E_},N1={concrete:!0,name:"codeFenced",tokenize:C_};function C_(e,n,a){const r=this,o={partial:!0,tokenize:U};let s=0,u=0,d;return p;function p(O){return f(O)}function f(O){const W=r.events[r.events.length-1];return s=W&&W[1].type==="linePrefix"?W[2].sliceSerialize(W[1],!0).length:0,d=O,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),y(O)}function y(O){return O===d?(u++,e.consume(O),y):u<3?a(O):(e.exit("codeFencedFenceSequence"),qe(O)?Ke(e,g,"whitespace")(O):g(O))}function g(O){return O===null||Ae(O)?(e.exit("codeFencedFence"),r.interrupt?n(O):e.check(T1,C,F)(O)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===null||Ae(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(O)):qe(O)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ke(e,b,"whitespace")(O)):O===96&&O===d?a(O):(e.consume(O),x)}function b(O){return O===null||Ae(O)?g(O):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||Ae(O)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(O)):O===96&&O===d?a(O):(e.consume(O),k)}function C(O){return e.attempt(o,F,j)(O)}function j(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),E}function E(O){return s>0&&qe(O)?Ke(e,_,"linePrefix",s+1)(O):_(O)}function _(O){return O===null||Ae(O)?e.check(T1,C,F)(O):(e.enter("codeFlowValue"),R(O))}function R(O){return O===null||Ae(O)?(e.exit("codeFlowValue"),_(O)):(e.consume(O),R)}function F(O){return e.exit("codeFenced"),n(O)}function U(O,W,P){let M=0;return T;function T(Q){return O.enter("lineEnding"),O.consume(Q),O.exit("lineEnding"),G}function G(Q){return O.enter("codeFencedFence"),qe(Q)?Ke(O,Y,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):Y(Q)}function Y(Q){return Q===d?(O.enter("codeFencedFenceSequence"),ie(Q)):P(Q)}function ie(Q){return Q===d?(M++,O.consume(Q),ie):M>=u?(O.exit("codeFencedFenceSequence"),qe(Q)?Ke(O,B,"whitespace")(Q):B(Q)):P(Q)}function B(Q){return Q===null||Ae(Q)?(O.exit("codeFencedFence"),W(Q)):P(Q)}}}function E_(e,n,a){const r=this;return o;function o(u){return u===null?a(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return r.parser.lazy[r.now().line]?a(u):n(u)}}const lp={name:"codeIndented",tokenize:j_},A_={partial:!0,tokenize:T_};function j_(e,n,a){const r=this;return o;function o(f){return e.enter("codeIndented"),Ke(e,s,"linePrefix",5)(f)}function s(f){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?u(f):a(f)}function u(f){return f===null?p(f):Ae(f)?e.attempt(A_,u,p)(f):(e.enter("codeFlowValue"),d(f))}function d(f){return f===null||Ae(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),d)}function p(f){return e.exit("codeIndented"),n(f)}}function T_(e,n,a){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?a(u):Ae(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ke(e,s,"linePrefix",5)(u)}function s(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):Ae(u)?o(u):a(u)}}const N_={name:"codeText",previous:__,resolve:R_,tokenize:O_};function R_(e){let n=e.length-4,a=3,r,o;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=a;++r<n;)if(e[r][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[n][1].type="codeTextPadding",a+=2,n-=2;break}}for(r=a-1,n++;++r<=n;)o===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(o=r):(r===n||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),n-=r-o-2,r=o+2),o=void 0);return e}function __(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function O_(e,n,a){let r=0,o,s;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),d(g)}function d(g){return g===96?(e.consume(g),r++,d):(e.exit("codeTextSequence"),p(g))}function p(g){return g===null?a(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(s=e.enter("codeTextSequence"),o=0,y(g)):Ae(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),f(g))}function f(g){return g===null||g===32||g===96||Ae(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),f)}function y(g){return g===96?(e.consume(g),o++,y):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(g)):(s.type="codeTextData",f(g))}}class D_{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,a){const r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,a,r){const o=a||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&xo(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),xo(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),xo(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const a=this.left.splice(n,Number.POSITIVE_INFINITY);xo(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);xo(this.left,a.reverse())}}}function xo(e,n){let a=0;if(n.length<1e4)e.push(...n);else for(;a<n.length;)e.push(...n.slice(a,a+1e4)),a+=1e4}function Rw(e){const n={};let a=-1,r,o,s,u,d,p,f;const y=new D_(e);for(;++a<y.length;){for(;a in n;)a=n[a];if(r=y.get(a),a&&r[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,M_(y,a)),a=n[a],f=!0);else if(r[1]._container){for(s=a,o=void 0;s--;)if(u=y.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},d=y.slice(o,a),d.unshift(r),y.splice(o,a-o+1,d))}}return Hn(e,0,Number.POSITIVE_INFINITY,y.slice(0)),!f}function M_(e,n){const a=e.get(n)[1],r=e.get(n)[2];let o=n-1;const s=[];let u=a._tokenizer;u||(u=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,p=[],f={};let y,g,x=-1,b=a,k=0,C=0;const j=[C];for(;b;){for(;e.get(++o)[1]!==b;);s.push(o),b._tokenizer||(y=r.sliceStream(b),b.next||y.push(null),g&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(y),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=a;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(C=x+1,j.push(C),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):j.pop(),x=j.length;x--;){const E=d.slice(j[x],j[x+1]),_=s.pop();p.push([_,_+E.length-1]),e.splice(_,2,E)}for(p.reverse(),x=-1;++x<p.length;)f[k+p[x][0]]=k+p[x][1],k+=p[x][1]-p[x][0]-1;return f}const L_={resolve:I_,tokenize:P_},z_={partial:!0,tokenize:U_};function I_(e){return Rw(e),e}function P_(e,n){let a;return r;function r(d){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):Ae(d)?e.check(z_,u,s)(d):(e.consume(d),o)}function s(d){return e.exit("chunkContent"),e.exit("content"),n(d)}function u(d){return e.consume(d),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function U_(e,n,a){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ke(e,s,"linePrefix")}function s(u){if(u===null||Ae(u))return a(u);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?n(u):e.interrupt(r.parser.constructs.flow,a,n)(u)}}function _w(e,n,a,r,o,s,u,d,p){const f=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(E){return E===60?(e.enter(r),e.enter(o),e.enter(s),e.consume(E),e.exit(s),x):E===null||E===32||E===41||Wc(E)?a(E):(e.enter(r),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),C(E))}function x(E){return E===62?(e.enter(s),e.consume(E),e.exit(s),e.exit(o),e.exit(r),n):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===62?(e.exit("chunkString"),e.exit(d),x(E)):E===null||E===60||Ae(E)?a(E):(e.consume(E),E===92?k:b)}function k(E){return E===60||E===62||E===92?(e.consume(E),b):b(E)}function C(E){return!y&&(E===null||E===41||gt(E))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(r),n(E)):y<f&&E===40?(e.consume(E),y++,C):E===41?(e.consume(E),y--,C):E===null||E===32||E===40||Wc(E)?a(E):(e.consume(E),E===92?j:C)}function j(E){return E===40||E===41||E===92?(e.consume(E),C):C(E)}}function Ow(e,n,a,r,o,s){const u=this;let d=0,p;return f;function f(b){return e.enter(r),e.enter(o),e.consume(b),e.exit(o),e.enter(s),y}function y(b){return d>999||b===null||b===91||b===93&&!p||b===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?a(b):b===93?(e.exit(s),e.enter(o),e.consume(b),e.exit(o),e.exit(r),n):Ae(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),y):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||Ae(b)||d++>999?(e.exit("chunkString"),y(b)):(e.consume(b),p||(p=!qe(b)),b===92?x:g)}function x(b){return b===91||b===92||b===93?(e.consume(b),d++,g):g(b)}}function Dw(e,n,a,r,o,s){let u;return d;function d(x){return x===34||x===39||x===40?(e.enter(r),e.enter(o),e.consume(x),e.exit(o),u=x===40?41:x,p):a(x)}function p(x){return x===u?(e.enter(o),e.consume(x),e.exit(o),e.exit(r),n):(e.enter(s),f(x))}function f(x){return x===u?(e.exit(s),p(u)):x===null?a(x):Ae(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Ke(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===u||x===null||Ae(x)?(e.exit("chunkString"),f(x)):(e.consume(x),x===92?g:y)}function g(x){return x===u||x===92?(e.consume(x),y):y(x)}}function No(e,n){let a;return r;function r(o){return Ae(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a=!0,r):qe(o)?Ke(e,r,a?"linePrefix":"lineSuffix")(o):n(o)}}const B_={name:"definition",tokenize:$_},H_={partial:!0,tokenize:q_};function $_(e,n,a){const r=this;let o;return s;function s(b){return e.enter("definition"),u(b)}function u(b){return Ow.call(r,e,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return o=da(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),p):a(b)}function p(b){return gt(b)?No(e,f)(b):f(b)}function f(b){return _w(e,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return e.attempt(H_,g,g)(b)}function g(b){return qe(b)?Ke(e,x,"whitespace")(b):x(b)}function x(b){return b===null||Ae(b)?(e.exit("definition"),r.parser.defined.push(o),n(b)):a(b)}}function q_(e,n,a){return r;function r(d){return gt(d)?No(e,o)(d):a(d)}function o(d){return Dw(e,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return qe(d)?Ke(e,u,"whitespace")(d):u(d)}function u(d){return d===null||Ae(d)?n(d):a(d)}}const F_={name:"hardBreakEscape",tokenize:G_};function G_(e,n,a){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ae(s)?(e.exit("hardBreakEscape"),n(s)):a(s)}}const V_={name:"headingAtx",resolve:W_,tokenize:Y_};function W_(e,n){let a=e.length-2,r=3,o,s;return e[r][1].type==="whitespace"&&(r+=2),a-2>r&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&e[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[a][1].end},s={type:"chunkText",start:e[r][1].start,end:e[a][1].end,contentType:"text"},Hn(e,r,a-r+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function Y_(e,n,a){let r=0;return o;function o(y){return e.enter("atxHeading"),s(y)}function s(y){return e.enter("atxHeadingSequence"),u(y)}function u(y){return y===35&&r++<6?(e.consume(y),u):y===null||gt(y)?(e.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(e.enter("atxHeadingSequence"),p(y)):y===null||Ae(y)?(e.exit("atxHeading"),n(y)):qe(y)?Ke(e,d,"whitespace")(y):(e.enter("atxHeadingText"),f(y))}function p(y){return y===35?(e.consume(y),p):(e.exit("atxHeadingSequence"),d(y))}function f(y){return y===null||y===35||gt(y)?(e.exit("atxHeadingText"),d(y)):(e.consume(y),f)}}const K_=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],R1=["pre","script","style","textarea"],Q_={concrete:!0,name:"htmlFlow",resolveTo:J_,tokenize:eO},X_={partial:!0,tokenize:nO},Z_={partial:!0,tokenize:tO};function J_(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function eO(e,n,a){const r=this;let o,s,u,d,p;return f;function f(N){return y(N)}function y(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),g}function g(N){return N===33?(e.consume(N),x):N===47?(e.consume(N),s=!0,C):N===63?(e.consume(N),o=3,r.interrupt?n:D):hn(N)?(e.consume(N),u=String.fromCharCode(N),j):a(N)}function x(N){return N===45?(e.consume(N),o=2,b):N===91?(e.consume(N),o=5,d=0,k):hn(N)?(e.consume(N),o=4,r.interrupt?n:D):a(N)}function b(N){return N===45?(e.consume(N),r.interrupt?n:D):a(N)}function k(N){const ue="CDATA[";return N===ue.charCodeAt(d++)?(e.consume(N),d===ue.length?r.interrupt?n:Y:k):a(N)}function C(N){return hn(N)?(e.consume(N),u=String.fromCharCode(N),j):a(N)}function j(N){if(N===null||N===47||N===62||gt(N)){const ue=N===47,pe=u.toLowerCase();return!ue&&!s&&R1.includes(pe)?(o=1,r.interrupt?n(N):Y(N)):K_.includes(u.toLowerCase())?(o=6,ue?(e.consume(N),E):r.interrupt?n(N):Y(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(N):s?_(N):R(N))}return N===45||on(N)?(e.consume(N),u+=String.fromCharCode(N),j):a(N)}function E(N){return N===62?(e.consume(N),r.interrupt?n:Y):a(N)}function _(N){return qe(N)?(e.consume(N),_):T(N)}function R(N){return N===47?(e.consume(N),T):N===58||N===95||hn(N)?(e.consume(N),F):qe(N)?(e.consume(N),R):T(N)}function F(N){return N===45||N===46||N===58||N===95||on(N)?(e.consume(N),F):U(N)}function U(N){return N===61?(e.consume(N),O):qe(N)?(e.consume(N),U):R(N)}function O(N){return N===null||N===60||N===61||N===62||N===96?a(N):N===34||N===39?(e.consume(N),p=N,W):qe(N)?(e.consume(N),O):P(N)}function W(N){return N===p?(e.consume(N),p=null,M):N===null||Ae(N)?a(N):(e.consume(N),W)}function P(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||gt(N)?U(N):(e.consume(N),P)}function M(N){return N===47||N===62||qe(N)?R(N):a(N)}function T(N){return N===62?(e.consume(N),G):a(N)}function G(N){return N===null||Ae(N)?Y(N):qe(N)?(e.consume(N),G):a(N)}function Y(N){return N===45&&o===2?(e.consume(N),H):N===60&&o===1?(e.consume(N),ee):N===62&&o===4?(e.consume(N),L):N===63&&o===3?(e.consume(N),D):N===93&&o===5?(e.consume(N),V):Ae(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(X_,X,ie)(N)):N===null||Ae(N)?(e.exit("htmlFlowData"),ie(N)):(e.consume(N),Y)}function ie(N){return e.check(Z_,B,X)(N)}function B(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return N===null||Ae(N)?ie(N):(e.enter("htmlFlowData"),Y(N))}function H(N){return N===45?(e.consume(N),D):Y(N)}function ee(N){return N===47?(e.consume(N),u="",ne):Y(N)}function ne(N){if(N===62){const ue=u.toLowerCase();return R1.includes(ue)?(e.consume(N),L):Y(N)}return hn(N)&&u.length<8?(e.consume(N),u+=String.fromCharCode(N),ne):Y(N)}function V(N){return N===93?(e.consume(N),D):Y(N)}function D(N){return N===62?(e.consume(N),L):N===45&&o===2?(e.consume(N),D):Y(N)}function L(N){return N===null||Ae(N)?(e.exit("htmlFlowData"),X(N)):(e.consume(N),L)}function X(N){return e.exit("htmlFlow"),n(N)}}function tO(e,n,a){const r=this;return o;function o(u){return Ae(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):a(u)}function s(u){return r.parser.lazy[r.now().line]?a(u):n(u)}}function nO(e,n,a){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Go,n,a)}}const aO={name:"htmlText",tokenize:iO};function iO(e,n,a){const r=this;let o,s,u;return d;function d(D){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(D),p}function p(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),U):D===63?(e.consume(D),R):hn(D)?(e.consume(D),P):a(D)}function f(D){return D===45?(e.consume(D),y):D===91?(e.consume(D),s=0,k):hn(D)?(e.consume(D),_):a(D)}function y(D){return D===45?(e.consume(D),b):a(D)}function g(D){return D===null?a(D):D===45?(e.consume(D),x):Ae(D)?(u=g,ee(D)):(e.consume(D),g)}function x(D){return D===45?(e.consume(D),b):g(D)}function b(D){return D===62?H(D):D===45?x(D):g(D)}function k(D){const L="CDATA[";return D===L.charCodeAt(s++)?(e.consume(D),s===L.length?C:k):a(D)}function C(D){return D===null?a(D):D===93?(e.consume(D),j):Ae(D)?(u=C,ee(D)):(e.consume(D),C)}function j(D){return D===93?(e.consume(D),E):C(D)}function E(D){return D===62?H(D):D===93?(e.consume(D),E):C(D)}function _(D){return D===null||D===62?H(D):Ae(D)?(u=_,ee(D)):(e.consume(D),_)}function R(D){return D===null?a(D):D===63?(e.consume(D),F):Ae(D)?(u=R,ee(D)):(e.consume(D),R)}function F(D){return D===62?H(D):R(D)}function U(D){return hn(D)?(e.consume(D),O):a(D)}function O(D){return D===45||on(D)?(e.consume(D),O):W(D)}function W(D){return Ae(D)?(u=W,ee(D)):qe(D)?(e.consume(D),W):H(D)}function P(D){return D===45||on(D)?(e.consume(D),P):D===47||D===62||gt(D)?M(D):a(D)}function M(D){return D===47?(e.consume(D),H):D===58||D===95||hn(D)?(e.consume(D),T):Ae(D)?(u=M,ee(D)):qe(D)?(e.consume(D),M):H(D)}function T(D){return D===45||D===46||D===58||D===95||on(D)?(e.consume(D),T):G(D)}function G(D){return D===61?(e.consume(D),Y):Ae(D)?(u=G,ee(D)):qe(D)?(e.consume(D),G):M(D)}function Y(D){return D===null||D===60||D===61||D===62||D===96?a(D):D===34||D===39?(e.consume(D),o=D,ie):Ae(D)?(u=Y,ee(D)):qe(D)?(e.consume(D),Y):(e.consume(D),B)}function ie(D){return D===o?(e.consume(D),o=void 0,Q):D===null?a(D):Ae(D)?(u=ie,ee(D)):(e.consume(D),ie)}function B(D){return D===null||D===34||D===39||D===60||D===61||D===96?a(D):D===47||D===62||gt(D)?M(D):(e.consume(D),B)}function Q(D){return D===47||D===62||gt(D)?M(D):a(D)}function H(D){return D===62?(e.consume(D),e.exit("htmlTextData"),e.exit("htmlText"),n):a(D)}function ee(D){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),ne}function ne(D){return qe(D)?Ke(e,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):V(D)}function V(D){return e.enter("htmlTextData"),u(D)}}const Xh={name:"labelEnd",resolveAll:sO,resolveTo:cO,tokenize:uO},rO={tokenize:dO},lO={tokenize:fO},oO={tokenize:pO};function sO(e){let n=-1;const a=[];for(;++n<e.length;){const r=e[n][1];if(a.push(e[n]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",n+=o}}return e.length!==a.length&&Hn(e,0,e.length,a),e}function cO(e,n){let a=e.length,r=0,o,s,u,d;for(;a--;)if(o=e[a][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=a,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=a);const p={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},y={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",p,n],["enter",f,n]],d=na(d,e.slice(s+1,s+r+3)),d=na(d,[["enter",y,n]]),d=na(d,uu(n.parser.constructs.insideSpan.null,e.slice(s+r+4,u-3),n)),d=na(d,[["exit",y,n],e[u-2],e[u-1],["exit",f,n]]),d=na(d,e.slice(u+1)),d=na(d,[["exit",p,n]]),Hn(e,s,e.length,d),e}function uO(e,n,a){const r=this;let o=r.events.length,s,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return d;function d(x){return s?s._inactive?g(x):(u=r.parser.defined.includes(da(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),p):a(x)}function p(x){return x===40?e.attempt(rO,y,u?y:g)(x):x===91?e.attempt(lO,y,u?f:g)(x):u?y(x):g(x)}function f(x){return e.attempt(oO,y,g)(x)}function y(x){return n(x)}function g(x){return s._balanced=!0,a(x)}}function dO(e,n,a){return r;function r(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),o}function o(g){return gt(g)?No(e,s)(g):s(g)}function s(g){return g===41?y(g):_w(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return gt(g)?No(e,p)(g):y(g)}function d(g){return a(g)}function p(g){return g===34||g===39||g===40?Dw(e,f,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function f(g){return gt(g)?No(e,y)(g):y(g)}function y(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),n):a(g)}}function fO(e,n,a){const r=this;return o;function o(d){return Ow.call(r,e,s,u,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(da(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(d):a(d)}function u(d){return a(d)}}function pO(e,n,a){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):a(s)}}const hO={name:"labelStartImage",resolveAll:Xh.resolveAll,tokenize:mO};function mO(e,n,a){const r=this;return o;function o(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),s}function s(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):a(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):n(d)}}const gO={name:"labelStartLink",resolveAll:Xh.resolveAll,tokenize:yO};function yO(e,n,a){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(u):n(u)}}const op={name:"lineEnding",tokenize:vO};function vO(e,n){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ke(e,n,"linePrefix")}}const Nc={name:"thematicBreak",tokenize:xO};function xO(e,n,a){let r=0,o;return s;function s(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,d(f)}function d(f){return f===o?(e.enter("thematicBreakSequence"),p(f)):r>=3&&(f===null||Ae(f))?(e.exit("thematicBreak"),n(f)):a(f)}function p(f){return f===o?(e.consume(f),r++,p):(e.exit("thematicBreakSequence"),qe(f)?Ke(e,d,"whitespace")(f):d(f))}}const An={continuation:{tokenize:kO},exit:EO,name:"list",tokenize:SO},bO={partial:!0,tokenize:AO},wO={partial:!0,tokenize:CO};function SO(e,n,a){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return d;function d(b){const k=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Yp(b)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Nc,a,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(b)}return a(b)}function p(b){return Yp(b)&&++u<10?(e.consume(b),p):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):a(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(Go,r.interrupt?a:y,e.attempt(bO,x,g))}function y(b){return r.containerState.initialBlankLine=!0,s++,x(b)}function g(b){return qe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):a(b)}function x(b){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(b)}}function kO(e,n,a){const r=this;return r.containerState._closeFlow=void 0,e.check(Go,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(e,n,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!qe(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wO,n,u)(d))}function u(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(e,e.attempt(An,n,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function CO(e,n,a){const r=this;return Ke(e,o,"listItemIndent",r.containerState.size+1);function o(s){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?n(s):a(s)}}function EO(e){e.exit(this.containerState.type)}function AO(e,n,a){const r=this;return Ke(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const u=r.events[r.events.length-1];return!qe(s)&&u&&u[1].type==="listItemPrefixWhitespace"?n(s):a(s)}}const _1={name:"setextUnderline",resolveTo:jO,tokenize:TO};function jO(e,n){let a=e.length,r,o,s;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){r=a;break}e[a][1].type==="paragraph"&&(o=a)}else e[a][1].type==="content"&&e.splice(a,1),!s&&e[a][1].type==="definition"&&(s=a);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",u,n]),e.splice(s+1,0,["exit",e[r][1],n]),e[r][1].end={...e[s][1].end}):e[r][1]=u,e.push(["exit",u,n]),e}function TO(e,n,a){const r=this;let o;return s;function s(f){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(e.enter("setextHeadingLine"),o=f,u(f)):a(f)}function u(f){return e.enter("setextHeadingLineSequence"),d(f)}function d(f){return f===o?(e.consume(f),d):(e.exit("setextHeadingLineSequence"),qe(f)?Ke(e,p,"lineSuffix")(f):p(f))}function p(f){return f===null||Ae(f)?(e.exit("setextHeadingLine"),n(f)):a(f)}}const NO={tokenize:RO};function RO(e){const n=this,a=e.attempt(Go,r,e.attempt(this.parser.constructs.flowInitial,o,Ke(e,e.attempt(this.parser.constructs.flow,o,e.attempt(L_,o)),"linePrefix")));return a;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,a}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,a}}const _O={resolveAll:Lw()},OO=Mw("string"),DO=Mw("text");function Mw(e){return{resolveAll:Lw(e==="text"?MO:void 0),tokenize:n};function n(a){const r=this,o=this.parser.constructs[e],s=a.attempt(o,u,d);return u;function u(y){return f(y)?s(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return f(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function f(y){if(y===null)return!0;const g=o[y];let x=-1;if(g)for(;++x<g.length;){const b=g[x];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function Lw(e){return n;function n(a,r){let o=-1,s;for(;++o<=a.length;)s===void 0?a[o]&&a[o][1].type==="data"&&(s=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==s+2&&(a[s][1].end=a[o-1][1].end,a.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(a,r):a}}function MO(e,n){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const r=e[a-1][1],o=n.sliceStream(r);let s=o.length,u=-1,d=0,p;for(;s--;){const f=o[s];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(f===-2)p=!0,d++;else if(f!==-1){s++;break}}if(n._contentTypeTextTrailing&&a===e.length&&(d=0),d){const f={type:a===e.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:r.start._bufferIndex+u,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(a,0,["enter",f,n],["exit",f,n]),a+=2)}a++}return e}const LO={42:An,43:An,45:An,48:An,49:An,50:An,51:An,52:An,53:An,54:An,55:An,56:An,57:An,62:jw},zO={91:B_},IO={[-2]:lp,[-1]:lp,32:lp},PO={35:V_,42:Nc,45:[_1,Nc],60:Q_,61:_1,95:Nc,96:N1,126:N1},UO={38:Nw,92:Tw},BO={[-5]:op,[-4]:op,[-3]:op,33:hO,38:Nw,42:Kp,60:[g_,aO],91:gO,92:[F_,Tw],93:Xh,95:Kp,96:N_},HO={null:[Kp,_O]},$O={null:[42,95]},qO={null:[]},FO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$O,contentInitial:zO,disable:qO,document:LO,flow:PO,flowInitial:IO,insideSpan:HO,string:UO,text:BO},Symbol.toStringTag,{value:"Module"}));function GO(e,n,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},s=[];let u=[],d=[];const p={attempt:W(U),check:W(O),consume:_,enter:R,exit:F,interrupt:W(O,{interrupt:!0})},f={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:g};let y=n.tokenize.call(f,p);return n.resolveAll&&s.push(n),f;function g(G){return u=na(u,G),j(),u[u.length-1]!==null?[]:(P(n,0),f.events=uu(s,f.events,f),f.events)}function x(G,Y){return WO(b(G),Y)}function b(G){return VO(u,G)}function k(){const{_bufferIndex:G,_index:Y,line:ie,column:B,offset:Q}=r;return{_bufferIndex:G,_index:Y,line:ie,column:B,offset:Q}}function C(G){o[G.line]=G.column,T()}function j(){let G;for(;r._index<u.length;){const Y=u[r._index];if(typeof Y=="string")for(G=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<Y.length;)E(Y.charCodeAt(r._bufferIndex));else E(Y)}}function E(G){y=y(G)}function _(G){Ae(G)?(r.line++,r.column=1,r.offset+=G===-3?2:1,T()):G!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=G}function R(G,Y){const ie=Y||{};return ie.type=G,ie.start=k(),f.events.push(["enter",ie,f]),d.push(ie),ie}function F(G){const Y=d.pop();return Y.end=k(),f.events.push(["exit",Y,f]),Y}function U(G,Y){P(G,Y.from)}function O(G,Y){Y.restore()}function W(G,Y){return ie;function ie(B,Q,H){let ee,ne,V,D;return Array.isArray(B)?X(B):"tokenize"in B?X([B]):L(B);function L(he){return Ee;function Ee(Ue){const Ne=Ue!==null&&he[Ue],et=Ue!==null&&he.null,Ot=[...Array.isArray(Ne)?Ne:Ne?[Ne]:[],...Array.isArray(et)?et:et?[et]:[]];return X(Ot)(Ue)}}function X(he){return ee=he,ne=0,he.length===0?H:N(he[ne])}function N(he){return Ee;function Ee(Ue){return D=M(),V=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?pe():he.tokenize.call(Y?Object.assign(Object.create(f),Y):f,p,ue,pe)(Ue)}}function ue(he){return G(V,D),Q}function pe(he){return D.restore(),++ne<ee.length?N(ee[ne]):H}}}function P(G,Y){G.resolveAll&&!s.includes(G)&&s.push(G),G.resolve&&Hn(f.events,Y,f.events.length-Y,G.resolve(f.events.slice(Y),f)),G.resolveTo&&(f.events=G.resolveTo(f.events,f))}function M(){const G=k(),Y=f.previous,ie=f.currentConstruct,B=f.events.length,Q=Array.from(d);return{from:B,restore:H};function H(){r=G,f.previous=Y,f.currentConstruct=ie,f.events.length=B,d=Q,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function VO(e,n){const a=n.start._index,r=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let u;if(a===o)u=[e[a].slice(r,s)];else{if(u=e.slice(a,o),r>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(r):u.shift()}s>0&&u.push(e[o].slice(0,s))}return u}function WO(e,n){let a=-1;const r=[];let o;for(;++a<e.length;){const s=e[a];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
|
|
1140
|
-
`;break}case-3:{u=`\r
|
|
1141
|
-
`;break}case-2:{u=n?" ":" ";break}case-1:{if(!n&&o)continue;u=" ";break}default:u=String.fromCharCode(s)}o=s===-2,r.push(u)}return r.join("")}function YO(e){const r={constructs:Ew([FO,...(e||{}).extensions||[]]),content:o(c_),defined:[],document:o(d_),flow:o(NO),lazy:{},string:o(OO),text:o(DO)};return r;function o(s){return u;function u(d){return GO(r,s,d)}}}function KO(e){for(;!Rw(e););return e}const O1=/[\0\t\n\r]/g;function QO(){let e=1,n="",a=!0,r;return o;function o(s,u,d){const p=[];let f,y,g,x,b;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),g=0,n="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if(O1.lastIndex=g,f=O1.exec(s),x=f&&f.index!==void 0?f.index:s.length,b=s.charCodeAt(x),!f){n=s.slice(g);break}if(b===10&&g===x&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<x&&(p.push(s.slice(g,x)),e+=x-g),b){case 0:{p.push(65533),e++;break}case 9:{for(y=Math.ceil(e/4)*4,p.push(-2);e++<y;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:r=!0,e=1}g=x+1}return d&&(r&&p.push(-5),n&&p.push(n),p.push(null)),p}}const XO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ZO(e){return e.replace(XO,JO)}function JO(e,n,a){if(n)return n;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),s=o===120||o===88;return Aw(a.slice(s?2:1),s?16:10)}return Qh(a)||e}const zw={}.hasOwnProperty;function eD(e,n,a){return n&&typeof n=="object"&&(a=n,n=void 0),tD(a)(KO(YO(a).document().write(QO()(e,n,!0))))}function tD(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Nt),autolinkProtocol:M,autolinkEmail:M,atxHeading:s(Zt),blockQuote:s(et),characterEscape:M,characterReference:M,codeFenced:s(Ot),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Ot,u),codeText:s(xt,u),codeTextData:M,data:M,codeFlowValue:M,definition:s(bt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(yt),hardBreakEscape:s(Pe),hardBreakTrailing:s(Pe),htmlFlow:s(pt,u),htmlFlowData:M,htmlText:s(pt,u),htmlTextData:M,image:s(Dt),label:u,link:s(Nt),listItem:s(Mt),listItemValue:x,listOrdered:s(ge,g),listUnordered:s(ge),paragraph:s(qn),reference:N,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(Zt),strong:s(yn),thematicBreak:s(fe)},exit:{atxHeading:p(),atxHeadingSequence:U,autolink:p(),autolinkEmail:Ne,autolinkProtocol:Ue,blockQuote:p(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:he,characterReference:Ee,codeFenced:p(j),codeFencedFence:C,codeFencedFenceInfo:b,codeFencedFenceMeta:k,codeFlowValue:T,codeIndented:p(E),codeText:p(Q),codeTextData:T,data:T,definition:p(),definitionDestinationString:F,definitionLabelString:_,definitionTitleString:R,emphasis:p(),hardBreakEscape:p(Y),hardBreakTrailing:p(Y),htmlFlow:p(ie),htmlFlowData:T,htmlText:p(B),htmlTextData:T,image:p(ee),label:V,labelText:ne,lineEnding:G,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:D,resourceTitleString:L,resource:X,setextHeading:p(P),setextHeadingLineSequence:W,setextHeadingText:O,strong:p(),thematicBreak:p()}};Iw(n,(e||{}).mdastExtensions||[]);const a={};return r;function r($){let le={type:"root",children:[]};const me={stack:[le],tokenStack:[],config:n,enter:d,exit:f,buffer:u,resume:y,data:a},ye=[];let I=-1;for(;++I<$.length;)if($[I][1].type==="listOrdered"||$[I][1].type==="listUnordered")if($[I][0]==="enter")ye.push(I);else{const Te=ye.pop();I=o($,Te,I)}for(I=-1;++I<$.length;){const Te=n[$[I][0]];zw.call(Te,$[I][1].type)&&Te[$[I][1].type].call(Object.assign({sliceSerialize:$[I][2].sliceSerialize},me),$[I][1])}if(me.tokenStack.length>0){const Te=me.tokenStack[me.tokenStack.length-1];(Te[1]||D1).call(me,void 0,Te[0])}for(le.position={start:Ti($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:Ti($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},I=-1;++I<n.transforms.length;)le=n.transforms[I](le)||le;return le}function o($,le,me){let ye=le-1,I=-1,Te=!1,at,Ie,Xe,Ve;for(;++ye<=me;){const Se=$[ye];switch(Se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Se[0]==="enter"?I++:I--,Ve=void 0;break}case"lineEndingBlank":{Se[0]==="enter"&&(at&&!Ve&&!I&&!Xe&&(Xe=ye),Ve=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ve=void 0}if(!I&&Se[0]==="enter"&&Se[1].type==="listItemPrefix"||I===-1&&Se[0]==="exit"&&(Se[1].type==="listUnordered"||Se[1].type==="listOrdered")){if(at){let Vt=ye;for(Ie=void 0;Vt--;){const rt=$[Vt];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;Ie&&($[Ie][1].type="lineEndingBlank",Te=!0),rt[1].type="lineEnding",Ie=Vt}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}Xe&&(!Ie||Xe<Ie)&&(at._spread=!0),at.end=Object.assign({},Ie?$[Ie][1].start:Se[1].end),$.splice(Ie||ye,0,["exit",at,Se[2]]),ye++,me++}if(Se[1].type==="listItemPrefix"){const Vt={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0};at=Vt,$.splice(ye,0,["enter",Vt,Se[2]]),ye++,me++,Xe=void 0,Ve=!0}}}return $[le][1]._spread=Te,me}function s($,le){return me;function me(ye){d.call(this,$(ye),ye),le&&le.call(this,ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function d($,le,me){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([le,me||void 0]),$.position={start:Ti(le.start),end:void 0}}function p($){return le;function le(me){$&&$.call(this,me),f.call(this,me)}}function f($,le){const me=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==$.type&&(le?le.call(this,$,ye[0]):(ye[1]||D1).call(this,$,ye[0]));else throw new Error("Cannot close `"+$.type+"` ("+To({start:$.start,end:$.end})+"): it’s not open");me.position.end=Ti($.end)}function y(){return Kh(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x($){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function b(){const $=this.resume(),le=this.stack[this.stack.length-1];le.lang=$}function k(){const $=this.resume(),le=this.stack[this.stack.length-1];le.meta=$}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const $=this.resume(),le=this.stack[this.stack.length-1];le.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const $=this.resume(),le=this.stack[this.stack.length-1];le.value=$.replace(/(\r?\n|\r)$/g,"")}function _($){const le=this.resume(),me=this.stack[this.stack.length-1];me.label=le,me.identifier=da(this.sliceSerialize($)).toLowerCase()}function R(){const $=this.resume(),le=this.stack[this.stack.length-1];le.title=$}function F(){const $=this.resume(),le=this.stack[this.stack.length-1];le.url=$}function U($){const le=this.stack[this.stack.length-1];if(!le.depth){const me=this.sliceSerialize($).length;le.depth=me}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function W($){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function M($){const me=this.stack[this.stack.length-1].children;let ye=me[me.length-1];(!ye||ye.type!=="text")&&(ye=it(),ye.position={start:Ti($.start),end:void 0},me.push(ye)),this.stack.push(ye)}function T($){const le=this.stack.pop();le.value+=this.sliceSerialize($),le.position.end=Ti($.end)}function G($){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=le.children[le.children.length-1];me.position.end=Ti($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(le.type)&&(M.call(this,$),T.call(this,$))}function Y(){this.data.atHardBreak=!0}function ie(){const $=this.resume(),le=this.stack[this.stack.length-1];le.value=$}function B(){const $=this.resume(),le=this.stack[this.stack.length-1];le.value=$}function Q(){const $=this.resume(),le=this.stack[this.stack.length-1];le.value=$}function H(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=le,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ee(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=le,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function ne($){const le=this.sliceSerialize($),me=this.stack[this.stack.length-2];me.label=ZO(le),me.identifier=da(le).toLowerCase()}function V(){const $=this.stack[this.stack.length-1],le=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ye=$.children;me.children=ye}else me.alt=le}function D(){const $=this.resume(),le=this.stack[this.stack.length-1];le.url=$}function L(){const $=this.resume(),le=this.stack[this.stack.length-1];le.title=$}function X(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function ue($){const le=this.resume(),me=this.stack[this.stack.length-1];me.label=le,me.identifier=da(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function pe($){this.data.characterReferenceType=$.type}function he($){const le=this.sliceSerialize($),me=this.data.characterReferenceType;let ye;me?(ye=Aw(le,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=Qh(le);const I=this.stack[this.stack.length-1];I.value+=ye}function Ee($){const le=this.stack.pop();le.position.end=Ti($.end)}function Ue($){T.call(this,$);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize($)}function Ne($){T.call(this,$);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize($)}function et(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function xt(){return{type:"inlineCode",value:""}}function bt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function yt(){return{type:"emphasis",children:[]}}function Zt(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function pt(){return{type:"html",value:""}}function Dt(){return{type:"image",title:null,url:"",alt:null}}function Nt(){return{type:"link",title:null,url:"",children:[]}}function ge($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[]}}function Mt($){return{type:"listItem",spread:$._spread,checked:null,children:[]}}function qn(){return{type:"paragraph",children:[]}}function yn(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function Ti(e){return{line:e.line,column:e.column,offset:e.offset}}function Iw(e,n){let a=-1;for(;++a<n.length;){const r=n[a];Array.isArray(r)?Iw(e,r):nD(e,r)}}function nD(e,n){let a;for(a in n)if(zw.call(n,a))switch(a){case"canContainEols":{const r=n[a];r&&e[a].push(...r);break}case"transforms":{const r=n[a];r&&e[a].push(...r);break}case"enter":case"exit":{const r=n[a];r&&Object.assign(e[a],r);break}}}function D1(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+To({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+To({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+To({start:n.start,end:n.end})+") is still open")}function aD(e){const n=this;n.parser=a;function a(r){return eD(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function iD(e,n){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,a),e.applyData(n,a)}function rD(e,n){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,a),[e.applyData(n,a),{type:"text",value:`
|
|
1142
|
-
`}]}function lD(e,n){const a=n.value?n.value+`
|
|
1143
|
-
`:"",r={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function oD(e,n){const a={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function sD(e,n){const a={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function cD(e,n){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),o=yl(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let u,d=e.footnoteCounts.get(r);d===void 0?(d=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=s+1,d+=1,e.footnoteCounts.set(r,d);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+o,id:a+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(n,p);const f={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(n,f),e.applyData(n,f)}function uD(e,n){const a={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function dD(e,n){if(e.options.allowDangerousHtml){const a={type:"raw",value:n.value};return e.patch(n,a),e.applyData(n,a)}}function Pw(e,n){const a=n.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function fD(e,n){const a=String(n.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return Pw(e,n);const o={src:yl(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function pD(e,n){const a={src:yl(n.url)};n.alt!==null&&n.alt!==void 0&&(a.alt=n.alt),n.title!==null&&n.title!==void 0&&(a.title=n.title);const r={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,r),e.applyData(n,r)}function hD(e,n){const a={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(n,r),e.applyData(n,r)}function mD(e,n){const a=String(n.identifier).toUpperCase(),r=e.definitionById.get(a);if(!r)return Pw(e,n);const o={href:yl(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function gD(e,n){const a={href:yl(n.url)};n.title!==null&&n.title!==void 0&&(a.title=n.title);const r={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function yD(e,n,a){const r=e.all(n),o=a?vD(a):Uw(n),s={},u=[];if(typeof n.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(o||d!==0||y.type!=="element"||y.tagName!=="p")&&u.push({type:"text",value:`
|
|
1144
|
-
`}),y.type==="element"&&y.tagName==="p"&&!o?u.push(...y.children):u.push(y)}const p=r[r.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
1145
|
-
`});const f={type:"element",tagName:"li",properties:s,children:u};return e.patch(n,f),e.applyData(n,f)}function vD(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const a=e.children;let r=-1;for(;!n&&++r<a.length;)n=Uw(a[r])}return n}function Uw(e){const n=e.spread;return n??e.children.length>1}function xD(e,n){const a={},r=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(a.start=n.start);++o<r.length;){const u=r[o];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:a,children:e.wrap(r,!0)};return e.patch(n,s),e.applyData(n,s)}function bD(e,n){const a={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function wD(e,n){const a={type:"root",children:e.wrap(e.all(n))};return e.patch(n,a),e.applyData(n,a)}function SD(e,n){const a={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function kD(e,n){const a=e.all(n),r=a.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],u),o.push(u)}if(a.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},d=Gh(n.children[1]),p=vw(n.children[n.children.length-1]);d&&p&&(u.position={start:d,end:p}),o.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function CD(e,n,a){const r=a?a.children:void 0,s=(r?r.indexOf(n):1)===0?"th":"td",u=a&&a.type==="table"?a.align:void 0,d=u?u.length:n.children.length;let p=-1;const f=[];for(;++p<d;){const g=n.children[p],x={},b=u?u[p]:void 0;b&&(x.align=b);let k={type:"element",tagName:s,properties:x,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),f.push(k)}const y={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(n,y),e.applyData(n,y)}function ED(e,n){const a={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}const M1=9,L1=32;function AD(e){const n=String(e),a=/\r?\n|\r/g;let r=a.exec(n),o=0;const s=[];for(;r;)s.push(z1(n.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=a.exec(n);return s.push(z1(n.slice(o),o>0,!1)),s.join("")}function z1(e,n,a){let r=0,o=e.length;if(n){let s=e.codePointAt(r);for(;s===M1||s===L1;)r++,s=e.codePointAt(r)}if(a){let s=e.codePointAt(o-1);for(;s===M1||s===L1;)o--,s=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function jD(e,n){const a={type:"text",value:AD(String(n.value))};return e.patch(n,a),e.applyData(n,a)}function TD(e,n){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,a),e.applyData(n,a)}const ND={blockquote:iD,break:rD,code:lD,delete:oD,emphasis:sD,footnoteReference:cD,heading:uD,html:dD,imageReference:fD,image:pD,inlineCode:hD,linkReference:mD,link:gD,listItem:yD,list:xD,paragraph:bD,root:wD,strong:SD,table:kD,tableCell:ED,tableRow:CD,text:jD,thematicBreak:TD,toml:yc,yaml:yc,definition:yc,footnoteDefinition:yc};function yc(){}const Bw=-1,du=0,Ro=1,Yc=2,Zh=3,Jh=4,em=5,tm=6,Hw=7,$w=8,RD=typeof self=="object"?self:globalThis,I1=(e,n)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new RD[e](n)},_D=(e,n)=>{const a=(o,s)=>(e.set(s,o),o),r=o=>{if(e.has(o))return e.get(o);const[s,u]=n[o];switch(s){case du:case Bw:return a(u,o);case Ro:{const d=a([],o);for(const p of u)d.push(r(p));return d}case Yc:{const d=a({},o);for(const[p,f]of u)d[r(p)]=r(f);return d}case Zh:return a(new Date(u),o);case Jh:{const{source:d,flags:p}=u;return a(new RegExp(d,p),o)}case em:{const d=a(new Map,o);for(const[p,f]of u)d.set(r(p),r(f));return d}case tm:{const d=a(new Set,o);for(const p of u)d.add(r(p));return d}case Hw:{const{name:d,message:p}=u;return a(I1(d,p),o)}case $w:return a(BigInt(u),o);case"BigInt":return a(Object(BigInt(u)),o);case"ArrayBuffer":return a(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:d}=new Uint8Array(u);return a(new DataView(d),u)}}return a(I1(s,u),o)};return r},P1=e=>_D(new Map,e)(0),el="",{toString:OD}={},{keys:DD}=Object,bo=e=>{const n=typeof e;if(n!=="object"||!e)return[du,n];const a=OD.call(e).slice(8,-1);switch(a){case"Array":return[Ro,el];case"Object":return[Yc,el];case"Date":return[Zh,el];case"RegExp":return[Jh,el];case"Map":return[em,el];case"Set":return[tm,el];case"DataView":return[Ro,a]}return a.includes("Array")?[Ro,a]:a.includes("Error")?[Hw,a]:[Yc,a]},vc=([e,n])=>e===du&&(n==="function"||n==="symbol"),MD=(e,n,a,r)=>{const o=(u,d)=>{const p=r.push(u)-1;return a.set(d,p),p},s=u=>{if(a.has(u))return a.get(u);let[d,p]=bo(u);switch(d){case du:{let y=u;switch(p){case"bigint":d=$w,y=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([Bw],u)}return o([d,y],u)}case Ro:{if(p){let x=u;return p==="DataView"?x=new Uint8Array(u.buffer):p==="ArrayBuffer"&&(x=new Uint8Array(u)),o([p,[...x]],u)}const y=[],g=o([d,y],u);for(const x of u)y.push(s(x));return g}case Yc:{if(p)switch(p){case"BigInt":return o([p,u.toString()],u);case"Boolean":case"Number":case"String":return o([p,u.valueOf()],u)}if(n&&"toJSON"in u)return s(u.toJSON());const y=[],g=o([d,y],u);for(const x of DD(u))(e||!vc(bo(u[x])))&&y.push([s(x),s(u[x])]);return g}case Zh:return o([d,u.toISOString()],u);case Jh:{const{source:y,flags:g}=u;return o([d,{source:y,flags:g}],u)}case em:{const y=[],g=o([d,y],u);for(const[x,b]of u)(e||!(vc(bo(x))||vc(bo(b))))&&y.push([s(x),s(b)]);return g}case tm:{const y=[],g=o([d,y],u);for(const x of u)(e||!vc(bo(x)))&&y.push(s(x));return g}}const{message:f}=u;return o([d,{name:p,message:f}],u)};return s},U1=(e,{json:n,lossy:a}={})=>{const r=[];return MD(!(n||a),!!n,new Map,r)(e),r},Kc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?P1(U1(e,n)):structuredClone(e):(e,n)=>P1(U1(e,n));function LD(e,n){const a=[{type:"text",value:"↩"}];return n>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),a}function zD(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function ID(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||LD,r=e.options.footnoteBackLabel||zD,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[p]);if(!f)continue;const y=e.all(f),g=String(f.identifier).toUpperCase(),x=yl(g.toLowerCase());let b=0;const k=[],C=e.footnoteCounts.get(g);for(;C!==void 0&&++b<=C;){k.length>0&&k.push({type:"text",value:" "});let _=typeof a=="string"?a:a(p,b);typeof _=="string"&&(_={type:"text",value:_}),k.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,b),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const j=y[y.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const _=j.children[j.children.length-1];_&&_.type==="text"?_.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...k)}else y.push(...k);const E={type:"element",tagName:"li",properties:{id:n+"fn-"+x},children:e.wrap(y,!0)};e.patch(f,E),d.push(E)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Kc(u),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
1146
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
1147
|
-
`}]}}const fu=(function(e){if(e==null)return HD;if(typeof e=="function")return pu(e);if(typeof e=="object")return Array.isArray(e)?PD(e):UD(e);if(typeof e=="string")return BD(e);throw new Error("Expected function, string, or object as test")});function PD(e){const n=[];let a=-1;for(;++a<e.length;)n[a]=fu(e[a]);return pu(r);function r(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function UD(e){const n=e;return pu(a);function a(r){const o=r;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function BD(e){return pu(n);function n(a){return a&&a.type===e}}function pu(e){return n;function n(a,r,o){return!!($D(a)&&e.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function HD(){return!0}function $D(e){return e!==null&&typeof e=="object"&&"type"in e}const qw=[],qD=!0,Qp=!1,FD="skip";function Fw(e,n,a,r){let o;typeof n=="function"&&typeof a!="function"?(r=a,a=n):o=n;const s=fu(o),u=r?-1:1;d(e,void 0,[])();function d(p,f,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(p.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=qw,k,C,j;if((!n||s(p,f,y[y.length-1]||void 0))&&(b=GD(a(p,y)),b[0]===Qp))return b;if("children"in p&&p.children){const E=p;if(E.children&&b[0]!==FD)for(C=(r?E.children.length:-1)+u,j=y.concat(E);C>-1&&C<E.children.length;){const _=E.children[C];if(k=d(_,C,j)(),k[0]===Qp)return k;C=typeof k[1]=="number"?k[1]:C+u}}return b}}}function GD(e){return Array.isArray(e)?e:typeof e=="number"?[qD,e]:e==null?qw:[e]}function nm(e,n,a,r){let o,s,u;typeof n=="function"&&typeof a!="function"?(s=void 0,u=n,o=a):(s=n,u=a,o=r),Fw(e,s,d,o);function d(p,f){const y=f[f.length-1],g=y?y.children.indexOf(p):void 0;return u(p,g,y)}}const Xp={}.hasOwnProperty,VD={};function WD(e,n){const a=n||VD,r=new Map,o=new Map,s=new Map,u={...ND,...a.handlers},d={all:f,applyData:KD,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:u,one:p,options:a,patch:YD,wrap:XD};return nm(e,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:o,x=String(y.identifier).toUpperCase();g.has(x)||g.set(x,y)}}),d;function p(y,g){const x=y.type,b=d.handlers[x];if(Xp.call(d.handlers,x)&&b)return b(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in y){const{children:C,...j}=y,E=Kc(j);return E.children=d.all(y),E}return Kc(y)}return(d.options.unknownHandler||QD)(d,y,g)}function f(y){const g=[];if("children"in y){const x=y.children;let b=-1;for(;++b<x.length;){const k=d.one(x[b],y);if(k){if(b&&x[b-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=B1(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=B1(C.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function YD(e,n){e.position&&(n.position=L3(e))}function KD(e,n){let a=n;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const u="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:u}}a.type==="element"&&s&&Object.assign(a.properties,Kc(s)),"children"in a&&a.children&&o!==null&&o!==void 0&&(a.children=o)}return a}function QD(e,n){const a=n.data||{},r="value"in n&&!(Xp.call(a,"hProperties")||Xp.call(a,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function XD(e,n){const a=[];let r=-1;for(n&&a.push({type:"text",value:`
|
|
1148
|
-
`});++r<e.length;)r&&a.push({type:"text",value:`
|
|
1149
|
-
`}),a.push(e[r]);return n&&e.length>0&&a.push({type:"text",value:`
|
|
1150
|
-
`}),a}function B1(e){let n=0,a=e.charCodeAt(n);for(;a===9||a===32;)n++,a=e.charCodeAt(n);return e.slice(n)}function H1(e,n){const a=WD(e,n),r=a.one(e,void 0),o=ID(a),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
1151
|
-
`},o),s}function ZD(e,n){return e&&"run"in e?async function(a,r){const o=H1(a,{file:r,...n});await e.run(o,r)}:function(a,r){return H1(a,{file:r,...e||n})}}function $1(e){if(e)throw e}var sp,q1;function JD(){if(q1)return sp;q1=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},s=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var y=e.call(f,"constructor"),g=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!y&&!g)return!1;var x;for(x in f);return typeof x>"u"||e.call(f,x)},u=function(f,y){a&&y.name==="__proto__"?a(f,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):f[y.name]=y.newValue},d=function(f,y){if(y==="__proto__")if(e.call(f,y)){if(r)return r(f,y).value}else return;return f[y]};return sp=function p(){var f,y,g,x,b,k,C=arguments[0],j=1,E=arguments.length,_=!1;for(typeof C=="boolean"&&(_=C,C=arguments[1]||{},j=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});j<E;++j)if(f=arguments[j],f!=null)for(y in f)g=d(C,y),x=d(f,y),C!==x&&(_&&x&&(s(x)||(b=o(x)))?(b?(b=!1,k=g&&o(g)?g:[]):k=g&&s(g)?g:{},u(C,{name:y,newValue:p(_,k,x)})):typeof x<"u"&&u(C,{name:y,newValue:x}));return C},sp}var eM=JD();const cp=Uo(eM);function Zp(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function tM(){const e=[],n={run:a,use:r};return n;function a(...o){let s=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...o);function d(p,...f){const y=e[++s];let g=-1;if(p){u(p);return}for(;++g<o.length;)(f[g]===null||f[g]===void 0)&&(f[g]=o[g]);o=f,y?nM(y,d)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function nM(e,n){let a;return r;function r(...u){const d=e.length>u.length;let p;d&&u.push(o);try{p=e.apply(this,u)}catch(f){const y=f;if(d&&a)throw y;return o(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(u,...d){a||(a=!0,n(u,...d))}function s(u){o(null,u)}}const ka={basename:aM,dirname:iM,extname:rM,join:lM,sep:"/"};function aM(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Vo(e);let a=0,r=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){a=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":e.slice(a,r)}if(n===e)return"";let u=-1,d=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){a=o+1;break}}else u<0&&(s=!0,u=o+1),d>-1&&(e.codePointAt(o)===n.codePointAt(d--)?d<0&&(r=o):(d=-1,r=u));return a===r?r=u:r<0&&(r=e.length),e.slice(a,r)}function iM(e){if(Vo(e),e.length===0)return".";let n=-1,a=e.length,r;for(;--a;)if(e.codePointAt(a)===47){if(r){n=a;break}}else r||(r=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function rM(e){Vo(e);let n=e.length,a=-1,r=0,o=-1,s=0,u;for(;n--;){const d=e.codePointAt(n);if(d===47){if(u){r=n+1;break}continue}a<0&&(u=!0,a=n+1),d===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||a<0||s===0||s===1&&o===a-1&&o===r+1?"":e.slice(o,a)}function lM(...e){let n=-1,a;for(;++n<e.length;)Vo(e[n]),e[n]&&(a=a===void 0?e[n]:a+"/"+e[n]);return a===void 0?".":oM(a)}function oM(e){Vo(e);const n=e.codePointAt(0)===47;let a=sM(e,!n);return a.length===0&&!n&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),n?"/"+a:a}function sM(e,n){let a="",r=0,o=-1,s=0,u=-1,d,p;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(o===u-1||s===1))if(o!==u-1&&s===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),o=u,s=0;continue}}else if(a.length>0){a="",r=0,o=u,s=0;continue}}n&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+e.slice(o+1,u):a=e.slice(o+1,u),r=u-o-1;o=u,s=0}else d===46&&s>-1?s++:s=-1}return a}function Vo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const cM={cwd:uM};function uM(){return"/"}function Jp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function dM(e){if(typeof e=="string")e=new URL(e);else if(!Jp(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return fM(e)}function fM(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let a=-1;for(;++a<n.length;)if(n.codePointAt(a)===37&&n.codePointAt(a+1)===50){const r=n.codePointAt(a+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const up=["history","path","basename","stem","extname","dirname"];class Gw{constructor(n){let a;n?Jp(n)?a={path:n}:typeof n=="string"||pM(n)?a={value:n}:a=n:a={},this.cwd="cwd"in a?"":cM.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<up.length;){const s=up[r];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let o;for(o in a)up.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?ka.basename(this.path):void 0}set basename(n){fp(n,"basename"),dp(n,"basename"),this.path=ka.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?ka.dirname(this.path):void 0}set dirname(n){F1(this.basename,"dirname"),this.path=ka.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?ka.extname(this.path):void 0}set extname(n){if(dp(n,"extname"),F1(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ka.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){Jp(n)&&(n=dM(n)),fp(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?ka.basename(this.path,this.extname):void 0}set stem(n){fp(n,"stem"),dp(n,"stem"),this.path=ka.join(this.dirname||"",n+(this.extname||""))}fail(n,a,r){const o=this.message(n,a,r);throw o.fatal=!0,o}info(n,a,r){const o=this.message(n,a,r);return o.fatal=void 0,o}message(n,a,r){const o=new sn(n,a,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function dp(e,n){if(e&&e.includes(ka.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+ka.sep+"`")}function fp(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function F1(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function pM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hM=(function(e){const r=this.constructor.prototype,o=r[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),mM={}.hasOwnProperty;class am extends hM{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=tM()}copy(){const n=new am;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];n.use(...r)}return n.data(cp(!0,{},this.namespace)),n}data(n,a){return typeof n=="string"?arguments.length===2?(mp("data",this.frozen),this.namespace[n]=a,this):mM.call(this.namespace,n)&&this.namespace[n]||void 0:n?(mp("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=a.call(n,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const a=xc(n),r=this.parser||this.Parser;return pp("parse",r),r(String(a),a)}process(n,a){const r=this;return this.freeze(),pp("process",this.parser||this.Parser),hp("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(s,u){const d=xc(n),p=r.parse(d);r.run(p,d,function(y,g,x){if(y||!g||!x)return f(y);const b=g,k=r.stringify(b,x);vM(k)?x.value=k:x.result=k,f(y,x)});function f(y,g){y||!g?u(y):s?s(g):a(void 0,g)}}}processSync(n){let a=!1,r;return this.freeze(),pp("processSync",this.parser||this.Parser),hp("processSync",this.compiler||this.Compiler),this.process(n,o),V1("processSync","process",a),r;function o(s,u){a=!0,$1(s),r=u}}run(n,a,r){G1(n),this.freeze();const o=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?s(void 0,r):new Promise(s);function s(u,d){const p=xc(a);o.run(n,p,f);function f(y,g,x){const b=g||n;y?d(y):u?u(b):r(void 0,b,x)}}}runSync(n,a){let r=!1,o;return this.run(n,a,s),V1("runSync","run",r),o;function s(u,d){$1(u),o=d,r=!0}}stringify(n,a){this.freeze();const r=xc(a),o=this.compiler||this.Compiler;return hp("stringify",o),G1(n),o(n,r)}use(n,...a){const r=this.attachers,o=this.namespace;if(mp("use",this.frozen),n!=null)if(typeof n=="function")p(n,a);else if(typeof n=="object")Array.isArray(n)?d(n):u(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(f){if(typeof f=="function")p(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[y,...g]=f;p(y,g)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(f.plugins),f.settings&&(o.settings=cp(!0,o.settings,f.settings))}function d(f){let y=-1;if(f!=null)if(Array.isArray(f))for(;++y<f.length;){const g=f[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function p(f,y){let g=-1,x=-1;for(;++g<r.length;)if(r[g][0]===f){x=g;break}if(x===-1)r.push([f,...y]);else if(y.length>0){let[b,...k]=y;const C=r[x][1];Zp(C)&&Zp(b)&&(b=cp(!0,C,b)),r[x]=[f,b,...k]}}}}const gM=new am().freeze();function pp(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hp(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function mp(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G1(e){if(!Zp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function V1(e,n,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function xc(e){return yM(e)?e:new Gw(e)}function yM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function vM(e){return typeof e=="string"||xM(e)}function xM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",W1=[],Y1={allowDangerousHtml:!0},wM=/^(https?|ircs?|mailto|xmpp)$/i,SM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function kM(e){const n=CM(e),a=EM(e);return AM(n.runSync(n.parse(a),a),e)}function CM(e){const n=e.rehypePlugins||W1,a=e.remarkPlugins||W1,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Y1}:Y1;return gM().use(aD).use(a).use(ZD,r).use(n)}function EM(e){const n=e.children||"",a=new Gw;return typeof n=="string"&&(a.value=n),a}function AM(e,n){const a=n.allowedElements,r=n.allowElement,o=n.components,s=n.disallowedElements,u=n.skipHtml,d=n.unwrapDisallowed,p=n.urlTransform||jM;for(const y of SM)Object.hasOwn(n,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+bM+y.id,void 0);return nm(e,f),B3(e,{Fragment:m.Fragment,components:o,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function f(y,g,x){if(y.type==="raw"&&x&&typeof g=="number")return u?x.children.splice(g,1):x.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let b;for(b in rp)if(Object.hasOwn(rp,b)&&Object.hasOwn(y.properties,b)){const k=y.properties[b],C=rp[b];(C===null||C.includes(y.tagName))&&(y.properties[b]=p(String(k||""),b,y))}}if(y.type==="element"){let b=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!b&&r&&typeof g=="number"&&(b=!r(y,g,x)),b&&x&&typeof g=="number")return d&&y.children?x.children.splice(g,1,...y.children):x.children.splice(g,1),g}}}function jM(e){const n=e.indexOf(":"),a=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||a!==-1&&n>a||r!==-1&&n>r||wM.test(e.slice(0,n))?e:""}function K1(e,n){const a=String(e);if(typeof n!="string")throw new TypeError("Expected character");let r=0,o=a.indexOf(n);for(;o!==-1;)r++,o=a.indexOf(n,o+n.length);return r}function TM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Vw(e,n,a){const o=fu((a||{}).ignore||[]),s=NM(n);let u=-1;for(;++u<s.length;)Fw(e,"text",d);function d(f,y){let g=-1,x;for(;++g<y.length;){const b=y[g],k=x?x.children:void 0;if(o(b,k?k.indexOf(b):void 0,x))return;x=b}if(x)return p(f,y)}function p(f,y){const g=y[y.length-1],x=s[u][0],b=s[u][1];let k=0;const j=g.children.indexOf(f);let E=!1,_=[];x.lastIndex=0;let R=x.exec(f.value);for(;R;){const F=R.index,U={index:R.index,input:R.input,stack:[...y,f]};let O=b(...R,U);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?x.lastIndex=F+1:(k!==F&&_.push({type:"text",value:f.value.slice(k,F)}),Array.isArray(O)?_.push(...O):O&&_.push(O),k=F+R[0].length,E=!0),!x.global)break;R=x.exec(f.value)}return E?(k<f.value.length&&_.push({type:"text",value:f.value.slice(k)}),g.children.splice(j,1,..._)):_=[f],j+_.length}}function NM(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<a.length;){const o=a[r];n.push([RM(o[0]),_M(o[1])])}return n}function RM(e){return typeof e=="string"?new RegExp(TM(e),"g"):e}function _M(e){return typeof e=="function"?e:function(){return e}}const gp="phrasing",yp=["autolink","link","image","label"];function OM(){return{transforms:[UM],enter:{literalAutolink:MM,literalAutolinkEmail:vp,literalAutolinkHttp:vp,literalAutolinkWww:vp},exit:{literalAutolink:PM,literalAutolinkEmail:IM,literalAutolinkHttp:LM,literalAutolinkWww:zM}}}function DM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gp,notInConstruct:yp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gp,notInConstruct:yp},{character:":",before:"[ps]",after:"\\/",inConstruct:gp,notInConstruct:yp}]}}function MM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vp(e){this.config.enter.autolinkProtocol.call(this,e)}function LM(e){this.config.exit.autolinkProtocol.call(this,e)}function zM(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function IM(e){this.config.exit.autolinkEmail.call(this,e)}function PM(e){this.exit(e)}function UM(e){Vw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),HM]],{ignore:["link","linkReference"]})}function BM(e,n,a,r,o){let s="";if(!Ww(o)||(/^w/i.test(n)&&(a=n+a,n="",s="http://"),!$M(a)))return!1;const u=qM(a+r);if(!u[0])return!1;const d={type:"link",title:null,url:s+n+u[0],children:[{type:"text",value:n+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function HM(e,n,a,r){return!Ww(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+a,children:[{type:"text",value:n+"@"+a}]}}function $M(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function qM(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let a=n[0],r=a.indexOf(")");const o=K1(e,"(");let s=K1(e,")");for(;r!==-1&&o>s;)e+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),s++;return[e,a]}function Ww(e,n){const a=e.input.charCodeAt(e.index-1);return(e.index===0||cr(a)||cu(a))&&(!n||a!==47)}Yw.peek=ZM;function FM(){this.buffer()}function GM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function VM(){this.buffer()}function WM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function YM(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=da(this.sliceSerialize(e)).toLowerCase(),a.label=n}function KM(e){this.exit(e)}function QM(e){const n=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=da(this.sliceSerialize(e)).toLowerCase(),a.label=n}function XM(e){this.exit(e)}function ZM(){return"["}function Yw(e,n,a,r){const o=a.createTracker(r);let s=o.move("[^");const u=a.enter("footnoteReference"),d=a.enter("reference");return s+=o.move(a.safe(a.associationId(e),{after:"]",before:s})),d(),u(),s+=o.move("]"),s}function JM(){return{enter:{gfmFootnoteCallString:FM,gfmFootnoteCall:GM,gfmFootnoteDefinitionLabelString:VM,gfmFootnoteDefinition:WM},exit:{gfmFootnoteCallString:YM,gfmFootnoteCall:KM,gfmFootnoteDefinitionLabelString:QM,gfmFootnoteDefinition:XM}}}function e6(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:a,footnoteReference:Yw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,o,s,u){const d=s.createTracker(u);let p=d.move("[^");const f=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((n?`
|
|
1152
|
-
`:" ")+s.indentLines(s.containerFlow(r,d.current()),n?Kw:t6))),f(),p}}function t6(e,n,a){return n===0?e:Kw(e,n,a)}function Kw(e,n,a){return(a?"":" ")+e}const n6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Qw.peek=o6;function a6(){return{canContainEols:["delete"],enter:{strikethrough:r6},exit:{strikethrough:l6}}}function i6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:n6}],handlers:{delete:Qw}}}function r6(e){this.enter({type:"delete",children:[]},e)}function l6(e){this.exit(e)}function Qw(e,n,a,r){const o=a.createTracker(r),s=a.enter("strikethrough");let u=o.move("~~");return u+=a.containerPhrasing(e,{...o.current(),before:u,after:"~"}),u+=o.move("~~"),s(),u}function o6(){return"~"}function s6(e){return e.length}function c6(e,n){const a=n||{},r=(a.align||[]).concat(),o=a.stringLength||s6,s=[],u=[],d=[],p=[];let f=0,y=-1;for(;++y<e.length;){const C=[],j=[];let E=-1;for(e[y].length>f&&(f=e[y].length);++E<e[y].length;){const _=u6(e[y][E]);if(a.alignDelimiters!==!1){const R=o(_);j[E]=R,(p[E]===void 0||R>p[E])&&(p[E]=R)}C.push(_)}u[y]=C,d[y]=j}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<f;)s[g]=Q1(r[g]);else{const C=Q1(r);for(;++g<f;)s[g]=C}g=-1;const x=[],b=[];for(;++g<f;){const C=s[g];let j="",E="";C===99?(j=":",E=":"):C===108?j=":":C===114&&(E=":");let _=a.alignDelimiters===!1?1:Math.max(1,p[g]-j.length-E.length);const R=j+"-".repeat(_)+E;a.alignDelimiters!==!1&&(_=j.length+_+E.length,_>p[g]&&(p[g]=_),b[g]=_),x[g]=R}u.splice(1,0,x),d.splice(1,0,b),y=-1;const k=[];for(;++y<u.length;){const C=u[y],j=d[y];g=-1;const E=[];for(;++g<f;){const _=C[g]||"";let R="",F="";if(a.alignDelimiters!==!1){const U=p[g]-(j[g]||0),O=s[g];O===114?R=" ".repeat(U):O===99?U%2?(R=" ".repeat(U/2+.5),F=" ".repeat(U/2-.5)):(R=" ".repeat(U/2),F=R):F=" ".repeat(U)}a.delimiterStart!==!1&&!g&&E.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&_==="")&&(a.delimiterStart!==!1||g)&&E.push(" "),a.alignDelimiters!==!1&&E.push(R),E.push(_),a.alignDelimiters!==!1&&E.push(F),a.padding!==!1&&E.push(" "),(a.delimiterEnd!==!1||g!==f-1)&&E.push("|")}k.push(a.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
|
|
1153
|
-
`)}function u6(e){return e==null?"":String(e)}function Q1(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function d6(e,n,a,r){const o=a.enter("blockquote"),s=a.createTracker(r);s.move("> "),s.shift(2);const u=a.indentLines(a.containerFlow(e,s.current()),f6);return o(),u}function f6(e,n,a){return">"+(a?"":" ")+e}function p6(e,n){return X1(e,n.inConstruct,!0)&&!X1(e,n.notInConstruct,!1)}function X1(e,n,a){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return a;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function Z1(e,n,a,r){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
1154
|
-
`&&p6(a.stack,a.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
1155
|
-
`}function h6(e,n){const a=String(e);let r=a.indexOf(n),o=r,s=0,u=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++s>u&&(u=s):s=1,o=r+n.length,r=a.indexOf(n,o);return u}function m6(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function g6(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function y6(e,n,a,r){const o=g6(a),s=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(m6(e,a)){const g=a.enter("codeIndented"),x=a.indentLines(s,v6);return g(),x}const d=a.createTracker(r),p=o.repeat(Math.max(h6(s,o)+1,3)),f=a.enter("codeFenced");let y=d.move(p);if(e.lang){const g=a.enter(`codeFencedLang${u}`);y+=d.move(a.safe(e.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(e.lang&&e.meta){const g=a.enter(`codeFencedMeta${u}`);y+=d.move(" "),y+=d.move(a.safe(e.meta,{before:y,after:`
|
|
1156
|
-
`,encode:["`"],...d.current()})),g()}return y+=d.move(`
|
|
1157
|
-
`),s&&(y+=d.move(s+`
|
|
1158
|
-
`)),y+=d.move(p),f(),y}function v6(e,n,a){return(a?"":" ")+e}function im(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function x6(e,n,a,r){const o=im(a),s=o==='"'?"Quote":"Apostrophe",u=a.enter("definition");let d=a.enter("label");const p=a.createTracker(r);let f=p.move("[");return f+=p.move(a.safe(a.associationId(e),{before:f,after:"]",...p.current()})),f+=p.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=a.enter("destinationLiteral"),f+=p.move("<"),f+=p.move(a.safe(e.url,{before:f,after:">",...p.current()})),f+=p.move(">")):(d=a.enter("destinationRaw"),f+=p.move(a.safe(e.url,{before:f,after:e.title?" ":`
|
|
1159
|
-
`,...p.current()}))),d(),e.title&&(d=a.enter(`title${s}`),f+=p.move(" "+o),f+=p.move(a.safe(e.title,{before:f,after:o,...p.current()})),f+=p.move(o),d()),u(),f}function b6(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function Io(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Qc(e,n,a){const r=ol(e),o=ol(n);return r===void 0?o===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Xw.peek=w6;function Xw(e,n,a,r){const o=b6(a),s=a.enter("emphasis"),u=a.createTracker(r),d=u.move(o);let p=u.move(a.containerPhrasing(e,{after:o,before:d,...u.current()}));const f=p.charCodeAt(0),y=Qc(r.before.charCodeAt(r.before.length-1),f,o);y.inside&&(p=Io(f)+p.slice(1));const g=p.charCodeAt(p.length-1),x=Qc(r.after.charCodeAt(0),g,o);x.inside&&(p=p.slice(0,-1)+Io(g));const b=u.move(o);return s(),a.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},d+p+b}function w6(e,n,a){return a.options.emphasis||"*"}function S6(e,n){let a=!1;return nm(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,Qp}),!!((!e.depth||e.depth<3)&&Kh(e)&&(n.options.setext||a))}function k6(e,n,a,r){const o=Math.max(Math.min(6,e.depth||1),1),s=a.createTracker(r);if(S6(e,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),x=a.containerPhrasing(e,{...s.current(),before:`
|
|
1160
|
-
`,after:`
|
|
1161
|
-
`});return g(),y(),x+`
|
|
1162
|
-
`+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
1163
|
-
`))+1))}const u="#".repeat(o),d=a.enter("headingAtx"),p=a.enter("phrasing");s.move(u+" ");let f=a.containerPhrasing(e,{before:"# ",after:`
|
|
1164
|
-
`,...s.current()});return/^[\t ]/.test(f)&&(f=Io(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,a.options.closeAtx&&(f+=" "+u),p(),d(),f}Zw.peek=C6;function Zw(e){return e.value||""}function C6(){return"<"}Jw.peek=E6;function Jw(e,n,a,r){const o=im(a),s=o==='"'?"Quote":"Apostrophe",u=a.enter("image");let d=a.enter("label");const p=a.createTracker(r);let f=p.move("![");return f+=p.move(a.safe(e.alt,{before:f,after:"]",...p.current()})),f+=p.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=a.enter("destinationLiteral"),f+=p.move("<"),f+=p.move(a.safe(e.url,{before:f,after:">",...p.current()})),f+=p.move(">")):(d=a.enter("destinationRaw"),f+=p.move(a.safe(e.url,{before:f,after:e.title?" ":")",...p.current()}))),d(),e.title&&(d=a.enter(`title${s}`),f+=p.move(" "+o),f+=p.move(a.safe(e.title,{before:f,after:o,...p.current()})),f+=p.move(o),d()),f+=p.move(")"),u(),f}function E6(){return"!"}eS.peek=A6;function eS(e,n,a,r){const o=e.referenceType,s=a.enter("imageReference");let u=a.enter("label");const d=a.createTracker(r);let p=d.move("![");const f=a.safe(e.alt,{before:p,after:"]",...d.current()});p+=d.move(f+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const g=a.safe(a.associationId(e),{before:p,after:"]",...d.current()});return u(),a.stack=y,s(),o==="full"||!f||f!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function A6(){return"!"}tS.peek=j6;function tS(e,n,a){let r=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<a.unsafe.length;){const u=a.unsafe[s],d=a.compilePattern(u);let p;if(u.atBreak)for(;p=d.exec(r);){let f=p.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(p.index+1)}}return o+r+o}function j6(){return"`"}function nS(e,n){const a=Kh(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(a===e.url||"mailto:"+a===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}aS.peek=T6;function aS(e,n,a,r){const o=im(a),s=o==='"'?"Quote":"Apostrophe",u=a.createTracker(r);let d,p;if(nS(e,a)){const y=a.stack;a.stack=[],d=a.enter("autolink");let g=u.move("<");return g+=u.move(a.containerPhrasing(e,{before:g,after:">",...u.current()})),g+=u.move(">"),d(),a.stack=y,g}d=a.enter("link"),p=a.enter("label");let f=u.move("[");return f+=u.move(a.containerPhrasing(e,{before:f,after:"](",...u.current()})),f+=u.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=a.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(a.safe(e.url,{before:f,after:">",...u.current()})),f+=u.move(">")):(p=a.enter("destinationRaw"),f+=u.move(a.safe(e.url,{before:f,after:e.title?" ":")",...u.current()}))),p(),e.title&&(p=a.enter(`title${s}`),f+=u.move(" "+o),f+=u.move(a.safe(e.title,{before:f,after:o,...u.current()})),f+=u.move(o),p()),f+=u.move(")"),d(),f}function T6(e,n,a){return nS(e,a)?"<":"["}iS.peek=N6;function iS(e,n,a,r){const o=e.referenceType,s=a.enter("linkReference");let u=a.enter("label");const d=a.createTracker(r);let p=d.move("[");const f=a.containerPhrasing(e,{before:p,after:"]",...d.current()});p+=d.move(f+"]["),u();const y=a.stack;a.stack=[],u=a.enter("reference");const g=a.safe(a.associationId(e),{before:p,after:"]",...d.current()});return u(),a.stack=y,s(),o==="full"||!f||f!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function N6(){return"["}function rm(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function R6(e){const n=rm(e),a=e.options.bulletOther;if(!a)return n==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+a+"`) to be different");return a}function _6(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function rS(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function O6(e,n,a,r){const o=a.enter("list"),s=a.bulletCurrent;let u=e.ordered?_6(a):rm(a);const d=e.ordered?u==="."?")":".":R6(a);let p=n&&a.bulletLastUsed?u===a.bulletLastUsed:!1;if(!e.ordered){const y=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),rS(a)===u&&y){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(u=d),a.bulletCurrent=u;const f=a.containerFlow(e,r);return a.bulletLastUsed=u,a.bulletCurrent=s,o(),f}function D6(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function M6(e,n,a,r){const o=D6(a);let s=a.bulletCurrent||rm(a);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(a.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let u=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=a.createTracker(r);d.move(s+" ".repeat(u-s.length)),d.shift(u);const p=a.enter("listItem"),f=a.indentLines(a.containerFlow(e,d.current()),y);return p(),f;function y(g,x,b){return x?(b?"":" ".repeat(u))+g:(b?s:s+" ".repeat(u-s.length))+g}}function L6(e,n,a,r){const o=a.enter("paragraph"),s=a.enter("phrasing"),u=a.containerPhrasing(e,r);return s(),o(),u}const z6=fu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function I6(e,n,a,r){return(e.children.some(function(u){return z6(u)})?a.containerPhrasing:a.containerFlow).call(a,e,r)}function P6(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}lS.peek=U6;function lS(e,n,a,r){const o=P6(a),s=a.enter("strong"),u=a.createTracker(r),d=u.move(o+o);let p=u.move(a.containerPhrasing(e,{after:o,before:d,...u.current()}));const f=p.charCodeAt(0),y=Qc(r.before.charCodeAt(r.before.length-1),f,o);y.inside&&(p=Io(f)+p.slice(1));const g=p.charCodeAt(p.length-1),x=Qc(r.after.charCodeAt(0),g,o);x.inside&&(p=p.slice(0,-1)+Io(g));const b=u.move(o+o);return s(),a.attentionEncodeSurroundingInfo={after:x.outside,before:y.outside},d+p+b}function U6(e,n,a){return a.options.strong||"*"}function B6(e,n,a,r){return a.safe(e.value,r)}function H6(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function $6(e,n,a){const r=(rS(a)+(a.options.ruleSpaces?" ":"")).repeat(H6(a));return a.options.ruleSpaces?r.slice(0,-1):r}const oS={blockquote:d6,break:Z1,code:y6,definition:x6,emphasis:Xw,hardBreak:Z1,heading:k6,html:Zw,image:Jw,imageReference:eS,inlineCode:tS,link:aS,linkReference:iS,list:O6,listItem:M6,paragraph:L6,root:I6,strong:lS,text:B6,thematicBreak:$6};function q6(){return{enter:{table:F6,tableData:J1,tableHeader:J1,tableRow:V6},exit:{codeText:W6,table:G6,tableData:xp,tableHeader:xp,tableRow:xp}}}function F6(e){const n=e._align;this.enter({type:"table",align:n.map(function(a){return a==="none"?null:a}),children:[]},e),this.data.inTable=!0}function G6(e){this.exit(e),this.data.inTable=void 0}function V6(e){this.enter({type:"tableRow",children:[]},e)}function xp(e){this.exit(e)}function J1(e){this.enter({type:"tableCell",children:[]},e)}function W6(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Y6));const a=this.stack[this.stack.length-1];a.type,a.value=n,this.exit(e)}function Y6(e,n){return n==="|"?n:e}function K6(e){const n=e||{},a=n.tableCellPadding,r=n.tablePipeAlign,o=n.stringLength,s=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
1165
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:u,tableCell:p,tableRow:d}};function u(b,k,C,j){return f(y(b,C,j),b.align)}function d(b,k,C,j){const E=g(b,C,j),_=f([E]);return _.slice(0,_.indexOf(`
|
|
1166
|
-
`))}function p(b,k,C,j){const E=C.enter("tableCell"),_=C.enter("phrasing"),R=C.containerPhrasing(b,{...j,before:s,after:s});return _(),E(),R}function f(b,k){return c6(b,{align:k,alignDelimiters:r,padding:a,stringLength:o})}function y(b,k,C){const j=b.children;let E=-1;const _=[],R=k.enter("table");for(;++E<j.length;)_[E]=g(j[E],k,C);return R(),_}function g(b,k,C){const j=b.children;let E=-1;const _=[],R=k.enter("tableRow");for(;++E<j.length;)_[E]=p(j[E],b,k,C);return R(),_}function x(b,k,C){let j=oS.inlineCode(b,k,C);return C.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function Q6(){return{exit:{taskListCheckValueChecked:ex,taskListCheckValueUnchecked:ex,paragraph:Z6}}}function X6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:J6}}}function ex(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function Z6(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const o=n.children;let s=-1,u;for(;++s<o.length;){const d=o[s];if(d.type==="paragraph"){u=d;break}}u===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function J6(e,n,a,r){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=a.createTracker(r);s&&d.move(u);let p=oS.listItem(e,n,a,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),p;function f(y){return y+u}}function e5(){return[OM(),JM(),a6(),q6(),Q6()]}function t5(e){return{extensions:[DM(),e6(e),i6(),K6(e),X6()]}}const n5={tokenize:s5,partial:!0},sS={tokenize:c5,partial:!0},cS={tokenize:u5,partial:!0},uS={tokenize:d5,partial:!0},a5={tokenize:f5,partial:!0},dS={name:"wwwAutolink",tokenize:l5,previous:pS},fS={name:"protocolAutolink",tokenize:o5,previous:hS},ei={name:"emailAutolink",tokenize:r5,previous:mS},Aa={};function i5(){return{text:Aa}}let ir=48;for(;ir<123;)Aa[ir]=ei,ir++,ir===58?ir=65:ir===91&&(ir=97);Aa[43]=ei;Aa[45]=ei;Aa[46]=ei;Aa[95]=ei;Aa[72]=[ei,fS];Aa[104]=[ei,fS];Aa[87]=[ei,dS];Aa[119]=[ei,dS];function r5(e,n,a){const r=this;let o,s;return u;function u(g){return!eh(g)||!mS.call(r,r.previous)||lm(r.events)?a(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return eh(g)?(e.consume(g),d):g===64?(e.consume(g),p):a(g)}function p(g){return g===46?e.check(a5,y,f)(g):g===45||g===95||on(g)?(s=!0,e.consume(g),p):y(g)}function f(g){return e.consume(g),o=!0,p}function y(g){return s&&o&&hn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(g)):a(g)}}function l5(e,n,a){const r=this;return o;function o(u){return u!==87&&u!==119||!pS.call(r,r.previous)||lm(r.events)?a(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(n5,e.attempt(sS,e.attempt(cS,s),a),a)(u))}function s(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(u)}}function o5(e,n,a){const r=this;let o="",s=!1;return u;function u(g){return(g===72||g===104)&&hS.call(r,r.previous)&&!lm(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),e.consume(g),d):a(g)}function d(g){if(hn(g)&&o.length<5)return o+=String.fromCodePoint(g),e.consume(g),d;if(g===58){const x=o.toLowerCase();if(x==="http"||x==="https")return e.consume(g),p}return a(g)}function p(g){return g===47?(e.consume(g),s?f:(s=!0,p)):a(g)}function f(g){return g===null||Wc(g)||gt(g)||cr(g)||cu(g)?a(g):e.attempt(sS,e.attempt(cS,y),a)(g)}function y(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(g)}}function s5(e,n,a){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),s):a(u)}function s(u){return u===null?a(u):n(u)}}function c5(e,n,a){let r,o,s;return u;function u(f){return f===46||f===95?e.check(uS,p,d)(f):f===null||gt(f)||cr(f)||f!==45&&cu(f)?p(f):(s=!0,e.consume(f),u)}function d(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function p(f){return o||r||!s?a(f):n(f)}}function u5(e,n){let a=0,r=0;return o;function o(u){return u===40?(a++,e.consume(u),o):u===41&&r<a?s(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(uS,n,s)(u):u===null||gt(u)||cr(u)?n(u):(e.consume(u),o)}function s(u){return u===41&&r++,e.consume(u),o}}function d5(e,n,a){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),r):d===38?(e.consume(d),s):d===93?(e.consume(d),o):d===60||d===null||gt(d)||cr(d)?n(d):a(d)}function o(d){return d===null||d===40||d===91||gt(d)||cr(d)?n(d):r(d)}function s(d){return hn(d)?u(d):a(d)}function u(d){return d===59?(e.consume(d),r):hn(d)?(e.consume(d),u):a(d)}}function f5(e,n,a){return r;function r(s){return e.consume(s),o}function o(s){return on(s)?a(s):n(s)}}function pS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function hS(e){return!hn(e)}function mS(e){return!(e===47||eh(e))}function eh(e){return e===43||e===45||e===46||e===95||on(e)}function lm(e){let n=e.length,a=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return e.length>0&&!a&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const p5={tokenize:w5,partial:!0};function h5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:v5,continuation:{tokenize:x5},exit:b5}},text:{91:{name:"gfmFootnoteCall",tokenize:y5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:m5,resolveTo:g5}}}}function m5(e,n,a){const r=this;let o=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const p=r.events[o][1];if(p.type==="labelImage"){u=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!u||!u._balanced)return a(p);const f=da(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!s.includes(f.slice(1))?a(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),n(p))}}function g5(e,n){let a=e.length;for(;a--;)if(e[a][1].type==="labelImage"&&e[a][0]==="enter"){e[a][1];break}e[a+1][1].type="data",e[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[a+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[a+3][1].end),end:Object.assign({},e[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[e[a+1],e[a+2],["enter",r,n],e[a+3],e[a+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",u,n],["exit",u,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(a,e.length-a+1,...d),e}function y5(e,n,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,u;return d;function d(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(g){if(s>999||g===93&&!u||g===null||g===91||gt(g))return a(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return o.includes(da(r.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):a(g)}return gt(g)||(u=!0),s++,e.consume(g),g===92?y:f}function y(g){return g===91||g===92||g===93?(e.consume(g),s++,f):f(g)}}function v5(e,n,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,u=0,d;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",y):a(k)}function y(k){if(u>999||k===93&&!d||k===null||k===91||gt(k))return a(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=da(r.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return gt(k)||(d=!0),u++,e.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(e.consume(k),u++,y):y(k)}function x(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),o.includes(s)||o.push(s),Ke(e,b,"gfmFootnoteDefinitionWhitespace")):a(k)}function b(k){return n(k)}}function x5(e,n,a){return e.check(Go,n,e.attempt(p5,n,a))}function b5(e){e.exit("gfmFootnoteDefinition")}function w5(e,n,a){const r=this;return Ke(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?n(s):a(s)}}function S5(e){let a=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:o};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,d){let p=-1;for(;++p<u.length;)if(u[p][0]==="enter"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._close){let f=p;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[p][1].end.offset-u[p][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[p][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[p][1].end)},g={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[p][1].start)},x=[["enter",y,d],["enter",u[f][1],d],["exit",u[f][1],d],["enter",g,d]],b=d.parser.constructs.insideSpan.null;b&&Hn(x,x.length,0,uu(b,u.slice(f+1,p),d)),Hn(x,x.length,0,[["exit",g,d],["enter",u[p][1],d],["exit",u[p][1],d],["exit",y,d]]),Hn(u,f-1,p-f+3,x),p=f+x.length-2;break}}for(p=-1;++p<u.length;)u[p][1].type==="strikethroughSequenceTemporary"&&(u[p][1].type="data");return u}function s(u,d,p){const f=this.previous,y=this.events;let g=0;return x;function x(k){return f===126&&y[y.length-1][1].type!=="characterEscape"?p(k):(u.enter("strikethroughSequenceTemporary"),b(k))}function b(k){const C=ol(f);if(k===126)return g>1?p(k):(u.consume(k),g++,b);if(g<2&&!a)return p(k);const j=u.exit("strikethroughSequenceTemporary"),E=ol(k);return j._open=!E||E===2&&!!C,j._close=!C||C===2&&!!E,d(k)}}}class k5{constructor(){this.map=[]}add(n,a,r){C5(this,n,a,r)}consume(n){if(this.map.sort(function(s,u){return s[0]-u[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(n.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),n.length=this.map[a][0];r.push(n.slice()),n.length=0;let o=r.pop();for(;o;){for(const s of o)n.push(s);o=r.pop()}this.map.length=0}}function C5(e,n,a,r){let o=0;if(!(a===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=a,e.map[o][2].push(...r);return}o+=1}e.map.push([n,a,r])}}function E5(e,n){let a=!1;const r=[];for(;n<e.length;){const o=e[n];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);n+=1}return r}function A5(){return{flow:{null:{name:"table",tokenize:j5,resolveAll:T5}}}}function j5(e,n,a){const r=this;let o=0,s=0,u;return d;function d(T){let G=r.events.length-1;for(;G>-1;){const B=r.events[G][1].type;if(B==="lineEnding"||B==="linePrefix")G--;else break}const Y=G>-1?r.events[G][1].type:null,ie=Y==="tableHead"||Y==="tableRow"?O:p;return ie===O&&r.parser.lazy[r.now().line]?a(T):ie(T)}function p(T){return e.enter("tableHead"),e.enter("tableRow"),f(T)}function f(T){return T===124||(u=!0,s+=1),y(T)}function y(T){return T===null?a(T):Ae(T)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),b):a(T):qe(T)?Ke(e,y,"whitespace")(T):(s+=1,u&&(u=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),u=!0,y):(e.enter("data"),g(T)))}function g(T){return T===null||T===124||gt(T)?(e.exit("data"),y(T)):(e.consume(T),T===92?x:g)}function x(T){return T===92||T===124?(e.consume(T),g):g(T)}function b(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(T):(e.enter("tableDelimiterRow"),u=!1,qe(T)?Ke(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):k(T))}function k(T){return T===45||T===58?j(T):T===124?(u=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),C):U(T)}function C(T){return qe(T)?Ke(e,j,"whitespace")(T):j(T)}function j(T){return T===58?(s+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),E):T===45?(s+=1,E(T)):T===null||Ae(T)?F(T):U(T)}function E(T){return T===45?(e.enter("tableDelimiterFiller"),_(T)):U(T)}function _(T){return T===45?(e.consume(T),_):T===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(T))}function R(T){return qe(T)?Ke(e,F,"whitespace")(T):F(T)}function F(T){return T===124?k(T):T===null||Ae(T)?!u||o!==s?U(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(T)):U(T)}function U(T){return a(T)}function O(T){return e.enter("tableRow"),W(T)}function W(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),W):T===null||Ae(T)?(e.exit("tableRow"),n(T)):qe(T)?Ke(e,W,"whitespace")(T):(e.enter("data"),P(T))}function P(T){return T===null||T===124||gt(T)?(e.exit("data"),W(T)):(e.consume(T),T===92?M:P)}function M(T){return T===92||T===124?(e.consume(T),P):P(T)}}function T5(e,n){let a=-1,r=!0,o=0,s=[0,0,0,0],u=[0,0,0,0],d=!1,p=0,f,y,g;const x=new k5;for(;++a<e.length;){const b=e[a],k=b[1];b[0]==="enter"?k.type==="tableHead"?(d=!1,p!==0&&(tx(x,n,p,f,y),y=void 0,p=0),f={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(a,0,[["enter",f,n]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],u=[0,a+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},x.add(a,0,[["enter",y,n]])),o=k.type==="tableDelimiterRow"?2:y?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(s[1]!==0&&(u[0]=u[1],g=bc(x,n,s,o,void 0,g),s=[0,0,0,0]),u[2]=a)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(u[0]=u[1],g=bc(x,n,s,o,void 0,g)),s=u,u=[s[1],a,0,0])):k.type==="tableHead"?(d=!0,p=a):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=a,s[1]!==0?(u[0]=u[1],g=bc(x,n,s,o,a,g)):u[1]!==0&&(g=bc(x,n,u,o,a,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=a)}for(p!==0&&tx(x,n,p,f,y),x.consume(n.events),a=-1;++a<n.events.length;){const b=n.events[a];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=E5(n.events,a))}return e}function bc(e,n,a,r,o,s){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";a[0]!==0&&(s.end=Object.assign({},tl(n.events,a[0])),e.add(a[0],0,[["exit",s,n]]));const p=tl(n.events,a[1]);if(s={type:u,start:Object.assign({},p),end:Object.assign({},p)},e.add(a[1],0,[["enter",s,n]]),a[2]!==0){const f=tl(n.events,a[2]),y=tl(n.events,a[3]),g={type:d,start:Object.assign({},f),end:Object.assign({},y)};if(e.add(a[2],0,[["enter",g,n]]),r!==2){const x=n.events[a[2]],b=n.events[a[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",a[3]>a[2]+1){const k=a[2]+1,C=a[3]-a[2]-1;e.add(k,C,[])}}e.add(a[3]+1,0,[["exit",g,n]])}return o!==void 0&&(s.end=Object.assign({},tl(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function tx(e,n,a,r,o){const s=[],u=tl(n.events,a);o&&(o.end=Object.assign({},u),s.push(["exit",o,n])),r.end=Object.assign({},u),s.push(["exit",r,n]),e.add(a+1,0,s)}function tl(e,n){const a=e[n],r=a[0]==="enter"?"start":"end";return a[1][r]}const N5={name:"tasklistCheck",tokenize:_5};function R5(){return{text:{91:N5}}}function _5(e,n,a){const r=this;return o;function o(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),s)}function s(p){return gt(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),u):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),u):a(p)}function u(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):a(p)}function d(p){return Ae(p)?n(p):qe(p)?e.check({tokenize:O5},n,a)(p):a(p)}}function O5(e,n,a){return Ke(e,r,"whitespace");function r(o){return o===null?a(o):n(o)}}function D5(e){return Ew([i5(),h5(),S5(e),A5(),R5()])}const M5={};function L5(e){const n=this,a=e||M5,r=n.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(D5(a)),s.push(e5()),u.push(t5(a))}function z5(e){Vw(e,[/\r?\n|\r/g,I5])}function I5(){return{type:"break"}}function P5(){return function(e){z5(e)}}const gS=[{aliases:{sh:"sh",shell:"sh",zsh:"sh",bash:"bash"},load:()=>nt(()=>import("./bash-Yzrsuije.js"),[])},{aliases:{css:"css"},load:()=>nt(()=>import("./css-CLj8gQPS.js"),[])},{aliases:{diff:"diff",patch:"diff"},load:()=>nt(()=>import("./diff-D97Zzqfu.js"),[])},{aliases:{dockerfile:"dockerfile",docker:"dockerfile"},load:()=>nt(()=>import("./dockerfile-BcOcwvcX.js"),[])},{aliases:{go:"go",golang:"go"},load:()=>nt(()=>import("./go-C27-OAKa.js"),[])},{aliases:{html:"html"},load:()=>nt(()=>import("./html-pp8916En.js"),__vite__mapDeps([0,1,2]))},{aliases:{js:"js",javascript:"js"},load:()=>nt(()=>import("./javascript-wDzz0qaB.js"),[])},{aliases:{json:"json"},load:()=>nt(()=>import("./json-Cp-IABpG.js"),[])},{aliases:{jsx:"jsx"},load:()=>nt(()=>import("./jsx-g9-lgVsj.js"),[])},{aliases:{md:"md",markdown:"md"},load:()=>nt(()=>import("./markdown-Cvjx9yec.js"),[])},{aliases:{py:"py",python:"py"},load:()=>nt(()=>import("./python-B6aJPvgy.js"),[])},{aliases:{rust:"rust",rs:"rust"},load:()=>nt(()=>import("./rust-B1yitclQ.js"),[])},{aliases:{solidity:"solidity",sol:"solidity"},load:()=>nt(()=>import("./solidity-rGO070M0.js"),[])},{aliases:{sparql:"sparql"},load:()=>nt(()=>import("./sparql-DVZY-KUA.js"),[])},{aliases:{sql:"sql"},load:()=>nt(()=>import("./sql-BLtJtn59.js"),[])},{aliases:{toml:"toml"},load:()=>nt(()=>import("./toml-vGWfd6FD.js"),[])},{aliases:{tsx:"tsx"},load:()=>nt(()=>import("./tsx-COt5Ahok.js"),[])},{aliases:{ts:"ts",typescript:"ts"},load:()=>nt(()=>import("./typescript-BPQ3VLAy.js"),[])},{aliases:{xml:"xml"},load:()=>nt(()=>import("./xml-B8PEiB0p.js"),[])},{aliases:{yaml:"yaml",yml:"yaml"},load:()=>nt(()=>import("./yaml-Buea-lGh.js"),[])}],yS=Object.freeze(Object.assign({},...gS.map(({aliases:e})=>e)));Object.freeze(Object.keys(yS));function U5(e){if(!e)return null;const n=e.toLowerCase().trim();return yS[n]??null}async function D9(){return(await Promise.all(gS.map(({load:n})=>n()))).flatMap(({default:n})=>n).filter((n,a,r)=>r.findIndex(o=>o.name===n.name)===a)}let wo=null;function B5(){return wo||(wo=nt(()=>import("./shikiHighlighter-CzU2U2Tx.js"),[]).then(e=>e.createHighlighter()).catch(e=>{throw wo=null,e}),wo)}function H5({code:e,lang:n}){const a=U5(n),[r,o]=S.useState(null),[s,u]=S.useState(!1),p=aa(g=>g.theme)==="light"?"github-light":"github-dark",f=S.useRef(null);S.useEffect(()=>{if(!a){o(null);return}let g=!1;return B5().then(x=>{if(!g)try{o(x.codeToHtml(e,{lang:a,theme:p}))}catch{o(null)}}).catch(()=>{g||o(null)}),()=>{g=!0}},[e,a,p]),S.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const y=async()=>{try{await navigator.clipboard.writeText(e),u(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>u(!1),1200)}catch{}};return m.jsxs("div",{className:"v10-md-pre",children:[m.jsx("button",{type:"button",className:"v10-md-copy",onClick:y,"aria-label":s?"Copied":"Copy code",title:s?"Copied":"Copy code",children:s?m.jsx(rN,{size:14,"aria-hidden":"true"}):m.jsx(uN,{size:14,"aria-hidden":"true"})}),m.jsx("span",{className:"v10-md-copy-announce","aria-live":"polite",children:s?"Copied":""}),a&&m.jsx("span",{className:"v10-md-pre-lang","aria-hidden":"true",children:a}),r?m.jsx("div",{className:"v10-md-pre-rendered",dangerouslySetInnerHTML:{__html:r}}):m.jsx("pre",{className:"v10-md-pre-fallback",children:m.jsx("code",{children:e})})]})}function $5(){return e=>{let n="none",a=null;const r=new Set(["img","hr","br"]),o=(d,p)=>{const f=d.children;if(Array.isArray(f))for(let y=0;y<f.length;y++){const g=f[y];if(g.type==="text"&&typeof g.value=="string"&&g.value.trim().length>0)p?n="code":(a={siblings:f,index:y},n="text");else if(g.type==="element"){const x=g.tagName;x==="pre"?(n="code",o(g,!0)):x&&r.has(x)?n="leaf":o(g,p)}}},s=e;o(s,!1);const u={type:"element",tagName:"span",properties:{className:["v10-chat-cursor"]},children:[]};if(n==="text"&&a){const{siblings:d,index:p}=a;d.splice(p+1,0,u)}else n==="leaf"&&Array.isArray(s.children)&&s.children.push(u)}}function q5(e){return e?/^https?:\/\//i.test(e)?"http":/^mailto:/i.test(e)?"mailto":"inert":"inert"}function vS({content:e,streaming:n}){return m.jsx("div",{className:"v10-md",children:m.jsx(kM,{remarkPlugins:[L5,P5],rehypePlugins:n?[$5]:[],components:{img:({src:a,alt:r,title:o})=>m.jsxs("span",{className:"v10-md-image-placeholder",title:o||(typeof a=="string"?a:void 0),children:["[image",r?`: ${r}`:"","]"]}),h1:({children:a})=>m.jsx("h1",{className:"v10-md-h1",children:a}),h2:({children:a})=>m.jsx("h2",{className:"v10-md-h2",children:a}),h3:({children:a})=>m.jsx("h3",{className:"v10-md-h3",children:a}),h4:({children:a})=>m.jsx("h4",{className:"v10-md-h4",children:a}),h5:({children:a})=>m.jsx("h5",{className:"v10-md-h5",children:a}),h6:({children:a})=>m.jsx("h6",{className:"v10-md-h6",children:a}),p:({children:a})=>m.jsx("p",{className:"v10-md-p",children:a}),ul:({children:a})=>m.jsx("ul",{className:"v10-md-ul",children:a}),ol:({children:a})=>m.jsx("ol",{className:"v10-md-ol",children:a}),li:({children:a})=>m.jsx("li",{className:"v10-md-li",children:a}),a:({href:a,children:r})=>{const o=q5(a);return o==="http"?m.jsx("a",{className:"v10-md-link",href:a,target:"_blank",rel:"noopener noreferrer",children:r}):o==="mailto"?m.jsx("a",{className:"v10-md-link",href:a,children:r}):m.jsx("span",{className:"v10-md-link v10-md-link-inert",title:a,children:r})},blockquote:({children:a})=>m.jsx("blockquote",{className:"v10-md-blockquote",children:a}),hr:()=>m.jsx("hr",{className:"v10-md-hr"}),table:({children:a})=>m.jsx("div",{className:"v10-md-table-scroll",children:m.jsx("table",{className:"v10-md-table",children:a})}),thead:({children:a,node:r,...o})=>m.jsx("thead",{className:"v10-md-thead",...o,children:a}),tbody:({children:a,node:r,...o})=>m.jsx("tbody",{className:"v10-md-tbody",...o,children:a}),tr:({children:a,node:r,...o})=>m.jsx("tr",{className:"v10-md-tr",...o,children:a}),th:({children:a,node:r,...o})=>m.jsx("th",{className:"v10-md-th",...o,children:a}),td:({children:a,node:r,...o})=>m.jsx("td",{className:"v10-md-td",...o,children:a}),pre:({children:a,node:r})=>{var s,u,d;const o=(s=r==null?void 0:r.children)==null?void 0:s[0];if((o==null?void 0:o.tagName)==="code"){const p=((d=(u=o.properties)==null?void 0:u.className)==null?void 0:d[0])??"",f=/language-([\w-]+)/.exec(p),y=(o.children??[]).map(g=>(g==null?void 0:g.value)??"").join("").replace(/\n$/,"");return m.jsx(H5,{code:y,lang:f==null?void 0:f[1]})}return m.jsx("pre",{children:a})},code:({children:a})=>m.jsx("code",{className:"v10-md-code",children:a})},children:e})})}const F5=m.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),m.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),G5=Ja(()=>nt(()=>import("./Operations-LAhUQsnj.js"),__vite__mapDeps([3,4])).then(e=>e.OperationsPage),"operations"),V5=Ja(()=>nt(()=>import("./AgentHub-DyF5Pa70.js"),[]).then(e=>e.AgentHubPage),"agent hub"),W5=Ja(()=>nt(()=>import("./Settings-runaZqPv.js"),__vite__mapDeps([5,6])).then(e=>e.SettingsPage),"settings"),Y5=Ja(()=>nt(()=>import("./AgentProfilePage-BPrSuKjV.js"),__vite__mapDeps([7,8,9])).then(e=>e.AgentProfilePage),"account"),K5=Ja(()=>nt(()=>import("./PublishingConviction-CF6352oT.js"),__vite__mapDeps([10,11,6,12])).then(e=>e.PublishingConvictionPage),"Publisher Conviction"),Q5=Ja(()=>nt(()=>import("./ConvictionDetailView-BsPTd17P.js"),__vite__mapDeps([13,12,6,11])).then(e=>e.ConvictionDetailView),"account"),X5=Ja(()=>nt(()=>import("./ProjectView-0zCSblAV.js"),__vite__mapDeps([14,8,9,11,15,16])).then(e=>e.ProjectView),"project"),bp=Ja(()=>nt(()=>import("./MemoryLayerView-CloJeM33.js"),__vite__mapDeps([17,15])).then(e=>e.MemoryLayerView),({layer:e})=>({wm:"working memory",swm:"shared memory",vm:"verifiable memory"})[e]),Z5=Ja(()=>nt(()=>import("./MemoryStackView-BbUJ2uiM.js"),__vite__mapDeps([18,9])).then(e=>e.MemoryStackView),"memory stack");function J5(){const{tabs:e,activeTabId:n,setActiveTab:a,closeTab:r}=gn();return m.jsx("div",{className:"v10-center-tabs",children:e.map(o=>m.jsxs("button",{className:`v10-center-tab ${o.id===n?"active":""}`,onClick:()=>a(o.id),children:[m.jsx("span",{className:"v10-center-tab-label",children:o.label}),o.closable&&m.jsx("span",{className:"v10-center-tab-close",onClick:s=>{s.stopPropagation(),r(o.id)},children:F5})]},o.id))})}const eL=["text/","application/json","application/xml","application/javascript","application/x-yaml"];function tL(e){return eL.some(n=>e.startsWith(n))}function nL({docRef:e,contentType:n}){const{tabs:a,activeTabId:r,closeTab:o}=gn(),s=gn(T=>T.setActiveTab),[u,d]=S.useState(null),[p,f]=S.useState(null),[y,g]=S.useState(""),[x,b]=S.useState(!0),[k,C]=S.useState(null),[j,E]=S.useState("formatted"),_=e.startsWith("urn:dkg:file:"),R=a.find(T=>T.id===r),F=(R==null?void 0:R.label)??"Document",U=()=>{const T=a.find(G=>G.id.startsWith("project:"));T&&s(T.id),o(r)};S.useEffect(()=>{let T=!1;if(b(!0),C(null),d(null),f(null),g(""),!_){b(!1);return}const G=e.replace("urn:dkg:file:",""),Y=new AbortController;return fetch(pj(G,n||void 0),{headers:$t(),signal:Y.signal}).then(async ie=>{if(!ie.ok)throw new Error(`HTTP ${ie.status}`);const B=ie.headers.get("content-type")??"application/octet-stream";if(!T)if(g(B),tL(B)){const Q=await ie.text();T||(d(Q),b(!1))}else if(B.startsWith("image/")){const Q=await ie.blob();T||(f(URL.createObjectURL(Q)),b(!1))}else if(B==="application/pdf"){const Q=await ie.blob();T||(f(URL.createObjectURL(Q)),b(!1))}else{const Q=await ie.text();T||(d(Q),b(!1))}}).catch(ie=>{T||(C(ie.message),b(!1))}),()=>{T=!0,Y.abort()}},[e,_,n]),S.useEffect(()=>{E("formatted")},[e]),S.useEffect(()=>{const T=p;return()=>{T&&URL.revokeObjectURL(T)}},[p]);const O=y.startsWith("image/"),W=y==="application/pdf",P=y.startsWith("text/markdown")||n.startsWith("text/markdown"),M=!x&&!k&&_&&P&&u!==null;return m.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[m.jsxs("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:10,padding:"8px 16px",borderBottom:"1px solid var(--border-subtle)",background:"var(--bg-panel)"},children:[m.jsx("button",{onClick:U,style:{border:"1px solid var(--border-default)",borderRadius:5,background:"none",color:"var(--text-secondary)",fontSize:11,fontWeight:600,padding:"4px 10px",cursor:"pointer",fontFamily:"var(--font-sans)"},children:"← Back to Project"}),m.jsxs("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:["📄 ",F]}),M&&m.jsx("div",{role:"group","aria-label":"Document view mode",style:{marginLeft:"auto",display:"flex",gap:2,padding:2,border:"1px solid var(--border-default)",borderRadius:6,background:"var(--bg-surface)"},children:["formatted","raw"].map(T=>{const G=j===T;return m.jsx("button",{type:"button","aria-pressed":G,onClick:()=>E(T),style:{border:"none",borderRadius:4,cursor:"pointer",padding:"3px 12px",fontSize:11,fontWeight:600,fontFamily:"var(--font-sans)",color:G?"var(--text-primary)":"var(--text-secondary)",background:G?"var(--bg-elevated)":"transparent"},children:T==="formatted"?"Formatted":"Raw"},T)})})]}),m.jsx("div",{style:{flex:1,overflow:"auto",padding:"20px 24px"},children:_?m.jsxs(m.Fragment,{children:[x&&m.jsx("div",{style:{color:"var(--text-tertiary)",fontSize:12},children:"Loading document..."}),k&&m.jsxs("div",{style:{color:"var(--accent-red)",fontSize:12},children:["Failed to load: ",k]}),!x&&O&&p&&m.jsx("img",{src:p,alt:F,style:{maxWidth:"100%",borderRadius:8}}),!x&&W&&p&&m.jsx("iframe",{src:p,title:F,style:{width:"100%",height:"100%",border:"none",borderRadius:8}}),u!==null&&!O&&!W&&P&&j==="formatted"&&m.jsx("div",{style:{background:"var(--bg-surface)",borderRadius:8,padding:"16px 20px",border:"1px solid var(--border-default)",color:"var(--text-primary)"},children:m.jsx(vS,{content:u})}),u!==null&&!O&&!W&&!(P&&j==="formatted")&&m.jsx("pre",{style:{fontFamily:"var(--font-mono)",fontSize:12,lineHeight:1.7,color:"var(--text-primary)",whiteSpace:"pre-wrap",wordBreak:"break-word",background:"var(--bg-surface)",borderRadius:8,padding:16,border:"1px solid var(--border-default)",margin:0},children:u})]}):m.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:10,height:"100%",color:"var(--text-tertiary)",textAlign:"center"},children:[m.jsx("span",{style:{fontSize:28,opacity:.6},children:"📄"}),m.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-secondary)"},children:"Source file not available for this document"}),m.jsx("span",{style:{fontSize:12,maxWidth:360,lineHeight:1.6},children:"This document was indexed into the graph without a stored source file, so there is nothing to preview here. You can still explore its extracted entities and relationships in the graph."})]})})]})}function aL(){const e=gn(n=>n.activeTabId);if(e==="dashboard")return m.jsx(o3,{});if(e==="operations")return m.jsx(G5,{});if(e==="agent-hub")return m.jsx(V5,{});if(e==="settings")return m.jsx(W5,{});if(e==="conviction")return m.jsx(K5,{});if(e==="memory-stack")return m.jsx(Z5,{});if(e===Hh)return m.jsx(u3,{});if(e.startsWith("project:")){const n=e.slice(8);return m.jsx(X5,{contextGraphId:n})}if(e.startsWith("conviction:")){const n=e.slice(11);return m.jsx(Q5,{accountId:n})}if(e.startsWith("agent:")){const n=e.slice(6),a=n.indexOf("|");if(a>0){const r=n.slice(0,a),o=n.slice(a+1),s=o.includes(":")?o:`urn:dkg:agent:${o}`;return m.jsx(Y5,{contextGraphId:r,agentUri:s})}}if(e.startsWith($h)){const{docRef:n,contentType:a}=d3(e);return m.jsx(nL,{docRef:n,contentType:a})}return e.startsWith("wm:")?m.jsx(bp,{layer:"wm",contextGraphId:e.slice(3)}):e.startsWith("swm:")?m.jsx(bp,{layer:"swm",contextGraphId:e.slice(4)}):e.startsWith("vm:")?m.jsx(bp,{layer:"vm",contextGraphId:e.slice(3)}):m.jsx("div",{className:"v10-view-placeholder",children:m.jsxs("p",{style:{color:"var(--text-tertiary)",fontSize:12},children:['View "',e,'" coming soon.']})})}function iL(){return m.jsxs("div",{className:"v10-panel-center",children:[m.jsx(J5,{}),m.jsx("div",{className:"v10-center-content",children:m.jsx(aL,{})})]})}const rL=["Node Log","Transactions"],lL=m.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:m.jsx("polyline",{points:"6 9 12 15 18 9"})}),oL=m.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("polyline",{points:"15 3 21 3 21 9"}),m.jsx("polyline",{points:"9 21 3 21 3 15"}),m.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),m.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),sL=m.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("polyline",{points:"4 14 10 14 10 20"}),m.jsx("polyline",{points:"20 10 14 10 14 4"}),m.jsx("line",{x1:"10",y1:"14",x2:"3",y2:"21"}),m.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"})]}),cL=/(\x1B\[[0-9;]*[mGKHFJA-Z]|\[[0-9;]*m)/g;function uL(e){return e.replace(cL,"")}function nx(e){const n=e.toLowerCase();return n.includes("error")||n.includes(" err ")||n.includes("[error]")?"error":n.includes("warn")||n.includes("[warn]")?"warn":n.includes("debug")||n.includes("[debug]")||n.includes("trace")?"debug":"info"}const dL={error:"var(--accent-red, #ef4444)",warn:"var(--accent-yellow, #f59e0b)",info:"var(--text-primary)",debug:"var(--text-tertiary)"};function fL(e){const n=S.useRef(null),a=S.useRef(!0);return S.useEffect(()=>{const r=n.current;if(!r)return;const o=()=>{a.current=r.scrollHeight-r.scrollTop-r.clientHeight<40};return r.addEventListener("scroll",o),()=>r.removeEventListener("scroll",o)},[]),S.useEffect(()=>{a.current&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e]),n}function pL(){const[e,n]=S.useState([]),[a,r]=S.useState(""),[o,s]=S.useState("all"),u=S.useCallback(()=>{Bn.fetchNodeLog({lines:300,q:a||void 0}).then(({lines:y})=>n((y??[]).map(uL))).catch(()=>{})},[a]);S.useEffect(()=>{u();const y=setInterval(u,3e3);return()=>clearInterval(y)},[u]);const d=e.filter(y=>o==="all"||nx(y)===o),p=d.length>0?d[d.length-1]:"",f=fL(p);return m.jsxs("div",{className:"v10-log-container",children:[m.jsxs("div",{className:"v10-log-toolbar",children:[m.jsx("input",{id:"dkg-node-log-filter",name:"dkg-node-log-filter",type:"text",placeholder:"Filter logs...",className:"v10-log-filter",value:a,onChange:y=>r(y.target.value),"aria-label":"Filter node log lines"}),m.jsxs("select",{id:"dkg-node-log-level",name:"dkg-node-log-level",className:"v10-log-level-select",value:o,onChange:y=>s(y.target.value),"aria-label":"Filter node log level",children:[m.jsx("option",{value:"all",children:"All"}),m.jsx("option",{value:"error",children:"Error"}),m.jsx("option",{value:"warn",children:"Warn"}),m.jsx("option",{value:"info",children:"Info"}),m.jsx("option",{value:"debug",children:"Debug"})]})]}),m.jsxs("div",{className:"v10-log-output",ref:f,children:[d.map((y,g)=>m.jsx("div",{className:"v10-log-line",style:{color:dL[nx(y)]},children:y},g)),d.length===0&&m.jsx("div",{className:"v10-log-line",style:{color:"var(--text-tertiary)"},children:"No log output"})]})]})}const hL=new Set(["publish","publishFromSWM","update","ka-update","verify","reconstruct"]),mL={publish:"#22c55e",publishFromSWM:"#16a34a",update:"#14b8a6","ka-update":"#0d9488",verify:"#8b5cf6",reconstruct:"#fb923c"};function gL(){const[e,n]=S.useState([]),[a,r]=S.useState(null),o=S.useCallback(()=>{const s=String(Date.now()-216e5),u=[...hL].join(",");Bn.fetchOperationsWithPhases({limit:"100",from:s,names:u}).then(d=>{n((d==null?void 0:d.operations)??[])}).catch(()=>{})},[]);return S.useEffect(()=>{o();const s=setInterval(o,1e4);return()=>clearInterval(s)},[o]),e.length===0?m.jsx("div",{style:{padding:"20px 16px",color:"var(--text-tertiary)",fontSize:12},children:"No publish, update, or verify activity in the last 6 hours."}):m.jsx("div",{className:"v10-log-output",style:{overflowY:"auto",flex:1},children:m.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:11},children:[m.jsx("thead",{children:m.jsxs("tr",{style:{borderBottom:"1px solid var(--border-subtle)",color:"var(--text-secondary)",textAlign:"left"},children:[m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"Type"}),m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"ID"}),m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"Status"}),m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"Duration"}),m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"Time"}),m.jsx("th",{style:{padding:"6px 12px",fontWeight:600},children:"Tx Hash"})]})}),m.jsx("tbody",{children:e.map(s=>{const u=(s.phases??[]).find(f=>f.phase==="chain"),d=s.tx_hash??(u==null?void 0:u.tx_hash),p=a===s.operation_id;return m.jsxs(mn.Fragment,{children:[m.jsxs("tr",{onClick:()=>r(f=>f===s.operation_id?null:s.operation_id),style:{borderBottom:"1px solid var(--border-subtle)",cursor:"pointer",background:p?"rgba(255,255,255,.03)":void 0},children:[m.jsx("td",{style:{padding:"7px 12px",color:mL[s.operation_name]??"var(--text-secondary)",fontWeight:600},children:s.operation_name}),m.jsx("td",{style:{padding:"7px 12px",fontFamily:"var(--font-mono)",color:"var(--text-secondary)"},children:a1(s.operation_id)}),m.jsx("td",{style:{padding:"7px 12px"},children:m.jsx("span",{style:{padding:"2px 6px",borderRadius:4,fontSize:10,fontWeight:600,background:s.status==="success"?"rgba(34,197,94,.15)":s.status==="error"?"rgba(239,68,68,.15)":"rgba(245,158,11,.15)",color:s.status==="success"?"#22c55e":s.status==="error"?"#ef4444":"#f59e0b"},children:s.status})}),m.jsx("td",{style:{padding:"7px 12px",color:"var(--text-secondary)"},children:s.duration_ms!=null?n1(s.duration_ms):"—"}),m.jsx("td",{style:{padding:"7px 12px",color:"var(--text-secondary)"},children:s.started_at?p4(s.started_at):"—"}),m.jsx("td",{style:{padding:"7px 12px",fontFamily:"var(--font-mono)",color:"var(--text-tertiary)",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d?`${d.slice(0,10)}…`:s.status==="success"?m.jsx("span",{style:{fontFamily:"var(--font-sans)",fontStyle:"italic",color:"var(--text-tertiary)"},children:"local"}):"—"})]}),p&&m.jsx("tr",{style:{background:"rgba(0,0,0,.2)"},children:m.jsxs("td",{colSpan:6,style:{padding:"8px 16px"},children:[m.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:16,fontSize:11,color:"var(--text-secondary)"},children:[m.jsxs("span",{children:[m.jsx("b",{children:"ID:"})," ",m.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:s.operation_id})]}),d&&m.jsxs("span",{children:[m.jsx("b",{children:"Tx:"})," ",m.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:d})]}),s.peer_id&&m.jsxs("span",{children:[m.jsx("b",{children:"Peer:"})," ",m.jsx("span",{style:{fontFamily:"var(--font-mono)"},children:a1(s.peer_id)})]}),s.error_message&&m.jsxs("span",{style:{color:"#ef4444"},children:[m.jsx("b",{children:"Error:"})," ",s.error_message]})]}),(s.phases??[]).length>0&&m.jsx("div",{style:{marginTop:8,display:"flex",gap:6,flexWrap:"wrap"},children:s.phases.map(f=>m.jsxs("span",{style:{padding:"2px 8px",borderRadius:4,fontSize:10,fontWeight:600,background:"rgba(255,255,255,.06)",color:"var(--text-secondary)"},children:[f.phase," ",f.duration_ms!=null?n1(f.duration_ms):""]},f.phase))})]})})]},s.operation_id)})})]})})}function yL(){const{bottomCollapsed:e,toggleBottom:n,bottomMaximised:a,toggleBottomMaximised:r,bottomHeight:o,setBottomHeight:s}=aa(),[u,d]=S.useState("Node Log"),p=S.useRef(null),f=S.useRef(o);f.current=o,S.useEffect(()=>{const g=p.current;if(!g)return;let x=0;const b=j=>{const E=x-j.clientY;x=j.clientY,s(f.current+E)},k=()=>{document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k),document.body.style.cursor="",document.body.style.userSelect="",g.classList.remove("active")},C=j=>{j.preventDefault(),x=j.clientY,document.addEventListener("mousemove",b),document.addEventListener("mouseup",k),document.body.style.cursor="row-resize",document.body.style.userSelect="none",g.classList.add("active")};return g.addEventListener("mousedown",C),()=>g.removeEventListener("mousedown",C)},[s]);const y=e?void 0:a?"80vh":Math.min(o,Mc());return m.jsxs("div",{className:`v10-panel-bottom ${e?"collapsed":""} ${a?"maximised":""}`,style:e?void 0:{height:y},children:[!e&&!a&&m.jsx("div",{className:"v10-resize-handle-v",ref:p,title:"Drag to resize"}),m.jsxs("div",{className:"v10-bottom-tabs",children:[rL.map(g=>m.jsx("button",{className:`v10-bottom-tab ${g===u?"active":""}`,onClick:()=>{d(g),e&&n()},children:g},g)),m.jsx("div",{style:{flex:1}}),m.jsx("button",{className:"v10-bottom-toggle",onClick:r,title:a?"Restore":"Maximise",style:{display:e?"none":void 0},children:a?sL:oL}),m.jsx("button",{className:"v10-bottom-toggle",onClick:n,title:e?"Expand":"Collapse",children:m.jsx("span",{style:{transform:e?"rotate(180deg)":"none",display:"flex",transition:"transform 0.15s"},children:lL})})]}),!e&&m.jsxs("div",{className:"v10-bottom-content",children:[u==="Node Log"&&m.jsx(pL,{}),u==="Transactions"&&m.jsx(gL,{})]})]})}function ax(e){const n=Math.floor(e/1e3);if(n<60)return`${n}s`;const a=Math.floor(n/60);return a<60?`${a}m`:`${Math.floor(a/60)}h ${a%60}m`}function Xc(e){if(e==null||e==="")return"";const n=e instanceof Date?e:new Date(e);return Number.isNaN(n.valueOf())?typeof e=="string"?e:"":n.toLocaleString([],{dateStyle:"medium",timeStyle:"short"})}function th(e){if(e==null||e==="")return;const n=e instanceof Date?e:new Date(e);if(!Number.isNaN(n.valueOf()))return n.toISOString()}function vL(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function xL(e){var a;const n=((a=e.split(".").pop())==null?void 0:a.toLowerCase())??"";return["md","txt","csv","json","xml","yaml","yml"].includes(n)?"TXT":["pdf"].includes(n)?"PDF":["docx","doc"].includes(n)?"DOC":["png","jpg","jpeg","webp"].includes(n)?"IMG":["py","ts","js","tsx","jsx","java","go","rs","c","cpp"].includes(n)?"CODE":"FILE"}function nh(e,n){var a;return((a=e.find(r=>r.id===n))==null?void 0:a.name)??n}function bL(e){return e.startsWith("did:dkg:context-graph:")?e:`did:dkg:context-graph:${e}`}function wL(e){return String(e??"").replace(/[\u0000-\u001F\u007F]/g," ").replace(/\s+/g," ").trim()}function xS(e){if(e.length===0)return"";const n=e.map(a=>a.fileName);return n.length<=2?`Attached ${n.join(" and ")}.`:`Attached ${n[0]} and ${n.length-1} more files.`}function bS(e){return e.status==="queued"||e.status==="completed"||e.status==="skipped"}function wS(e){return e.name.trim()}function SL(e){if(e.status!=="completed"||!e.result)return null;const n=e.result.extraction.mdIntermediateHash,a=n??(e.result.detectedContentType==="text/markdown"?e.result.fileHash:void 0);return{id:e.id,fileName:wS(e.file),contextGraphId:e.contextGraphId,assertionName:e.assertionName,assertionUri:e.result.assertionUri,fileHash:e.result.fileHash,detectedContentType:e.result.detectedContentType,rootEntity:e.result.rootEntity,extractionStatus:"completed",tripleCount:e.result.extraction.tripleCount??e.result.extraction.triplesWritten,...n?{mdIntermediateHash:n}:{},...a?{markdownHash:a,markdownForm:`urn:dkg:file:${a}`}:{}}}function kL(e){const n=[];return{results:e.flatMap(r=>{if(r.status!=="skipped"||!r.result)return[];n.push(r.id);const o=r.result,s=o.extraction;return[{id:r.id,fileName:wS(r.file),contextGraphId:r.contextGraphId,assertionName:r.assertionName,assertionUri:o.assertionUri,fileHash:o.fileHash,detectedContentType:o.detectedContentType,extractionStatus:"skipped",pipelineUsed:s.pipelineUsed??null,tripleCount:s.tripleCount??s.triplesWritten??0,...o.rootEntity?{rootEntity:o.rootEntity}:{},...s.mdIntermediateHash?{mdIntermediateHash:s.mdIntermediateHash}:{},...s.error?{error:s.error}:{}}]}),deliveredDraftIds:n}}function SS(e){return e.length===0?"":e.length===1?`Attachment import result: ${wL(e[0].fileName)}.`:`Attached ${e.length} document import results.`}function CL(e,n){const a=[xS(e),SS(n)].filter(r=>r.length>0).map(r=>r.replace(/\.$/,""));return a.length?`${a.join("; ")}.`:""}function EL(e,n,a){const r=[];if(n){const o=nh(e,n);r.push({key:"target_context_graph",label:"Target context graph id",value:n}),r.push({key:"target_context_graph_uri",label:"Target context graph URI",value:bL(n)}),r.push({key:"target_context_graph_name",label:"Target context graph name",value:o})}return a!=null&&a.agentAddress&&r.push({key:"current_agent_address",label:"Current agent address",value:a.agentAddress}),a!=null&&a.agentDid&&r.push({key:"current_agent_did",label:"Current agent DID",value:a.agentDid}),a!=null&&a.peerId&&r.push({key:"current_agent_peer_id",label:"Current agent peer ID",value:a.peerId}),r}const AL="https://docs.openclaw.ai/",jL="https://github.com/openclaw/openclaw/releases",sr="__add_agent__",TL=["openclaw"];function NL(e,n){const a=n instanceof Error?n.message:String(n??"Unknown error");if(n instanceof Ic){if(n.code==="HERMES_BRIDGE_RESPONSE_TIMEOUT")return`${e.name} bridge response timed out.`;if(n.code==="HERMES_GATEWAY_RESPONSE_TIMEOUT")return`${e.name} gateway response timed out.`;if(n.code==="OPENCLAW_BRIDGE_RESPONSE_TIMEOUT")return`${e.name} bridge response timed out.`;if(n.code==="OPENCLAW_GATEWAY_RESPONSE_TIMEOUT")return`${e.name} gateway response timed out.`;if(n.code==="PRIME_AGENT_SESSION_BUSY")return`${e.name} session is busy — try again in a moment.`;if(n.code==="PRIME_AGENT_NO_SESSION")return`No live ${e.name} session is available. Start or resume a session, then send again.`;if(n.code==="PRIME_AGENT_PROVIDER_UNAUTHORIZED")return`${e.name} provider authentication failed. Check its provider credentials and try again.`;if(n.code==="PRIME_AGENT_PROVIDER_ERROR")return`${e.name} provider request failed. Check its provider configuration and try again.`;if(n.code==="PRIME_AGENT_TURN_ABORTED")return`${e.name} turn was aborted.`;if(n.code==="PRIME_AGENT_TURN_TIMEOUT")return`${e.name} turn exceeded its maximum run time.`;if(n.code==="PRIME_AGENT_DELIVERY_FAILED")return`${e.name} rejected the message before starting the turn.`;if(n.code==="SWM_SYNC_TIMEOUT"||n.source==="background-sync")return"Background sync timed out. The chat request was not marked as failed by the local-agent bridge."}return/OpenClaw bridge unreachable/i.test(a)?`${e.name} is unavailable right now.`:/Hermes bridge unreachable/i.test(a)?`${e.name} is unavailable right now.`:/gateway response timeout/i.test(a)?`${e.name} gateway response timed out.`:/bridge response timeout/i.test(a)||/aborted due to timeout/i.test(a)?`${e.name} bridge response timed out.`:/Agent response timeout/i.test(a)?`${e.name} took too long to respond.`:/Agent returned no text response/i.test(a)||/\(no response\)/i.test(a)?`${e.name} did not return a text reply.`:a}function wp(e,n,a){return e+(n-e)*a}function kS(e){return e-Math.floor(e)}function Sp(e,n){const a=Math.floor(e),r=Math.floor(n);let o=e-a,s=n-r;o=o*o*(3-2*o),s=s*s*(3-2*s);const u=ia(a,r),d=ia(a+1,r),p=ia(a,r+1),f=ia(a+1,r+1);return u+(d-u)*o+(p-u)*s+(u-d-p+f)*o*s}function ia(e,n){const a=Math.sin(e*12.9898+n*78.233)*43758.5453;return a-Math.floor(a)}function om(e,n){const a=Math.PI*(3-Math.sqrt(5)),r=1-2*(e+.5)/n,o=Math.sqrt(1-r*r),s=e*a;return[o*Math.cos(s),r,o*Math.sin(s)]}function RL(e,n){return Math.atan2(Math.sin(e-n),Math.cos(e-n))}function pr(e,n,a,r,o){const s=Math.sin(n),u=Math.cos(n),d=Math.sin(e),p=Math.cos(e);return(f,y,g)=>{const x=f*p+g*d,b=-f*d+g*p,k=y*u-b*s,C=y*s+b*u;return[a+x*o,r-k*o,C]}}function zi(e,n,a,r=.3){n.sort((o,s)=>o.z-s.z);for(const o of n){const s=o.a??1;if(s<.02)continue;const u=Math.min(1,Math.max(0,o.white)),d=Math.round((a?1-u:u)*255);e.fillStyle=`rgba(${d},${d},${d},${s})`,e.beginPath(),e.arc(o.x,o.y,Math.max(r,o.r),0,Math.PI*2),e.fill()}}function _L(e,n,a){for(const r of n){const o=r.a??1;if(o<.02)continue;const s=Math.min(1,Math.max(0,r.white)),u=Math.round((a?1-s:s)*255);e.strokeStyle=`rgba(${u},${u},${u},${o})`,e.lineWidth=r.w,e.beginPath(),e.moveTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.stroke()}}function hr(e,n){return(e/300)**n}const OL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.76,p=pr(a*.4,.3,s,u,1),f=hr(n,o.rsPow??.6),y=[],g=o.ghostN??150;for(let k=0;k<g;k++){const C=om(k,g),[j,E,_]=p(C[0]*d,C[1]*d,C[2]*d),R=(_/d+1)/2;y.push({x:j,y:E,z:_,r:.8*f,white:.78,a:.1+.22*R})}const x=o.strandN??52,b=o.turns??3;for(let k=0;k<3;k++){const C=k/3*2*Math.PI;for(let j=0;j<x;j++){const E=(kS(j/x+a*.045)*2-1)*.96,_=Math.sqrt(Math.max(0,1-E*E)),R=Math.min(1,(1-Math.abs(E))/.1),F=E*Math.PI*b+C,U=1+.075*Math.sin(E*Math.PI*b*2+C*2+a*.8),O=_*d*U,[W,P,M]=p(Math.cos(F)*O,E*d*U,Math.sin(F)*O),T=(M/d+1)/2;y.push({x:W,y:P,z:M,r:((o.rBase??1.2)+(o.rDepth??1.8)*T)*f,white:.55-.45*T,a:R*(.45+.55*T)})}}zi(e,y,r,o.rMin)};function DL(e,n,a,r){const o=2*n*a+r,s=e%o,u=new Array(n).fill(0);let d=-1;if(s<2*n*a){const p=Math.floor(s/a),f=(s-p*a)/a,y=1-(1-Math.min(1,f/.7))**3;if(p<n){for(let g=0;g<p;g++)u[g]=1;u[p]=y,d=p}else{const g=2*n-1-p;for(let x=0;x<g;x++)u[x]=1;u[g]=1-y,d=g}}return{amount:u,active:d}}function ML(e,n,a){let[r,o,s]=e,u=!1;for(let d=0;d<n.length;d++){if(a.amount[d]<=0)continue;const p=n[d],f=p.axis===0?r:p.axis===1?o:s;if(f<p.lo||f>=p.hi)continue;d===a.active&&(u=!0);const y=p.ang*a.amount[d],g=Math.cos(y),x=Math.sin(y);if(p.axis===0){const b=o*g-s*x;s=o*x+s*g,o=b}else if(p.axis===1){const b=r*g+s*x;s=-r*x+s*g,r=b}else{const b=r*g-o*x;o=r*x+o*g,r=b}}return[r,o,s,u]}function LL(e){const n=[];for(let a=0;a<e;a++){const r=Math.min(2,Math.floor(ia(a,2.3)*3)),o=-1+.5*Math.min(3,Math.floor(ia(a,5.9)*4)),s=ia(a,7.7)<.5?1:-1;n.push({axis:r,lo:o,hi:o+.5,ang:s*Math.PI/2})}return n}const zL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.82,p=.4+.06*Math.sin(a*.35),f=pr(a*.5,p,s,u,d),y=a*(.5+(1.7-.5)*(o.scanMul??1)),g=hr(n,o.rsPow??.6),x=o.dimBase??1,b=[],k=o.latRings??17,C=o.lonDensity??44;for(let j=0;j<=k;j++){const E=-Math.PI/2+j/k*Math.PI,_=Math.cos(E),R=Math.sin(E),F=Math.max(1,Math.round(Math.abs(_)*C));for(let U=0;U<F;U++){const O=U/F*2*Math.PI,[W,P,M]=f(_*Math.cos(O),R,_*Math.sin(O)),T=(M+1)/2,G=RL(O+a*.5,y),Y=Math.exp(-(G*G)/.18)*Math.max(0,M);b.push({x:W,y:P,z:M,r:((o.rBase??.6)+(o.rDepth??1.7)*T+(o.rBoost??1)*Y)*g,white:(o.inkFar??.62)-(o.inkSpan??.54)*T,a:x+(1-x)*Math.min(1,Y)})}}zi(e,b,r,o.rMin)},IL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.82,p=pr(a*.55,.35+.1*Math.sin(a*.9),s,u,d),f=hr(n,o.rsPow??.6),y=o.moveCount??14,g=LL(y),x=DL(a,y,.42,1.2),b=[],k=o.latRings??15,C=o.lonDensity??40;for(let j=0;j<=k;j++){const E=-Math.PI/2+j/k*Math.PI,_=Math.cos(E),R=Math.sin(E),F=Math.max(1,Math.round(Math.abs(_)*C));for(let U=0;U<F;U++){const O=U/F*2*Math.PI,[W,P,M,T]=ML([_*Math.cos(O),R,_*Math.sin(O)],g,x),[G,Y,ie]=p(W,P,M),B=(ie+1)/2;b.push({x:G,y:Y,z:ie,r:((o.rBase??.6)+(o.rDepth??1.7)*B+(T?o.rActive??.3:0))*f,white:(o.inkFar??.62)-(o.inkSpan??.54)*B-(T?.14:0)})}}zi(e,b,r,o.rMin)},PL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.874,p=pr(a*.18,.38,s,u,1),f=hr(n,o.rsPow??.6),y=[],g=o.rings??15,x=o.lonDensity??40;for(let b=0;b<=g;b++){const k=-Math.PI/2+b/g*Math.PI,C=Math.cos(k),j=Math.sin(k),E=.62*Math.sin(a*2.1-b*.52)+.38*Math.sin(a*1.27+b*.83),_=d*(.88+.105*E),R=Math.max(1,Math.round(Math.abs(C)*x));for(let F=0;F<R;F++){const U=F/R*2*Math.PI,[O,W,P]=p(C*Math.cos(U)*_,j*_,C*Math.sin(U)*_),M=(P/d+1)/2,T=Math.max(0,E);y.push({x:O,y:W,z:P,r:((o.rBase??.6)+(o.rDepth??1.7)*M)*(1+.4*T)*f,white:.66-.56*M-.1*T})}}zi(e,y,r,o.rMin)};function UL(e){return e*e*(3-2*e)}function CS(e){const n=e.length,a=[];let r=0;for(let o=0;o<n;o++){const s=e[o],u=e[(o+1)%n],d=Math.hypot(u[0]-s[0],u[1]-s[1]);a.push(d),r+=d}return o=>{let s=o*r,u=0;for(;s>a[u]&&u<n-1;)s-=a[u],u++;const d=e[u],p=e[(u+1)%n],f=a[u]?Math.min(1,s/a[u]):0;return[d[0]+(p[0]-d[0])*f,d[1]+(p[1]-d[1])*f]}}const BL=e=>{const n=-Math.PI/2+e*2*Math.PI;return[Math.cos(n)*.24,Math.sin(n)*.24]},HL=CS([[0,-.26],[.24,.16],[-.24,.16]]),$L=CS([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]]),kp=[BL,HL,$L];function qL(e){return Math.max(6,Math.round(34*e))}const ah=1.4,ES=.9,Cp=ah+ES,FL=(e,n,a,r,o)=>{const s=kp.length,u=a%(Cp*s),d=Math.floor(u/Cp),p=u-d*Cp,f=p>ah?UL((p-ah)/ES):0,y=o.spread??1,g=kp[d],x=kp[(d+1)%s],b=160,k=[];for(let P=0;P<b;P++){const M=P/b,T=g(M),G=x(M);k.push([(T[0]+(G[0]-T[0])*f)*y,(T[1]+(G[1]-T[1])*f)*y])}const C=[];let j=0;for(let P=0;P<b;P++){const M=k[P],T=k[(P+1)%b],G=Math.hypot(T[0]-M[0],T[1]-M[1]);C.push(G),j+=G}const E=qL(o.iconD??1),_=(o.rDot??.021)*1.35*y,R=1+.02*Math.sin(p*3.1),F=[],U=n/2;let O=0,W=0;for(let P=0;P<E;P++){const M=P/E*j;for(;W+C[O]<M&&O<b-1;)W+=C[O],O++;const T=k[O],G=k[(O+1)%b],Y=C[O]?Math.min(1,(M-W)/C[O]):0,ie=(T[0]+(G[0]-T[0])*Y)*R,B=(T[1]+(G[1]-T[1])*Y)*R;F.push({x:U+ie*n,y:U+B*n,z:0,r:Math.max(.35,_*n),white:.1})}zi(e,F,r,o.rMin)},GL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.82,p=pr(a*.12,.3,s,u,1),f=hr(n,o.rsPow??.6),y=[],g=o.orbitN??12,x=o.ghostN??40,b=o.particles??3;for(let k=0;k<g;k++){const C=ia(k,1.7),j=ia(k,5.2),E=ia(k,8.9),_=d*(.45+.52*C),R=C*2*Math.PI,F=Math.acos(2*j-1),U=Math.sin(F)*Math.cos(R),O=Math.cos(F),W=Math.sin(F)*Math.sin(R);let P=-O,M=U;const T=0,G=Math.max(1e-6,Math.sqrt(P*P+M*M));P/=G,M/=G;const Y=O*T-W*M,ie=W*P-U*T,B=U*M-O*P,Q=(.25+.55*E)*(E>.5?1:-1);for(let H=0;H<x;H++){const ee=H/x*2*Math.PI,[ne,V,D]=p((P*Math.cos(ee)+Y*Math.sin(ee))*_,(M*Math.cos(ee)+ie*Math.sin(ee))*_,(T*Math.cos(ee)+B*Math.sin(ee))*_),L=(D/_+1)/2;y.push({x:ne,y:V,z:D,r:(o.ghostR??.9)*f,white:.72,a:(o.ghostA??.5)*(.4+.6*L)})}for(let H=0;H<b;H++){const ee=a*Q+H/b*2*Math.PI+j*6,[ne,V,D]=p((P*Math.cos(ee)+Y*Math.sin(ee))*_,(M*Math.cos(ee)+ie*Math.sin(ee))*_,(T*Math.cos(ee)+B*Math.sin(ee))*_),L=(D/_+1)/2;y.push({x:ne,y:V,z:D,r:((o.partR??1.2)+(o.partRDepth??1.6)*L)*f,white:.3-.22*L})}}zi(e,y,r,o.rMin)},ix=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.78,p=o.spin??1,f=.3,y=pr(a*.1*p,f,s,u,1),g=hr(n,o.rsPow??.6),x=[],b=o.ghostN??150;for(let B=0;B<b;B++){const Q=om(B,b),[H,ee,ne]=y(Q[0]*d,Q[1]*d,Q[2]*d),V=(ne/d+1)/2;x.push({x:H,y:ee,z:ne,r:.8*g,white:.78,a:.1+.22*V})}const k=a*.24*p,C=o.faceOn?-f:.55+.3*Math.sin(a*.18)*p,j=Math.cos(k),E=0,_=Math.sin(k),R=-_*Math.sin(C),F=Math.cos(C),U=j*Math.sin(C),O=E*U-_*F,W=_*R-j*U,P=j*F-E*R,M=.23*(o.wobMul??1),T=o.faceOn?d/(1+.85*M):d,G=o.lanes??5,Y=o.segs??88,ie=Math.max(1,Math.round(G*(o.bandMul??1)));for(let B=0;B<ie;B++){const Q=(B-(ie-1)/2)*.075,H=Math.abs(B-(ie-1)/2)/Math.max(1,(ie-1)/2);for(let ee=0;ee<Y;ee++){const ne=ee/Y*2*Math.PI,V=(.16*Math.sin(ne*3-a*1.7+B*.22)+.07*Math.sin(ne*5+a*1.1))*(o.wobMul??1),D=o.faceOn?1+V:1,L=o.faceOn?Q:Q+V,X=j*Math.cos(ne)+R*Math.sin(ne)+O*L,N=E*Math.cos(ne)+F*Math.sin(ne)+W*L,ue=_*Math.cos(ne)+U*Math.sin(ne)+P*L,pe=Math.sqrt(X*X+N*N+ue*ue),he=T*D,[Ee,Ue,Ne]=y(X/pe*he,N/pe*he,ue/pe*he),et=(Ne/d+1)/2;x.push({x:Ee,y:Ue,z:Ne,r:((o.rBase??1.1)+(o.rDepth??1.7)*et)*(1-.25*H)*g,white:.52-.44*et+.18*H,a:.4+.6*et})}}zi(e,x,r,o.rMin)},VL=(e,n,a,r,o)=>{const s=n/2,u=n/2,d=n/2*.8*(o.spread??1),p=pr(a*.12,.32,s,u,d),f=hr(n,o.rsPow??.6),y=o.nodeN??30,g=o.thr??.72,x=o.nodeR??1.4,b=o.nodeRDepth??1.8,k=[];for(let _=0;_<y;_++){const R=om(_,y),F=R[0]+.3*(Sp(_*.31+9,a*.24)-.5)*2,U=R[1]+.3*(Sp(_*.53+27,a*.21)-.5)*2,O=R[2]+.3*(Sp(_*.77+55,a*.27)-.5)*2,W=Math.sqrt(F*F+U*U+O*O);k.push([F/W,U/W,O/W])}const C=[],j=[];for(let _=0;_<y;_++)for(let R=_+1;R<y;R++){const F=k[_][0]-k[R][0],U=k[_][1]-k[R][1],O=k[_][2]-k[R][2],W=Math.sqrt(F*F+U*U+O*O);if(W>=g)continue;const[P,M,T]=p(k[_][0],k[_][1],k[_][2]),[G,Y,ie]=p(k[R][0],k[R][1],k[R][2]),B=((T+ie)/2+1)/2;C.push({x1:P,y1:M,x2:G,y2:Y,white:.42,a:(1-W/g)*(.3+.55*B),w:Math.max(.6,(o.lineW??.8)*f)})}for(let _=0;_<y;_++){const[R,F,U]=p(k[_][0],k[_][1],k[_][2]),O=(U+1)/2,W=1+.25*Math.sin(a*1.4+_*2.7);j.push({x:R,y:F,z:U,r:(x+b*O)*W*f,white:.55-.45*O})}const E=o.signals??5;for(let _=0;_<E;_++){const R=Math.floor(a*.55+_*7.31),F=Math.floor(ia(R,_*3.1+1.7)*y),U=Math.floor(ia(R,_*5.7+4.2)*y);if(F===U)continue;const O=kS(a*.55+_*7.31),W=wp(k[F][0],k[U][0],O),P=wp(k[F][1],k[U][1],O),M=wp(k[F][2],k[U][2],O),T=Math.max(1e-6,Math.sqrt(W*W+P*P+M*M)),[G,Y,ie]=p(W/T,P/T,M/T),B=(ie+1)/2;j.push({x:G,y:Y,z:ie,r:(x*1.5+b*B)*f,white:.05,a:.5+.5*B})}_L(e,C,r),zi(e,j,r,o.rMin)},WL={orbits:GL,globe:zL,rubik:IL,wave:PL,web:VL,braid:OL,ribbon:ix,ring:ix,morph:FL},YL=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],KL=["orbitN","ghostN","nodeN","strandN","signals"],QL=["iconD"],XL=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"];function ZL(e,n){const a={...e},r=new Set,o=Math.sqrt(n);for(const[s,u]of YL){const d=a[s],p=a[u];d!=null&&p!=null&&!r.has(s)&&!r.has(u)&&(a[s]=Math.max(2,Math.round(d*o)),a[u]=Math.max(2,Math.round(p*o)),r.add(s),r.add(u))}for(const s of KL){const u=a[s];u!=null&&u!==0&&!r.has(s)&&(a[s]=Math.max(1,Math.round(u*n)))}for(const s of QL){const u=a[s];u!=null&&(a[s]=Math.max(.02,u*n))}return a}function JL(e,n){const a={...e};for(const r of XL){const o=a[r];o!=null&&(a[r]=o*n)}return a.rSizeMul=(a.rSizeMul??1)*n,a}const ez={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},tz={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},nz={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},rx=new Map;function az(e,n){const a=`${e}-${n}`,r=rx.get(a);if(r)return r;const o=tz[e],s=nz[o][n];let u={...ez[o]};s.count!==1&&(u=ZL(u,s.count)),s.size!==1&&(u=JL(u,s.size)),s.extra&&(u={...u,...s.extra});const d={mode:o,speed:s.speed,opts:u};return rx.set(a,d),d}function iz(e){let n=e;for(;n;){const a=n.getAttribute("data-theme");if(a==="dark")return!0;if(a==="light")return!1;if(n.classList.contains("dark"))return!0;if(n.classList.contains("light"))return!1;n=n.parentElement}return null}function rz(){return typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches}function lz(e,n){const[a,r]=S.useState(!0);return S.useEffect(()=>{if(e==="dark"){r(!0);return}if(e==="light"){r(!1);return}const o=()=>{const p=iz(n.current);r(p??rz())};o();const s=typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,u=()=>o();s==null||s.addEventListener("change",u);let d=null;return typeof MutationObserver<"u"&&n.current&&(d=new MutationObserver(o),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0})),()=>{s==null||s.removeEventListener("change",u),d==null||d.disconnect()}},[e,n]),a}function oz(){const[e,n]=S.useState(!1);return S.useEffect(()=>{if(typeof matchMedia>"u")return;const a=matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);const r=o=>n(o.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}const sz={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function cz({state:e="working",size:n=64,theme:a="auto",speed:r=1,paused:o=!1,style:s,"aria-label":u,...d}){const p=S.useRef(null),f=lz(a,p),y=oz();return S.useEffect(()=>{const g=p.current;if(!g)return;const x=Math.min(2,typeof devicePixelRatio<"u"&&devicePixelRatio||1);g.width=Math.round(n*x),g.height=Math.round(n*x);const b=g.getContext("2d");if(!b)return;const{mode:k,speed:C,opts:j}=az(e,n),E=WL[k],_=C*r,R=Y=>{b.setTransform(x,0,0,x,0,0),b.clearRect(0,0,n,n),E(b,n,Y,f,j)};if(y){R(.6);return}let F=0,U=!1;const O=()=>{R(performance.now()/1e3*_),U&&(F=requestAnimationFrame(O))},W=()=>{U||o||(U=!0,F=requestAnimationFrame(O))},P=()=>{U=!1,cancelAnimationFrame(F)};R(performance.now()/1e3*_);let M=!0;const T=typeof IntersectionObserver<"u"?new IntersectionObserver(([Y])=>{M=Y.isIntersecting,M&&document.visibilityState!=="hidden"?W():P()}):null;T==null||T.observe(g);const G=()=>{document.visibilityState==="hidden"?P():M&&W()};return document.addEventListener("visibilitychange",G),T||W(),()=>{P(),T==null||T.disconnect(),document.removeEventListener("visibilitychange",G)}},[e,n,f,r,o,y]),m.jsx("canvas",{ref:p,role:"img","aria-label":u??sz[e],style:{width:n,height:n,display:"block",...s},...d})}let uz=0;function dz(e,n,a){const r=e.trim();return r?r===n?!0:a==="Request cancelled."&&r===a:!1}function fz(e,n,a,r){return e&&dz(e,n,a)?{content:e,synthesized:!0}:e?r==="hermes"?{content:e,failureNotice:n,synthesized:!1}:{content:e,synthesized:!1}:{content:"",failureNotice:n,synthesized:!0}}function pz(e,n){return e?{content:e,failureNotice:n,synthesized:!1}:{content:n,synthesized:!0}}function lx(e,n=""){const a=e.author.toLowerCase(),r=a.includes("assistant")||a.includes("agent")?"assistant":"user",o=typeof e.failureReason=="string"&&e.failureReason.trim()?e.failureReason.trim():void 0,s=r==="assistant"&&(e.persistStatus==="failed"||!!o),u=`Error: ${o??"The local agent turn failed."}`,d=s?fz(e.text,u,o,n):null,p=(d==null?void 0:d.content)??(e.text||xS(e.attachmentRefs??[])),f=!!e.text;return{id:e.uri||`local-history:${++uz}`,uri:e.uri,turnId:e.turnId,role:r,content:p,ts:Xc(e.ts),tsRaw:th(e.ts),attachments:e.attachmentRefs,failureNotice:d==null?void 0:d.failureNotice,synthesized:(d==null?void 0:d.synthesized)??!f}}function hz(e){return e.turnId?`turn:${e.turnId}:${e.role}`:e.uri??`${e.role}:${e.ts??""}:${e.content}`}function Ep(e,n){const a=new Set,r=[];for(const o of[...n,...e]){const s=hz(o);a.has(s)||(a.add(s),r.push(o))}return r}function ox(e,n,a){const r=typeof a=="string"&&a.trim()?a.trim():n;return!r||r===n?e:e.map(o=>o.turnId===n?{...o,turnId:r}:o)}function sx(e){return e.replace(/\r\n/g,`
|
|
1167
|
-
`).replace(/^(?:[ \t]*\n)+/,"").replace(/(?:\n[ \t]*)+$/,"")}function mz(e,n,a,r,o){const s=sx(e),u=o?sx(o):"";if(n==="assistant"&&r&&s.trim()===""&&!u)return m.jsxs("span",{className:"v10-chat-thinking",role:"status","aria-live":"polite",children:[m.jsx(cz,{"aria-hidden":"true",className:"v10-chat-thinking-orb",state:"connecting",size:64,style:{width:28,height:28},theme:"auto"}),m.jsx("span",{children:"Connecting dots..."})]});if(n==="assistant"&&!a&&s.trim()!=="")return m.jsxs(m.Fragment,{children:[m.jsx(vS,{content:s,streaming:r&&!u}),u&&m.jsxs("span",{className:"v10-chat-plaintext v10-chat-failure-notice",children:[u,r&&m.jsx("span",{className:"v10-chat-cursor"})]})]});const d=[s,u].filter(Boolean).join(`
|
|
1168
|
-
|
|
1169
|
-
`);return m.jsxs("span",{className:"v10-chat-plaintext",children:[d,r&&m.jsx("span",{className:"v10-chat-cursor"})]})}function ih(){return ih=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var r in a)({}).hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},ih.apply(null,arguments)}function gz(e,n){if(e==null)return{};var a={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(n.indexOf(r)!==-1)continue;a[r]=e[r]}return a}var yz=S.useLayoutEffect,vz=function(n){var a=mn.useRef(n);return yz(function(){a.current=n}),a},cx=function(n,a){if(typeof n=="function"){n(a);return}n.current=a},xz=function(n,a){var r=mn.useRef();return mn.useCallback(function(o){n.current=o,r.current&&cx(r.current,null),r.current=a,a&&cx(a,o)},[a])},ux={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},bz=function(n){Object.keys(ux).forEach(function(a){n.style.setProperty(a,ux[a],"important")})},dx=bz,pn=null,fx=function(n,a){var r=n.scrollHeight;return a.sizingStyle.boxSizing==="border-box"?r+a.borderSize:r-a.paddingSize};function wz(e,n,a,r){a===void 0&&(a=1),r===void 0&&(r=1/0),pn||(pn=document.createElement("textarea"),pn.setAttribute("tabindex","-1"),pn.setAttribute("aria-hidden","true"),dx(pn)),pn.parentNode===null&&document.body.appendChild(pn);var o=e.paddingSize,s=e.borderSize,u=e.sizingStyle,d=u.boxSizing;Object.keys(u).forEach(function(x){var b=x;pn.style[b]=u[b]}),dx(pn),pn.value=n;var p=fx(pn,e);pn.value=n,p=fx(pn,e),pn.value="x";var f=pn.scrollHeight-o,y=f*a;d==="border-box"&&(y=y+o+s),p=Math.max(y,p);var g=f*r;return d==="border-box"&&(g=g+o+s),p=Math.min(g,p),[p,f]}var px=function(){},Sz=function(n,a){return n.reduce(function(r,o){return r[o]=a[o],r},{})},kz=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Cz=!!document.documentElement.currentStyle,Ez=function(n){var a=window.getComputedStyle(n);if(a===null)return null;var r=Sz(kz,a),o=r.boxSizing;if(o==="")return null;Cz&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var s=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),u=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:s,borderSize:u}},Az=Ez;function sm(e,n,a){var r=vz(a);S.useLayoutEffect(function(){var o=function(u){return r.current(u)};if(e)return e.addEventListener(n,o),function(){return e.removeEventListener(n,o)}},[])}var jz=function(n,a){sm(document.body,"reset",function(r){n.current.form===r.target&&a(r)})},Tz=function(n){sm(window,"resize",n)},Nz=function(n){sm(document.fonts,"loadingdone",n)},Rz=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],_z=function(n,a){var r=n.cacheMeasurements,o=n.maxRows,s=n.minRows,u=n.onChange,d=u===void 0?px:u,p=n.onHeightChange,f=p===void 0?px:p,y=gz(n,Rz),g=y.value!==void 0,x=S.useRef(null),b=xz(x,a),k=S.useRef(0),C=S.useRef(),j=function(){var R=x.current,F=r&&C.current?C.current:Az(R);if(F){C.current=F;var U=wz(F,R.value||R.placeholder||"x",s,o),O=U[0],W=U[1];k.current!==O&&(k.current=O,R.style.setProperty("height",O+"px","important"),f(O,{rowHeight:W}))}},E=function(R){g||j(),d(R)};return S.useLayoutEffect(j),jz(x,function(){if(!g){var _=x.current.value;requestAnimationFrame(function(){var R=x.current;R&&_!==R.value&&j()})}}),Tz(j),Nz(j),S.createElement("textarea",ih({},y,{onChange:E,ref:b}))},Oz=S.forwardRef(_z),Ap={exports:{}},jp,hx;function Dz(){if(hx)return jp;hx=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return jp=e,jp}var Tp,mx;function Mz(){if(mx)return Tp;mx=1;var e=Dz();function n(){}function a(){}return a.resetWarningCache=n,Tp=function(){function r(u,d,p,f,y,g){if(g!==e){var x=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw x.name="Invariant Violation",x}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:a,resetWarningCache:n};return s.PropTypes=s,s},Tp}var gx;function Lz(){return gx||(gx=1,Ap.exports=Mz()()),Ap.exports}var zz=Lz();const mt=Uo(zz);function mr(e,n,a,r){function o(s){return s instanceof a?s:new a(function(u){u(s)})}return new(a||(a=Promise))(function(s,u){function d(y){try{f(r.next(y))}catch(g){u(g)}}function p(y){try{f(r.throw(y))}catch(g){u(g)}}function f(y){y.done?s(y.value):o(y.value).then(d,p)}f((r=r.apply(e,n||[])).next())})}const Iz=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function sl(e,n,a){const r=Pz(e),{webkitRelativePath:o}=e,s=typeof n=="string"?n:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&yx(r,"path",s),yx(r,"relativePath",s),r}function Pz(e){const{name:n}=e;if(n&&n.lastIndexOf(".")!==-1&&!e.type){const r=n.split(".").pop().toLowerCase(),o=Iz.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function yx(e,n,a){Object.defineProperty(e,n,{value:a,writable:!1,configurable:!1,enumerable:!0})}const Uz=[".DS_Store","Thumbs.db"];function Bz(e){return mr(this,void 0,void 0,function*(){return Zc(e)&&Hz(e.dataTransfer)?Gz(e.dataTransfer,e.type):$z(e)?qz(e):Array.isArray(e)&&e.every(n=>"getFile"in n&&typeof n.getFile=="function")?Fz(e):[]})}function Hz(e){return Zc(e)}function $z(e){return Zc(e)&&Zc(e.target)}function Zc(e){return typeof e=="object"&&e!==null}function qz(e){return rh(e.target.files).map(n=>sl(n))}function Fz(e){return mr(this,void 0,void 0,function*(){return(yield Promise.all(e.map(a=>a.getFile()))).map(a=>sl(a))})}function Gz(e,n){return mr(this,void 0,void 0,function*(){if(e.items){const a=rh(e.items).filter(o=>o.kind==="file");if(n!=="drop")return a;const r=yield Promise.all(a.map(Vz));return vx(AS(r))}return vx(rh(e.files).map(a=>sl(a)))})}function vx(e){return e.filter(n=>Uz.indexOf(n.name)===-1)}function rh(e){if(e===null)return[];const n=[];for(let a=0;a<e.length;a++){const r=e[a];n.push(r)}return n}function Vz(e){if(typeof e.webkitGetAsEntry!="function")return xx(e);const n=e.webkitGetAsEntry();return n&&n.isDirectory?jS(n):xx(e,n)}function AS(e){return e.reduce((n,a)=>[...n,...Array.isArray(a)?AS(a):[a]],[])}function xx(e,n){return mr(this,void 0,void 0,function*(){var a;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const s=yield e.getAsFileSystemHandle();if(s===null)throw new Error(`${e} is not a File`);if(s!==void 0){const u=yield s.getFile();return u.handle=s,sl(u)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return sl(r,(a=n==null?void 0:n.fullPath)!==null&&a!==void 0?a:void 0)})}function Wz(e){return mr(this,void 0,void 0,function*(){return e.isDirectory?jS(e):Yz(e)})}function jS(e){const n=e.createReader();return new Promise((a,r)=>{const o=[];function s(){n.readEntries(u=>mr(this,void 0,void 0,function*(){if(u.length){const d=Promise.all(u.map(Wz));o.push(d),s()}else try{const d=yield Promise.all(o);a(d)}catch(d){r(d)}}),u=>{r(u)})}s()})}function Yz(e){return mr(this,void 0,void 0,function*(){return new Promise((n,a)=>{e.file(r=>{const o=sl(r,e.fullPath);n(o)},r=>{a(r)})})})}var wc={},bx;function Kz(){return bx||(bx=1,wc.__esModule=!0,wc.default=function(e,n){if(e&&n){var a=Array.isArray(n)?n:n.split(",");if(a.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),s=o.replace(/\/.*$/,"");return a.some(function(u){var d=u.trim().toLowerCase();return d.charAt(0)==="."?r.toLowerCase().endsWith(d):d.endsWith("/*")?s===d.replace(/\/.*$/,""):o===d})}return!0}),wc}var Qz=Kz();const Np=Uo(Qz);function wx(e){return Jz(e)||Zz(e)||NS(e)||Xz()}function Xz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1170
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zz(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jz(e){if(Array.isArray(e))return lh(e)}function Sx(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,r)}return a}function kx(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?Sx(Object(a),!0).forEach(function(r){TS(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Sx(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function TS(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function Po(e,n){return nI(e)||tI(e,n)||NS(e,n)||eI()}function eI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1171
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NS(e,n){if(e){if(typeof e=="string")return lh(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return lh(e,n)}}function lh(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,r=new Array(n);a<n;a++)r[a]=e[a];return r}function tI(e,n){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r=[],o=!0,s=!1,u,d;try{for(a=a.call(e);!(o=(u=a.next()).done)&&(r.push(u.value),!(n&&r.length===n));o=!0);}catch(p){s=!0,d=p}finally{try{!o&&a.return!=null&&a.return()}finally{if(s)throw d}}return r}}function nI(e){if(Array.isArray(e))return e}var aI=typeof Np=="function"?Np:Np.default,iI="file-invalid-type",rI="file-too-large",lI="file-too-small",oI="too-many-files",sI=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=n.split(","),r=a.length>1?"one of ".concat(a.join(", ")):a[0];return{code:iI,message:"File type must be ".concat(r)}},Cx=function(n){return{code:rI,message:"File is larger than ".concat(n," ").concat(n===1?"byte":"bytes")}},Ex=function(n){return{code:lI,message:"File is smaller than ".concat(n," ").concat(n===1?"byte":"bytes")}},cI={code:oI,message:"Too many files"};function uI(e){return e.type===""&&typeof e.getAsFile=="function"}function RS(e,n){var a=e.type==="application/x-moz-file"||aI(e,n)||uI(e);return[a,a?null:sI(n)]}function _S(e,n,a){if(or(e.size))if(or(n)&&or(a)){if(e.size>a)return[!1,Cx(a)];if(e.size<n)return[!1,Ex(n)]}else{if(or(n)&&e.size<n)return[!1,Ex(n)];if(or(a)&&e.size>a)return[!1,Cx(a)]}return[!0,null]}function or(e){return e!=null}function dI(e){var n=e.files,a=e.accept,r=e.minSize,o=e.maxSize,s=e.multiple,u=e.maxFiles,d=e.validator;return!s&&n.length>1||s&&u>=1&&n.length>u?!1:n.every(function(p){var f=RS(p,a),y=Po(f,1),g=y[0],x=_S(p,r,o),b=Po(x,1),k=b[0],C=d?d(p):null;return g&&k&&!C})}function Jc(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function So(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(n){return n==="Files"||n==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Ax(e){e.preventDefault()}function fI(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function pI(e){return e.indexOf("Edge/")!==-1}function hI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return fI(e)||pI(e)}function wa(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),u=1;u<o;u++)s[u-1]=arguments[u];return n.some(function(d){return!Jc(r)&&d&&d.apply(void 0,[r].concat(s)),Jc(r)})}}function mI(){return"showOpenFilePicker"in window}function gI(e){if(or(e)){var n=Object.entries(e).filter(function(a){var r=Po(a,2),o=r[0],s=r[1],u=!0;return OS(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),u=!1),(!Array.isArray(s)||!s.every(DS))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),u=!1),u}).reduce(function(a,r){var o=Po(r,2),s=o[0],u=o[1];return kx(kx({},a),{},TS({},s,u))},{});return[{description:"Files",accept:n}]}return e}function yI(e){if(or(e))return Object.entries(e).reduce(function(n,a){var r=Po(a,2),o=r[0],s=r[1];return[].concat(wx(n),[o],wx(s))},[]).filter(function(n){return OS(n)||DS(n)}).join(",")}function vI(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function xI(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function OS(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function DS(e){return/^.*\.[\w]+$/.test(e)}var bI=["children"],wI=["open"],SI=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],kI=["refKey","onChange","onClick"];function jx(e){return AI(e)||EI(e)||MS(e)||CI()}function CI(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1172
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function EI(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AI(e){if(Array.isArray(e))return oh(e)}function Rp(e,n){return NI(e)||TI(e,n)||MS(e,n)||jI()}function jI(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1173
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MS(e,n){if(e){if(typeof e=="string")return oh(e,n);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return oh(e,n)}}function oh(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,r=new Array(n);a<n;a++)r[a]=e[a];return r}function TI(e,n){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var r=[],o=!0,s=!1,u,d;try{for(a=a.call(e);!(o=(u=a.next()).done)&&(r.push(u.value),!(n&&r.length===n));o=!0);}catch(p){s=!0,d=p}finally{try{!o&&a.return!=null&&a.return()}finally{if(s)throw d}}return r}}function NI(e){if(Array.isArray(e))return e}function Tx(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),a.push.apply(a,r)}return a}function kt(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?Tx(Object(a),!0).forEach(function(r){sh(e,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Tx(Object(a)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))})}return e}function sh(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function eu(e,n){if(e==null)return{};var a=RI(e,n),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function RI(e,n){if(e==null)return{};var a={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(n.indexOf(o)>=0)&&(a[o]=e[o]);return a}var cm=S.forwardRef(function(e,n){var a=e.children,r=eu(e,bI),o=zS(r),s=o.open,u=eu(o,wI);return S.useImperativeHandle(n,function(){return{open:s}},[s]),mn.createElement(S.Fragment,null,a(kt(kt({},u),{},{open:s})))});cm.displayName="Dropzone";var LS={disabled:!1,getFilesFromEvent:Bz,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};cm.defaultProps=LS;cm.propTypes={children:mt.func,accept:mt.objectOf(mt.arrayOf(mt.string)),multiple:mt.bool,preventDropOnDocument:mt.bool,noClick:mt.bool,noKeyboard:mt.bool,noDrag:mt.bool,noDragEventsBubbling:mt.bool,minSize:mt.number,maxSize:mt.number,maxFiles:mt.number,disabled:mt.bool,getFilesFromEvent:mt.func,onFileDialogCancel:mt.func,onFileDialogOpen:mt.func,useFsAccessApi:mt.bool,autoFocus:mt.bool,onDragEnter:mt.func,onDragLeave:mt.func,onDragOver:mt.func,onDrop:mt.func,onDropAccepted:mt.func,onDropRejected:mt.func,onError:mt.func,validator:mt.func};var ch={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function zS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=kt(kt({},LS),e),a=n.accept,r=n.disabled,o=n.getFilesFromEvent,s=n.maxSize,u=n.minSize,d=n.multiple,p=n.maxFiles,f=n.onDragEnter,y=n.onDragLeave,g=n.onDragOver,x=n.onDrop,b=n.onDropAccepted,k=n.onDropRejected,C=n.onFileDialogCancel,j=n.onFileDialogOpen,E=n.useFsAccessApi,_=n.autoFocus,R=n.preventDropOnDocument,F=n.noClick,U=n.noKeyboard,O=n.noDrag,W=n.noDragEventsBubbling,P=n.onError,M=n.validator,T=S.useMemo(function(){return yI(a)},[a]),G=S.useMemo(function(){return gI(a)},[a]),Y=S.useMemo(function(){return typeof j=="function"?j:Nx},[j]),ie=S.useMemo(function(){return typeof C=="function"?C:Nx},[C]),B=S.useRef(null),Q=S.useRef(null),H=S.useReducer(_I,ch),ee=Rp(H,2),ne=ee[0],V=ee[1],D=ne.isFocused,L=ne.isFileDialogActive,X=S.useRef(typeof window<"u"&&window.isSecureContext&&E&&mI()),N=function(){!X.current&&L&&setTimeout(function(){if(Q.current){var $=Q.current.files;$.length||(V({type:"closeDialog"}),ie())}},300)};S.useEffect(function(){return window.addEventListener("focus",N,!1),function(){window.removeEventListener("focus",N,!1)}},[Q,L,ie,X]);var ue=S.useRef([]),pe=S.useRef([]),he=function($){B.current&&B.current.contains($.target)||($.preventDefault(),ue.current=[])};S.useEffect(function(){return R&&(document.addEventListener("dragover",Ax,!1),document.addEventListener("drop",he,!1)),function(){R&&(document.removeEventListener("dragover",Ax),document.removeEventListener("drop",he))}},[B,R]),S.useEffect(function(){var fe=function(I){pe.current=[].concat(jx(pe.current),[I.target]),So(I)&&V({isDragGlobal:!0,type:"setDragGlobal"})},$=function(I){pe.current=pe.current.filter(function(Te){return Te!==I.target&&Te!==null}),!(pe.current.length>0)&&V({isDragGlobal:!1,type:"setDragGlobal"})},le=function(){pe.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){pe.current=[],V({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",fe,!1),document.addEventListener("dragleave",$,!1),document.addEventListener("dragend",le,!1),document.addEventListener("drop",me,!1),function(){document.removeEventListener("dragenter",fe),document.removeEventListener("dragleave",$),document.removeEventListener("dragend",le),document.removeEventListener("drop",me)}},[B]),S.useEffect(function(){return!r&&_&&B.current&&B.current.focus(),function(){}},[B,_,r]);var Ee=S.useCallback(function(fe){P?P(fe):console.error(fe)},[P]),Ue=S.useCallback(function(fe){fe.preventDefault(),fe.persist(),Mt(fe),ue.current=[].concat(jx(ue.current),[fe.target]),So(fe)&&Promise.resolve(o(fe)).then(function($){if(!(Jc(fe)&&!W)){var le=$.length,me=le>0&&dI({files:$,accept:T,minSize:u,maxSize:s,multiple:d,maxFiles:p,validator:M}),ye=le>0&&!me;V({isDragAccept:me,isDragReject:ye,isDragActive:!0,type:"setDraggedFiles"}),f&&f(fe)}}).catch(function($){return Ee($)})},[o,f,Ee,W,T,u,s,d,p,M]),Ne=S.useCallback(function(fe){fe.preventDefault(),fe.persist(),Mt(fe);var $=So(fe);if($&&fe.dataTransfer)try{fe.dataTransfer.dropEffect="copy"}catch{}return $&&g&&g(fe),!1},[g,W]),et=S.useCallback(function(fe){fe.preventDefault(),fe.persist(),Mt(fe);var $=ue.current.filter(function(me){return B.current&&B.current.contains(me)}),le=$.indexOf(fe.target);le!==-1&&$.splice(le,1),ue.current=$,!($.length>0)&&(V({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),So(fe)&&y&&y(fe))},[B,y,W]),Ot=S.useCallback(function(fe,$){var le=[],me=[];fe.forEach(function(ye){var I=RS(ye,T),Te=Rp(I,2),at=Te[0],Ie=Te[1],Xe=_S(ye,u,s),Ve=Rp(Xe,2),Se=Ve[0],Vt=Ve[1],rt=M?M(ye):null;if(at&&Se&&!rt)le.push(ye);else{var ja=[Ie,Vt];rt&&(ja=ja.concat(rt)),me.push({file:ye,errors:ja.filter(function(ti){return ti})})}}),(!d&&le.length>1||d&&p>=1&&le.length>p)&&(le.forEach(function(ye){me.push({file:ye,errors:[cI]})}),le.splice(0)),V({acceptedFiles:le,fileRejections:me,type:"setFiles"}),x&&x(le,me,$),me.length>0&&k&&k(me,$),le.length>0&&b&&b(le,$)},[V,d,T,u,s,p,x,b,k,M]),xt=S.useCallback(function(fe){fe.preventDefault(),fe.persist(),Mt(fe),ue.current=[],So(fe)&&Promise.resolve(o(fe)).then(function($){Jc(fe)&&!W||Ot($,fe)}).catch(function($){return Ee($)}),V({type:"reset"})},[o,Ot,Ee,W]),bt=S.useCallback(function(){if(X.current){V({type:"openDialog"}),Y();var fe={multiple:d,types:G};window.showOpenFilePicker(fe).then(function($){return o($)}).then(function($){Ot($,null),V({type:"closeDialog"})}).catch(function($){vI($)?(ie($),V({type:"closeDialog"})):xI($)?(X.current=!1,Q.current?(Q.current.value=null,Q.current.click()):Ee(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Ee($)});return}Q.current&&(V({type:"openDialog"}),Y(),Q.current.value=null,Q.current.click())},[V,Y,ie,E,Ot,Ee,G,d]),yt=S.useCallback(function(fe){!B.current||!B.current.isEqualNode(fe.target)||(fe.key===" "||fe.key==="Enter"||fe.keyCode===32||fe.keyCode===13)&&(fe.preventDefault(),bt())},[B,bt]),Zt=S.useCallback(function(){V({type:"focus"})},[]),Pe=S.useCallback(function(){V({type:"blur"})},[]),pt=S.useCallback(function(){F||(hI()?setTimeout(bt,0):bt())},[F,bt]),Dt=function($){return r?null:$},Nt=function($){return U?null:Dt($)},ge=function($){return O?null:Dt($)},Mt=function($){W&&$.stopPropagation()},qn=S.useMemo(function(){return function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=fe.refKey,le=$===void 0?"ref":$,me=fe.role,ye=fe.onKeyDown,I=fe.onFocus,Te=fe.onBlur,at=fe.onClick,Ie=fe.onDragEnter,Xe=fe.onDragOver,Ve=fe.onDragLeave,Se=fe.onDrop,Vt=eu(fe,SI);return kt(kt(sh({onKeyDown:Nt(wa(ye,yt)),onFocus:Nt(wa(I,Zt)),onBlur:Nt(wa(Te,Pe)),onClick:Dt(wa(at,pt)),onDragEnter:ge(wa(Ie,Ue)),onDragOver:ge(wa(Xe,Ne)),onDragLeave:ge(wa(Ve,et)),onDrop:ge(wa(Se,xt)),role:typeof me=="string"&&me!==""?me:"presentation"},le,B),!r&&!U?{tabIndex:0}:{}),Vt)}},[B,yt,Zt,Pe,pt,Ue,Ne,et,xt,U,O,r]),yn=S.useCallback(function(fe){fe.stopPropagation()},[]),it=S.useMemo(function(){return function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$=fe.refKey,le=$===void 0?"ref":$,me=fe.onChange,ye=fe.onClick,I=eu(fe,kI),Te=sh({accept:T,multiple:d,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:Dt(wa(me,xt)),onClick:Dt(wa(ye,yn)),tabIndex:-1},le,Q);return kt(kt({},Te),I)}},[Q,a,d,xt,r]);return kt(kt({},ne),{},{isFocused:D&&!r,getRootProps:qn,getInputProps:it,rootRef:B,inputRef:Q,open:Dt(bt)})}function _I(e,n){switch(n.type){case"focus":return kt(kt({},e),{},{isFocused:!0});case"blur":return kt(kt({},e),{},{isFocused:!1});case"openDialog":return kt(kt({},ch),{},{isFileDialogActive:!0});case"closeDialog":return kt(kt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return kt(kt({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return kt(kt({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:!1});case"setDragGlobal":return kt(kt({},e),{},{isDragGlobal:n.isDragGlobal});case"reset":return kt({},ch);default:return e}}function Nx(){}function Rx({value:e,onChange:n,options:a,placeholder:r="Select…",disabled:o=!1,className:s,ariaLabel:u,prefixIcon:d}){const[p,f]=S.useState(!1),[y,g]=S.useState(null),[x,b]=S.useState(()=>{const M=a.findIndex(T=>T.value===e);return M>=0?M:0}),k=S.useRef(null),C=S.useRef(null),j=S.useRef(null),E=a.find(M=>M.value===e),_=(E==null?void 0:E.label)??r,R=S.useCallback(()=>{var M;f(!1),(M=C.current)==null||M.focus()},[]),F=S.useCallback(()=>{const M=C.current;if(!M)return;const T=M.getBoundingClientRect(),G=Math.min(240,a.length*36+16),Y=window.innerHeight-T.bottom,ie=T.top,B=Y<G+16&&ie>Y?"above":"below";g({left:T.left,top:B==="below"?T.bottom+4:T.top-4,width:T.width,placement:B})},[a.length]);S.useLayoutEffect(()=>{p&&F()},[p,F]),S.useEffect(()=>{if(!p)return;const M=()=>F(),T=()=>F(),G=ie=>{var Q,H;const B=ie.target;(Q=k.current)!=null&&Q.contains(B)||(H=j.current)!=null&&H.contains(B)||f(!1)},Y=ie=>{ie.key==="Escape"&&(ie.preventDefault(),R())};return window.addEventListener("scroll",M,!0),window.addEventListener("resize",T),document.addEventListener("mousedown",G),document.addEventListener("keydown",Y),()=>{window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",T),document.removeEventListener("mousedown",G),document.removeEventListener("keydown",Y)}},[p,R,F]),S.useEffect(()=>{if(p){const M=a.findIndex(T=>T.value===e);b(M>=0?M:0),requestAnimationFrame(()=>{var T;return(T=j.current)==null?void 0:T.focus()})}},[p,e,a]),S.useEffect(()=>{o&&p&&f(!1)},[o,p]);const U=M=>{o||(M.key==="ArrowDown"||M.key==="Enter"||M.key===" ")&&(M.preventDefault(),f(!0))},O=M=>{var T;if(M.key==="ArrowDown")M.preventDefault(),b(G=>{var Y;for(let ie=1;ie<=a.length;ie++){const B=(G+ie)%a.length;if(!((Y=a[B])!=null&&Y.disabled))return B}return G});else if(M.key==="ArrowUp")M.preventDefault(),b(G=>{var Y;for(let ie=1;ie<=a.length;ie++){const B=(G-ie+a.length)%a.length;if(!((Y=a[B])!=null&&Y.disabled))return B}return G});else if(M.key==="Enter"){M.preventDefault();const G=a[x];G&&!G.disabled&&(n(G.value),R())}else if(M.key==="Home"){M.preventDefault();const G=a.findIndex(Y=>!Y.disabled);G>=0&&b(G)}else if(M.key==="End"){M.preventDefault();let G=-1;for(let Y=a.length-1;Y>=0;Y--)if(!((T=a[Y])!=null&&T.disabled)){G=Y;break}G>=0&&b(G)}},W=["v10-select",s,o?"disabled":"",p?"open":""].filter(Boolean).join(" "),P=y?y.placement==="below"?{position:"fixed",left:y.left,top:y.top,width:y.width}:{position:"fixed",left:y.left,top:y.top,width:y.width,transform:"translateY(-100%)"}:void 0;return m.jsxs("div",{ref:k,className:W,children:[m.jsxs("button",{ref:C,type:"button",className:"v10-select-trigger",onClick:()=>!o&&f(M=>!M),onKeyDown:U,disabled:o,"aria-haspopup":"listbox","aria-expanded":p,"aria-label":u,children:[d&&m.jsx("span",{className:"v10-select-prefix","aria-hidden":"true",children:d}),m.jsx("span",{className:`v10-select-value ${E?"":"placeholder"}`,children:_}),m.jsx(oN,{className:"v10-select-caret",size:12,"aria-hidden":"true"})]}),p&&y&&zE.createPortal(m.jsxs("ul",{ref:j,className:`v10-select-menu v10-select-menu-${y.placement}`,role:"listbox",tabIndex:-1,onKeyDown:O,style:P,children:[a.length===0&&m.jsx("li",{className:"v10-select-option empty","aria-disabled":"true",children:"No options"}),a.map((M,T)=>m.jsx("li",{role:"option","aria-selected":M.value===e,title:M.label,className:["v10-select-option",M.value===e?"selected":"",T===x?"highlighted":"",M.disabled?"disabled":""].filter(Boolean).join(" "),onMouseEnter:()=>b(T),onMouseDown:G=>G.preventDefault(),onClick:()=>{o||M.disabled||(n(M.value),R())},children:M.label},M.value))]}),document.body)]})}function _x(e){return e.bridgeOnline?"connected":e.status==="connecting"?"known":e.status==="degraded"?"degraded":"offline"}function OI(e,n){return n?"Session history":e.chatReady?`${e.name} connected`:e.status==="connecting"?`${e.name} is connecting…`:e.status==="degraded"?`${e.name} degraded`:`${e.name} is unavailable`}function DI(e){const[n,a]=S.useState(!1),[r,o]=S.useState(!1),s=S.useRef(null),u=S.useRef(null),d=S.useRef(null);S.useLayoutEffect(()=>{if(!n)return;const g=d.current,x=u.current;if(!g||!x)return;const k=(x.closest(".v10-panel-right")||document.body).getBoundingClientRect();x.getBoundingClientRect().left+g.offsetWidth>k.right-4?o(!0):o(!1)},[n]);const p=S.useCallback(()=>{var g;a(!1),(g=u.current)==null||g.focus()},[]);S.useEffect(()=>{if(!n)return;const g=b=>{var k;(k=s.current)!=null&&k.contains(b.target)||a(!1)},x=b=>{b.key==="Escape"&&(b.preventDefault(),p())};return document.addEventListener("mousedown",g),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",x)}},[n,p]),S.useEffect(()=>{var x;if(!n)return;const g=(x=d.current)==null?void 0:x.querySelector(".v10-agent-tab-menu-item:not(:disabled)");g==null||g.focus()},[n]);const f=g=>{(g.key==="ArrowDown"||g.key==="Enter"||g.key===" ")&&(g.preventDefault(),a(!0))},y=g=>{var j,E;if(g.key==="Tab"){a(!1);return}if(g.key!=="ArrowDown"&&g.key!=="ArrowUp")return;g.preventDefault();const x=Array.from(((j=d.current)==null?void 0:j.querySelectorAll(".v10-agent-tab-menu-item:not(:disabled)"))??[]);if(x.length===0)return;const b=x.findIndex(_=>_===document.activeElement),k=g.key==="ArrowDown"?1:-1,C=b===-1?k===1?0:x.length-1:(b+k+x.length)%x.length;(E=x[C])==null||E.focus()};return m.jsxs("div",{className:"v10-agent-tab-menu",ref:s,children:[m.jsx("button",{ref:u,type:"button",className:"v10-agent-tab-menu-trigger","aria-label":`More actions for ${e.integration.name}`,"aria-haspopup":"menu","aria-expanded":n,title:`More actions for ${e.integration.name}`,onClick:g=>{g.stopPropagation(),a(x=>!x)},onKeyDown:f,children:m.jsx(fN,{"aria-hidden":"true",size:14})}),n&&m.jsxs("div",{ref:d,className:`v10-agent-tab-menu-popover${r?" align-right":""}`,role:"menu",onKeyDown:y,children:[m.jsxs("div",{className:"v10-agent-tab-menu-status","aria-hidden":"true",children:[m.jsx("span",{className:`v10-agents-stat-dot ${e.statusDotClass}`}),m.jsx("span",{children:e.statusLabel})]}),m.jsx("button",{type:"button",role:"menuitem",className:"v10-agent-tab-menu-item",disabled:e.refreshBusy,onClick:()=>{p(),e.onRefresh()},children:e.refreshBusy?"Refreshing…":"Refresh"}),e.canClearSession&&m.jsx("button",{type:"button",role:"menuitem",className:"v10-agent-tab-menu-item",disabled:e.clearBusy,onClick:()=>{var g;p(),(g=e.onClearSession)==null||g.call(e)},children:e.clearBusy?"Clearing…":"Clear session"}),e.canDisconnect&&m.jsx("button",{type:"button",role:"menuitem",className:"v10-agent-tab-menu-item danger",onClick:()=>{p(),e.onDisconnect()},children:"Disconnect"})]})]})}function um(e,n){return(n==null?void 0:n.trim())||`integration:${e}`}function _o(e){const n=e.sessionId??e.defaultSessionId??rr(e.integrationId);return{integrationId:e.integrationId,sessionId:n,stateKey:um(e.integrationId,n)}}function IS(e,n){for(const a of n)if(e===a.id||e.startsWith(`${a.id}:`))return{id:a.id,name:a.name};return null}function PS(e){var a;if(e.selectedSessionId==null)return!1;const n=e.integrations.find(r=>r.id===e.integrationId);return!(((a=IS(e.selectedSessionId,e.integrations))==null?void 0:a.id)!==e.integrationId||n!=null&&n.defaultSessionId&&e.selectedSessionId!==n.defaultSessionId&&LI(e.integrationId,e.selectedSessionId))}function MI(e){return PS(e)}function LI(e,n){return n===`${e}:dkg-ui`||n.startsWith(`${e}:dkg-ui:profile-`)||n.startsWith(`${e}:dkg-ui:home-`)||n.startsWith(`${e}:dkg-ui:transport-`)}function Ox(e,n){const a=e.flatMap(r=>{var d;const o=IS(r.session,n);if(!o)return[];const s=r.messages.find(p=>p.author==="user"),u=r.messages[r.messages.length-1];return[{sessionId:r.session,integrationId:o.id,integrationName:o.name,preview:((d=s==null?void 0:s.text)==null?void 0:d.slice(0,60))||r.session,messageCount:r.messages.length,lastTs:u==null?void 0:u.ts}]});return a.sort((r,o)=>{const s=Date.parse(r.lastTs??""),u=Date.parse(o.lastTs??"");return Number.isFinite(s)&&Number.isFinite(u)?u-s:String(o.lastTs??"").localeCompare(String(r.lastTs??""))}),a}function US(e,n,a,r,o){var u;const s=_o({integrationId:e,sessionId:n,defaultSessionId:o});return(((u=a[s.stateKey])==null?void 0:u.length)??0)>0||(s.sessionId?r.some(d=>d.sessionId===s.sessionId):!1)}function BS(e,n,a){const r=um(e,null);return Object.entries(n).some(([o,s])=>s.length>0&&(o===r||o.startsWith(`${e}:`)))||a.some(o=>o.integrationId===e)}function zI(e){const n=[...e.integrations].sort(hu),a=n.filter(d=>d.persistentChat),r=n.find(d=>d.id===e.selectedIntegrationId)??a[0]??null,o=r?_o({integrationId:r.id,sessionId:e.selectedSessionId,defaultSessionId:r.defaultSessionId}):null,s=r?US(r.id,e.selectedSessionId,e.localMessagesByConversation,e.sessions,r.defaultSessionId):!1,u=r?BS(r.id,e.localMessagesByConversation,e.sessions):!1;return{sortedIntegrations:n,connectedIntegrations:a,selectedIntegration:r,selectedConversation:o,selectedHasConversation:s,selectedIntegrationHasAnyConversation:u}}function II(e){const n=e.selectedIntegration,a=!!(n&&!n.persistentChat&&e.selectedHasConversation),r=!!(n&&!n.persistentChat&&e.selectedIntegrationHasAnyConversation),o=r?[n,...e.connectedAgents.filter(d=>d.id!==n.id)]:e.connectedAgents,s=e.selectedIntegrationId===sr||!n&&e.connectedAgents.length===0||!!(n&&!n.persistentChat&&!e.selectedIntegrationHasAnyConversation),u=!e.localHistoryLoaded&&e.localMessagesCount===0&&!!(n!=null&&n.persistentChat||e.selectedHasConversation);return{showingSessionHistory:a,showingStoredSessions:r,visibleAgentTabs:o,showAddFlow:s,shouldShowConversationLoader:u}}function hu(e,n){const a=e.id==="openclaw"?0:1,r=n.id==="openclaw"?0:1;return a!==r?a-r:e.persistentChat!==n.persistentChat?e.persistentChat?-1:1:e.name.localeCompare(n.name)}function Rc(e,n){return[...e.filter(a=>a.id!==n.id),n].sort(hu)}function PI(e,n){const a=e.find(u=>u.id===n);if(!a)return e;const r=a.connectSupported,o=r?"available":"coming_soon",s=r?"Ready to connect":"Coming next";return Rc(e,{...a,configured:!1,detected:!1,persistentChat:!1,chatReady:!1,bridgeOnline:!1,bridgeStatusLabel:s,status:o,statusLabel:s,detail:r?`${a.name} is no longer attached to this node. Reconnect from the + tab when you want live chat again.`:a.detail,error:void 0,target:void 0})}function UI(e){const n=e.selectedItem;return e.selectedIntegrationId===sr||n!=null&&(n.persistentChat||US(e.selectedIntegrationId,e.selectedSessionId,e.localMessagesByConversation,e.sessionSummaries,n.defaultSessionId)||BS(e.selectedIntegrationId,e.localMessagesByConversation,e.sessionSummaries))}const BI={openclaw:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAEy0lEQVR42u2ba4hVVRTHf1OmM9GUjzITRmEyX4nglxwjzZKMIsFHGEJJJlLfJGTGBD8kRkRCVmrRA8ueSqmRqJFOpqb2QafR0sovvbTygaPQpONM3s6W/43D7Z65Zx/OuWcfuAsWM/fOXnut/9pr77322nugQhWqUIWiUzVwC1CXgu466a5OC/wdwA9ADugE9gCPAD0S1NlDOvZIp9H9I9CQhgOmA98BrwIfAG0yaDswIgF9I9S30XFGOo3uVs8h96QVBVf6fh8IvCADTwFTfH8bANztOWk+sBLYAHyhkfwKaAbWAyvUZhJwk09+ivrMScdA39+qXFsX7gV+Bi4Ay4GtPuNt+LQX2p8BL6ov0+fkLCyMozWiuZi5WX07S4OBNzVauYT4gnQMdg38w8DxBIEX8nHtBqlTL+ClMgIv5JdlQyp0LbAxRfB5/kS2lJWu0eqec4S3yqaykMnG1joEPs9rE85C/6MlDoLP89NJg5/sy8HDrNQ7gIMRwVwCWtTHiZAyF5NMi3sD31usztdLrqfODW0W4H8H7vPp7g+sCSlrbLwuzdBvVn5u5uMqL2r2Ard6ETEvpPw/3iHrQekcBuwE3tEAHAjZx5IksrwzIZU/7jM+/90qjcq5EPLHgFr1sdj3/RhgYUgbjK2D4nTA8xbh+5ivWPKGRu12L2HqE3Ia/OLpu1p9jAK+1kmxxsIBhp+LC3w/zcmwijcUyF+hn7O0sJWS79TRudhxd6flOtIvDgfMtVy9zRxuBK7y9WEi4FeLPg4XnPxMND0bYSeZE4cDXrPY+vxsQv8tYDPwdwT5c0q1V3u7yKEI8p2qGFnTDcBQb+Wt18pbo89TlWgccTgROiIbp8rmamGo1+f+3QE3CcQWJR3m3N3uhf9vwDYtPg+oElujUXEN/GrZVidbm7yp97kwtAvTSZ0b/pcszVYWVUrJX5rfPR2LhMOyqVE2hskYZ/uLmactlHWoYPmMQw5YKpsuWtYcLxdXn4igcGxEuaTY2HJbRDnrUlaHsqyljkXAIMsIyGlrvjx/bIRaIiQlSfOXsqnFUu5blCzYJhc3ezvDeYcccF422WJ5FF0whk1U9snTaxzcBt+WbftCtjeYh+Rz7U0hBMxBZriurbocdECXbBse8tD1qf+cMa7EAmISifuVSf3kcCZobLtRtraXyAPGFSZDTd10epdSyr0Og/dP096yOWiwGoPSYXNk3a3t4RttL30UVvszAD7P+2VzX2FoUZ1hF/BQmANRre/q+ymLapBL3Cbb89f4tVHvAFozCD7PrXHcFSzKsAMWxlEQGVpiRXWV25XjxELrM+iAj+OsCk9UrS8r4I2td8bpgCpVi7LigC1JPJ4aq6Ow6+A7VBtIhFZmwAErkrwdNhcNRx0GfzSuy5DuaJKjU6FDtpWFmhx0QFM53whV6cbIFfCvp/Fk1jxPW+cA+HVpPpUzNzHvpgj+PdmQKpnT1rIUwC8r16swm+eyf5QB+J/S5STVKyy7Eip6vq/yt/M0HvgQOBsD8LNa6MaTQZoT8P7vSWAB8Iq200X6fKmbN0eZpGkBo1rsn5waAtpOy7IDZgSAmlCk7YSAtjMqDsgwzQwANTGg6lSs7cwsO8DM64+K8MgibUcGtG2gQsnRv1P7PFimYrmBAAAAAElFTkSuQmCC",hermes:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANwElEQVR42rVbCZAcVRn+Z3bume6ZnnN3dg0EEzmMiWCJpVUmIjEeWJZiqRRBEw8owERRU4pXieWBEsAyZUlQMXhfSCkBQUuU9RY8IhQaECMEEjAEYyRkQULWflPfW7/8eT3dvYtb1cl0v9fv/e//X//H9/9PRGRURMZEpCIiIyLSFpGeiORFpIS2Jto8EemLSA33LbxfFJEC3mujrYq+Pu6bGKuEsbsi0hGRHOY2bQ30bRBNOfTrRtDkK5raoKkAukZB5wj69LEOcx8IBusTAzp4yU7Wx2RZvDiOgbIYeIwYwJNV0ddH3ybGsgzoYS7Tt4y2Ovo2FE1d9M8RTQH6+pinGsGAMdCUBd3jWIelaTBJBZO20KmKxgBtNbT5ILaO9hraA0ffOvVtYVI7T4A57DwNtPk0j+3bpL4B9fUc8zSJfk1TE30q1NeMMeDaSIyEKuCcllCZJGS3aFlJqJ5CQkl2WBttVUVToOi3NPEOaxBNdocNBuxgwCIY0cZAFbQFaPMwqIf7AH0rmKSN94tYRBfSLGDyDvqWsLgmftfQVld9a0RTS9HUQF8f83DfDugpJ6B/IOlRMCCPRXQxeAntAb4/DxKp4b6J9hIG7IHQHMYbA4G27yiIKoCwNuasoK2Bvg3cV4imDt4ro83S5BP9OczfAz2W/ibaaqDJw/2AAfkIArsOAusRBHZwcV8mcEwR2FUEagYzgczgLt7POxgcOBjciWBwnZg2M3iACewWbWOyIjryFq2rz6aF/tx32BZtp9iivJ2TfmKWJvvZRNFf02bQ2lzrBxQdfoBWUlahsZKKM4N2HvMsQz6ET0p2DIt2+QFxZrBHNEWZQav4B/9ok9bE7ypeZtPTVCatGWHSPGU6PZKsmWueiDxdRI4TkWNF5Kloz2CRwRAz2yTz56cws57DzA44YaXZB9dykCabEWtyMnhxHISOgOM9/C6ibcBdkq55tlhEVoVjbxSRX4vIv0VkWkT2icgOEflVKMHPhP+vwNhl2mF5/O6QGZzAYjJY9Djm1zSV0NZAX2uazfgDrvi46iSpOt3bNl/dR/X1aOuuDNs+FT67RETeKiInYVsa4k8VkWvABH39UUTejjGKKWjyU/YdSN1yI0OucA6c72N3ZPDyBLZhBt9bX0mohuttInKnY2FTIRMmReQ0vGf+3kC7QV9mVywnbc87LIPnE9gRlv4x0GPpb6Othr72UzPrmiG4Tt9dDduljt8e3VcxaQPPa/Q7D6luiViMvjbSQl4qIv+K6LdXRF6PxTeIpgC0MP1MU0PRb/sy/Ye5wi4dUIkIVkoUVR2B7/eJhIu31w8gNcEio95/VETeTIGMtjLWFY7SAZGusLXhNXwGUVbAatw2iCjTjjkmlOBvUy7cLmpXyOjP0g7aOKT/dSKyEAtoYGF+Cvo9Rf/ACgzDA2w8HYUHmPsTReQOReiBIYv4h4jcH37320TkZSJyPBTeKuy8Ptq13vge9MoFMKENhQdE+QHD8ICBpbKRlvUEy3jWwYsFDN5VwUobjNsMSVpid4rIfSThg2oxRuLvFZHV2ParwMBPgzAz14WhxXhQRK7CWJeh79PwfDW2ck95gl3yBNvknVaI/jz+71lXuEAMYL/bBiuWAT0awDobhpD3iMgPsdDHQi5fDM1tFv8dfLdmkb8RkZtCBpwLzp+P7b4VfS8XkaVY0KJwsV8XkVNE5EuhhXgnpH8ZmHgzuc0+0dQjAXIAVUFbw8WAniOwcX0COfoEzCRHwpRNYGBj59eLyGtxvxzm7cMiskRE1sIRssStc3wel0LShpZfQtrb0fZIyPC78fsgrIaoTyCXABLjYKsptFWsErGxdxmEtEnheASSvE9ErghN1DtE5IVYqJHwnyGhu5Vtn4K3twXt9zgY8AcQlsH4wxTolRRtWvqtC90ipKuNZ0y/h/vGbMxgBjvkNmx5I42HhxCaxiz+M5zvI2Dk9WDatEOPWGV6HAVmgTLNvaSIUDXCEbL4W1U5HYZBy1IsbAe2b5K+ByhGuAUMngaDXZZlJekopr9KjpCmv6qcpkNc4azDFR5XrrB5cU0KqW5P6SPcA6VoJHwXGL0vwku8FBKekyvsp7yMYvloigX9B9p7KkHfgyR1vTO2R8QJVRXQ+erei1nPIeHwuEMHZFU4LPhOoxZxr0Mn/FREfj4LT5Gvvyt/YxpWYh5omnU43HSAHAHphkAFQRXY5ChCH4E5NJ7e37B9jT9wpoj8Dtv6r7AEO1Iw4EFcWsEupbC8GkG/BnR8yg8cAollyY7mFCSWJTPybIc0DsDLW0tJltfAz/+JiPxIRN5PQGsfKNDahAx4DLtAPz+bFsz052MgsZnMUIlsYocw/pYCIBlUNO1fIYlPw3F5tYicTjsqA/9gJzHJMOJVGFfg0OhF3Qo7f5PS/tsc1mADRag67+ACRYsaFNWweEnB4jkHLO7BE7wBfvyfoORug2u7jCRiwuQ3Ybt+F4y7CN9mBszQDDDO0u8BnOxXccYe1fdnlFAdpcwQw+LlCFh84Ad0yS/OE26vEyN5LHyUpNuGb38q0B8TGO0ml7cLs2Pc46/B3z+Nkh1GAq9IoQcexi7gZ7vhEJUV/Tbv0IVw85hvlELvQWLEQs5VLJpTY4zbFxRuXyDEpQTp347vvEC4vcXnngKNnaN4wIx/VgoGGDP5F4dn+EqKXWxqjOlvEv09on/AgJz6BIoqOcr5+7rK31vn6UhI4luUlQlUvF4mJdUjPHBDSnO43eFZnk8KTydHc5ib6w/qhIHMKD2ruat41kyQ8rbZnmPgx38QW/4EQl0Yt9eITR6QWBoG7MVc/GwzKT6mvxlBv0/0H2YGu8oV1unrCQpAbCS5BP77i4HyWLvLuH2THJUc6YetKRnwOMwtP7sfNLtc4TFKqbMrbJ2/maDBhfF7Ch32FbpqCw5egu/yFIAfPukBxukbymlZFBNJDnOKtG5YQSYuDf2RmaGxCFdYZ4bM31tAyDp4gb8Ix/m4iCwg3L6iJGT+Tp6lW7zfoQjXg67UrnBDYfxpOVgExjcN2OuM0PZvwk44j96tq3mKAFN0JPjQLGKEaTC94shaRdHvaVeYy11cmaGsgsSsDvCRD7BbcQ22Y5USkRmF21tn6vNqMRfCnKZhwHUInffC1AbkCueT6IA0VsBmVxeRD2AWc63y4loOK6Bx+5yyAFOAyG9JyQBjeq/G79cRAmStQDnOCuQIEovzA4pwXE4mZ6nokNo6jJGlChGrL9qEPnMKbRLKdFdKBnwj1Anvxu9PKmvm8gMOg8RcnmDH4Qla13ES+LwFJBdj+2lnZQlBUB5qAE4kBs9TIMduoD4PpGTAlaSENyH7vIwWHusJRsUC7Etbr24cEloBaZpn5wwxVZOIErdicfvhKpu/+QoPMLvhBcAN0jDgYwSxm+DsmSFzv0hFlbGxQFw0mCd4+Xho6S0IY5dTCny/AyOI8udXgQm30vM34tn6lAxYCcDFhuSjwCCPpoKqodFgHB5QonTz82HqXN7ZNxPiftNAhM5TDHsAKNHBFIvfA8bZ/MON+LTuBWjjx+AB1TSIkMDn3wx8z8Li9yEkvp6QmycS5gAuSrlgVxXJzXR/OT5PI4ijsJ5YRIgxwWoMJmgY8mUR+bGIfAAWYQUU0TQ5QwcSuLIvgg7ZOAcG6HnOAS07KTvE+Q2fMMGqyxXmYEWjwjYIasPrOgDQc4+SyLeHEDwFp2kpdpQNWz80C/Onr4dgDSwM7ydwhSs6L1Afgp/XaSc0kbG9HVt+JzTwakduX6O4a6i2x5bQmb9PUL+7yBxOYXG7AL1NRiRJroBg9kFZV2LW47uKpLJDXGEukqqA6HmY1Ciil2MHRAUrXB+wgOIJgwx/FYvbAMj9KliXM6HNj4X3eRLc5UuQhOV44EYw+FxKgycuknLl1oIEuTXDpHepxd4JizBMuRk7/YyQmC8A4roAWns+lOkdWPAIudBlbGUjnM9BFzHavAPp+JwjN+jKbwRcJMWlrMWURVIZwOEXwyE5CvZ4WKrscWzza7FdF8Jz3IRFHY0dZs8LcBmeFdLVSKTuhwu8kGqOc2mKpNqEkZcS1gd4Khc/Iv/7Oz0mdN0GTb0Y0jgC1WFnw56fQBUqVQdNVrqL8dlcQ7uDaSonqA8IbJHU6JBiaV0hwucFuDbfMOG5sAyPQnlN4Zu/AZ+GSY19n7bhfEhyMUpizgITG1T6HnVoqgK4/QxiVk6BrvoMg64Qac2lRqgHIgpUWt/HYp4XOkzPQtC0AIpnARypcSrDN/8/B+NN0Lg18tW7JN0Oubc18lR1jVCB8EquEXIWSaWtEssPqciyIESTymmrNG6WzgCUaHsHVHano7UubXGmqeYQiqapparEuEjKnmGYU52gPjeoj80lPTdYprxDNuG5wSBBnWAxSZ1gKwKxSVIpqlEkV1WmH4M4ldWxvJLKO5QVxl8ldKcUUb0aVynKNM3ZDLrOC0Sd6Miqg5lx6WuXGXSdF4grknKZwRlXuBaB2rqqxV3V1royuxaBxHpqnpoDtfUcqHNSmmZLv7NIaizleYE8FT20SfkNywz1Ep5IyRJqNfL/OC/gqcyN/yScGBn2bt3xrp+iL4/bmOOJEc+VGSrO8cyQDT0Dh4RcOqAfk3vsz+LMUC5NZihQgMiwU2OuE1p8aqxFuQR9aowPZ8edBNMHrgOV6Y07NaZPsgURp8aC/wJs6rIsXDWrggAAAABJRU5ErkJggg==","prime-agent":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAEUElEQVR42u2Za4hWRRjHf7uuklZ0pSuRG26WUdHVIilqsduHXa39UJBCJWWlkNLNCrthQR+iD4ZWFLFZEhWRKJYVka6Q+qnY7trFG9GuZRetzextBv4Lw2HOeed99z3nLNv8YfZlmTkzzzPnufyf50BERERERERERERERETEiMcRwAH/J4UPAqYAC4E1wE7gY+C4kaz0aOBSYDHwDVDxjPaRqPhhwGxgU4rSg+N5YOxIUnwMcCvwdRXF7XgMaG7UwQcD5wHnAseUpPxkY+4fBSj+BzCrkQdfDnwJ7NfoAz4E5ijSFuHn9wK/Byj/I3BFo33tu4wDrSlek6Pyk4D3AhS3Y6ustKE426SVf6scvA+4rcHnNgG3y9pClN8BnJPHGzjVmN+fAQLYS5jeoDNbgTcS+9uLeCfl7F3K/7lgArA38C1sA44d4nnX6226+/bIFR5NefMX5RmArg5wAXc8Wec59uK6Pfs9Z3L58cALnrkf8jJ7F695Dv7EpJq7UnJxfx3Us9PD4v4B7tP8ZZ5zdio+5YoLgQHP4VdpfmWKFcwN3P9IYInHwqzLzXTWnZJIgft1abnjrZS3byusccDmlAtYF8DAbK7u9Tz7C9ChNW3mz8PiIO6aZ4pQ/nzgb4+AMzR/ckZw3Kv5NF7xtLJG8rmfgalOJtjlzFlL3GAC7c1ASxEX4As6PeLiyA2yguEdnj3bZUGVlDc/NbH+YrlChy50VFGc+2gPARmQQIO4u8oF9Do0+XBlh4GM9XMcAjTPMLpVRulXlRlelys0F3UB13kE7E6seSkgJX5qeMSyjFhhx1+KNWOcam9bCscYV9QFLPf49GnO/KiAOjx0LJN5jzfnTjRF1iVKpe6aX03Ov7HIsnNDQoAVntL4+wYovxv4AvhANPdtFT5r9f/L4gKTiq67Z4qY7JGgt3gKlcnqt9Wj+JtKgyeojzda+05JWFqpaNHtV1KaC03K97Uq/xlwiGe/+WJ//XkWNrXA0s8tEnq5Z/6COpS3fYUzE/vYDLHUQ7YOLFP5WY75D5aiyTbYWTUqv0qVpWtB01PYYEX7l4K5KdXfnYl1zXIRG7Ce8tDVipjk+0bJrsRzV5o6490qqbGtDOWnZZCVrxSw0uDygs9NYFtkgt3pzrz1+xt0YdWsZXWRrG8QJ6rEzBJsXsbzC9Q5WqRiaazM+CZT6z/rxJNqY08RNb4P3QHC9Sv9pbXNJ6hGf8XEke01NlLSXK0QnCG/CxGwTxnCB+vbvw2BGD1RVuB7vEZBfxJtdXGoIVDf1qm4zf8PlKW8jcrr6xD6wcQ+HXUqvzXn7wpBX116axB4QGVqa2Kf++ukxOOHA+tbHWimK9Un9GFhDYpvSfT8SkdXhrC2LfViAD9vD1DcptlHgKMYZmjyBMI+fYhorSGWPKTWVrKXsNH83qP+/rBGpwqfxUOgoicB16p52amWdgsREREREREREREREREREaXhPxXZ1AH/I5YbAAAAAElFTkSuQmCC"};function HI(e){return BI[e.trim().toLowerCase()]}function Dx({integrationId:e}){const n=HI(e);return n?m.jsx("span",{className:"v10-local-agent-logo","aria-hidden":"true","data-agent-logo":e,style:{maskImage:`url("${n}")`,WebkitMaskImage:`url("${n}")`}}):null}function $I(e){var me,ye;const{integrations:n,selectedIntegrationId:a,selectedIntegration:r,selectedSessionId:o,selectedHasConversation:s,selectedIntegrationHasAnyConversation:u,onSelectIntegration:d,onConnectIntegration:p,onDisconnectIntegration:f,onRefreshIntegration:y,onClearIntegrationSession:g,connectBusyId:x,refreshBusyId:b,clearBusyId:k,connectNotice:C,connectError:j,localMessages:E,localHistoryLoaded:_,localChatEndRef:R,localInput:F,onLocalInputChange:U,onSendLocalMessage:O,onStopLocalStream:W,localSending:P,activeProjectId:M,availableProjects:T,projectsLoading:G,onSelectProject:Y,attachments:ie,onAddAttachments:B,onRemoveAttachment:Q}=e,H=e.selectableProjects??T,ee=ie,ne=ee.some(bS),V=[...new Set(ee.map(I=>I.contextGraphId))],D=ee.some(I=>I.status==="uploading"),X=E.some(I=>I.streaming)?"streaming":D?"uploading":"idle",N=ee.length>0&&ee.some(I=>I.contextGraphId!==M),ue=S.useRef(null),pe=S.useRef(null),[he,Ee]=S.useState(null),Ue=S.useCallback(I=>{pe.current=I,Ee(I)},[]),[Ne,et]=S.useState(!1),Ot=S.useCallback(()=>{const I=pe.current;if(!I)return;const Te=I.scrollHeight-I.scrollTop-I.clientHeight;et(Te>40)},[]),xt=S.useCallback(()=>{const I=pe.current;I&&I.scrollTo({top:I.scrollHeight,behavior:"smooth"})},[]);S.useEffect(()=>{const I=pe.current;if(!I)return;const Te=requestAnimationFrame(()=>{const at=I.scrollHeight-I.scrollTop-I.clientHeight;et(at>40)});return()=>cancelAnimationFrame(Te)},[a,o,E.length]),S.useEffect(()=>{if(!he||typeof MutationObserver>"u")return;const I=()=>{const at=he.scrollHeight-he.scrollTop-he.clientHeight;et(at>40)};I();const Te=new MutationObserver(I);return Te.observe(he,{childList:!0,subtree:!0,characterData:!0}),()=>Te.disconnect()},[he]);const bt=(me=e.selectedIntegration)!=null&&me.chatAttachments?e.activeProjectId?e.localSending?"sending":null:"noProject":"unsupported",yt=bt===null,Zt=S.useCallback(I=>{yt&&B(I)},[yt,B]),Pe=zS({onDrop:Zt,noClick:!0,noKeyboard:!0}),pt=[...n].sort(hu),Dt=pt.filter(I=>I.persistentChat),Nt=pt.filter(I=>!I.persistentChat),ge=r,{showingSessionHistory:Mt,showingStoredSessions:qn,visibleAgentTabs:yn,showAddFlow:it,shouldShowConversationLoader:fe}=II({connectedAgents:Dt,selectedIntegration:r,selectedIntegrationId:a,selectedHasConversation:s,selectedIntegrationHasAnyConversation:u,localHistoryLoaded:_,localMessagesCount:E.length}),$=P||!(ge!=null&&ge.chatReady)||ge.busy===!0,le=!$&&!D&&(F.trim()!==""||ne);return m.jsxs("div",{className:"v10-agents-tab",children:[m.jsxs("div",{className:"v10-agent-subtabs",role:"tablist","aria-label":"Integrated agents",children:[yn.map(I=>{const Te=(ge==null?void 0:ge.id)===I.id&&!it;return m.jsxs("div",{className:`v10-agent-subtab-group ${Te?"active":""}`,children:[m.jsxs("button",{className:`v10-agent-subtab ${Te?"active":""}`,onClick:()=>d(I.id,{preserveSession:PS({integrationId:I.id,selectedSessionId:o,integrations:n}),sessionId:I.defaultSessionId}),role:"tab","aria-selected":Te,children:[m.jsx("span",{className:`v10-agents-stat-dot ${_x(I)}`}),m.jsx(Dx,{integrationId:I.id}),m.jsx("span",{children:I.name})]}),Te&&m.jsx(DI,{integration:I,statusLabel:OI(I,Mt),statusDotClass:_x(I),refreshBusy:b===I.id,clearBusy:k===I.id,canDisconnect:I.connectSupported&&I.persistentChat,canClearSession:I.id==="local-llm",onRefresh:()=>y(I.id),onDisconnect:()=>f(I.id),onClearSession:()=>g(I.id)})]},I.id)}),m.jsx("button",{className:`v10-agent-subtab add ${it?"active":""}`,onClick:()=>d(sr),role:"tab","aria-selected":it,"aria-label":"Add another integrated agent",title:"Add another integrated agent",children:"+"})]}),it?m.jsxs("div",{className:"v10-agent-add-surface",children:[m.jsx("div",{className:"v10-agents-section-label",children:"Connect Another Agent"}),C&&m.jsx("div",{className:"v10-local-agent-notice",children:C}),j&&m.jsx("div",{className:"v10-local-agent-error",children:j}),m.jsxs("div",{className:"v10-local-agent-list","aria-label":"Available agent integrations",children:[Nt.length===0&&m.jsx("div",{className:"v10-agent-empty-state",children:"No additional local agent integrations are available yet."}),Nt.map(I=>m.jsxs("div",{className:"v10-local-agent-detail v10-local-agent-choice",children:[m.jsxs("div",{className:"v10-local-agent-detail-head",children:[m.jsxs("div",{children:[m.jsxs("div",{className:"v10-local-agent-title",children:[m.jsx(Dx,{integrationId:I.id}),I.name]}),m.jsx("div",{className:"v10-local-agent-subtitle",children:I.description})]}),m.jsx("span",{className:`v10-local-agent-status-pill ${I.status}`,children:I.statusLabel})]}),m.jsx("p",{className:"v10-local-agent-copy",children:I.detail}),I.error&&m.jsx("div",{className:"v10-local-agent-warning offline",role:"status","data-testid":`local-agent-warning-${I.id}`,children:I.error}),I.id==="openclaw"&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"v10-local-agent-copy",children:"Connect your local OpenClaw once, then this tab becomes the persistent chat surface for that agent. The node can retry the bridge without forcing you back through setup."}),m.jsxs("div",{className:"v10-local-agent-actions",children:[m.jsx("button",{className:"v10-agent-send-btn secondary",onClick:()=>p(I.id),disabled:x===I.id,children:x===I.id?"Connecting...":"Connect OpenClaw"}),m.jsx("a",{className:"v10-agent-link-btn",href:AL,target:"_blank",rel:"noreferrer",children:"Docs"}),m.jsx("a",{className:"v10-agent-link-btn",href:jL,target:"_blank",rel:"noreferrer",children:"Release Notes"})]})]}),I.id==="prime-agent"&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"v10-local-agent-copy",children:"Connect a local Prime Agent through the node, then this tab becomes the persistent chat surface for it. Prime Agent publishes a bridge per live session; the first chat pins one session, and you can switch explicitly when several are live."}),typeof I.sessionCount=="number"&&m.jsx("p",{className:"v10-local-agent-copy","data-testid":`local-agent-sessions-${I.id}`,children:I.sessionCount===0?"No live session. Start a Prime Agent session, then refresh — the extension publishes its bridge on session start.":I.sessionCount===1?"1 live session.":`${I.sessionCount} live sessions — choose which session this chat should use.`}),I.connectSupported&&m.jsx("div",{className:"v10-local-agent-actions",children:m.jsx("button",{className:"v10-agent-send-btn secondary",onClick:()=>p(I.id),disabled:x===I.id,children:x===I.id?"Connecting...":"Connect Prime Agent"})})]}),I.id==="hermes"&&m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"v10-local-agent-copy",children:"Connect a local Hermes profile through the node, then this tab becomes the persistent chat surface for that profile."}),I.connectSupported&&m.jsx("div",{className:"v10-local-agent-actions",children:m.jsx("button",{className:"v10-agent-send-btn secondary",onClick:()=>p(I.id),disabled:x===I.id,children:x===I.id?"Connecting...":"Connect Hermes"})})]})]},I.id))]})]}):ge&&m.jsxs("div",{...Pe.getRootProps({className:"v10-local-agent-chat-shell"}),children:[m.jsx("input",{...Pe.getInputProps()}),C&&m.jsx("div",{className:"v10-local-agent-notice",children:C}),j&&m.jsx("div",{className:"v10-local-agent-error",children:j}),!ge.chatReady&&m.jsx("div",{className:`v10-local-agent-warning ${ge.status==="connecting"?"connecting":"offline"}`,children:Mt?`${ge.name} is not currently attached to this node. Session history remains available here; reconnect from the + tab when you want live chat again.`:ge.status==="connecting"?`${ge.name} is still finishing setup. This chat tab stays in place and will go live automatically when the connection is ready.`:ge.status==="degraded"?ge.detail:qn?`${ge.name} has saved sessions on this node. Open one from Sessions or reconnect from the + tab to resume live chat here.`:`${ge.name} is temporarily unavailable. Refresh after it recovers to resume chatting here.`}),ge.id==="prime-agent"&&ge.busy===!0&&m.jsx("div",{className:"v10-local-agent-warning connecting",role:"status","data-testid":"prime-agent-active-turn-status",children:ge.detail}),ge.id==="prime-agent"&&(((ye=ge.liveSessions)==null?void 0:ye.length)??0)>1&&m.jsxs("div",{className:"v10-composer-target","data-testid":"prime-agent-session-picker",children:[m.jsx("span",{className:"v10-local-agent-target-label",children:"Prime session"}),m.jsx(Rx,{className:"v10-local-agent-target-select",value:o??ge.defaultSessionId??"",onChange:I=>d(ge.id,{sessionId:I}),options:ge.liveSessions.map((I,Te)=>{var at;return{value:I.sessionId,label:((at=I.sessionName)==null?void 0:at.trim())||`${Te===0?"Most recent":`Session ${Te+1}`} · ${I.sessionId.slice(0,8)}…`}}),ariaLabel:"Prime Agent session",disabled:P||ge.busy===!0})]}),Pe.isDragActive&&m.jsx("div",{className:`v10-drop-overlay active ${yt?"accept":"refuse"}`,role:"status","aria-live":"polite",children:m.jsxs("div",{className:"v10-drop-overlay-card",children:[yt?m.jsx(NN,{className:"v10-drop-overlay-icon",size:32,"aria-hidden":"true"}):m.jsx(aN,{className:"v10-drop-overlay-icon",size:32,"aria-hidden":"true"}),m.jsx("div",{className:"v10-drop-overlay-title",children:yt?`Drop files to attach to ${nh(T,M)}`:bt==="sending"?"Wait for the current send to finish.":bt==="unsupported"?`${ge.name} doesn't accept file attachments.`:"Choose a context graph before attaching files."}),m.jsx("div",{className:"v10-drop-overlay-hint",children:yt?"Release to upload to this conversation.":bt==="sending"?"Drop will be accepted once the agent reply lands.":bt==="unsupported"?"Try a different agent that supports attachments.":"Use the picker below the composer."})]})}),m.jsxs("div",{className:"v10-chat-messages v10-local-agent-messages",ref:Ue,onScroll:Ot,children:[fe&&m.jsx("div",{className:"v10-agent-empty-state",children:"Loading the latest conversation from DKG memory..."}),!fe&&E.length===0&&(()=>{const I=Mt?{title:"No turns in this session yet.",hint:`Reconnect ${ge.name} from the + tab to start a new live thread.`}:qn?{title:`${ge.name} has saved sessions.`,hint:"Open one from Sessions, or reconnect from + to start fresh."}:ge.chatReady?{title:`Start a conversation with ${ge.name}.`,hint:'Try: "What can you help me with?"'}:{title:`${ge.name} is offline.`,hint:"Conversation history stays here while the bridge reconnects."};return m.jsxs("div",{className:"v10-agent-empty-state",children:[m.jsx("div",{className:"v10-agent-empty-state-title",children:I.title}),m.jsx("div",{className:"v10-agent-empty-state-hint",children:I.hint})]})})(),E.map(I=>{var Te,at;return m.jsxs("div",{className:`v10-chat-msg ${I.role}`,children:[m.jsx("div",{className:`v10-chat-bubble ${I.role}`,children:mz(I.content,I.role,!!I.synthesized,!!I.streaming,I.failureNotice)}),I.attachments&&I.attachments.length>0&&m.jsx("div",{className:"v10-local-agent-attachment-row",style:{display:"flex",flexWrap:"wrap",gap:6,marginTop:6},children:I.attachments.map(Ie=>m.jsx("span",{className:"v10-local-agent-attachment-chip",style:{padding:"2px 8px",borderRadius:999,background:"var(--bg-elevated)",fontSize:11},children:Ie.fileName},Ie.id??Ie.assertionUri??Ie.fileHash))}),I.role==="assistant"&&(((Te=I.toolCalls)==null?void 0:Te.length)||I.traceFile)&&m.jsxs("div",{className:"v10-local-agent-copy","data-testid":"local-llm-turn-metadata",children:[(at=I.toolCalls)!=null&&at.length?`Tools: ${I.toolCalls.map(Ie=>Ie.name).join(", ")}`:"Tools: none",I.traceFile?` · Trace: ${I.traceFile}`:""]}),I.ts&&m.jsx("time",{className:`v10-local-agent-msg-time ${I.role}`,dateTime:I.tsRaw,children:I.ts})]},I.id)}),m.jsx("div",{ref:R}),m.jsx("button",{type:"button",className:`v10-scroll-to-bottom ${Ne?"visible":""}`,onClick:xt,"aria-label":"Scroll to latest message",title:"Scroll to latest message",tabIndex:Ne?0:-1,"aria-hidden":!Ne,children:m.jsx(JT,{size:14,"aria-hidden":"true"})})]}),m.jsx("div",{className:"v10-agent-input-area",children:m.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8,width:"100%"},children:[ee.length>0&&m.jsx("div",{className:"v10-attachment-chips",role:"list","aria-label":"Attached files",children:ee.map(I=>{var Ie,Xe;const Te=((Ie=I.result)==null?void 0:Ie.extraction.tripleCount)??((Xe=I.result)==null?void 0:Xe.extraction.triplesWritten),at=I.status==="queued"?"Queued":I.status==="uploading"?"Importing…":I.status==="completed"?Te!=null?`Ready · ${Te} triples`:"Ready":I.status==="skipped"?"Stored only":I.error??"Failed";return m.jsxs("div",{className:"v10-attachment-chip","data-status":I.status,role:"listitem",children:[m.jsx("div",{className:"v10-attachment-chip-badge","aria-hidden":"true",children:xL(I.file.name)}),m.jsxs("div",{className:"v10-attachment-chip-body",children:[m.jsx("div",{className:"v10-attachment-chip-name",title:I.file.name,children:I.file.name}),m.jsxs("div",{className:"v10-attachment-chip-meta",children:[m.jsx("span",{children:vL(I.file.size)}),m.jsx("span",{"aria-hidden":"true",children:"·"}),m.jsx("span",{className:"v10-attachment-chip-status",children:at})]})]}),m.jsx("button",{type:"button",className:"v10-attachment-chip-remove",onClick:()=>Q(I.id),disabled:P,"aria-label":`Remove ${I.file.name}`,title:"Remove attachment",children:m.jsx(LN,{size:12,"aria-hidden":"true"})})]},I.id)})}),N&&m.jsx("div",{className:"v10-local-agent-copy",style:{margin:0,color:"var(--text-tertiary)"},children:V.length>1?"Queued files keep their stored targets and may span multiple projects.":`Queued files keep their stored target (${nh(T,V[0])}), not the active project.`}),m.jsx("input",{ref:ue,type:"file",multiple:!0,style:{display:"none"},onChange:I=>{I.target.files&&(B(I.target.files),I.target.value="")}}),m.jsx("div",{className:"v10-local-agent-composer-row",children:m.jsxs("div",{className:"v10-local-agent-composer-shell",children:[m.jsx(Oz,{placeholder:Mt?`Reconnect ${ge.name} to resume live chat...`:ge.chatReady?`Message ${ge.name}...`:ge.status==="connecting"?`${ge.name} is still connecting...`:`${ge.name} bridge offline...`,className:"v10-agent-input",value:F,onChange:I=>U(I.target.value),onKeyDown:I=>{if(!I.nativeEvent.isComposing){if(I.key==="Enter"&&!I.shiftKey&&!I.ctrlKey&&!I.metaKey){I.preventDefault(),le&&O();return}if((I.ctrlKey||I.metaKey)&&I.key==="Enter"){I.preventDefault(),le&&O();return}I.key==="Escape"&&F.length>0&&(I.preventDefault(),U(""))}},disabled:$,minRows:1,maxRows:8}),m.jsxs("div",{className:"v10-composer-controls",children:[m.jsxs("div",{className:"v10-composer-controls-left",children:[m.jsx("button",{type:"button",className:"v10-composer-attach",onClick:()=>{var I;return(I=ue.current)==null?void 0:I.click()},disabled:!yt,title:yt?"Attach files":bt==="noProject"?"Choose a context graph to attach files":bt==="sending"?"Wait for the current message to send":"This agent does not support attachments","aria-label":"Attach files",children:m.jsx(SN,{size:14,"aria-hidden":"true"})}),m.jsx("div",{className:"v10-composer-target",children:m.jsx(Rx,{className:"v10-local-agent-target-select",value:M??"",onChange:Y,options:[...M?[{value:"",label:"No context graph (clear selection)"}]:[],...H.map(I=>({value:I.id,label:I.name}))],placeholder:G?"Loading context graphs…":"Choose a context graph",disabled:G||!M&&H.length===0,ariaLabel:"Active project",prefixIcon:m.jsx(hN,{size:12,"aria-hidden":"true"})})})]}),m.jsx("button",{type:"button",className:`v10-local-agent-inline-send v10-local-agent-inline-send-${X}`,onClick:X==="streaming"?W:O,disabled:X==="streaming"?!1:X==="uploading"?!0:!le,"aria-label":X==="streaming"?"Stop reply":X==="uploading"?"Send message (attachments uploading)":"Send message",title:X==="streaming"?"Stop reply":X==="uploading"?"Send message (attachments uploading)…":"Send message",children:X==="streaming"?m.jsx(EN,{size:12,"aria-hidden":"true"}):X==="uploading"?m.jsx(vN,{className:"v10-local-agent-inline-send-spinner",size:14,"aria-hidden":"true"}):m.jsx(tN,{size:14,"aria-hidden":"true"})})]})]})})]})})]})]})}function _p(e){return e.length>12?e.slice(-8):e}function qI(e){if(!e)return"";const n=e.lastIndexOf(":"),a=n>=0?e.slice(n+1):e;return a.length>10?a.slice(-10):a||e.slice(-8)}function FI(e,n){const a=new Map;for(const y of n){if(!y.peerId)continue;const g=a.get(y.peerId)??[];g.push(y),a.set(y.peerId,g)}const r=new Map;for(const y of e){if(!y.peerId)continue;const g=r.get(y.peerId)??{hasDirect:!1,hasRelay:!1,openedAt:null},x=g.hasDirect||y.transport==="direct",b=g.hasRelay||y.transport==="relayed",k=y.openedAt!=null?g.openedAt!=null?Math.min(g.openedAt,y.openedAt):y.openedAt:g.openedAt;r.set(y.peerId,{hasDirect:x,hasRelay:b,openedAt:k})}const o=y=>{var g;return(g=y.find(x=>x.name))==null?void 0:g.name},s=y=>y.reduce((g,x)=>x.lastSeen!=null&&(g==null||x.lastSeen>g)?x.lastSeen:g,void 0),u=[],d=new Set;for(const[y,g]of r){const x=a.get(y)??[];u.push({peerId:y,name:o(x),transport:g.hasDirect?"direct":"relayed",hasDirect:g.hasDirect,hasRelay:g.hasRelay,openedAt:g.openedAt,connected:!0,lastSeen:s(x),agents:x}),d.add(y)}for(const[y,g]of a){if(d.has(y))continue;const x=g.filter(j=>j.connectionStatus==="connected");if(x.length===0)continue;const b=x.some(j=>j.connectionTransport==="direct"),k=x.some(j=>j.connectionTransport==="relayed"),C=k&&!b?"relayed":"direct";u.push({peerId:y,name:o(g),transport:C,hasDirect:b,hasRelay:k,openedAt:null,connected:!0,lastSeen:s(g),agents:g}),d.add(y)}const p=[];for(const[y,g]of a){if(d.has(y))continue;const x=s(g);x!=null&&p.push({peerId:y,name:o(g),transport:"direct",hasDirect:!1,hasRelay:!1,openedAt:null,connected:!1,lastSeen:x,agents:g})}p.sort((y,g)=>(g.lastSeen??0)-(y.lastSeen??0));const f=u.filter(y=>y.transport==="direct").length;return{connected:u,recentlySeen:p,directCount:f,relayedCount:u.length-f}}function GI({peer:e}){var y;const[n,a]=S.useState(!1),r=S.useId(),o=3,s=e.connected?"connected":"offline",u=((y=e.name)==null?void 0:y.trim())||_p(e.peerId),d=n?e.agents:e.agents.slice(0,o),p=e.connected?e.transport:"Disconnected",f=e.connected&&e.hasDirect&&e.hasRelay?"Direct + relay paths active — direct shown":void 0;return m.jsxs("div",{className:`v10-agent-card v10-peer-card ${s}`,children:[m.jsxs("div",{className:"v10-agent-card-header",children:[m.jsx("span",{className:`v10-agent-card-dot ${s}`}),m.jsx("span",{className:"v10-peer-card-name",children:u}),m.jsx("span",{className:"v10-agent-card-badge",title:f,children:p})]}),m.jsxs("div",{className:"v10-peer-card-meta",children:[m.jsx("span",{title:e.peerId,children:_p(e.peerId)}),e.connected&&e.openedAt!=null&&m.jsxs("span",{children:["up ",ax(Date.now()-e.openedAt)]}),!e.connected&&e.lastSeen!=null&&m.jsxs("span",{children:[ax(Date.now()-e.lastSeen)," ago"]}),e.agents.length>0&&m.jsxs("span",{children:[e.agents.length," agent",e.agents.length===1?"":"s"]})]}),e.agents.length>0&&m.jsxs("ul",{id:r,className:"v10-peer-card-chips","aria-label":`Agents on ${u}`,children:[d.map((g,x)=>m.jsx("li",{className:"v10-peer-chip",title:g.agentUri||"",children:m.jsx("span",{className:"v10-peer-chip-label",children:qI(g.agentUri)||_p(g.peerId)})},g.agentUri||`${e.peerId}:${x}`)),e.agents.length>o&&m.jsx("li",{children:m.jsx("button",{type:"button",className:"v10-peer-chip-more","aria-expanded":n,"aria-controls":r,onClick:()=>a(g=>!g),children:n?"Show less":`+${e.agents.length-o} more`})})]})]})}function Mx(e){const{label:n,peers:a,expanded:r,onToggle:o,emptyMessage:s}=e;return m.jsxs("div",{className:"v10-peer-group",children:[m.jsxs("button",{type:"button",className:"v10-peer-group-header",onClick:o,"aria-expanded":r,children:[m.jsx(Bp,{size:14,className:`v10-peer-group-chevron ${r?"expanded":""}`,"aria-hidden":"true"}),m.jsx("span",{className:"v10-peer-group-label",children:n}),m.jsx("span",{className:"v10-peer-group-count",children:a.length})]}),r&&m.jsx("div",{className:"v10-peer-group-body",children:a.length===0?m.jsx("div",{className:"v10-agent-empty-state",children:s}):a.map(u=>m.jsx(GI,{peer:u},u.peerId))})]})}function VI(e){const{peerAgents:n,connections:a,loading:r,onRefresh:o}=e,[s,u]=S.useState(!0),[d,p]=S.useState(!1),{connected:f,recentlySeen:y,directCount:g,relayedCount:x}=FI(a.rows,n);return m.jsxs("div",{className:"v10-agent-scroll-tab",children:[m.jsxs("div",{className:"v10-agents-summary",children:[m.jsxs("span",{className:"v10-agents-stat",children:[m.jsx("span",{className:`v10-agents-stat-dot ${f.length>0||a.total>0?"connected":"known"}`}),m.jsxs("span",{title:"Unique libp2p peers connected to this node — matches the count in the header.",children:[f.length," peer",f.length===1?"":"s"]})]}),m.jsxs("span",{className:"v10-agents-stat",title:"Preferred transport per peer (peers reachable via direct + relay are bucketed under direct)",children:[g," direct / ",x," relayed"]}),m.jsx("button",{className:"v10-agents-refresh",onClick:o,title:"Refresh network peers",children:"Refresh"})]}),r&&m.jsx("p",{className:"v10-agents-loading",children:"Loading peers..."}),!r&&f.length===0&&y.length===0&&a.total===0&&m.jsx("div",{className:"v10-agent-empty-state",children:"No network peers detected yet."}),!r&&f.length===0&&a.total>0&&m.jsxs("div",{className:"v10-agent-empty-state",children:["Connected to ",a.total," peer",a.total===1?"":"s"," (peer metadata syncing…)."]}),(f.length>0||y.length>0)&&m.jsxs(m.Fragment,{children:[m.jsx(Mx,{label:"Connected",peers:f,expanded:s,onToggle:()=>u(b=>!b),emptyMessage:"No peers currently connected."}),m.jsx(Mx,{label:"Recently seen",peers:y,expanded:d,onToggle:()=>p(b=>!b),emptyMessage:"No previously-seen peers."})]})]})}function WI(e){const{sessions:n,onOpenSession:a}=e;return m.jsx("div",{className:"v10-agent-scroll-tab",children:m.jsxs("div",{className:"v10-sessions-list",children:[m.jsx("div",{className:"v10-local-agent-copy",style:{marginBottom:12},children:"Sessions track DKG-persisted conversations for your integrated agents."}),n.length===0?m.jsx("p",{className:"v10-agent-empty-state",children:"No integrated-agent sessions yet."}):n.map(r=>m.jsxs("button",{className:"v10-session-item",onClick:()=>a(r),children:[m.jsxs("span",{className:"v10-session-preview",children:[r.integrationName,": ",r.preview]}),m.jsxs("span",{className:"v10-session-count",children:[r.messageCount," msg",r.messageCount!==1?"s":"",r.lastTs?` - ${Xc(r.lastTs)}`:""]})]},r.sessionId))]})})}function YI(){return Rh().data}function KI(){const{stage:e,advance:n}=Lh(),[a,r]=S.useState("agents"),[o,s]=S.useState([]),[u,d]=S.useState([]),[p,f]=S.useState({total:0,direct:0,relayed:0,rows:[]}),[y,g]=S.useState(!0),x=YI(),[b,k]=S.useState([]),[C,j]=S.useState("openclaw"),[E,_]=S.useState(()=>rr("openclaw")),[R,F]=S.useState(null),[U,O]=S.useState(null),[W,P]=S.useState(null),[M,T]=S.useState(null),[G,Y]=S.useState(null),[ie,B]=S.useState({}),[Q,H]=S.useState({}),[ee,ne]=S.useState({}),[V,D]=S.useState({}),[L,X]=S.useState({}),N=S.useRef(new Map),ue=S.useRef(!1),pe=S.useRef(null),he=S.useRef([]),Ee=S.useRef({}),Ue=S.useRef("openclaw"),Ne=S.useRef(rr("openclaw")),et=ca(se=>se.contextGraphs),Ot=ca(se=>se.loading),xt=ca(se=>se.activeProjectId),bt=ca(se=>se.setActiveProject),yt=S.useMemo(()=>YR(et,x?Uh(x):null,xt),[et,x,xt]),Zt=Ox(o,b),{selectedIntegration:Pe,selectedConversation:pt,selectedHasConversation:Dt,selectedIntegrationHasAnyConversation:Nt}=zI({integrations:b,selectedIntegrationId:C,selectedSessionId:E,localMessagesByConversation:ie,sessions:Zt}),ge=(pt==null?void 0:pt.stateKey)??null,Mt=ge?ie[ge]??[]:[],qn=ge?V[ge]??!1:!1,yn=ge?Q[ge]??"":"",it=ge?ee[ge]??!1:!1,fe=ge?L[ge]??[]:[],$=S.useCallback(()=>{var se;(se=pe.current)==null||se.scrollIntoView({behavior:"smooth"})},[]);S.useEffect($,[ge,Mt,$]),S.useEffect(()=>{he.current=o},[o]),S.useEffect(()=>{Ee.current=ie},[ie]),S.useEffect(()=>{Ue.current=C},[C]),S.useEffect(()=>{Ne.current=E},[E]);const le=S.useCallback((se,ve)=>{B(ke=>({...ke,[se]:ve(ke[se]??[])}))},[]),me=S.useCallback((se,ve)=>{se&&H(ke=>({...ke,[se]:ve}))},[]),ye=S.useCallback((se,ve)=>{ne(ke=>({...ke,[se]:ve}))},[]),I=S.useCallback((se,ve)=>{X(ke=>({...ke,[se]:ve(ke[se]??[])}))},[]),Te=S.useCallback((se,ve,ke)=>{const De=Array.from(ve);if(De.length===0)return;const Ye=new Set((L[se]??[]).map(we=>`${we.contextGraphId}:${we.file.name}:${we.file.size}:${we.file.lastModified}`)),lt=De.filter(we=>{const _e=`${ke}:${we.name}:${we.size}:${we.lastModified}`;return Ye.has(_e)?!1:(Ye.add(_e),!0)});if(lt.length===0)return;const Re=lt.map(we=>({id:`${se}:${we.name}:${we.size}:${we.lastModified}:${crypto.randomUUID()}`,file:we,contextGraphId:ke,assertionName:`${Date.now().toString(36)}-${crypto.randomUUID().slice(0,8)}-${we.name.replace(/[^a-zA-Z0-9._-]/g,"_")}`,status:"queued"}));I(se,we=>[...we,...Re])},[L,I]),at=S.useCallback(async(se,ve)=>{const ke=[];for(const De of ve){if(De.status==="completed"||De.status==="skipped"){ke.push(De);continue}I(se,Ye=>Ye.map(lt=>lt.id===De.id?{...lt,status:"uploading",error:void 0}:lt));try{const Ye=await rj(De.assertionName,De.contextGraphId,De.file),lt=Ye.extraction.status==="completed"?"completed":Ye.extraction.status==="skipped"?"skipped":"error",Re={...De,status:lt,result:Ye,error:Ye.extraction.error};ke.push(Re),I(se,we=>we.map(_e=>_e.id===De.id?Re:_e))}catch(Ye){const lt={...De,status:"error",error:(Ye==null?void 0:Ye.message)??"Upload failed"};ke.push(lt),I(se,Re=>Re.map(we=>we.id===De.id?lt:we))}}return ke},[I]),Ie=S.useCallback((se,ve)=>{I(se,ke=>ke.filter(De=>De.id!==ve))},[I]),Xe=S.useCallback((se,ve)=>{const ke=new Set(ve);I(se,De=>De.filter(Ye=>!ke.has(Ye.id)))},[I]),Ve=S.useCallback((se,ve={})=>{j(se),se!==sr&&(ve.preserveSession||_(ve.sessionId??rr(se)))},[]),Se=S.useCallback(()=>{Bn.fetchMemorySessions(50).then(({sessions:se})=>s(se??[])).catch(()=>{})},[]),Vt=S.useCallback(async()=>{try{const[se,ve]=await Promise.all([jb().catch(()=>({agents:[]})),GA().catch(()=>({total:0,direct:0,relayed:0,connections:[]}))]),ke=(se.agents??[]).filter(De=>De.connectionStatus!=="self");d(ke),f({total:ve.total??0,direct:ve.direct??0,relayed:ve.relayed??0,rows:Array.isArray(ve.connections)?ve.connections:[]})}catch{}g(!1)},[]),rt=S.useCallback(async()=>{try{const{integrations:se}=await ou();k(se);const ve=Ox(he.current,se),ke=[...se].sort(hu).filter(_e=>_e.persistentChat),De=Ue.current,Ye=Ne.current,lt=se.find(_e=>_e.id===De)??null,Re=UI({selectedIntegrationId:De,selectedItem:lt,selectedSessionId:Ye,localMessagesByConversation:Ee.current,sessionSummaries:ve});if(!Re){const _e=ke[0];Ve((_e==null?void 0:_e.id)??sr,{sessionId:(_e==null?void 0:_e.defaultSessionId)??null})}const we=ke[0];we&&!ue.current&&De!==sr?(ue.current=!0,Ve(we.id,{sessionId:we.defaultSessionId}),r("agents")):!we&&!Re&&(ue.current=!1,Ve(sr))}catch{}},[Ve]),ja=S.useCallback(async(se,ve=null,ke=null)=>{const De=_o({integrationId:se,sessionId:ve,defaultSessionId:ke});D(Ye=>({...Ye,[De.stateKey]:!1}));try{const lt=(await N0(se,100,{sessionId:De.sessionId??void 0})).map(Re=>lx(Re,se));le(De.stateKey,Re=>Ep(Re,lt))}catch{le(De.stateKey,Ye=>Ye)}finally{D(Ye=>({...Ye,[De.stateKey]:!0})),Se()}},[Se,le]);S.useEffect(()=>{Se(),Vt(),rt()},[Se,Vt,rt]),S.useEffect(()=>{for(const se of TL)ja(se,rr(se))},[]);const ti=S.useCallback(()=>{Se(),Vt()},[Se,Vt]);$o(ti,15e3,{runImmediately:!1});const Ii=b.some(se=>se.persistentChat&&(!se.chatReady||se.status==="connecting"))?3e3:15e3;S.useEffect(()=>{const se=setInterval(()=>{rt()},Ii);return()=>clearInterval(se)},[Ii,rt]),S.useEffect(()=>{if(!(Pe!=null&&Pe.chatSupported)||!Pe.persistentChat&&!Dt){ge&&D(ve=>({...ve,[ge]:!1}));return}let se=!1;return(async()=>await ja(Pe.id,(pt==null?void 0:pt.sessionId)??null,Pe.defaultSessionId??null))(),()=>{se=!0}},[ja,pt==null?void 0:pt.sessionId,ge,Dt,Pe==null?void 0:Pe.defaultSessionId,Pe==null?void 0:Pe.chatSupported,Pe==null?void 0:Pe.id,Pe==null?void 0:Pe.persistentChat]);const gr=S.useCallback(async()=>{var vr,Ra;const se=Pe,ve=pt,ke=yn.trim(),De=fe,Ye=De.some(bS);if(!(se!=null&&se.chatSupported)||!se.chatReady||it||!ve||!ke&&!Ye)return;const lt=se.id,Re=ve.stateKey;ye(Re,!0),P(null);let we=null,_e="",rn="",Na="",xl="",Ko=[],ni=[],ha=[];try{ni=await at(Re,De);const Wt=ni.map(Be=>SL(Be)).filter(Be=>Be!=null),cn=kL(ni);if(!ke&&Wt.length===0&&cn.results.length===0)return;rn=crypto.randomUUID();const Fn=SS(cn.results),At=[ke,Fn].filter(Be=>Be.length>0).join(`
|
|
1174
|
-
|
|
1175
|
-
`);Na=ke?At:CL(Wt,cn.results);const vn=ke?At:"";Ko=Wt,ha=[...Wt.map(Be=>Be.id).filter(Be=>typeof Be=="string"&&Be.length>0),...cn.deliveredDraftIds];const un=`local:${Re}:${rn}:user`;_e=`local:${Re}:${rn}:assistant`;const Gn=new Date,ai=Xc(Gn),bl=th(Gn);le(Re,Be=>[...Be,{id:un,turnId:rn,role:"user",content:Na,ts:ai,tsRaw:bl,attachments:Wt},{id:_e,turnId:rn,role:"assistant",content:"",ts:ai,tsRaw:bl,streaming:!0}]),me(Re,""),ha.length>0&&Xe(Re,ha),we=new AbortController,N.current.set(Re,we);const Qo=[...EL(et,xt,x)],yu=se.id==="prime-agent"?(vr=se.liveSessions)==null?void 0:vr.find(Be=>Be.sessionId===ve.sessionId):void 0,dn=await Gj(lt,vn,{correlationId:rn,signal:we==null?void 0:we.signal,sessionId:ve.sessionId??void 0,liveSession:yu,profile:se.profile,persistUserMessage:vn?void 0:Na,attachments:Wt,attachmentImportResults:cn.results,contextEntries:Qo,contextGraphId:xt??void 0,onEvent:Be=>{Be.type==="text_delta"&&(xl+=Be.delta,le(Re,Ft=>Ft.map(_a=>_a.id===_e?{..._a,content:_a.content+Be.delta}:_a)))}}),Bi=new Date;le(Re,Be=>ox(Be,rn,dn.turnId).map(Ft=>{var _a;return Ft.id===_e?{...Ft,content:dn.text||Ft.content,turnId:((_a=dn.turnId)==null?void 0:_a.trim())||Ft.turnId,streaming:!1,synthesized:!dn.text&&!Ft.content?!0:Ft.synthesized,ts:Xc(Bi),tsRaw:th(Bi),toolCalls:dn.toolCalls,traceFile:dn.traceFile,profile:dn.profile,contextGraphId:dn.contextGraphId,readOnly:dn.readOnly}:Ft}));const xn=lt==="prime-agent"?(Ra=dn.sessionId)==null?void 0:Ra.trim():void 0;if(xn&&xn!==ve.sessionId&&Ue.current===lt&&Ne.current===ve.sessionId){const Be=um(lt,xn);B(Ft=>({...Ft,[Be]:Ep(Ft[Be]??[],Ft[Re]??[])})),D(Ft=>({...Ft,[Be]:Ft[Re]??!0})),Ve(lt,{sessionId:xn}),O(`${se.name} restarted; switched chat to the live session.`)}Se(),e===0&&n()}catch(Wt){const cn=(Wt==null?void 0:Wt.name)==="AbortError",Fn=cn?"Request cancelled.":NL(se,Wt),At=cn?Fn:`Error: ${Fn}`;if(_e){const vn=pz(xl,At);le(Re,ma=>ma.map(un=>un.id===_e?{...un,...vn,streaming:!1}:un))}!cn&<==="hermes"&&_e&&Na&&(async()=>{try{const vn=await Fj(lt,{sessionId:ve.sessionId??void 0,correlationId:rn||void 0,userMessage:Na,assistantReply:xl,failureReason:Fn,profile:se.profile,attachments:Ko,contextGraphId:xt??void 0});vn.turnId&&le(Re,ma=>ox(ma,rn,vn.turnId)),Se()}catch{}})(),ha.length>0&&ni.length>0&&X(vn=>{const ma=vn[Re]??[],un=new Set(ma.map(ai=>ai.id)),Gn=ni.filter(ai=>!un.has(ai.id));return Gn.length===0?vn:{...vn,[Re]:[...Gn,...ma]}}),rt()}finally{ye(Re,!1),N.current.get(Re)===we&&N.current.delete(Re)}},[xt,n,et,x,Se,yn,it,at,fe,rt,pt,Pe,Xe,me,ye,Ve,e,le]),Ta=S.useCallback(()=>{if(!ge)return;const se=N.current.get(ge);se==null||se.abort()},[ge]),yr=S.useCallback(async se=>{F(se),P(null),O(null);try{const ve=await Bj(se);k(Ye=>Rc(Ye,ve.integration)),await rt();const ke=Rc(b,ve.integration),De=MI({integrationId:se,selectedSessionId:E,integrations:ke});Ve(se,{preserveSession:De,sessionId:ve.integration.defaultSessionId}),ue.current=!0,O(ve.notice??(ve.integration.chatReady?`${ve.integration.name} is connected and chat-ready.`:`${ve.integration.name} attach is in progress. The node will keep checking for a live bridge.`)),r("agents")}catch(ve){await rt(),P(ve.message)}finally{F(null)}},[b,rt,E,Ve]),Pi=S.useCallback(async se=>{P(null),O(null);try{await Hj(se),k(ve=>PI(ve,se)),ue.current=!1,Ve(se,{preserveSession:C===se}),O("The local agent was disconnected from this node. Session history remains available here."),r("agents"),await rt()}catch(ve){P(ve.message)}},[rt,C,Ve]),mu=S.useCallback(async se=>{var Ye,lt,Re;if(M===se)return;T(se),P(null),O(null);const ve=_o({integrationId:se,sessionId:C===se?Ne.current:null,defaultSessionId:(Ye=b.find(we=>we.id===se))==null?void 0:Ye.defaultSessionId}),[ke,De]=await Promise.allSettled([$j(se),N0(se,100,{sessionId:ve.sessionId??void 0})]);try{if(ke.status==="fulfilled"?(k(we=>Rc(we,ke.value.integration)),ke.value.notice&&O(ke.value.notice)):P(((lt=ke.reason)==null?void 0:lt.message)??"Failed to refresh integration."),De.status==="fulfilled"){const we=De.value.map(_e=>lx(_e,se));le(ve.stateKey,_e=>Ep(_e,we)),D(_e=>({..._e,[ve.stateKey]:!0}))}else ke.status==="fulfilled"&&P(((Re=De.reason)==null?void 0:Re.message)??"Failed to refresh conversation.")}finally{T(null)}},[b,M,C,le]),Wo=S.useCallback(async se=>{if(!(se!=="local-llm"||G)){Y(se),P(null),O(null);try{await Aj();const ve=_o({integrationId:se,sessionId:rr(se)});B(ke=>({...ke,[ve.stateKey]:[]})),H(ke=>({...ke,[ve.stateKey]:""})),X(ke=>({...ke,[ve.stateKey]:[]})),D(ke=>({...ke,[ve.stateKey]:!0})),O("DKG Local LLM session cleared. You can now select a different Context Graph."),await rt()}catch(ve){P((ve==null?void 0:ve.message)??"Failed to clear the local LLM session.")}finally{Y(null)}}},[G,rt]),vl=S.useCallback(se=>{Ve(se.integrationId,{sessionId:se.sessionId}),r("agents")},[Ve]),Ui=S.useCallback(se=>{bt(se||null)},[bt]),gu=S.useCallback(se=>{!ge||!xt||Te(ge,se,xt)},[xt,Te,ge]),Yo=S.useCallback(se=>{ge&&Ie(ge,se)},[Ie,ge]);return m.jsxs("div",{className:"v10-panel-right",children:[m.jsxs("div",{className:"v10-agent-mode-tabs",children:[m.jsx("button",{className:`v10-agent-mode-tab ${a==="agents"?"active":""}`,onClick:()=>r("agents"),children:"Agents"}),m.jsx("button",{className:`v10-agent-mode-tab ${a==="network"?"active":""}`,onClick:()=>r("network"),children:"Network"}),m.jsx("button",{className:`v10-agent-mode-tab ${a==="sessions"?"active":""}`,onClick:()=>r("sessions"),children:"Sessions"})]}),a==="agents"&&m.jsx($I,{integrations:b,selectedIntegrationId:C,selectedIntegration:Pe,selectedSessionId:E,selectedHasConversation:Dt,selectedIntegrationHasAnyConversation:Nt,onSelectIntegration:Ve,onConnectIntegration:yr,onDisconnectIntegration:Pi,onRefreshIntegration:mu,onClearIntegrationSession:Wo,connectBusyId:R,refreshBusyId:M,clearBusyId:G,connectNotice:U,connectError:W,localMessages:Mt,localHistoryLoaded:qn,localChatEndRef:pe,localInput:yn,onLocalInputChange:se=>me(ge,se),onSendLocalMessage:gr,onStopLocalStream:Ta,localSending:it,activeProjectId:xt,availableProjects:et,selectableProjects:yt,projectsLoading:Ot,onSelectProject:Ui,attachments:fe,onAddAttachments:gu,onRemoveAttachment:Yo}),a==="network"&&m.jsx(VI,{peerAgents:u,connections:p,loading:y,onRefresh:Vt}),a==="sessions"&&m.jsx(WI,{sessions:Zt,onOpenSession:vl})]})}function QI(e,n=document){const a=e==="light";n.documentElement.setAttribute("data-theme",e),n.documentElement.classList.toggle("light",a),n.body.classList.toggle("light",a)}function XI(){const{toggleLeft:e,toggleRight:n,toggleBottom:a}=aa();S.useEffect(()=>{const r=o=>{if(o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement||!(o.metaKey||o.ctrlKey))return;const u=o.key.toLowerCase();if(o.shiftKey&&u==="b"){o.preventDefault(),n();return}if(!o.shiftKey){if(u==="b"){o.preventDefault(),e();return}if(u==="j"){o.preventDefault(),a();return}}};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[e,n,a])}const Lx={"/observability":{id:"operations",label:"Observability"},"/operations":{id:"operations",label:"Observability"},"/settings":{id:"settings",label:"Settings"}},ZI={operations:"/observability",settings:"/settings",dashboard:"/"};function JI(){const{pathname:e}=pa(),n=ph(),a=gn(o=>o.openTab),r=gn(o=>o.activeTabId);S.useEffect(()=>{const o=Lx[e];o&&a({id:o.id,label:o.label,closable:!0})},[e,a]),S.useEffect(()=>{const o=ZI[r];if(o){o!==e&&n(o,{replace:!0});return}Lx[e]&&n("/",{replace:!0})},[r,e,n])}function e8(){const[e,n]=S.useState(dT());return S.useEffect(()=>fT(n),[]),e?m.jsxs("div",{className:"v10-mock-banner",role:"alert","aria-live":"polite",children:[m.jsx("span",{className:"v10-mock-banner-dot","aria-hidden":"true"}),m.jsxs("span",{children:[m.jsx("strong",{children:"Demo data"})," — the node isn’t responding (it may be down, timing out, or returning errors), so the UI is showing example data, not live node state. Check the daemon, then reload."]}),m.jsx("button",{type:"button",className:"v10-mock-banner-reload",onClick:()=>window.location.reload(),children:"Reload"})]}):null}const zx=[1e3,2e3,4e3,8e3,15e3,3e4];function t8(e){return zx[Math.min(e,zx.length-1)]}function HS({reload:e=()=>window.location.reload(),probeRetryMs:n=t8}){const[a,r]=S.useState("hidden"),[o,s]=S.useState("");if(S.useEffect(()=>{if(YE())return;let d=!1,p;const f=async y=>{const g=await JE();if(d)return;if(g==="unknown"){p=setTimeout(()=>{f(y+1)},n(y));return}if(g==="accepted")return;const x=!!db();x&&XE(),r(x?"rejected":"required")};return f(0),()=>{d=!0,p!==void 0&&clearTimeout(p)}},[]),a==="hidden")return null;const u=d=>{d.preventDefault(),o.trim()&&QE(o)&&e()};return m.jsxs("form",{className:"v10-token-prompt","aria-label":"Node API token",onSubmit:u,children:[m.jsxs("span",{className:"v10-token-prompt-text",children:[m.jsx("strong",{children:"API token required"}),a==="rejected"?" — the node did not accept that token.":" —"," The node passes its token to the dashboard only when it is opened on the node host. Paste the token from ",m.jsx("code",{children:"auth.token"})," on the node host to use this dashboard at ",m.jsx("strong",{children:window.location.host})," (kept for this tab only)."]}),m.jsx("input",{className:"v10-token-prompt-input",type:"password",autoComplete:"off",spellCheck:!1,"aria-label":"API token",value:o,onChange:d=>s(d.target.value)}),m.jsx("button",{type:"submit",className:"v10-token-prompt-submit",disabled:!o.trim(),children:"Use token"})]})}function n8(){const e=bh(n=>n.setNodeStatus);$o(()=>{Bn.fetchStatus().then(e).catch(()=>{})},1e4)}function Ix(e){const n=S.useRef(null),a=S.useRef(e);return a.current=e,S.useEffect(()=>{const r=n.current;if(!r)return;let o=0;const s=p=>{const f=p.clientX-o;o=p.clientX,a.current(f)},u=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.body.style.cursor="",document.body.style.userSelect="",r.classList.remove("active")},d=p=>{p.preventDefault(),o=p.clientX,document.addEventListener("mousemove",s),document.addEventListener("mouseup",u),document.body.style.cursor="col-resize",document.body.style.userSelect="none",r.classList.add("active")};return r.addEventListener("mousedown",d),()=>r.removeEventListener("mousedown",d)},[]),n}function a8(e){const n=S.useRef(e);n.current=e;const[a,r]=S.useState(null);return S.useEffect(()=>{if(!a)return;let o=0;const s=p=>{const f=p.clientY-o;o=p.clientY,n.current(f)},u=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",u),document.body.style.cursor="",document.body.style.userSelect="",a.classList.remove("active")},d=p=>{p.preventDefault(),o=p.clientY,document.addEventListener("mousemove",s),document.addEventListener("mouseup",u),document.body.style.cursor="row-resize",document.body.style.userSelect="none",a.classList.add("active")};return a.addEventListener("mousedown",d),()=>{a.removeEventListener("mousedown",d),u()}},[a]),S.useCallback(o=>r(o),[])}function i8(){n8(),XI(),JI();const{leftCollapsed:e,rightCollapsed:n,bottomCollapsed:a,theme:r,leftWidth:o,rightWidth:s,setLeftWidth:u,setRightWidth:d,setBottomHeight:p}=aa(),[,f]=S.useState(0);S.useEffect(()=>{QI(r)},[r]),S.useEffect(()=>{const j=()=>f(E=>E+1);return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]),S.useLayoutEffect(()=>{const j=window.requestAnimationFrame(()=>{window.dispatchEvent(new Event("resize"))});return()=>window.cancelAnimationFrame(j)},[e,n]);const y=S.useCallback(j=>{const E=aa.getState().leftWidth;u(Math.max(140,Math.min(400,E+j)))},[u]),g=S.useCallback(j=>{const E=aa.getState().rightWidth;d(Math.max(200,Math.min(500,E-j)))},[d]),x=S.useCallback(j=>{const E=Math.min(aa.getState().bottomHeight,Mc());p(Math.min(E-j,Mc()))},[p]),b=Ix(y),k=Ix(g),C=a8(x);return m.jsxs("div",{className:"v10-app",children:[m.jsx(e8,{}),m.jsx(HS,{}),m.jsx(gR,{}),m.jsxs("div",{className:"v10-app-body",children:[!e&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"v10-panel-left",style:{width:o},children:m.jsx(s4,{})}),m.jsx("div",{className:"v10-resize-handle-h",ref:b})]}),m.jsxs("div",{className:"v10-center-region",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"},children:[m.jsx("div",{style:{flex:1,minHeight:0,overflow:"hidden"},children:m.jsx(iL,{})}),!a&&m.jsx("div",{className:"v10-resize-handle-v",ref:C}),m.jsx(yL,{})]}),!n&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"v10-resize-handle-h",ref:k}),m.jsx("div",{className:"v10-panel-right",style:{width:s},children:m.jsx(KI,{})})]})]})]})}const r8=mn.lazy(()=>nt(()=>import("./Network-BKvJttOu.js"),[]).then(e=>({default:e.NetworkPage})));function l8(){const e=gn(n=>n.openTab);return S.useLayoutEffect(()=>{e(s3)},[e]),m.jsx(ko,{to:"/",replace:!0})}function o8(){return m.jsxs(nE,{children:[m.jsx(Ni,{path:"/network",element:m.jsxs(m.Fragment,{children:[m.jsx(HS,{}),m.jsx(mn.Suspense,{fallback:m.jsx("div",{className:"lazy-spinner",children:"Loading..."}),children:m.jsx(r8,{})})]})}),m.jsx(Ni,{path:"/context-graph-primer",element:m.jsx(l8,{})}),m.jsx(Ni,{path:"/agent",element:m.jsx(ko,{to:"/",replace:!0})}),m.jsx(Ni,{path:"/explorer",element:m.jsx(ko,{to:"/",replace:!0})}),m.jsx(Ni,{path:"/messages",element:m.jsx(ko,{to:"/",replace:!0})}),m.jsx(Ni,{path:"/apps/*",element:m.jsx(ko,{to:"/",replace:!0})}),m.jsx(Ni,{path:"*",element:m.jsx(i8,{})})]})}function s8(){const[e,n]=S.useState(0);return S.useEffect(()=>ZE(()=>n(a=>a+1)),[]),m.jsx(AE,{basename:"/ui",children:m.jsx(o8,{})},e)}iC.createRoot(document.getElementById("root")).render(m.jsx(mn.StrictMode,{children:m.jsx(s8,{})}));export{Q8 as $,Zb as A,k8 as B,V4 as C,A9 as D,K8 as E,Y8 as F,_9 as G,an as H,G4 as I,p9 as J,N9 as K,lw as L,C9 as M,M0 as N,jh as O,X8 as P,jb as Q,mn as R,k9 as S,c9 as T,H8 as U,GA as V,DN as W,Ah as X,ru as Y,R8 as Z,nt as _,W4 as a,Y4 as a$,_8 as a0,YA as a1,T8 as a2,x8 as a3,QA as a4,N8 as a5,KA as a6,A0 as a7,P8 as a8,L8 as a9,g9 as aA,zT as aB,PT as aC,j3 as aD,v9 as aE,rj as aF,R4 as aG,zb as aH,w8 as aI,S8 as aJ,UT as aK,NR as aL,e9 as aM,a9 as aN,m as aO,fj as aP,h9 as aQ,V8 as aR,b8 as aS,B8 as aT,ZA as aU,y8 as aV,$A as aW,D9 as aX,m4 as aY,$b as aZ,y9 as a_,z8 as aa,D8 as ab,O8 as ac,M8 as ad,C8 as ae,FA as af,I8 as ag,A8 as ah,_b as ai,pj as aj,S9 as ak,C3 as al,l9 as am,n1 as an,J4 as ao,e3 as ap,zN as aq,t9 as ar,R9 as as,p4 as at,T9 as au,j9 as av,IN as aw,Qe as ax,d8 as ay,Uo as az,s3 as b,Vc as b0,Oh as b1,G8 as b2,Z8 as b3,p8 as b4,v8 as b5,h8 as b6,g8 as b7,OT as b8,m8 as b9,Yb as bA,w9 as bB,aa as bC,Q4 as bD,_4 as bE,ET as bF,Gc as bG,hl as bH,Ub as bI,Bb as bJ,Up as bK,ca as bL,gn as bM,o9 as bN,i9 as bO,y3 as bP,$8 as bQ,TA as ba,W8 as bb,F8 as bc,S as bd,q8 as be,nj as bf,U8 as bg,O9 as bh,a1 as bi,f9 as bj,s9 as bk,J8 as bl,r9 as bm,f3 as bn,T3 as bo,Fh as bp,WN as bq,u9 as br,d9 as bs,E8 as bt,j8 as bu,y4 as bv,bh as bw,b9 as bx,Rh as by,ep as bz,rN as c,oN as d,uN as e,n9 as f,nb as g,vN as h,Xb as i,KI as j,mt as k,E9 as l,x9 as m,Bn as n,K4 as o,tj as p,$t as q,m9 as r,N4 as s,Mi as t,Qt as u,K1 as v,HT as w,u8 as x,qt as y,f8 as z};
|