aims-workstation 0.1.19 → 0.1.21
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 +12 -0
- package/package.json +1 -1
- package/server.js +25 -3
- package/web/dist/assets/index-DKhapqn5.css +2 -0
- package/web/dist/assets/index-PgUZ0iY9.js +105 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-D_efIQYP.js +0 -105
- package/web/dist/assets/index-vTyioJNj.css +0 -2
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ee(a,u),c+=N(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ee(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function L(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function te(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else L(te.bind(null,e))}var ne={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ne,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=te,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=L,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function m(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&m(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function g(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=g(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),M=Symbol.for(`react.profiler`),N=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),F=Symbol.for(`react.forward_ref`),I=Symbol.for(`react.suspense`),L=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),se=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case M:return`Profiler`;case ee:return`StrictMode`;case I:return`Suspense`;case L:return`SuspenseList`;case re:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case N:return(e._context.displayName||`Context`)+`.Consumer`;case F:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,R=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},me=[],he=-1;function ge(e){return{current:e}}function _e(e){0>he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=mp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,ve(Se,e)),t=ye.current;var n=mp(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),uh._currentValue=pe)}var B,De;function V(e){if(B===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||``,De=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+B+e+De}var Oe=!1;function ke(e,t){if(!e||Oe)return``;Oe=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
4
|
+
`),l=s.split(`
|
|
5
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
6
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Oe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?V(n):``}function Ae(e,t){switch(e.tag){case 26:case 27:case 5:return V(e.type);case 16:return V(`Lazy`);case 13:return e.child!==t&&t!==null?V(`Suspense Fallback`):V(`Suspense`);case 19:return V(`SuspenseList`);case 0:case 15:return ke(e.type,!1);case 11:return ke(e.type.render,!1);case 1:return ke(e.type,!0);case 31:return V(`Activity`);case 30:return V(`ViewTransition`);default:return``}}function je(e){try{var t=``,n=null;do t+=Ae(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var Me=Object.prototype.hasOwnProperty,Ne=t.unstable_scheduleCallback,Pe=t.unstable_cancelCallback,Fe=t.unstable_shouldYield,Ie=t.unstable_requestPaint,Le=t.unstable_now,Re=t.unstable_getCurrentPriorityLevel,ze=t.unstable_ImmediatePriority,Be=t.unstable_UserBlockingPriority,Ve=t.unstable_NormalPriority,He=t.unstable_LowPriority,Ue=t.unstable_IdlePriority,We=t.log,Ge=t.unstable_setDisableYieldValue,Ke=null,H=null;function qe(e){if(typeof We==`function`&&Ge(e),H&&typeof H.setStrictMode==`function`)try{H.setStrictMode(Ke,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Je(n),i=1<<r;t|=e[r],n&=~i}return t}function at(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ot(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function st(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Je(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ut(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Je(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function dt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Je(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ft(e,t){var n=t&-t;return n=n&42?1:pt(n),(n&(e.suspendedLanes|t))===0?n:0}function pt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function U(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mt(){var e=z.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function ht(e,t){var n=z.p;try{return z.p=e,t()}finally{z.p=n}}var W=Math.random().toString(36).slice(2),gt=`__reactFiber$`+W,_t=`__reactProps$`+W,vt=`__reactContainer$`+W,yt=`__reactEvents$`+W,bt=`__reactListeners$`+W,xt=`__reactHandles$`+W,St=`__reactResources$`+W,Ct=`__reactMarker$`+W,wt=`__reactLoad$`+W;function Tt(e){delete e[gt],delete e[_t],delete e[bt],delete e[xt]}function Et(e){var t;if(t=e[gt])return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[gt])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function Dt(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ot(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function kt(e){var t=e[St];return t||=e[St]={hoistableStyles:new Map,hoistableScripts:new Map},t}function At(e){e[Ct]=!0}function jt(e){e[wt]=void 0}var Mt=new Set,Nt={};function Pt(e,t){Ft(e,t),Ft(e+`Capture`,t)}function Ft(e,t){for(Nt[e]=t,e=0;e<t.length;e++)Mt.add(t[e])}var It=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]*$`),Lt={},Rt={};function zt(e){return Me.call(Rt,e)?!0:Me.call(Lt,e)?!1:It.test(e)?Rt[e]=!0:(Lt[e]=!0,!1)}var Bt=!1;function G(){var e=Bt;return Bt=!1,e}function Vt(e,t,n){if(zt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Yt=/[\n"\\]/g;function Xt(e){return e.replace(Yt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):$t(e,Wt(n)):o===`number`&&e.value==t?$t(e,Wt(e.value)):$t(e,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function Qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function $t(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function en(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function tn(e,t,n){t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Wt(n)}function nn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function rn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var an=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 on(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||an.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function sn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Bt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(on(e,a,r),Bt=!0)}else for(var o in t)t.hasOwnProperty(o)&&on(e,o,t[o])}function cn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var ln=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`],[`maskType`,`mask-type`],[`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`]]),un=/^[\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 dn(e){return un.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function fn(){}var pn=null;function mn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hn=null,gn=null;function _n(e){var t=Dt(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Zt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Xt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[_t]||null;if(!a)throw Error(i(90));Zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:tn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&en(e,!!n.multiple,t,!1)}}}var vn=!1;function yn(e,t,n){if(vn)return e(t,n);vn=!0;try{return e(t)}finally{if(vn=!1,(hn!==null||gn!==null)&&(Hd(),hn&&(t=hn,e=gn,gn=hn=null,_n(t),e)))for(t=0;t<e.length;t++)_n(e[t])}}function bn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Sn=!1;if(xn)try{var Cn={};Object.defineProperty(Cn,"passive",{get:function(){Sn=!0}}),window.addEventListener(`test`,Cn,Cn),window.removeEventListener(`test`,Cn,Cn)}catch{Sn=!1}var wn=null,Tn=null,En=null;function Dn(){if(En)return En;var e,t=Tn,n=t.length,r,i=`value`in wn?wn.value:wn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return En=i.slice(e,1<r?1-r:void 0)}function On(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kn(){return!0}function An(){return!1}function jn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?kn:An,this.isPropagationStopped=An,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nn=jn(Mn),Pn=D({},Mn,{view:0,detail:0}),Fn=jn(Pn),In,Ln,Rn,zn=D({},Pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Rn&&(Rn&&e.type===`mousemove`?(In=e.screenX-Rn.screenX,Ln=e.screenY-Rn.screenY):Ln=In=0,Rn=e),In)},movementY:function(e){return`movementY`in e?e.movementY:Ln}}),Bn=jn(zn),Vn=jn(D({},zn,{dataTransfer:0})),Hn=jn(D({},Pn,{relatedTarget:0})),Un=jn(D({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0})),Wn=jn(D({},Mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Gn=jn(D({},Mn,{data:0})),Kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={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`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=jn(D({},Pn,{key:function(e){if(e.key){var t=Kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=On(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?On(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?On(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=jn(D({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=jn(D({},Mn,{submitter:0})),er=jn(D({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),tr=jn(D({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=jn(D({},zn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=jn(D({},Mn,{newState:0,oldState:0,source:0})),ir=[9,13,27,32],ar=xn&&`CompositionEvent`in window,or=null;xn&&`documentMode`in document&&(or=document.documentMode);var sr=xn&&`TextEvent`in window&&!or,cr=xn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=Dn(),En=Tn=wn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={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 _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){hn?gn?gn.push(r):gn=[r]:hn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Nn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){Wf(e,0)}function Sr(e){if(Jt(Ot(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(xn){var Tr;if(xn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,mn(e)),yn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Me.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ur=xn&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==Lr(r)||(r=Wr,`selectionStart`in r&&Hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=Zf(Gr,`onSelect`),0<r.length&&(t=new Nn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionrun:Yr(`Transition`,`TransitionRun`),transitionstart:Yr(`Transition`,`TransitionStart`),transitioncancel:Yr(`Transition`,`TransitionCancel`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};xn&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionrun`),ii=$r(`transitionstart`),ai=$r(`transitioncancel`),oi=$r(`transitionend`),si=new Map,ci=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ci.push(`scrollEnd`);function li(e,t){si.set(e,t),Pt(t,[e])}var ui=0;function di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=ui++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function fi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function pi(e,t){return e=fi(e),t=fi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var mi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},hi=[],gi=0,_i=0;function vi(){for(var e=gi,t=_i=gi=0;t<e;){var n=hi[t];hi[t++]=null;var r=hi[t];hi[t++]=null;var i=hi[t];hi[t++]=null;var a=hi[t];if(hi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Si(n,i,a)}}function yi(e,t,n,r){hi[gi++]=e,hi[gi++]=t,hi[gi++]=n,hi[gi++]=r,_i|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bi(e,t,n,r){return yi(e,t,n,r),Ci(e)}function xi(e,t){return yi(e,null,null,t),Ci(e)}function Si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Je(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ci(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wi={};function Ti(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ei(e,t,n,r){return new Ti(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=Ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ki(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ai(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Di(r)&&(s=1);else if(typeof r==`string`)s=Xm(e,n,ye.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Ei(31,n,t,a),e.elementType=re,e.lanes=o,e;case j:return ji(n.children,a,o,t);case ee:s=8,a|=24;break;case M:return e=Ei(12,n,t,a|2),e.elementType=M,e.lanes=o,e;case I:return e=Ei(13,n,t,a),e.elementType=I,e.lanes=o,e;case L:return e=Ei(19,n,t,a),e.elementType=L,e.lanes=o,e;case ie:case oe:return e=a|32,e=Ei(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case N:s=9;break a;case F:s=11;break a;case te:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ji(e,t,n,r){return e=Ei(7,e,r,t),e.lanes=n,e}function Mi(e,t,n){return e=Ei(6,e,null,t),e.lanes=n,e}function Ni(e){var t=Ei(18,null,null,0);return t.stateNode=e,t}function Pi(e,t,n){return t=Ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fi=new WeakMap;function Ii(e,t){if(typeof e==`object`&&e){var n=Fi.get(e);return n===void 0?(t={value:e,source:t,stack:je(t)},Fi.set(e,t),t):n}return{value:e,source:t,stack:je(t)}}var Li=[],Ri=0,zi=null,Bi=0,Vi=[],Hi=0,Ui=null,Wi=1,Gi=``;function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=zi,zi=e,Bi=t}function qi(e,t,n){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Ui=e;var r=Wi;e=Gi;var i=32-Je(r)-1;r&=~(1<<i),n+=1;var a=32-Je(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wi=1<<32-Je(t)+i|n<<i|r,Gi=a+e}else Wi=1<<a|n<<i|r,Gi=e}function Ji(e){e.return!==null&&(Ki(e,1),qi(e,1,0))}function Yi(e){for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null;for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null}function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Wi=t.id,Gi=t.overflow,Ui=e}var Zi=null,Qi=null,$i=!1,ea=null,ta=!1,na=Error(i(519));function ra(e){throw la(Ii(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),na}function ia(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Uf.length;n++)Y(Uf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),Qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),nn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=fn),t=!0):t=!1,t||ra(e,!0)}function aa(e){for(Zi=e.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:ta=!1;return;case 27:case 3:ta=!0;return;default:Zi=Zi.return}}function oa(e){if(e!==Zi)return!1;if(!$i)return aa(e),$i=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||gp(e.type,e.memoizedProps)),n=!n),n&&Qi&&ra(e),aa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=mm(e)}else t===27?(t=Qi,Tp(e.type)?(e=pm,pm=null,Qi=e):Qi=t):Qi=Zi?fm(e.stateNode.nextSibling):null;return!0}function sa(){Qi=Zi=null,$i=!1}function ca(){var e=ea;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ea=null),e}function la(e){ea===null?ea=[e]:ea.push(e)}var ua=ge(null),da=null,fa=null;function pa(e,t,n){ve(ua,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=ua.current,_e(ua)}function ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ga(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ha(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ha(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ha(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function _a(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}a=a.return}return e!==null&&ga(t,e,n,r),t.flags|=262144,e!==null}function va(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){da=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ba(e){return Sa(da,e)}function xa(e,t){return da===null&&ya(e),Sa(e,t)}function Sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},fa===null){if(e===null)throw Error(i(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return n}var Ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},wa=t.unstable_scheduleCallback,Ta=t.unstable_NormalPriority,Ea={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Da(){return{controller:new Ca,data:new Map,refCount:0}}function Oa(e){e.refCount--,e.refCount===0&&wa(Ta,function(){e.controller.abort()})}function ka(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Aa=null;function ja(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ma=null,Na=0,Pa=0,Fa=null;function Ia(e,t){if(Ma===null){var n=Ma=[];Na=0,Pa=Rf(),Fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Na++,t.then(La,La),t}function La(){if(--Na===0&&(Aa=null,Ma!==null)){Fa!==null&&(Fa.status=`fulfilled`);var e=Ma;Ma=null,Pa=0,Fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var za=R.S;R.S=function(e,t){if(vd=Le(),typeof t==`object`&&t&&typeof t.then==`function`&&Ia(e,t),Aa!==null)for(var n=wf;n!==null;)ka(n,Aa),n=n.next;if(n=e.types,n!==null){for(var r=wf;r!==null;)ka(r,n),r=r.next;if(Pa!==0){r=Aa,r===null&&(r=Aa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}za!==null&&za(e,t)};var Ba=ge(null);function Va(){var e=Ba.current;return e===null?$u.pooledCache:e}function Ha(e,t){t===null?ve(Ba,Ba.current):ve(Ba,t.pool)}function Ua(){var e=Va();return e===null?null:{parent:Ea._currentValue,pool:e}}var Wa=Error(i(460)),Ga=Error(i(474)),Ka=Error(i(542)),qa={then:function(){}};function Ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(fn,fn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(fn,fn);else{if(e=$u,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e}throw Za=t,Wa}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Za=e,Wa):e}}var Za=null;function Qa(){if(Za===null)throw Error(i(459));var e=Za;return Za=null,e}function $a(e){if(e===Wa||e===Ka)throw Error(i(483))}var eo=null,to=0;function no(e){var t=to;return to+=1,eo===null&&(eo=[]),Ya(eo,e,t)}function ro(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function io(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ao(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Mi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),ro(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Xa(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=Ai(n.type,n.key,n.props,null,e.mode,r),ro(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ji(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Ai(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case A:return t=Pi(t,e.mode,n),t.return=e,t;case ne:return t=Xa(t),f(e,t,n)}if(fe(t)||le(t))return t=ji(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,no(t),n);if(t.$$typeof===P)return f(e,xa(e,t),n);io(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ne:return n=Xa(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,no(n),r);if(n.$$typeof===P)return p(e,t,xa(e,n),r);io(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Xa(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,no(r),i);if(r.$$typeof===P)return m(e,t,n,xa(t,r),i);io(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),$i&&Ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return $i&&Ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),$i&&Ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),$i&&Ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return $i&&Ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),$i&&Ki(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ro(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ro(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=ji(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=Ai(o.type,o.key,o.props,null,e.mode,c),ro(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Pi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Xa(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,no(o),c);if(o.$$typeof===P)return _(e,r,xa(e,o),c);io(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{to=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===Wa||t===Ka)throw t;var a=Ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var oo=ao(!0),so=ao(!1),co=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Qu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ci(e),Si(e,null,n),t}return yi(e,r,t,n),Ci(e)}function mo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}function ho(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var go=!1;function _o(){if(go){var e=Fa;if(e!==null)throw e}}function vo(e,t,n,r){go=!1;var i=e.updateQueue;co=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(td&f)===f:(r&f)===f){f!==0&&f===Pa&&(go=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:co=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function yo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function bo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yo(n[e],t)}var xo=ge(null),So=ge(0);function Co(e,t){e=sd,ve(So,e),ve(xo,t),sd=e|t.baseLanes}function wo(){ve(So,sd),ve(xo,xo.current)}function To(){sd=So.current,_e(xo),_e(So)}var Eo=ge(null),Do=null;function Oo(e){var t=e.alternate;ve(No,No.current&1),ve(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(ve(No,No.current),ve(Eo,e),Do===null&&(Do=e)):jo()}function jo(){ve(No,No.current),ve(Eo,Eo.current)}function Mo(e){_e(Eo),Do===e&&(Do=null),_e(No)}var No=ge(0);function Po(e,t){ve(Eo,Eo.current),ve(No,t)}function Fo(e){_e(No),_e(Eo),Do===e&&(Do=null)}function Io(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=0,K=null,Ro=null,zo=null,Bo=!1,Vo=!1,Ho=!1,Uo=0,Wo=0,Go=null,Ko=0;function qo(){throw Error(i(321))}function Jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Yo(e,t,n,r,i,a){return Lo=a,K=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?fc:pc,Ho=!1,a=n(r,i),Ho=!1,Vo&&(a=Zo(t,n,r,i)),Xo(e),a}function Xo(e){R.H=dc;var t=Ro!==null&&Ro.next!==null;if(Lo=0,zo=Ro=K=null,Bo=!1,Wo=0,Go=null,t)throw Error(i(300));e===null||Ac||(e=e.dependencies,e!==null&&va(e)&&(Ac=!0))}function Zo(e,t,n,r){K=e;var a=0;do{if(Vo&&(Go=null),Wo=0,Vo=!1,25<=a)throw Error(i(301));if(a+=1,zo=Ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}R.H=mc,o=t(n,r)}while(Vo);return o}function Qo(){var e=R.H,t=e.useState()[0];return t=typeof t.then==`function`?as(t):t,e=e.useState()[0],(Ro===null?null:Ro.memoizedState)!==e&&(K.flags|=1024),t}function $o(){var e=Uo!==0;return Uo=0,e}function es(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ts(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}Lo=0,zo=Ro=K=null,Vo=!1,Wo=Uo=0,Go=null}function ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zo===null?K.memoizedState=zo=e:zo=zo.next=e,zo}function rs(){if(Ro===null){var e=K.alternate;e=e===null?null:e.memoizedState}else e=Ro.next;var t=zo===null?K.memoizedState:zo.next;if(t!==null)zo=t,Ro=e;else{if(e===null)throw K.alternate===null?Error(i(467)):Error(i(310));Ro=e,e={memoizedState:Ro.memoizedState,baseState:Ro.baseState,baseQueue:Ro.baseQueue,queue:Ro.queue,next:null},zo===null?K.memoizedState=zo=e:zo=zo.next=e}return zo}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var t=Wo;return Wo+=1,Go===null&&(Go=[]),e=Ya(Go,e,t),t=K,(zo===null?t.memoizedState:zo.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?fc:pc),e}function os(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return as(e);if(e.$$typeof===se)return;if(e.$$typeof===P)return ba(e)}throw Error(i(438,String(e)))}function ss(e){var t=null,n=K.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=K.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=is(),K.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function cs(e,t){return typeof t==`function`?t(e):t}function ls(e){return us(rs(),Ro,e)}function us(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Lo&f)===f:(td&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Pa&&(d=!0);else if((Lo&p)===p){u=u.next,p===Pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,K.lanes|=p,ld|=p;f=u.action,Ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,K.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(Ac=!0,d&&(n=Fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ds(e){var t=rs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(Ac=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function fs(e,t,n){var r=K,a=rs(),o=$i;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Ro||a).memoizedState,n);if(s&&(a.memoizedState=n,Ac=!0),a=a.queue,Ls(hs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||zo!==null&&!!(zo.memoizedState.tag&1),Ms(e?9:8,{destroy:void 0},ms.bind(null,r,a,n,t),null),e){if(r.flags|=2048,$u===null)throw Error(i(349));o||Lo&127||ps(r,t,n)}return n}function ps(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=K.updateQueue,t===null?(t=is(),K.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ms(e,t,n,r){t.value=n,t.getSnapshot=r,gs(t)&&_s(e)}function hs(e,t,n){return n(function(){gs(t)&&_s(e)})}function gs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function _s(e){var t=xi(e,2);t!==null&&Ld(t,e,2)}function vs(e){var t=ns();if(typeof e==`function`){var n=e;if(e=n(),Ho){qe(!0);try{n()}finally{qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:e},t}function ys(e,t,n,r){return e.baseState=n,us(e,Ro,typeof r==`function`?r:cs)}function bs(e,t,n,r,a){if(cc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};R.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,xs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function xs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=R.T,o={};o.types=a===null?null:a.types,R.T=o;try{var s=n(i,r),c=R.S;c!==null&&c(o,s),Ss(e,t,s)}catch(n){ws(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),R.T=a}}else try{a=n(i,r),Ss(e,t,a)}catch(n){ws(e,t,n)}}function Ss(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Cs(e,t,n)},function(n){return ws(e,t,n)}):Cs(e,t,n)}function Cs(e,t,n){t.status=`fulfilled`,t.value=n,Ts(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xs(e,n)))}function ws(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Ts(t),t=t.next;while(t!==r)}e.action=null}function Ts(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Es(e,t){return t}function Ds(e,t){if($i){var n=$u.formState;if(n!==null){a:{var r=K;if($i){if(Qi){b:{for(var i=Qi,a=ta;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Qi=fm(i.nextSibling),r=i.data===`F!`;break a}}ra(r)}r=!1}r&&(t=n[0])}}return n=ns(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:t},n.queue=r,n=ac.bind(null,K,r),r.dispatch=n,r=vs(!1),a=sc.bind(null,K,!1,r.queue),r=ns(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=bs.bind(null,K,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Os(e){return ks(rs(),Ro,e)}function ks(e,t,n){if(t=us(e,t,Es)[0],e=ls(cs)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=as(t)}catch(e){throw e===Wa?Ka:e}else r=t;t=rs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(K.flags|=2048,Ms(9,{destroy:void 0},As.bind(null,i,n),null)),[r,a,e]}function As(e,t){e.action=t}function js(e){var t=rs(),n=Ro;if(n!==null)return ks(t,n,e);rs(),t=t.memoizedState,n=rs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=K.updateQueue,t===null&&(t=is(),K.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ns(){return rs().memoizedState}function Ps(e,t,n,r){var i=ns();K.flags|=e,i.memoizedState=Ms(1|t,{destroy:void 0},n,r===void 0?null:r)}function Fs(e,t,n,r){var i=rs();r=r===void 0?null:r;var a=i.memoizedState.inst;Ro!==null&&r!==null&&Jo(r,Ro.memoizedState.deps)?i.memoizedState=Ms(t,a,n,r):(K.flags|=e,i.memoizedState=Ms(1|t,a,n,r))}function Is(e,t){Ps(8390656,8,e,t)}function Ls(e,t){Fs(2048,8,e,t)}function Rs(e){K.flags|=4;var t=K.updateQueue;if(t===null)t=is(),K.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function zs(e){var t=rs().memoizedState;return Rs({ref:t,nextImpl:e}),function(){if(Qu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Bs(e,t){return Fs(4,2,e,t)}function Vs(e,t){return Fs(4,4,e,t)}function Hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Us(e,t,n){n=n==null?null:n.concat([e]),Fs(4,4,Hs.bind(null,t,e),n)}function Ws(){}function Gs(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ks(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Jo(t,r[1]))return r[0];if(r=e(),Ho){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r}function qs(e,t,n){return n===void 0||Lo&1073741824&&!(td&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),K.lanes|=e,ld|=e,n)}function Js(e,t,n,r){return Fr(n,t)?n:xo.current===null?!(Lo&106)||Lo&1073741824&&!(td&261930)?(Ac=!0,e.memoizedState=n):(e=Fd(),K.lanes|=e,ld|=e,t):(e=qs(e,n,r),Fr(e,t)||(Ac=!0),e)}function Ys(e,t,n,r,i){var a=z.p;z.p=a!==0&&8>a?a:8;var o=R.T,s={};s.types=o===null?null:o.types,R.T=s,sc(e,!1,t,n);try{var c=i(),l=R.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?oc(e,t,Ra(c,r),Pd(e)):oc(e,t,r,Pd(e))}catch(n){oc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{z.p=a,o!==null&&s.types!==null&&(o.types=s.types),R.T=o}}function Xs(){}function Zs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Qs(e).queue;Ys(e,a,t,pe,n===null?Xs:function(){return $s(e),n(r)})}function Qs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:cs,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $s(e){var t=Qs(e);t.next===null&&(t=e.alternate.memoizedState),oc(e,t.next.queue,{},Pd())}function ec(){return ba(uh)}function tc(){return rs().memoizedState}function nc(){return rs().memoizedState}function rc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=fo(n);var r=po(t,e,n);r!==null&&(Ld(r,t,n),mo(r,t,n)),t={cache:Da()},e.payload=t;return}t=t.return}}function ic(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},cc(e)?lc(t,n):(n=bi(e,t,n,r),n!==null&&(Ld(n,e,r),uc(n,t,r)))}function ac(e,t,n){oc(e,t,n,Pd())}function oc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(cc(e))lc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return yi(e,t,i,0),$u===null&&vi(),!1}catch{}if(n=bi(e,t,i,r),n!==null)return Ld(n,e,r),uc(n,t,r),!0}return!1}function sc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},cc(e)){if(t)throw Error(i(479))}else t=bi(e,n,r,2),t!==null&&Ld(t,e,2)}function cc(e){var t=e.alternate;return e===K||t!==null&&t===K}function lc(e,t){Vo=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function uc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dt(e,n)}}var dc={readContext:ba,use:os,useCallback:qo,useContext:qo,useEffect:qo,useImperativeHandle:qo,useLayoutEffect:qo,useInsertionEffect:qo,useMemo:qo,useReducer:qo,useRef:qo,useState:qo,useDebugValue:qo,useDeferredValue:qo,useTransition:qo,useSyncExternalStore:qo,useId:qo,useHostTransitionStatus:qo,useFormState:qo,useActionState:qo,useOptimistic:qo,useMemoCache:qo,useCacheRefresh:qo,useEffectEvent:qo},fc={readContext:ba,use:os,useCallback:function(e,t){return ns().memoizedState=[e,t===void 0?null:t],e},useContext:ba,useEffect:Is,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ps(4194308,4,Hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){Ps(4,2,e,t)},useMemo:function(e,t){var n=ns();t=t===void 0?null:t;var r=e();if(Ho){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ns();if(n!==void 0){var i=n(t);if(Ho){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ic.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=ns();return e={current:e},t.memoizedState=e},useState:function(e){e=vs(e);var t=e.queue,n=ac.bind(null,K,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ws,useDeferredValue:function(e,t){return qs(ns(),e,t)},useTransition:function(){var e=vs(!1);return e=Ys.bind(null,K,e.queue,!0,!1),ns().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=K,a=ns();if($i){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),$u===null)throw Error(i(349));td&127||ps(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Is(hs.bind(null,r,o,e),[e]),r.flags|=2048,Ms(9,{destroy:void 0},ms.bind(null,r,o,n,t),null),n},useId:function(){var e=ns(),t=$u.identifierPrefix;if($i){var n=Gi,r=Wi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:ec,useFormState:Ds,useActionState:Ds,useOptimistic:function(e){var t=ns();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=sc.bind(null,K,!0,n),n.dispatch=t,[e,t]},useMemoCache:ss,useCacheRefresh:function(){return ns().memoizedState=rc.bind(null,K)},useEffectEvent:function(e){var t=ns(),n={impl:e};return t.memoizedState=n,function(){if(Qu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},pc={readContext:ba,use:os,useCallback:Gs,useContext:ba,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Vs,useMemo:Ks,useReducer:ls,useRef:Ns,useState:function(){return ls(cs)},useDebugValue:Ws,useDeferredValue:function(e,t){return Js(rs(),Ro.memoizedState,e,t)},useTransition:function(){var e=ls(cs)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:fs,useId:tc,useHostTransitionStatus:ec,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){return ys(rs(),Ro,e,t)},useMemoCache:ss,useCacheRefresh:nc,useEffectEvent:zs},mc={readContext:ba,use:os,useCallback:Gs,useContext:ba,useEffect:Ls,useImperativeHandle:Us,useInsertionEffect:Bs,useLayoutEffect:Vs,useMemo:Ks,useReducer:ds,useRef:Ns,useState:function(){return ds(cs)},useDebugValue:Ws,useDeferredValue:function(e,t){var n=rs();return Ro===null?qs(n,e,t):Js(n,Ro.memoizedState,e,t)},useTransition:function(){var e=ds(cs)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:fs,useId:tc,useHostTransitionStatus:ec,useFormState:js,useActionState:js,useOptimistic:function(e,t){var n=rs();return Ro===null?(n.baseState=e,[e,n.queue.dispatch]):ys(n,Ro,e,t)},useMemoCache:ss,useCacheRefresh:nc,useEffectEvent:zs};function hc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var gc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Ld(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Ld(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(Ld(t,e,n),mo(t,e,n))}};function _c(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function vc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gc.enqueueReplaceState(t,t.state,null)}function yc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function bc(e){mi(e)}function xc(e){console.error(e)}function Sc(e){mi(e)}function Cc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function wc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){Cc(e,t)},n}function Ec(e){return e=fo(e),e.tag=3,e}function Dc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){wc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){wc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&_a(t,n,a,!0),n=Eo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Do===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),vf(e,r,a)),!1;case 22:return n.flags|=65536,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),vf(e,r,a)),!1}throw Error(i(435,n.tag))}return vf(e,r,a),Yd(),!1}if($i)return t=Eo.current,t===null?(r!==na&&(t=Error(i(423),{cause:r}),la(Ii(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ii(r,n),a=Tc(e.stateNode,r,a),ho(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==na&&(e=Error(i(422),{cause:r}),la(Ii(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ii(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Tc(n.stateNode,r,e),ho(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ec(a),Dc(a,e,n,r),ho(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var kc=Error(i(461)),Ac=!1;function jc(e,t,n,r){t.child=e===null?so(t,null,n,r):oo(t,e.child,n,r)}function Mc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ya(t),r=Yo(e,t,n,o,a,i),s=$o(),e!==null&&!Ac?(es(e,t,i),ol(e,t,i)):($i&&s&&Ji(t),t.flags|=1,jc(e,t,r,i),t.child)}function Nc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Pc(e,t,a,r,i)):(e=Ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!sl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return ol(e,t,i)}return t.flags|=1,e=Oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Pc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref){if(Ac=!1,t.pendingProps=r=a,sl(e,i))e.flags&131072&&(Ac=!0);else return t.lanes=e.lanes,ol(e,t,i)}}return Hc(e,t,n,r,i)}function Fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ha(t,a===null?null:a.cachePool),a===null?wo():Co(t,a),Ao(t);else return r=t.lanes=536870912,Lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ha(t,null),wo(),jo()):(Ha(t,a.cachePool),Co(t,a),jo(),t.memoizedState=null);return jc(e,t,i,n),t.child}function Ic(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Lc(e,t,n,r,i){var a=Va();return a=a===null?null:{parent:Ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ha(t,null),wo(),Ao(t),e!==null&&_a(e,t,r,!0),t.childLanes=i,null}function Rc(e,t){return t=Zc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function zc(e,t,n){return oo(t,e.child,null,n),e=Rc(t,t.pendingProps),e.flags|=2,Mo(t),t.memoizedState=null,e}function Bc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if($i){if(r.mode===`hidden`)return e=Rc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ic(null,e);if(ko(t),(e=Qi)?(e=cm(e,ta),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return Rc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ko(t),a){if(t.flags&256)t.flags&=-257,t=zc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(Ac||_a(e,t,n,!1),a=(n&e.childLanes)!==0,Ac||a){if(xo.current===null){if(r=$u,r!==null&&(s=ft(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,xi(e,s),Ld(r,e,s),kc;Yd()}t=zc(e,t,n)}else e=o.treeContext,Qi=fm(s.nextSibling),Zi=t,$i=!0,ea=null,ta=!1,e!==null&&Xi(t,e),t=Rc(t,r),t.flags|=134221824;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Hc(e,t,n,r,i){return ya(t),n=Yo(e,t,n,r,void 0,i),r=$o(),e!==null&&!Ac?(es(e,t,i),ol(e,t,i)):($i&&r&&Ji(t),t.flags|=1,jc(e,t,n,i),t.child)}function Uc(e,t,n,r,i,a){return ya(t),t.updateQueue=null,n=Zo(t,r,n,i),Xo(e),r=$o(),e!==null&&!Ac?(es(e,t,a),ol(e,t,a)):($i&&r&&Ji(t),t.flags|=1,jc(e,t,n,a),t.child)}function Wc(e,t,n,r,i){if(ya(t),t.stateNode===null){var a=wi,o=n.contextType;typeof o==`object`&&o&&(a=ba(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=gc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lo(t),o=n.contextType,a.context=typeof o==`object`&&o?ba(o):wi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(hc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&gc.enqueueReplaceState(a,a.state,null),vo(t,r,a,i),_o(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=yc(n,s);a.props=c;var l=a.context,u=n.contextType;o=wi,typeof u==`object`&&u&&(o=ba(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&vc(t,a,r,o),co=!1;var f=t.memoizedState;a.state=f,vo(t,r,a,i),_o(),l=t.memoizedState,s||f!==l||co?(typeof d==`function`&&(hc(t,n,d,r),l=t.memoizedState),(c=co||_c(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uo(e,t),o=t.memoizedProps,u=yc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=wi,typeof l==`object`&&l&&(c=ba(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&vc(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,vo(t,r,a,i),_o();var p=t.memoizedState;o!==d||f!==p||co||e!==null&&e.dependencies!==null&&va(e.dependencies)?(typeof s==`function`&&(hc(t,n,s,r),p=t.memoizedState),(u=co||_c(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&va(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Vc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=oo(t,e.child,null,i),t.child=oo(t,null,n,i)):jc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=ol(e,t,i),e}function Gc(e,t,n,r){return sa(),t.flags|=256,jc(e,t,n,r),t.child}var Kc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:Ua()}}function Jc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Yc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(No.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if($i){if(i?Oo(t):jo(),(e=Qi)?(e=cm(e,ta),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw ra(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(jo(),i=t.mode,a=Zc({mode:`hidden`,children:a},i),r=ji(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=qc(n),r.childLanes=Jc(e,o,n),t.memoizedState=Kc,Ic(null,r)):(Oo(t),Xc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return $c(e,t,a,o,r,c,s,n)}return i?(jo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Oi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ji(i,a,n,null),i.flags|=2):i=Oi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Ic(null,r),r=t.child,i=e.child.memoizedState,i===null?i=qc(n):(a=i.cachePool,a===null?a=Ua():(s=Ea._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Jc(e,o,n),t.memoizedState=Kc,Ic(e.child,r)):(Oo(t),n=e.child,e=n.sibling,n=Oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Xc(e,t){return t=Zc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Zc(e,t){return e=Ei(22,e,null,t),e.lanes=0,e}function Qc(e,t,n){return oo(t,e.child,null,n),e=Xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $c(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Oo(t),t.flags&=-257,Qc(e,t,c)):t.memoizedState===null?(jo(),o=a.fallback,s=t.mode,a=Zc({mode:`visible`,children:a.children},s),o=ji(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,oo(t,e.child,null,c),a=t.child,a.memoizedState=qc(c),a.childLanes=Jc(e,r,c),t.memoizedState=Kc,Ic(null,a)):(jo(),t.child=e.child,t.flags|=128,null);if(Oo(t),um(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,la({value:a,source:null,stack:null})),Qc(e,t,c)}if(Ac||_a(e,t,c,!1),r=(c&e.childLanes)!==0,Ac||r){if(xo.current!==null)return Qc(e,t,c);if(r=$u,r!==null&&(a=ft(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,xi(e,a),Ld(r,e,a),kc;return lm(o)||Yd(),Qc(e,t,c)}return lm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Qi=fm(o.nextSibling),Zi=t,$i=!0,ea=null,ta=!1,e!==null&&Xi(t,e),t=Xc(t,a.children),t.flags|=134221824,t)}function el(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ha(e.return,t,n)}function tl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Io(n)===null&&(t=e),e=e.sibling}return t}function nl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function rl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function il(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=No.current;if(t.flags&128)return Po(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Po(t,o),i===`backwards`&&e!==null?(rl(e),jc(e,t,r,n),rl(e)):jc(e,t,r,n),r=$i?Bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&el(e,n,t);else if(e.tag===19)el(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,rl(t)),nl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Io(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nl(t,!0,n,null,a,r);break;case`together`:nl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=tl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nl(t,!1,i,n,a,r)}return t.child}function al(e,t,n){var r=t.pendingProps;return pa(t,t.type,r.value),jc(e,t,r.children,n),t.child}function ol(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(_a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&va(e)))}function cl(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),pa(t,Ea,e.memoizedState.cache),sa();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ko(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Oo(t),t.flags|=128,null;r=_a(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Yc(e,t,n):(Oo(t),e=ol(e,t,n),e===null?null:e.sibling)}Oo(t);break;case 19:if(t.flags&128)return il(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(_a(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return il(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Po(t,No.current),r)break;return null;case 22:return t.lanes=0,Fc(e,t,n,t.pendingProps);case 24:pa(t,Ea,e.memoizedState.cache)}return ol(e,t,n)}function ll(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)Ac=!0;else{if(!sl(e,n)&&!(t.flags&128))return Ac=!1,cl(e,t,n);Ac=!!(e.flags&131072)}}else Ac=!1,$i&&t.flags&1048576&&qi(t,Bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e==`function`)Di(e)?(r=yc(e,r),t.tag=1,t=Wc(null,t,e,r,n)):(t.tag=0,t=Hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===F){t.tag=11,t=Mc(null,t,e,r,n);break a}if(a===te){t.tag=14,t=Nc(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=al(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return Hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=yc(r,t.pendingProps),Wc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,uo(e,t),vo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,pa(t,Ea,r),r!==o.cache&&ga(t,[Ea],n,!0),_o(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Gc(e,t,r,n);break a}if(r!==a){a=Ii(Error(i(424)),t),la(a),t=Gc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Qi=fm(e.firstChild),Zi=t,$i=!0,ea=null,ta=!0,n=so(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(sa(),r===a){t=ol(e,t,n);break a}jc(e,t,r,n)}t=t.child}return t;case 26:return Vc(e,t),e===null?(n=Im(t.type,null,t.pendingProps,null))?t.memoizedState=n:$i||(t.stateNode=hp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=Im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&$i&&(r=t.stateNode=vm(t.type,t.pendingProps,xe.current),Zi=t,ta=!0,a=Qi,Tp(t.type)?(pm=a,Qi=fm(r.firstChild)):Qi=a),jc(e,t,t.pendingProps.children,n),Vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$i&&((a=r=Qi)&&(r=om(r,t.type,t.pendingProps,ta),r===null?a=!1:(t.stateNode=r,Zi=t,Qi=fm(r.firstChild),ta=!1,a=!0)),a||ra(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,gp(a,o)?r=null:s!==null&&gp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Yo(e,t,Qo,null,null,n),uh._currentValue=a),Vc(e,t),jc(e,t,r,n),t.child;case 6:return e===null&&$i&&((e=n=Qi)&&(n=sm(n,t.pendingProps,ta),n===null?e=!1:(t.stateNode=n,Zi=t,Qi=null,e=!0)),e||ra(t)),null;case 13:return Yc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):jc(e,t,r,n),t.child;case 11:return Mc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Vc(e,t),jc(e,t,r,n),t.child;case 8:return jc(e,t,t.pendingProps.children,n),t.child;case 12:return jc(e,t,t.pendingProps.children,n),t.child;case 10:return al(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ya(t),a=ba(a),r=r(a),t.flags|=1,jc(e,t,r,n),t.child;case 14:return Nc(e,t,t.type,t.pendingProps,n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 19:return il(e,t,n);case 31:return Bc(e,t,n);case 22:return Fc(e,t,n,t.pendingProps);case 24:return ya(t),r=ba(Ea),e===null?(a=Va(),a===null&&(a=$u,o=Da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},lo(t),pa(t,Ea,a)):((e.lanes&n)!==0&&(uo(e,t),vo(t,null,null,n),_o()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,pa(t,Ea,r),r!==a.cache&&ga(t,[Ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),pa(t,Ea,r))),jc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:$i&&Ji(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Vc(e,t),jc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ul(e){e.flags|=4}function dl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw Za=qa,Ga}}else e.flags&=-16777217}function fl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(Kd())e.flags|=8192;else throw Za=qa,Ga}}function pl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ot(),e.lanes|=t,pd|=t)}function ml(e,t){if(!$i)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function hl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function gl(e,t,n){var r=t.pendingProps;switch(Yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hl(t),null;case 1:return hl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ma(Ea),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(oa(t)?ul(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ca())),hl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ul(t),o===null?(hl(t),dl(t,a,null,r,n)):(hl(t),fl(t,o))):o?o===e.memoizedState?(hl(t),t.flags&=-16777217):(ul(t),hl(t),fl(t,o)):(e=e.memoizedProps,e!==r&&ul(t),hl(t),dl(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}e=ye.current,oa(t)?ia(t,e):(e=vm(a,r,n),t.stateNode=e,ul(t))}return hl(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return hl(t),t.subtreeFlags&=-33554433,null}if(o=ye.current,oa(t))ia(t,o);else{var s=fp(xe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[gt]=t,o[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(op(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ul(t)}}return hl(t),t.subtreeFlags&=-33554433,dl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ul(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,oa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||ra(t,!0)}else e=fp(e).createTextNode(r),e[gt]=t,t.stateNode=e}return hl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[gt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),e=!1}else n=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Mo(t),t):(Mo(t),null);if(t.flags&128)throw Error(i(558))}return hl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[gt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;hl(t),a=!1}else a=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Mo(t),t):(Mo(t),null)}return Mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pl(t,t.updateQueue),hl(t),null);case 4:return we(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,hl(t),null;case 10:return ma(t.type),hl(t),null;case 19:if(Fo(t),r=t.memoizedState,r===null)return hl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ml(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Io(e),o!==null){for(t.flags|=128,ml(r,!1),e=o.updateQueue,t.updateQueue=e,pl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ki(n,e),n=n.sibling;return Po(t,No.current&1|2),$i&&Ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Le()>yd&&(t.flags|=128,a=!0,ml(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Io(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,pl(t,e),ml(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!$i)return hl(t),null}else 2*Le()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,ml(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Le(),e.sibling=null,o=No.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||$i?Po(t,o):(n=o,ve(Eo,t),ve(No,n),Do===null&&(Do=t)),$i&&Ki(t,r.treeForkCount),e}return hl(t),null;case 22:case 23:return Mo(t),To(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(hl(t),t.subtreeFlags&6&&(t.flags|=8192)):hl(t),n=t.updateQueue,n!==null&&pl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Ea),hl(t),null;case 25:return null;case 30:return t.flags|=33554432,hl(t),null}throw Error(i(156,t.tag))}function _l(e,t){switch(Yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Ea),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Mo(t),t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Fo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return ma(t.type),null;case 22:case 23:return Mo(t),To(),e!==null&&_e(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Ea),null;case 25:return null;default:return null}}function vl(e,t){switch(Yi(t),t.tag){case 3:ma(Ea),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Mo(t);break;case 13:Mo(t);break;case 19:Fo(t);break;case 10:ma(t.type);break;case 22:case 23:Mo(t),To(),e!==null&&_e(Ba);break;case 24:ma(Ea)}}function yl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){_f(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){_f(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){_f(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){_f(e,e.return,t)}}}function Sl(e,t,n){n.props=yc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){_f(e,t,n)}}function Cl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=di(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);m(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){_f(e,t,n)}}function wl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){_f(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){_f(e,t,n)}else n.current=null}}function Tl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function El(e){for(var t=e.return;t!==null&&(kl(t)&&rm(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Dl(e){for(var t=e.return;t!==null&&(kl(t)&&im(e.stateNode,t.stateNode),!Ol(t));)t=t.return}function Ol(e){return e.tag===5||e.tag===3||e.tag===27}function kl(e){return e&&e.tag===7&&e.stateNode!==null}function Al(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){_f(e,e.return,t)}}function jl(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[_t]=t}catch(t){_f(e,e.return,t)}}function Ml(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tp(e.type)||e.tag===4}function Nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ml(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Tp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fn)),Tl(e,r),Bt=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,Tp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),Tl(e,r),Bt=!0;else if(i!==4&&(i===27&&(Tl(e,r),r=null,Tp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[gt]=e,t[_t]=n}catch(t){_f(e,e.return,t)}}var Ll=!1,Rl=null;function zl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Ll=!0)}var Bl=null;function Vl(){var e=Bl;return Bl=null,e}var Hl=0;function Ul(e,t,n,r,i){return Hl=0,Wl(e.child,t,n,r,i)}function Wl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=jp(o);r.push(s),s.view&&(a=!0)}else a||jp(o).view&&(a=!0);Ll=!0,Op(o,Hl===0?t:t+`_`+Hl,n),Hl++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&i||Wl(e.child,t,n,r,i)&&(a=!0));e=e.sibling}return a}function Gl(e,t){for(;e!==null;)e.tag===5?kp(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Gl(e.child,t)),e=e.sibling}function Kl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Kl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=pi(t.default,t.share),t!==`none`&&(Ul(e,n,t,null,!1)||Gl(e.child,!1))}e=e.sibling}}function ql(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=di(r,n),a=pi(r.default,n.paired?r.share:r.enter);a===`none`?Kl(e):Ul(e,i,a,null,!1)?(Kl(e),n.paired||t||Id(e,r.onEnter)):Gl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)ql(e,t),e=e.sibling;else Kl(e)}function Jl(e){if(Rl!==null&&Rl.size!==0){var t=Rl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=pi(n.default,n.share);if(a!==`none`&&(Ul(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Gl(e.child,!1)),t.delete(r),t.size===0)break}}}Jl(e)}e=e.sibling}}}function Yl(e){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode),r=Rl===null?void 0:Rl.get(n),i=pi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Ul(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Rl.delete(n),Id(e,t.onShare)):Gl(e.child,!1)),Rl!==null&&Jl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Yl(e),e=e.sibling;else Rl!==null&&Jl(e)}function Xl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode);t=pi(t.default,t.update),e.flags&=-5,t!==`none`&&Ul(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Xl(e);e=e.sibling}}function Zl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Gl(e.child,!1))}Zl(e)}e=e.sibling}}function Ql(e){if(e.tag===30)e.stateNode.paired=null,Gl(e.child,!1),Zl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Ql(e),e=e.sibling;else Zl(e)}function $l(e){for(e=e.child;e!==null;)e.tag===30?Gl(e.child,!1):e.subtreeFlags&33554432&&$l(e),e=e.sibling}function eu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Hl<a.length){var l=a[Hl],u=jp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Op(c,Hl===0?n:n+`_`+Hl,i),s&&e.flags&4||(Bl===null&&(Bl=[]),Bl.push(c,Hl===0?r:r+`_`+Hl,t.memoizedProps)),Hl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:eu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function tu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=di(n,r),a=pi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Hl=0,i=eu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&tu(e,t);e=e.sibling}}var q=!1,nu=!1,ru=!1,iu=!1,au=typeof WeakSet==`function`?WeakSet:Set,ou=null,su=!1,cu=!1,lu=!1,uu=!1;function du(e,t,n){if(e=e.containerInfo,up=yh,e=Vr(e),Hr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(dp={focusedElem:e,selectionRange:r},yh=!1,n=(n&335544064)===n,ou=t,t=n?9270:1024;ou!==null;){if(e=ou,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Yl(r[a]);if(e.alternate===null&&e.flags&2)n&&zl(e),fu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Yl(r),fu(n);continue}if(r!==null&&r.memoizedState!==null){n&&zl(e),fu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ou=r):(n&&Xl(e),fu(n))}}Rl=null}function fu(e){for(;ou!==null;){var t=ou,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=yc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){_f(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=di(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=pi(a.default,a.update),a!==`none`&&Ul(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ou=r;break}ou=t.return}}function pu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Nu(e,n),r&4&&yl(5,n);break;case 1:if(Nu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){_f(n,n.return,e)}else{var i=yc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){_f(n,n.return,e)}}}r&64&&xl(n),r&512&&Cl(n,n.return);break;case 3:if(Nu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{bo(e,t)}catch(e){_f(n,n.return,e)}}break;case 27:t===null&&r&4&&Il(n);case 26:case 5:Nu(e,n),t===null&&r&4&&Al(n),r&512&&Cl(n,n.return);break;case 12:Nu(e,n);break;case 31:Nu(e,n),r&4&&Su(e,n);break;case 13:Nu(e,n),r&4&&Cu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=xf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||q,!r){var a=t!==null&&t.memoizedState!==null||nu;t=q,i=nu,q=r,(nu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Fu(e,n,r)):Nu(e,n),q=t,nu=i}break;case 30:Nu(e,n),r&512&&Cl(n,n.return);break;case 7:r&512&&Cl(n,n.return);default:Nu(e,n)}}function mu(e,t){for(e=e.child;e!==null;)hu(e,t),e=e.sibling}function hu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){_f(e,e.return,t)}gu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Bt=!0}catch(t){_f(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Dp(s,!0):Dp(e.stateNode,!1)}catch(t){_f(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&mu(e,t);break;default:mu(e,t)}}function gu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:hu(n,r);break a;case 22:n.memoizedState===null&&gu(n,r);break a;default:gu(n,r)}}e=e.sibling}}function _u(e){var t=e.alternate;t!==null&&(e.alternate=null,_u(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Tt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vu=null,yu=!1;function bu(e,t,n){for(n=n.child;n!==null;)xu(e,t,n),n=n.sibling}function xu(e,t,n){if(H&&typeof H.onCommitFiberUnmount==`function`)try{H.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:nu||wl(n,t),bu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!nu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nu||wl(n,t),Dl(n);var r=vu,i=yu;Tp(n.type)&&(vu=n.stateNode,yu=!1),bu(e,t,n),ym(n.stateNode,n.type,n.memoizedProps),vu=r,yu=i;break;case 5:nu||wl(n,t),Dl(n);case 6:if(n.tag===6&&Dl(n),r=vu,i=yu,vu=null,bu(e,t,n),vu=r,yu=i,vu!==null){if(yu)try{(vu.nodeType===9?vu.body:vu.nodeName===`HTML`?vu.ownerDocument.body:vu).removeChild(n.stateNode),Bt=!0}catch(e){_f(n,t,e)}else try{vu.removeChild(n.stateNode),Bt=!0}catch(e){_f(n,t,e)}}break;case 18:vu!==null&&(yu?(e=vu,Ep(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Ep(vu,n.stateNode));break;case 4:r=vu,i=yu,vu=n.stateNode.containerInfo,yu=!0,bu(e,t,n),vu=r,yu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),nu||bl(4,n,t),bu(e,t,n);break;case 1:nu||(wl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Sl(n,t,r)),bu(e,t,n);break;case 21:bu(e,t,n);break;case 22:nu=(r=nu)||n.memoizedState!==null,bu(e,t,n),nu=r;break;case 30:wl(n,t),bu(e,t,n);break;case 7:nu||wl(n,t),bu(e,t,n);break;default:bu(e,t,n)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gh(e)}catch(e){_f(t,t.return,e)}}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){_f(t,t.return,e)}}function wu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new au),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new au),t;default:throw Error(i(435,e.tag))}}function Tu(e,t){var n=wu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Sf.bind(null,e,t);t.then(r,r)}})}function Eu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Tp(l.type)){vu=l.stateNode,yu=!1;break a}break;case 5:vu=l.stateNode,yu=!1;break a;case 3:case 4:vu=l.stateNode.containerInfo,yu=!0;break a}l=l.return}if(vu===null)throw Error(i(160));xu(s,c,o),vu=null,yu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ou(t,e,n),t=t.sibling}var Du=null;function Ou(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Eu(t,e,n),ku(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Eu(t,e,n),ku(e),a&512&&(nu||r===null||wl(r,r.return)),a&64&&q&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Du,Eu(t,e,n),ku(e),a&512&&(nu||r===null||wl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(q)e.stateNode=hp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Ct]||r[gt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[gt]=e,At(r),t=r;break a;case`link`:if(o=Jm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Jm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[gt]=e,At(r),t=r}e.stateNode=t}}else q||Ym(o,e.type,e.stateNode)}else e.stateNode=Um(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&jl(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||nu||t.parentNode.removeChild(t)):a.count--,n===null?q||Ym(o,e.type,e.stateNode):Um(o,n,e.memoizedProps))}break;case 27:Eu(t,e,n),ku(e),a&512&&(nu||r===null||wl(r,r.return)),r!==null&&a&4&&jl(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ru,ru=!1,Eu(t,e,n),ru=o,ku(e),a&512&&(nu||r===null||wl(r,r.return)),e.flags&32){t=e.stateNode;try{rn(t,``),Bt=!0}catch(t){_f(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,jl(e,t,r===null?t:r.memoizedProps)),a&1024&&(iu=!0);break;case 6:if(Eu(t,e,n),ku(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Bt=!0}catch(t){_f(e,e.return,t)}}break;case 3:if(Bt=!1,qm=null,o=Du,Du=Cm(t.containerInfo),Eu(t,e,n),Du=o,ku(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){_f(e,e.return,t)}iu&&(iu=!1,Au(e)),Bt=!1;break;case 4:a=ru,ru=q,r=G(),o=Du,Du=Cm(e.stateNode.containerInfo),Eu(t,e,n),ku(e),Du=o,Bt&&cu&&(lu=!0),Bt=r,ru=a;break;case 12:Eu(t,e,n),ku(e);break;case 31:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 13:Eu(t,e,n),ku(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Le()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=q,l=nu,u=ru;q=c||o,ru=u||o,nu=l||s,Eu(t,e,n),nu=l,ru=u,q=c,ku(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||q||nu||(t=s||nu,n=q,r=nu,q=o||q,nu=t,Pu(e,2),q=n,nu=r),!o&&ru||mu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Tu(e,n))));break;case 19:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 30:a&512&&(nu||r===null||wl(r,r.return)),a=G(),o=cu,s=(n&335544064)===n,c=e.memoizedProps,cu=s&&pi(c.default,c.update)!==`none`,Eu(t,e,n),ku(e),s&&r!==null&&Bt&&(e.flags|=4),cu=o,Bt=a;break;case 21:break;case 7:a&512&&(nu||r===null||wl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Eu(t,e,n),ku(e)}}function ku(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Ml(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(kl(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Ol(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Fl(e,Nl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(rn(l,``),n.flags&=-33),Fl(e,Nl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Pl(e,Nl(e),u,s);break;default:throw Error(i(161))}}catch(t){_f(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Au(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Au(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function ju(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Mu(t,e),t=t.sibling;else tu(t,!1)}function Mu(e,t){var n=e.alternate;if(n===null)ql(e,!1);else switch(e.tag){case 3:if(uu=su=!1,Vl(),ju(t,e),!su&&!lu){if(e=Bl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];kp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),uu=!0}Bl=null;break;case 5:ju(t,e);break;case 4:r=su,su=!1,ju(t,e),su&&(lu=!0),su=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ju(t,e):ql(e,!1));break;case 30:r=su,i=Vl(),su=!1,ju(t,e),su&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=di(a,o),o=di(n.memoizedProps,o);var s=pi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Hl=0,t=eu(e,n,t,o,s,a,!0),Hl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),Bl=i):i!==null&&(i.push.apply(i,Bl),Bl=i),su=e.flags&32?!0:r;break;default:ju(t,e)}}function Nu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pu(e,t.alternate,t),t=t.sibling}function Pu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Pu(n,r);break;case 1:wl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Sl(n,n.return,i),Pu(n,r);break;case 27:r&2&&ym(n.stateNode,n.type,n.memoizedProps);case 5:wl(n,n.return),n.tag!==5&&n.tag!==27||Dl(n),Pu(n,r);break;case 6:Dl(n);break;case 26:wl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||nu||i.parentNode.removeChild(i),Pu(n,r);break;case 22:n.memoizedState===null&&Pu(n,r);break;case 30:wl(n,n.return),Pu(n,r);break;case 7:wl(n,n.return);default:Pu(n,r)}e=e.sibling}}function Fu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Fu(i,a,n),yl(4,a);break;case 1:if(Fu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){_f(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)yo(l[i],c)}catch(e){_f(r,r.return,e)}}s&&o&64&&xl(a),Cl(a,a.return);break;case 27:n&2&&Il(a);case 5:a.tag!==5&&a.tag!==27||El(a),Fu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 6:El(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||q||Ym(Cm(c.ownerDocument),a.type,c),Fu(i,a,n),s&&r===null&&o&4&&Al(a),Cl(a,a.return);break;case 12:Fu(i,a,n);break;case 31:Fu(i,a,n),s&&o&4&&Su(i,a);break;case 13:Fu(i,a,n),s&&o&4&&Cu(i,a);break;case 22:a.memoizedState===null&&Fu(i,a,n),Cl(a,a.return);break;case 30:Fu(i,a,n),Cl(a,a.return);break;case 7:Cl(a,a.return);default:Fu(i,a,n)}t=t.sibling}}function Iu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Oa(n))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Oa(e))}function Ru(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zu(e,t,n,r),t=t.sibling;else i&&$l(t)}function zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Ql(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ru(e,t,n,r),a&2048&&yl(9,t);break;case 1:Ru(e,t,n,r);break;case 3:Ru(e,t,n,r),i&&uu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Oa(a)));break;case 12:if(a&2048){Ru(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){_f(t,t.return,e)}}else Ru(e,t,n,r);break;case 31:Ru(e,t,n,r);break;case 13:Ru(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Ql(t),o._visibility&2?Ru(e,t,n,r):(o._visibility|=2,Bu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Ql(s),o._visibility&2?Ru(e,t,n,r):Vu(e,t)),a&2048&&Iu(s,t);break;case 24:Ru(e,t,n,r),a&2048&&Lu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Gl(a.child,!0),Gl(t.child,!0))),Ru(e,t,n,r);break;default:Ru(e,t,n,r)}}function Bu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Bu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Bu(a,o,s,c,i)):u._visibility&2?Bu(a,o,s,c,i):Vu(a,o),i&&l&2048&&Iu(o.alternate,o);break;case 24:Bu(a,o,s,c,i),i&&l&2048&&Lu(o.alternate,o);break;default:Bu(a,o,s,c,i)}t=t.sibling}}function Vu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Vu(n,r),i&2048&&Iu(r.alternate,r);break;case 24:Vu(n,r),i&2048&&Lu(r.alternate,r);break;default:Vu(n,r)}t=t.sibling}}var Hu=8192;function Uu(e,t,n){if(e.subtreeFlags&Hu)for(e=e.child;e!==null;)Wu(e,t,n),e=e.sibling}function Wu(e,t,n){switch(e.tag){case 26:Uu(e,t,n),e.flags&Hu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,Du,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&Hu&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=Du;Du=Cm(e.stateNode.containerInfo),Uu(e,t,n),Du=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Hu,Hu=16777216,Uu(e,t,n),Hu=r):Uu(e,t,n));break;case 30:if((e.flags&Hu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Rl===null&&(Rl=new Map),Rl.set(r,i)}Uu(e,t,n);break;default:Uu(e,t,n)}}function Gu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qu(e),e=e.sibling}function qu(e){switch(e.tag){case 0:case 11:case 15:Ku(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Ku(e);break;case 12:Ku(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ju(e)):Ku(e);break;default:Ku(e)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),Ju(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ju(t));break;default:Ju(t)}e=e.sibling}}function Yu(e,t){for(;ou!==null;){var n=ou;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ou=r;else a:for(n=e;ou!==null;){r=ou;var i=r.sibling,a=r.return;if(_u(r),r===n){ou=null;break a}if(i!==null){i.return=a,ou=i;break a}ou=a}}}var Xu={getCacheForType:function(e){var t=ba(Ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ba(Ea).controller.signal}},Zu=typeof WeakMap==`function`?WeakMap:Map,Qu=0,$u=null,ed=null,td=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return Qu&2&&td!==0?td&-td:R.T===null?mt():Rf()}function Fd(){if(fd===0){if(!(td&536870912)||$i){var e=$e;$e<<=1,!($e&3932160)&&($e=262144),fd=e}else fd=536870912}return e=Eo.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(di(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===$u&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,td,fd,!1)),ct(e,n),(!(Qu&2)||e!==$u)&&(e===$u&&(!(Qu&2)&&(ud|=n),cd===4&&Vd(e,td,fd,!1)),Af(e))}function Rd(e,t,n){if(Qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Le(),10<a)){if(Vd(r,t,fd,!id),nt(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=yp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);Af(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fn},Rl=null,Wu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Le():(a&4194048)===a?vd-Le():0,m=rh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=it(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Je(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ut(e,n,t)}function Hd(){return Qu&6?!0:(jf(0,!1),!1)}function Ud(){if(ed!==null){if(nd===0)var e=ed.return;else e=ed,fa=da=null,ts(e),eo=null,to=0,e=ed;for(;e!==null;)vl(e.alternate,e),e=e.return;ed=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,bp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),$u=e,ed=n=Oi(e.current,null),td=t,nd=0,rd=null,id=!1,ad=rt(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=it(e,t),vi(),n}function Gd(e,t){K=null,R.H=dc,t===Wa||t===Ka?(t=Qa(),nd=3):t===Ga?(t=Qa(),nd=4):nd=t===kc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,ed===null&&(cd=1,Cc(e,Ii(t,e.current)))}function Kd(){var e=Eo.current;return e===null?!0:(td&4194048)===td?Do===null:(td&62914560)===td||td&536870912?e===Do:!1}function qd(){var e=R.H;return R.H=dc,e===null?dc:e}function Jd(){var e=R.A;return R.A=Xu,e}function Yd(){cd=4,id||(td&4194048)!==td&&Eo.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||$u===null||Vd($u,td,fd,!1)}function Xd(e,t,n){var r=Qu;Qu|=2;var i=qd(),a=Jd();($u!==e||td!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&ed!==null){var s=ed,c=rd;switch(nd){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,fa=da=null,Qu=r,R.H=i,R.A=a,ed===null&&($u=null,td=0,vi()),o}function Zd(){for(;ed!==null;)ef(ed)}function Qd(e,t){var n=Qu;Qu|=2;var r=qd(),a=Jd();$u!==e||td!==t?(bd=null,yd=Le()+500,Wd(e,t)):ad=rt(e,t);a:do try{if(nd!==0&&ed!==null){t=ed;var o=rd;b:switch(nd){case 1:nd=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if(Ja(o)){nd=0,rd=null,tf(t);break}t=function(){nd!==2&&nd!==9||$u!==e||(nd=7),Af(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:Ja(o)?(nd=0,rd=null,tf(t)):(nd=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(ed.tag){case 26:s=ed.memoizedState;case 5:case 27:var c=ed;if(s?Qm(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)ed=l;else{var u=c.return;u===null?ed=null:(ed=u,rf(u))}break b}}nd=0,rd=null,nf(e,t,o,5);break;case 6:nd=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return fa=da=null,R.H=r,R.A=a,Qu=n,ed===null?($u=null,td=0,vi(),cd):0}function $d(){for(;ed!==null&&!Fe();)ef(ed)}function ef(e){var t=ll(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):ed=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Uc(n,t,t.pendingProps,t.type,void 0,td);break;case 11:t=Uc(n,t,t.pendingProps,t.type.render,t.ref,td);break;case 5:ts(t);var r=t;r===Zi&&($i?(aa(r),r.tag===5&&r.stateNode!=null&&(Qi=r.stateNode)):(aa(r),$i=!0));default:vl(n,t),t=ed=ki(t,sd),t=ll(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):ed=t}function nf(e,t,n,r){fa=da=null,ts(t),eo=null,to=0;var i=t.return;try{if(Oc(e,i,t,n,td)){cd=1,Cc(e,Ii(n,e.current)),ed=null;return}}catch(t){if(i!==null)throw ed=i,t;cd=1,Cc(e,Ii(n,e.current)),ed=null;return}t.flags&32768?($i||r===1?e=!0:ad||td&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=gl(t.alternate,t,sd);if(n!==null){ed=n;return}if(t=t.sibling,t!==null){ed=t;return}ed=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=_l(e.alternate,e);if(n!==null){n.flags&=32767,ed=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ed=e;return}ed=e=n}while(e!==null);cd=6,ed=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do mf();while(Sd!==0);if(Qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===$u&&(ed=$u=null,td=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=_i,lt(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=ja(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Cf(Ve,function(){return hf(),null})):(e.callbackNode=null,e.callbackPriority=0),Ll=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=R.T,R.T=null,i=z.p,z.p=2,a=Qu,Qu|=4;try{du(e,t,n)}finally{Qu=a,z.p=i,R.T=r}}Sd=1,Ll?kd=Fp(o,e.containerInfo,jd,uf,df,lf,ff,hf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Mu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=R.T,R.T=null;var i=z.p;z.p=2;var a=Qu;Qu|=4;try{cu=lu=!1,Ou(t,e,n),n=dp;var o=Vr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Br(s.ownerDocument.documentElement,s)){if(c!==null&&Hr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=zr(s,h),v=zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yh=!!up,dp=up=null}finally{Qu=a,z.p=i,R.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=R.T,R.T=null;var r=z.p;z.p=2;var i=Qu;Qu|=4;try{pu(e,t.alternate,t)}finally{Qu=i,z.p=r,R.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,Ie();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,pf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),U(r),n=n.stateNode,H&&typeof H.onCommitFiberRoot==`function`)try{H.onCommitFiberRoot(Ke,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=R.T,a=z.p,z.p=2,R.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{R.T=n,z.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&mf(),Af(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),jf(0,!1)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Oa(t)))}function mf(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),hf()}function hf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=U(Td),r=R.T,a=z.p;try{z.p=32>n?32:n,R.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,Qu&6)throw Error(i(331));var c=Qu;if(Qu|=4,qu(o.current),zu(o,o.current,s,n),Qu=c,jf(0,!1),H&&typeof H.onPostCommitFiberRoot==`function`)try{H.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{z.p=a,R.T=r,pf(e,t)}}function gf(e,t,n){t=Ii(n,t),t=Tc(e.stateNode,t,2),e=po(e,t,2),e!==null&&(ct(e,2),Af(e))}function _f(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Ii(n,e),n=Ec(2),r=po(t,n,2),r!==null&&(Dc(n,r,t,e),ct(r,2),Af(r));break}}t=t.return}}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=yf.bind(null,e,t,n),t.then(e,e))}function yf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(td&n)===n&&(cd===4||cd===3&&(td&62914560)===td&&300>Le()-_d?Qu&2?dd|=n:Wd(e,0):dd|=n,pd===td&&(pd=0)),Af(e)}function bf(e,t){t===0&&(t=ot()),e=xi(e,t),e!==null&&(ct(e,t),Af(e))}function xf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bf(e,n)}function Sf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),bf(e,n)}function Cf(e,t){return Ne(e,t)}var wf=null,Tf=null,Ef=!1,Df=!1,Of=!1,kf=0;function Af(e){e!==Tf&&e.next===null&&(Tf===null?wf=Tf=e:Tf=Tf.next=e),Df=!0,Ef||(Ef=!0,Lf())}function jf(e,t){if(!Of&&Df){Of=!0;do for(var n=!1,r=wf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,If(r,a))}else a=td,a=nt(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,If(r,a))}r=r.next}while(n);Of=!1}}function Mf(){Nf()}function Nf(){Df=Ef=!1;var e=0;kf!==0&&vp()&&(e=kf);for(var t=Le(),n=null,r=wf;r!==null;){var i=r.next,a=Pf(r,t);a===0?(r.next=null,n===null?wf=i:n.next=i,i===null&&(Tf=n)):(n=r,(e!==0||a&3)&&(Df=!0)),r=i}Sd!==0&&Sd!==5||jf(e,!1),kf!==0&&(kf=0)}function Pf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Je(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=at(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=$u,n=td,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Pe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Pe(r),U(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=Ff.bind(null,e),n=Ne(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Pe(r),e.callbackPriority=2,e.callbackNode=null,2}function Ff(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=td;return r=nt(e,e===$u?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Pf(e,Le()),e.callbackNode!=null&&e.callbackNode===n?Ff.bind(null,e):null)}function If(e,t){if(mf())return null;Rd(e,t,!0)}function Lf(){Cp(function(){Qu&6?Ne(ze,Mf):Nf()})}function Rf(){if(kf===0){var e=Pa;e===0&&(e=Qe,Qe<<=1,!(Qe&261888)&&(Qe=256)),kf=e}return kf}function zf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:dn(e)}function Bf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=zf((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?zf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Nn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(kf!==0){var e=new FormData(i,o);Zs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Zs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Vf=0;Vf<ci.length;Vf++){var Hf=ci[Vf];li(Hf.toLowerCase(),`on`+(Hf[0].toUpperCase()+Hf.slice(1)))}li(ei,`onAnimationEnd`),li(ti,`onAnimationIteration`),li(ni,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(ri,`onTransitionRun`),li(ii,`onTransitionStart`),li(ai,`onTransitionCancel`),li(oi,`onTransitionEnd`),Ft(`onMouseEnter`,[`mouseout`,`mouseover`]),Ft(`onMouseLeave`,[`mouseout`,`mouseover`]),Ft(`onPointerEnter`,[`pointerout`,`pointerover`]),Ft(`onPointerLeave`,[`pointerout`,`pointerover`]),Pt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Pt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Pt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Pt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Pt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Uf=`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(` `),J=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Uf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[yt];n===void 0&&(n=t[yt]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Mt.forEach(function(t){t!==`selectionchange`&&(J.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!Sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Et(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}yn(function(){var r=a,i=mn(n),s=[];a:{var c=si.get(e);if(c!==void 0){var l=Nn,u=e;switch(e){case`keypress`:if(On(n)===0)break a;case`keydown`:case`keyup`:l=Zn;break;case`focusin`:u=`focus`,l=Hn;break;case`focusout`:u=`blur`,l=Hn;break;case`beforeblur`:case`afterblur`:l=Hn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case ei:case ti:case ni:l=Un;break;case oi:l=tr;break;case`scroll`:case`scrollend`:l=Fn;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Qn;break;case`submit`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=bn(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==pn&&(u=n.relatedTarget||n.fromElement)&&(Et(u)||u[vt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Et(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Ot(c),h=l==null?u:Ot(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Et(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?Ot(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Cr;else if(_r(c)){if(wr)_=Nr;else{_=jr;var v=Ar}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&cn(r.elementType)&&(_=Cr):_=Mr;if(_&&=_(e,r)){vr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Ot(r):window,e){case`focusin`:(_r(v)||v.contentEditable===`true`)&&(Wr=v,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(s,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(s,n,i)}var y;if(ar)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else pr?dr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(cr&&n.locale!==`ko`&&(pr||b!==`onCompositionStart`?b===`onCompositionEnd`&&pr&&(y=Dn()):(wn=i,Tn=`value`in wn?wn.value:wn.textContent,pr=!0)),v=Zf(r,b),0<v.length&&(b=new Gn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=fr(n),y!==null&&(b.data=y)))),(y=sr?mr(e,n):hr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Gn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Bf(s,e,r,n,i)}Wf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=bn(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=bn(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=bn(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=bn(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
9
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&rn(e,``+r);else return;break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:sn(e,r,o);return;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=fn);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=dn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`: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`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=ln.get(n)||n,Vt(e,n,r);else return}Bt=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:sn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)rn(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=fn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Nt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[_t]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Bt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}return}Bt=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}Qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&en(e,!!r,n,!0):en(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}nn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Uf.length;r++)Y(Uf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(cn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Bt=!0),o=m;break;case`name`:m!==f&&(Bt=!0),a=m;break;case`checked`:m!==f&&(Bt=!0),u=m;break;case`defaultChecked`:m!==f&&(Bt=!0),d=m;break;case`value`:m!==f&&(Bt=!0),s=m;break;case`defaultValue`:m!==f&&(Bt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}Zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Bt=!0),p=o;break;case`defaultValue`:o!==l&&(Bt=!0),c=o;break;case`multiple`:o!==l&&(Bt=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?en(e,!!n,n?[]:``,!1):en(e,!!n,t,!0)):en(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Bt=!0),p=a;break;case`defaultValue`:a!==o&&(Bt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}tn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Bt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(cn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function X(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function lp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&X(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&X(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var up=null,dp=null;function fp(e){return e.nodeType===9?e:e.ownerDocument}function pp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function mp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function hp(e,t,n,r){return n=fp(n).createElement(e),n[gt]=r,n[_t]=t,op(n,e,t),At(n),n}function gp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _p=null;function vp(){var e=window.event;return e&&e.type===`popstate`?e!==_p&&(_p=e,!0):(_p=null,!1)}var yp=typeof setTimeout==`function`?setTimeout:void 0,bp=typeof clearTimeout==`function`?clearTimeout:void 0,xp=typeof Promise==`function`?Promise:void 0,Sp=typeof requestAnimationFrame==`function`?requestAnimationFrame:yp,Cp=typeof queueMicrotask==`function`?queueMicrotask:xp===void 0?yp:function(e){return xp.resolve(null).then(e).catch(wp)};function wp(e){setTimeout(function(){throw e})}function Tp(e){return e===`head`}function Ep(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Ct]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function Dp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Op(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function kp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Ap(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function jp(e){return Ap(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Ap(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=$m(f),u>nh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),m(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),m(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=g(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){m(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=b(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];m(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=g(this._fragmentFiber);e!==null&&(e=b(e),e=fp(e).activeElement,e!==null&&m(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),m(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),m(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return m(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=g(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=g(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];m(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=Et(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=g(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(m(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(m(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];m(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||g(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),em(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),em(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=b(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:am(n),Tt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Ct])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Sp(function(){Sp(function(t){return e(t)})})}function vm(e,t,n){switch(t=fp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ym(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===fn&&(e.onclick=null),Tt(e)}function bm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Tt(e)}var xm=new Map,Sm=new Set;function Cm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wm=z.d;z.d={f:Tm,r:Em,D:km,C:Am,L:jm,m:Mm,X:Pm,S:Nm,M:Fm};function Tm(){var e=wm.f(),t=Hd();return e||t}function Em(e){var t=Dt(e);t!==null&&t.tag===5&&t.type===`form`?$s(t):wm.r(e)}var Dm=typeof document>`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=Xt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),At(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+Xt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Xt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Xt(n.imageSizes)+`"]`)):i+=`[href="`+Xt(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[wt]=!0,o.onload=o.onerror=function(){jt(o)}),At(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Xt(r)+`"][href="`+Xt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=D({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),op(r,`link`,e),At(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=kt(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);At(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=kt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),At(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=kt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),At(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var a=(a=xe.current)?Cm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=kt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var o=kt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=xm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,o)),Bm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=kt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lm(e){return`href="`+Xt(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[wt]){r.loading=1;return}}else t=e.createElement(`link`),t[wt]=!0,t.onload=t.onerror=jt.bind(null,t),op(t,`link`,n),At(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+Xt(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Xt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),op(r,`style`,a),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lm(n.href);var o=e.querySelector(Rm(a));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=zm(n),(a=xm.get(a))&&Gm(r,a),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Wm(o,n.precedence,e),t.instance=o;case`script`:return o=Vm(n.src),(a=e.querySelector(Hm(o)))?(t.instance=a,At(a),a):(r=n,(a=xm.get(o))&&(r=D({},n),Km(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),At(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(e,t,n){if(qm===null){var r=new Map,i=qm=new Map;i.set(n,r)}else i=qm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ct]||a[gt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*lp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ah.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var uh={$$typeof:P,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function dh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=st(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=st(0),this.hiddenUpdates=st(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ei(3,null,null,t),e.current=a,a.stateNode=e,t=Da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lo(a),e}function ph(e){return e?(e=wi,e):wi}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=po(e,r,t),n!==null&&(Ld(n,e,t),mo(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Ld(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Pd();t=pt(t);var n=xi(e,t);n!==null&&Ld(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=2,Sh(e,t,n,r)}finally{z.p=a,R.T=i}}function xh(e,t,n,r){var i=R.T;R.T=null;var a=z.p;try{z.p=8,Sh(e,t,n,r)}finally{z.p=a,R.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Yf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=Dt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=tt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Je(o);s.entanglements[1]|=c,o&=~c}Af(a),!(Qu&6)&&(yd=Le()+500,jf(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Ld(s,a,2),Hd(),gh(a,2)}if(a=Ch(r),a===null&&Yf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function Ch(e){return e=mn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=Et(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function Eh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`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`fullscreenerror`: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`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`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 Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Dt(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=Et(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ht(e.priority,function(){vh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ht(e.priority,function(){vh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pn=r,n.target.dispatchEvent(r),pn=null}else return t=Dt(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Th(r||n)===null)continue;break}var a=Dt(n);a!==null&&(e.splice(t,3),t-=3,Zs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[_t]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qh(e){this._internalRoot=e}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mh(n,Pd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Hd(),t[vt]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=mt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=n.version;if(Yh!==`19.3.0`)throw Error(i(527,Yh,`19.3.0`));z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Xh={bundleType:0,version:`19.3.0`,rendererPackageName:`react-dom`,currentDispatcherRef:R,reconcilerVersion:`19.3.0`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{Ke=Zh.inject(Xh),H=Zh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=bc,s=xc,c=Sc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fh(e,1,!1,null,null,n,r,null,o,s,c,Kh),e[vt]=t.current,qf(e),new qh(t)}})),_=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=48,x=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-b-t;return n},S=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},C=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-b;n+=i>>>1^-(i&1),t[r]=n}return t},w=384,T=[],E=S(x(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),D=S(x(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),O=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,k=(()=>{let e=E.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=E[n];i<E[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(E[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=E[i];a<E[i+1];a++)n[r++]=e,e+=t[e]}return n})(),A=x(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),j=S(x(`123333359346463635126536711576`)),ee=x(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),M=x(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),N=C(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),P=(()=>{let e=new Int32Array(319).fill(-1),t=C(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=C(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),F=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),I=C(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),L=C(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),te=C(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±`),ne=new Int32Array(995),re=new Int32Array(995),ie=new Int32Array(995),ae=``,oe=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<I.length;r++)for(let i of F[te[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),oe[a*2]=ae.length,oe[a*2+1]=i.length,ae+=i),ne[n]=I[r],re[n]=L[r],ie[n]=a,n++}}var se=C(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),ce=S(x(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),le=C(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),ue=x(`ij`),de=x(``),fe=x(`1`),R={GROUP_COUNT:w,customValidatorNames:T,edgeStart:E,labelStart:D,labelText:O,edgeTarget:k,nodeGroup:A,nodeVlist:P,vlistPat:j,vlistOps:ee,vlistRef:M,vlistGroup:N,litAnchor:ne,litGroup:re,litPool:ie,poolOffsets:oe,poolText:ae,adjGid:se,adjStart:ce,adjTgt:le,patGid:ue,patTgt:de,postfixLookupGroups:fe,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},z=`line`in Error(),pe=-1,me=-1,he=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},ge=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},_e=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let ee=i.length-1,M=new Uint8Array(ee),N=0,P=!0;for(let e=0;e<m.length;e++){M[m[e]]=1;let t=_[g[e]*2+1];t>N&&(N=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(P=!1)}let F=1;for(;F<m.length*2;)F<<=1;let I=new Int32Array(F).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(he(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&F-1;for(;I[n]!==-1;)n=n+1&F-1;I[n]=e}let L=(e,t,n,r)=>{let i=(he(t,n,r)^Math.imul(e,2654435761)|0)&F-1,a=r-n;for(;;){let r=I[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&F-1}},te=n.cacheSize??8192,ne=n.prefix??e.prefix??``,re=ne===``?``:ne+`:`,ie=re.length,ae=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),oe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,se=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ce=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,le=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=0,de=-1,fe=-1,R=-1,_e=-1,ve=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ye=e=>/\s/.test(String.fromCharCode(e)),xe=(e,t,n)=>{if(ue=0,de=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)ue=1;else if(r===40&&i===41)ue=2;else return;R=t+1,_e=n-1;let a=t+1;if(ve(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!ve(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(de=t+1,fe=a,R=a+1)}},Se=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Ce=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,we=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Te=e=>!!e&&!Number.isNaN(Number(e)),Ee=(e,t,n)=>{if(n-t<11||!Se(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&Se(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&Se(e,t+10,t+18,`-normal/`)},B=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],De=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),V=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Oe=(e,t,n,r)=>{if(e>=10){if(e>=25)return ae[e-25](t.slice(n,r));let i=e-10;if(ue!==B[i])return!1;if(de>=0){for(let e of De[i])if(Se(t,de,fe,e))return!0;return!1}switch(V[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(R,_e);return oe.test(e)&&!se.test(e)}case 3:return Te(t.slice(R,_e));case 4:return le.test(t.slice(R,_e));default:return ce.test(t.slice(R,_e))}}switch(e){case 0:return!0;case 1:return ue===0;case 2:return ue===1;case 3:return ue===2;case 4:return Ce.test(t.slice(n,r));case 5:return Te(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&Te(t.slice(n,r-1));case 8:return we.test(t.slice(n,r));default:return Ee(t,n,r)}},ke=new Set(typeof E==`string`?E.split(` `):E),Ae=(e,t,n,r,i,a)=>{let o=he(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},je=new Map,Me=new Map,Ne=2,Pe=4096,Fe=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ke.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Me.get(s);return c===void 0&&Me.set(s,c=Ne++),c},Ie=new Map,Le=r,Re=r+4096,ze=()=>Le++,Be=2097152,Ve=8192,He=new Int32Array(Ve),Ue=Array(Ve).fill(null),We=new Int32Array(Ve),Ge=new Int32Array(Ve),Ke=new Uint8Array(Ve),H=0,qe=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ue[e]!==null){if(Ue[e|1]===null)c=e|1;else if(!(H++&3))c=e|H>>2&1;else return}Ue[c]=t.slice(n,r),He[c]=i,We[c]=a,Ge[c]=o,Ke[c]=s},Je=()=>Ue.fill(null),Ye=256,Xe=[new Int32Array(Ye),new Int32Array(Ye),new Int32Array(Ye),new Int32Array(Ye)],[Ze,Qe,$e,et]=Xe,tt=new Uint8Array(Ye),nt=new Uint8Array(Ye),rt=()=>{Ye*=2,Xe=Xe.map(e=>{let t=new Int32Array(Ye);return t.set(e),t}),[Ze,Qe,$e,et]=Xe;let e=new Uint8Array(Ye);e.set(tt),tt=e,nt=new Uint8Array(Ye)},it=64,at=new Int32Array(it),ot=new Int32Array(it),st=new Int32Array(r),ct=2048,lt=21,ut=new Float64Array(ct),dt=new Int32Array(ct),ft=0,pt=(e,t)=>{if(e===0&&t<r)return st[t]===ft?1:(st[t]=ft,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>lt;for(;dt[i]===ft;){if(ut[i]===n)return 1;i=i+1&ct-1}return ut[i]=n,dt[i]=ft,0},U=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?pe:Ae(Ie,e,t+1,r,0,ze)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ot[t];if(r>n)continue;let i=at[t],a=n-r;if(M[i]===1&&a>0&&a<=N){let t=e.charCodeAt(r);if(P===!1||t!==91&&t!==40){let t=L(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;xe(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(Oe(d[t],e,r,n))return p[h+t]}return pe},mt=e=>{let t=e.length,n=0,c=0,u=!1;(Ne>Pe||je.size>Pe)&&(je=new Map,Me=new Map,Ne=2,Je()),Le>Re&&(Ie=new Map,Le=r,Je());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ye(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ye(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Ye&&rt();let _=n++;Ze[_]=p,Qe[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(He[y]===v&&Ue[y]!==null&&Ue[y].length===g?t=y:He[y|1]===v&&Ue[y|1]!==null&&Ue[y|1].length===g&&(t=y|1),t>=0){let n=Ue[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){$e[_]=We[t],et[_]=Ge[t],tt[_]=Ke[t];continue}}}let b=p;if(ie!==0){if(h-p<=ie||!e.startsWith(re,p)){$e[_]=pe,qe(y,e,p,h,v,pe,0,0);continue}b=p+ie}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let ee=E;D-E>1&&e.charCodeAt(E)===45&&(ee=E+1);let N=0,P=0,F=0,I=-1,L=0;(l[0]>=0||M[0]===1)&&(at[0]=0,ot[0]=ee,L=1);let te=me,ne=0;for(let t=ee;t<D;t++)if(t===A&&(te=P<F?me:N,ne=L),N!==me){let n=e.charCodeAt(t),r=-1;if(P<F)o.charCodeAt(P)===n?(P++,P===F&&(r=N=I)):N=me;else{let e=i[N],t=i[N+1],c=me;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(P=e+1,F=a[i+1],I=s[i],c=N);break}}N=c}if(r>=0&&(l[r]>=0||M[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(L===it){it*=2;let e=new Int32Array(it);e.set(at),at=e;let t=new Int32Array(it);t.set(ot),ot=t}at[L]=r,ot[L]=t+2,L++}}A===D&&(te=P<F?me:N,ne=L);let ae=P<F?me:N,oe,se=!1;if(A>=0){if(se=!0,oe=U(e,E,A,te,ne),oe!==pe&&oe<r&&j[oe]){let t=U(e,E,D,ae,L);t!==pe&&t!==oe&&(oe=t,se=!1)}else oe===pe&&(oe=U(e,E,D,ae,L),se=!1)}else oe=U(e,E,D,ae,L);let ce=0,le=0;oe===pe?$e[_]=pe:(le=+!!se,ce=b>=C?+!!O:Ae(je,e,b,C,+!!O,e=>Fe(e,O)),$e[_]=oe,tt[_]=le,et[_]=ce),qe(y,e,p,h,v,oe,ce,le)}if(n===0)return``;if(n===1)return Ze[0]===0&&Qe[0]===t?e:e.slice(Ze[0],Qe[0]);if(n*k>ct){for(;n*k>ct;)ct<<=1,lt--;ut=new Float64Array(ct),dt=new Int32Array(ct)}if(Ne>=Be||Le>=Be)throw Error(`cn: too many distinct classes in one merge`);ft=ft+1|0,ft===0&&(st.fill(0),dt.fill(0),ft=1);let f=!1;for(let e=n-1;e>=0;e--){let t=$e[e];if(t===pe){nt[e]=1;continue}let n=et[e];if(pt(n,t)===1)nt[e]=0,f=!0;else if(nt[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)pt(n,x[e]);if(tt[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&pt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!nt[m]){m++;continue}let t=Ze[m],r=Qe[m],i=m+1;for(;i<n&&nt[i]&&Ze[i]===r+1&&e.charCodeAt(r)===32;)r=Qe[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},ht=16384,W=new Int32Array(ht*2),gt=0,_t=1,vt=Object.create(null),yt=Object.create(null),bt=new Map,xt=new Map,St=0,Ct=0,wt=()=>{gt^=ht,_t=_t+1|0,Ct=0},Tt=e=>{let t=vt[e];if(t!==void 0)return t;let n=ge(e,0,e.length),r=(n&16383)+gt,i=W[r]===(n^_t)||W[r^ht]===(n^_t-1);return i&&(t=yt[e],t!==void 0)?(vt[e]=t,t):(t=mt(e),i?(vt[e]=t,++St>te&&(St=0,yt=vt,vt=Object.create(null),wt())):(W[r]=n^_t,++Ct>ht&&wt()),t)},Et=e=>{let t=bt.get(e);if(t!==void 0)return t;let n=ge(e,0,e.length),r=(n&16383)+gt,i=W[r]===(n^_t)||W[r^ht]===(n^_t-1);return i&&(t=xt.get(e),t!==void 0)?(bt.set(e,t),t):(t=mt(e),i?(bt.set(e,t),++St>te&&(St=0,xt=bt,bt=new Map,wt())):(W[r]=n^_t,++Ct>ht&&wt()),t)},Dt=e=>{let t=ge(e,0,e.length),n=(t&16383)+gt;return W[n]===(t^_t)||W[n^ht]===(t^_t-1)||(W[n]=t^_t,++Ct>ht&&wt(),!1)},Ot=te===0?mt:z?e=>{let t=bt.get(e);return t===void 0?Et(e):t}:Tt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Ot(arguments[0]):Ot(be.apply(null,arguments))},mergeString:Ot,seenBefore:te===0?()=>!1:Dt,mergeUncached:mt}},ve=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:ve(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},ye=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:ve(i,t);a&&(n&&(n+=` `),n+=a)}return n},be=function(){return ye(arguments,!1)},xe=256,Se=16,Ce=1024,we=4096,Te=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(we).fill(``),l=Array(we).fill(``),u=Array(we).fill(``));let i=ge(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=ve(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Se&&(_.miss=Se,_.skip=Ce,_.e.length=0,_.at=0);let u=_.e;u.length<xe?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(ve(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Ee=_e(R),B=Te(Ee.mergeString,Ee);Ee.merge;async function De(e,t,n){let r=await fetch(e,{method:t,headers:n?{"Content-Type":`application/json`}:void 0,body:n?JSON.stringify(n):void 0}),i=await r.json().catch(()=>({}));if(!r.ok)throw Error(i.error||`HTTP ${r.status}`);return i}var V=e=>De(e,`GET`),Oe=(e,t)=>De(e,`POST`,t??{}),ke=(e,t)=>De(e,`PUT`,t),Ae=(e,t)=>De(e,`DELETE`,t);async function je(e,t,n,r){let i=await fetch(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r});if(!i.ok||!i.body){let e=await i.json().catch(()=>({}));throw Error(e.error||`HTTP ${i.status}`)}let a=i.body.getReader(),o=new TextDecoder,s=``;for(;;){let{done:e,value:t}=await a.read();if(e)break;s+=o.decode(t,{stream:!0});let r;for(;(r=s.indexOf(`
|
|
10
|
+
|
|
11
|
+
`))>=0;){let e=s.slice(0,r);s=s.slice(r+2);let t=e.split(`
|
|
12
|
+
`).find(e=>e.startsWith(`data: `));if(t)try{n(JSON.parse(t.slice(6)))}catch{}}}}var Me=new Map,Ne=null;function Pe(e,t,n,r){let i=`${e}|${t}|${n}`,a=Me.get(i);return a||Me.set(i,a={ver:null,cbs:new Set}),a.cbs.add(r),Ne===null&&(Ne=setInterval(async()=>{for(let[e,t]of Me){if(!t.cbs.size||t.busy)continue;t.busy=!0;let[n,r,i]=e.split(`|`);try{let e=await V(`/api/store/version?name=${encodeURIComponent(i)}&wb=${encodeURIComponent(n)}&ws=${encodeURIComponent(r)}`);if(t.ver!==null&&e.version!==t.ver)for(let e of t.cbs)e();t.ver=e.version}catch{}t.busy=!1}},3e3)),()=>{a.cbs.delete(r),a.cbs.size||Me.delete(i)}}function Fe(e,t=`default`){let n=(n,r,i)=>{let a=new URLSearchParams({wb:e,ws:t,...i||{}});return`/api/store/${n}/records${r?`/${encodeURIComponent(r)}`:``}?${a}`};return{list:async(e,t={})=>{let r={};t.filter&&(r.filter=JSON.stringify(t.filter)),t.sort&&(r.sort=t.sort),t.limit&&(r.limit=String(t.limit));let i=await fetch(n(e,void 0,r)),a=await i.json();if(!i.ok)throw Error(a.error);return a.records},create:async(e,t)=>{let r=await fetch(n(e),{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)}),i=await r.json();if(!r.ok)throw Error(i.error);return i.record},update:async(e,t,r)=>{let i=await fetch(n(e,t),{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)}),a=await i.json();if(!i.ok)throw Error(a.error);return a.record},remove:async(e,t)=>{let r=await fetch(n(e,t),{method:`DELETE`}),i=await r.json();if(!r.ok)throw Error(i.error);return!0},watch:(n,r)=>Pe(e,t,n,r)}}async function Ie(e,t,n,r={}){let i=await fetch(`/api/panel-action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({agentId:e,panelId:t,actionId:n,args:r})}),a=await i.json();if(!i.ok)throw Error(a.error);return a}function Le(e,t=`dt`){let n=new Date(String(e||``));if(isNaN(n.getTime()))return String(e||``);let r=e=>String(e).padStart(2,`0`),i=`${r(n.getHours())}:${r(n.getMinutes())}`;return t===`t`?`${i}:${r(n.getSeconds())}`:t===`tm`?i:t===`dts`?`${n.getFullYear()}-${r(n.getMonth()+1)}-${r(n.getDate())} ${i}:${r(n.getSeconds())}`:`${r(n.getMonth()+1)}-${r(n.getDate())} ${i}`}function Re(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Re(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function ze(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Re(e))&&(r&&(r+=` `),r+=t);return r}var Be=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Ve=ze,He=(e,t)=>n=>{if(t?.variants==null)return Ve(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Be(t)||Be(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Ve(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Ue=Object.defineProperty,We=(e,t)=>Ue(e,`name`,{value:t,configurable:!0});function Ge(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}We(Ge,`setRef`);function Ke(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ge(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ge(e[t],null)}}}}We(Ke,`composeRefs`);function H(...e){return v.useCallback(Ke(...e),e)}We(H,`useComposedRefs`);var qe=Object.defineProperty,Je=(e,t)=>qe(e,`name`,{value:t,configurable:!0});function Ye(e){let t=v.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=ot(r),v.Children.forEach(r,e=>{if(nt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;it(n)&&typeof ut==`function`;)n=ut(n._payload);a=$e(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v.cloneElement(a,void 0,s):!o&&v.Children.count(r)===1&&v.isValidElement(r)&&(a=r);let c=a?tt(a):void 0,l=H(n,c);if(!a){if(r||r===0)throw Error(o?lt(e):ct(e));return r}let u=et(i,a.props??{});return a.type!==v.Fragment&&(u.ref=n?l:c),v.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Je(Ye,`createSlot`);var Xe=Ye(`Slot`),Ze=Symbol.for(`radix.slottable`);function Qe(e){let t=Je(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ze,t}Je(Qe,`createSlottable`);var $e=Je((e,t)=>`child`in e.props?v.isValidElement(t)?v.cloneElement(t,void 0,e.props.children(t.props.children)):null:v.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function et(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=st(a,i))}return{...e,...n}}Je(et,`mergeProps`);function tt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Je(tt,`getElementRef`);function nt(e){return v.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ze}Je(nt,`isSlottable`);var rt=Symbol.for(`react.lazy`);function it(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===rt&&`_payload`in e&&at(e._payload)}Je(it,`isLazyComponent`);function at(e){return typeof e==`object`&&!!e&&`then`in e}Je(at,`isPromiseLike`);function ot(e){let t=e;for(;it(t)&&typeof ut==`function`;)t=ut(t._payload);return t}Je(ot,`useUnwrappedLazy`);function st(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Je(st,`concatAriaDescribedby`);var ct=Je(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),lt=Je(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),ut=v.use,dt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),ft=o(((e,t)=>{t.exports=dt()})),pt=l(h(),1),U=ft(),mt=Object.defineProperty,ht=(e,t)=>mt(e,`name`,{value:t,configurable:!0}),W=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ye(`Primitive.${t}`),r=v.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function gt(e,t){e&&pt.flushSync(()=>e.dispatchEvent(t))}ht(gt,`dispatchDiscreteCustomEvent`);var _t=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),vt=Object.defineProperty,yt=(e,t)=>vt(e,`name`,{value:t,configurable:!0});function bt(e,t){let n=v.createContext(t);n.displayName=e+`Context`;let r=yt(e=>{let{children:t,...r}=e,i=v.useMemo(()=>r,Object.values(r));return(0,U.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=v.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return yt(i,`useContext`),[r,i]}yt(bt,`createContext`);function xt(e,t=[]){let n=[];function r(t,r){let i=v.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=yt(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=v.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=v.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return yt(s,`useContext`),[o,s]}yt(r,`createContext`);let i=yt(()=>{let t=n.map(e=>v.createContext(e));return yt(function(n){let r=n?.[e]||t;return v.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,St(i,...t)]}yt(xt,`createContextScope`);function St(...e){let t=e[0];if(e.length===1)return t;let n=yt(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return yt(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}yt(St,`composeContextScopes`);var Ct=globalThis?.document?v.useLayoutEffect:()=>{},wt=Object.defineProperty,Tt=(e,t)=>wt(e,`name`,{value:t,configurable:!0});function Et(e){let t=e+`CollectionProvider`,[n,r]=xt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Tt(e=>{let{scope:t,children:n}=e,r=v.useRef(null),a=v.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Ye(s),l=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=H(t,a(s,n).collectionRef);return(0,U.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Ye(u),p=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),s=H(t,o),c=a(u,n);return v.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return v.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Tt(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Tt(Et,`createCollection`);var Dt=new WeakMap,Ot=class e extends Map{static{Tt(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Dt.set(this,!0)}set(e,t){return Dt.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=jt(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=kt(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=kt(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return kt(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function kt(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=At(e,t);return n===-1?void 0:e[n]}Tt(kt,`at`);function At(e,t){let n=e.length,r=jt(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Tt(At,`toSafeIndex`);function jt(e){return e!==e||e===0?0:Math.trunc(e)}Tt(jt,`toSafeInteger`);function Mt(e){let t=e+`CollectionProvider`,[n,r]=xt(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=Tt(({state:e,...t})=>e?(0,U.jsx)(u,{...t,state:e}):(0,U.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=Tt(e=>{let t=_();return(0,U.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=Tt(e=>{let{scope:t,children:n,state:r}=e,a=v.useRef(null),[s,c]=v.useState(null),l=H(a,c),[u,d]=r,f=v.useRef(new Ot),p=v.useCallback(()=>{let e=f.current;return Ft(e)||e.sort(It),e},[]);return v.useEffect(()=>{if(!s)return;let e=Lt(()=>{d(e=>{let t=e.toSorted(It);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,U.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,U.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=Ye(d),p=v.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=H(t,a(d,n).collectionElementRef);return(0,U.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=Ye(m),g=v.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=v.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=v.useRef(i);Nt(l.current,i)||(l.current=i);let u=l.current,d=H(t,v.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);Ct(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=v.useRef(null);return v.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new Ot(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(It)}))}),v.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new Ot(t);return n.delete(e.element),n})},[s]),(0,U.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return v.useState(new Ot)}Tt(_,`useInitCollection`);function y(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}Tt(y,`useCollection`);function b(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return Tt(b,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:y,useGetCollection:b,useInitCollection:_}]}Tt(Mt,`createCollection`);function Nt(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Tt(Nt,`shallowEqual`);function Pt(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Tt(Pt,`isElementPreceding`);function Ft(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Tt(Ft,`isInDocumentOrder`);function It(e,t){return!e[1].element||!t[1].element?0:Pt(e[1].element,t[1].element)?-1:1}Tt(It,`sortByDocumentPosition`);function Lt(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Tt(Lt,`getChildListObserver`);var Rt=Object.defineProperty,zt=(e,t)=>Rt(e,`name`,{value:t,configurable:!0}),Bt=!!(typeof window<`u`&&window.document&&window.document.createElement);function G(e,t,{checkForDefaultPrevented:n=!0}={}){return zt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}zt(G,`composeEventHandlers`);function Vt(e){if(!Bt)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}zt(Vt,`getOwnerWindow`);function Ht(e){if(!Bt)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}zt(Ht,`getOwnerDocument`);function Ut(e,t=!1){let{activeElement:n}=Ht(e);if(!n?.nodeName)return null;if(Wt(n)&&n.contentDocument)return Ut(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Ht(n).getElementById(e);if(t)return t}}return n}zt(Ut,`getActiveElement`);function Wt(e){return e.tagName===`IFRAME`}zt(Wt,`isFrame`);var Gt=Object.defineProperty,Kt=(e,t)=>Gt(e,`name`,{value:t,configurable:!0}),qt=v.useEffectEvent,Jt=v.useInsertionEffect;function Yt(e){if(typeof qt==`function`)return qt(e);let t=v.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Jt==`function`?Jt(()=>{t.current=e}):Ct(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Kt(Yt,`useEffectEvent`);var Xt=Object.defineProperty,Zt=(e,t)=>Xt(e,`name`,{value:t,configurable:!0}),Qt=v.useInsertionEffect||Ct;function $t({prop:e,defaultProp:t,onChange:n=Zt(()=>{},`onChange`),caller:r}){let[i,a,o]=en({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,v.useCallback(t=>{if(s){let n=tn(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Zt($t,`useControllableState`);function en({defaultProp:e,onChange:t}){let[n,r]=v.useState(e),i=v.useRef(n),a=v.useRef(t);return Qt(()=>{a.current=t},[t]),v.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Zt(en,`useUncontrolledState`);function tn(e){return typeof e==`function`}Zt(tn,`isFunction`);var nn=Symbol(`RADIX:SYNC_STATE`);function rn(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Yt(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=v.useReducer((t,n)=>{if(n.type===nn)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=v.useRef(p);v.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=v.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return v.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:nn,state:i})},[i,d.state,c]),[h,f]}Zt(rn,`useControllableStateReducer`);var an=Object.defineProperty,on=(e,t)=>an(e,`name`,{value:t,configurable:!0});function sn(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}on(sn,`useStateMachine`);var cn=on(e=>{let{present:t,children:n}=e,r=ln(t),i=typeof n==`function`?n({present:r.isPresent}):v.Children.only(n),a=dn(r.ref,pn(i));return typeof n==`function`||r.isPresent?v.cloneElement(i,{ref:a}):null},`Presence`);function ln(e){let[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),a=v.useRef(`none`),o=v.useRef(void 0),[s,c]=sn(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return v.useEffect(()=>{s===`mounted`?(a.current=o.current??fn(r.current),o.current=void 0):a.current=`none`},[s]),Ct(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=fn(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Ct(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=on(a=>{let o=fn(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=on(e=>{e.target===t&&(a.current=fn(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:v.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=fn(t)}else r.current=null;n(e)},[])}}on(ln,`usePresence`);function un(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}on(un,`setRef`);function dn(...e){let t=v.useRef(e);return t.current=e,v.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=un(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():un(n[e],null)}}},[])}on(dn,`useStableComposedRefs`);function fn(e){return e?.animationName||`none`}on(fn,`getAnimationName`);function pn(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}on(pn,`getElementRef`);var mn=Object.defineProperty,hn=(e,t)=>mn(e,`name`,{value:t,configurable:!0}),gn=v.useId||(()=>void 0),_n=0;function vn(e){let[t,n]=v.useState(gn());return Ct(()=>{e||n(e=>e??String(_n++))},[e]),e||(t?`radix-${t}`:``)}hn(vn,`useId`);var yn=Object.defineProperty,bn=(e,t)=>yn(e,`name`,{value:t,configurable:!0}),xn={LTR:`ltr`,RTL:`rtl`},Sn=v.createContext(void 0);function Cn(e){let t=v.useContext(Sn);return e||t||xn.LTR}bn(Cn,`useDirection`);var wn=Object.defineProperty,Tn=(e,t)=>wn(e,`name`,{value:t,configurable:!0}),En=v.useInsertionEffect;function Dn(e){let t=v.useRef(e);return typeof En==`function`?En(()=>{t.current=e}):Ct(()=>{t.current=e}),v.useMemo(()=>((...e)=>t.current?.(...e)),[])}Tn(Dn,`useCallbackRef`);var On=Object.defineProperty,kn=(e,t)=>On(e,`name`,{value:t,configurable:!0}),An=`dismissableLayer.update`,jn=`dismissableLayer.pointerDownOutside`,Mn=`dismissableLayer.focusOutside`,Nn,Pn=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Fn=v.forwardRef(kn(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(Pn),[d,f]=v.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=v.useState({}),h=H(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=_?g.indexOf(_):-1,b=d?g.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=v.useRef(!1),w=Rn(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:v.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=zn(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===g.length-1:!1,D=Dn(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return v.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),v.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Nn=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Bn(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Nn))}},[d,p,n,u]),v.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Bn())},[d,u]),v.useEffect(()=>{let e=kn(()=>m({}),`handleUpdate`);return document.addEventListener(An,e),()=>document.removeEventListener(An,e)},[]),(0,U.jsx)(W.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,T.onFocusCapture),onBlurCapture:G(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function In(){let e=v.useContext(Pn),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}kn(In,`useDismissableLayerSurface`);var Ln=kn(()=>!0,`IS_TRUE`);function Rn(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ln}=t,s=Dn(e),c=v.useRef(!1),l=v.useRef(!1),u=v.useRef(new Map),d=v.useRef(()=>{});return v.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}kn(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}kn(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}kn(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}kn(p,`handleInteractionBubble`);let m=kn(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Vn(jn,s,p,{discrete:!0})};if(kn(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:kn(()=>c.current=!0,`onPointerDownCapture`)}}kn(Rn,`usePointerDownOutside`);function zn(e,t=globalThis?.document){let n=Dn(e),r=v.useRef(!1);return v.useEffect(()=>{let e=kn(e=>{e.target&&!r.current&&Vn(Mn,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:kn(()=>r.current=!0,`onFocusCapture`),onBlurCapture:kn(()=>r.current=!1,`onBlurCapture`)}}kn(zn,`useFocusOutside`);function Bn(){let e=new CustomEvent(An);document.dispatchEvent(e)}kn(Bn,`dispatchUpdate`);function Vn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?gt(i,a):i.dispatchEvent(a)}kn(Vn,`handleAndDispatchCustomEvent`);var Hn=Object.defineProperty,Un=(e,t)=>Hn(e,`name`,{value:t,configurable:!0}),Wn=`focusScope.autoFocusOnMount`,Gn=`focusScope.autoFocusOnUnmount`,Kn={bubbles:!1,cancelable:!0},qn=v.forwardRef(Un(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=v.useState(null),u=Dn(a),d=Dn(o),f=v.useRef(null),p=H(t,l),m=v.useRef(i);v.useEffect(()=>{m.current=i});let h=v.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:ir(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||ir(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&ir(c)};Un(e,`handleFocusIn`),Un(t,`handleFocusOut`),Un(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),v.useEffect(()=>{if(c){ar.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Wn,Kn);c.addEventListener(Wn,u),c.dispatchEvent(t),t.defaultPrevented||(Qn(cr(er(c)),{select:!0}),document.activeElement===e&&ir(c))}return()=>{c.removeEventListener(Wn,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Gn,Kn);c.addEventListener(Gn,d),c.dispatchEvent(r),r.defaultPrevented||ir(e??t.body,{select:!0}),c.removeEventListener(Gn,d),ar.remove(g)},0)}}},[c,u,d,g]);let _=v.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=$n(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&ir(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&ir(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,U.jsx)(W.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),Jn=v.createContext(null);function Yn({registry:e,children:t}){return e?(0,U.jsx)(Jn.Provider,{value:e,children:t}):t}Un(Yn,`FocusScopeBranchProvider`);function Xn(){let[e,t]=v.useState([]);return{nodes:e,registry:v.useMemo(()=>({add:Un(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Un(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Un(Xn,`useFocusScopeBranchRegistry`);function Zn(e){let t=v.useContext(Jn);v.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Un(Zn,`useFocusScopeBranch`);function Qn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(ir(r,{select:t}),document.activeElement!==n)return}Un(Qn,`focusFirst`);function $n(e){let t=er(e);return[tr(t,e),tr(t.reverse(),e)]}Un($n,`getTabbableEdges`);function er(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Un(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Un(er,`getTabbableCandidates`);function tr(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):nr(r,{upTo:t})))return r}Un(tr,`findVisible`);function nr(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Un(nr,`isHidden`);function rr(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Un(rr,`isSelectableInput`);function ir(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&rr(e)&&t&&e.select()}}Un(ir,`focus`);var ar=or();function or(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=sr(e,t),e.unshift(t)},remove(t){e=sr(e,t),e[0]?.resume()}}}Un(or,`createFocusScopesStack`);function sr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Un(sr,`arrayRemove`);function cr(e){return e.filter(e=>e.tagName!==`A`)}Un(cr,`removeLinks`);var lr=Object.defineProperty,ur=v.forwardRef(((e,t)=>lr(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=v.useState(!1);Ct(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?pt.createPortal((0,U.jsx)(W.div,{...r,ref:t}),o):null},`Portal`)),dr=Object.defineProperty,fr=(e,t)=>dr(e,`name`,{value:t,configurable:!0}),pr=0,mr=null;function hr(e){return gr(),e.children}fr(hr,`FocusGuards`);function gr(){v.useEffect(()=>{mr||={start:_r(),end:_r()};let{start:e,end:t}=mr;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),pr++,()=>{pr===1&&(mr?.start.remove(),mr?.end.remove(),mr=null),pr=Math.max(0,pr-1)}},[])}fr(gr,`useFocusGuards`);function _r(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}fr(_r,`createFocusGuard`);var vr=function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vr.apply(this,arguments)};function yr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function br(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var xr=`right-scroll-bar-position`,Sr=`width-before-scroll-bar`,Cr=`with-scroll-bars-hidden`,wr=`--removed-body-scroll-bar-size`;function Tr(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Er(e,t){var n=(0,v.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Dr=typeof window<`u`?v.useLayoutEffect:v.useEffect,Or=new WeakMap;function kr(e,t){var n=Er(t||null,function(t){return e.forEach(function(e){return Tr(e,t)})});return Dr(function(){var t=Or.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Tr(e,null)}),i.forEach(function(e){r.has(e)||Tr(e,a)})}Or.set(n,e)},[e]),n}function Ar(e){return e}function jr(e,t){t===void 0&&(t=Ar);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Mr(e){e===void 0&&(e={});var t=jr(null);return t.options=vr({async:!0,ssr:!1},e),t}var Nr=function(e){var t=e.sideCar,n=yr(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return v.createElement(r,vr({},n))};Nr.isSideCarExport=!0;function Pr(e,t){return e.useMedium(t),Nr}var Fr=Mr(),Ir=function(){},Lr=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:Ir,onWheelCapture:Ir,onTouchMoveCapture:Ir}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,y=_===void 0?`div`:_,b=e.gapMode,x=yr(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=kr([n,t]),w=vr(vr({},x),i);return v.createElement(v.Fragment,null,u&&v.createElement(S,{sideCar:Fr,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),o?v.cloneElement(v.Children.only(s),vr(vr({},w),{ref:C})):v.createElement(y,vr({},w,{className:c,ref:C}),s))});Lr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Lr.classNames={fullWidth:Sr,zeroRight:xr};var Rr=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function zr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Rr();return t&&e.setAttribute(`nonce`,t),e}function Br(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Hr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=zr())&&(Br(t,n),Vr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ur=function(){var e=Hr();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Wr=function(){var e=Ur();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Gr={left:0,top:0,right:0,gap:0},Kr=function(e){return parseInt(e||``,10)||0},qr=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Kr(n),Kr(r),Kr(i)]},Jr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Gr;var t=qr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Yr=Wr(),Xr=`data-scroll-locked`,Zr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
13
|
+
.${Cr} {
|
|
14
|
+
overflow: hidden ${r};
|
|
15
|
+
padding-right: ${s}px ${r};
|
|
16
|
+
}
|
|
17
|
+
body[${Xr}] {
|
|
18
|
+
overflow: hidden ${r};
|
|
19
|
+
overscroll-behavior: contain;
|
|
20
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
21
|
+
padding-left: ${i}px;
|
|
22
|
+
padding-top: ${a}px;
|
|
23
|
+
padding-right: ${o}px;
|
|
24
|
+
margin-left:0;
|
|
25
|
+
margin-top:0;
|
|
26
|
+
margin-right: ${s}px ${r};
|
|
27
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.${xr} {
|
|
31
|
+
right: ${s}px ${r};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.${Sr} {
|
|
35
|
+
margin-right: ${s}px ${r};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.${xr} .${xr} {
|
|
39
|
+
right: 0 ${r};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.${Sr} .${Sr} {
|
|
43
|
+
margin-right: 0 ${r};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
body[${Xr}] {
|
|
47
|
+
${wr}: ${s}px;
|
|
48
|
+
}
|
|
49
|
+
`},Qr=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},$r=function(){v.useEffect(function(){return document.body.setAttribute(Xr,(Qr()+1).toString()),function(){var e=Qr()-1;e<=0?document.body.removeAttribute(Xr):document.body.setAttribute(Xr,e.toString())}},[])},ei=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;$r();var a=v.useMemo(function(){return Jr(i)},[i]);return v.createElement(Yr,{styles:Zr(a,!t,i,n?``:`!important`)})},ti=!1;if(typeof window<`u`)try{var ni=Object.defineProperty({},"passive",{get:function(){return ti=!0,!0}});window.addEventListener(`test`,ni,ni),window.removeEventListener(`test`,ni,ni)}catch{ti=!1}var ri=ti?{passive:!1}:!1,ii=function(e){return e.tagName===`TEXTAREA`},ai=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!ii(e)&&n[t]===`visible`)},oi=function(e){return ai(e,`overflowY`)},si=function(e){return ai(e,`overflowX`)},ci=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),di(e,r)){var i=fi(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},li=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},ui=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},di=function(e,t){return e===`v`?oi(t):si(t)},fi=function(e,t){return e===`v`?li(t):ui(t)},pi=function(e,t){return e===`h`&&t===`rtl`?-1:1},mi=function(e,t,n,r,i){var a=pi(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=fi(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&di(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},hi=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gi=function(e){return[e.deltaX,e.deltaY]},_i=function(e){return e&&`current`in e?e.current:e},vi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yi=function(e){return`
|
|
50
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
51
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
52
|
+
`},bi=0,xi=[];function Si(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(bi++)[0],a=v.useState(Wr)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=br([e.lockRef.current],(e.shards||[]).map(_i),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=hi(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=ci(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=ci(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return mi(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(xi.length&&xi[xi.length-1]===a){var r=`deltaY`in n?gi(n):hi(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&vi(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(_i).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ci(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=hi(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,gi(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,hi(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return xi.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,ri),document.addEventListener(`touchmove`,c,ri),document.addEventListener(`touchstart`,u,ri),function(){xi=xi.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,ri),document.removeEventListener(`touchmove`,c,ri),document.removeEventListener(`touchstart`,u,ri)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:yi(i)}):null,p?v.createElement(ei,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ci(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var wi=Pr(Fr,Si),Ti=v.forwardRef(function(e,t){return v.createElement(Lr,vr({},e,{ref:t,sideCar:wi}))});Ti.classNames=Lr.classNames;var Ei=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Di=new WeakMap,Oi=new WeakMap,ki={},Ai=0,ji=function(e){return e&&(e.host||ji(e.parentNode))},Mi=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ji(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Ni=function(e,t,n,r){var i=Mi(t,Array.isArray(e)?e:[e]);ki[n]||(ki[n]=new WeakMap);var a=ki[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Di.get(e)||0)+1,l=(a.get(e)||0)+1;Di.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Oi.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Ai++,function(){o.forEach(function(e){var t=Di.get(e)-1,i=a.get(e)-1;Di.set(e,t),a.set(e,i),t||(Oi.has(e)||e.removeAttribute(r),Oi.delete(e)),i||e.removeAttribute(n)}),Ai--,Ai||(Di=new WeakMap,Di=new WeakMap,Oi=new WeakMap,ki={})}},Pi=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ei(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Ni(r,i,n,`aria-hidden`)):function(){return null}},Fi=Object.defineProperty,Ii=(e,t)=>Fi(e,`name`,{value:t,configurable:!0}),Li=`Dialog`,[Ri,zi]=xt(Li),[Bi,Vi]=Ri(Li),Hi=Ii(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),{nodes:l,registry:u}=Xn(),[d,f]=$t({prop:r,defaultProp:i??!1,onChange:a,caller:Li}),[p,m]=v.useState(0),[h,g]=v.useState(0);return(0,U.jsx)(Bi,{scope:t,triggerRef:s,contentRef:c,contentId:vn(),titleId:vn(),descriptionId:vn(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:d,onOpenChange:f,onOpenToggle:v.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),Ui=`DialogPortal`,[Wi,Gi]=Ri(Ui,{forceMount:void 0}),Ki=Ii(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Vi(Ui,t);return(0,U.jsx)(Wi,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,U.jsx)(cn,{present:n||a.open,children:(0,U.jsx)(ur,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),qi=`DialogOverlay`,Ji=v.forwardRef(Ii(function(e,t){let n=Gi(qi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(qi,e.__scopeDialog);return a.modal?(0,U.jsx)(cn,{present:r||a.open,children:(0,U.jsx)(Xi,{...i,ref:t})}):null},`DialogOverlay`)),Yi=Ye(`DialogOverlay.RemoveScroll`),Xi=v.forwardRef(Ii(function(e,t){let{__scopeDialog:n,...r}=e,i=Vi(qi,n),a=H(t,In());return(0,U.jsx)(Ti,{as:Yi,allowPinchZoom:!0,shards:v.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,U.jsx)(W.div,{"data-state":sa(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Zi=`DialogContent`,Qi=v.forwardRef(Ii(function(e,t){let n=Gi(Zi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(Zi,e.__scopeDialog);return(0,U.jsx)(cn,{present:r||a.open,children:a.modal?(0,U.jsx)($i,{...i,ref:t}):(0,U.jsx)(ea,{...i,ref:t})})},`DialogContent`)),$i=v.forwardRef(Ii(function(e,t){let n=Vi(Zi,e.__scopeDialog),r=v.useRef(null),i=H(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return Pi(e)},[]),(0,U.jsx)(ta,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ea=v.forwardRef(Ii(function(e,t){let n=Vi(Zi,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,U.jsx)(ta,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),ta=v.forwardRef(Ii(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=Vi(Zi,n);return gr(),(0,U.jsx)(Yn,{registry:l.branchRegistry,children:(0,U.jsx)(qn,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,U.jsx)(Fn,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?oa(o,l.descriptionId):o,"data-state":sa(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),na=v.forwardRef(Ii(function(e,t){let{__scopeDialog:n,...r}=e,i=Vi(`DialogTitle`,n),{setTitleCount:a}=i;return Ct(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,U.jsx)(W.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),ra=v.forwardRef(Ii(function(e,t){let{__scopeDialog:n,...r}=e,i=Vi(`DialogDescription`,n),{setDescriptionCount:a}=i;return Ct(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,U.jsx)(W.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),ia=`DialogClose`,aa=v.forwardRef(Ii(function(e,t){let{__scopeDialog:n,...r}=e,i=Vi(ia,n);return(0,U.jsx)(W.button,{type:`button`,...r,ref:t,onClick:G(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function oa(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ii(oa,`concatAriaDescribedby`);function sa(e){return e?`open`:`closed`}Ii(sa,`getState`);var ca=Object.defineProperty,la=(e,t)=>ca(e,`name`,{value:t,configurable:!0});function ua(e){let[t,n]=v.useState(void 0);return Ct(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}la(ua,`useSize`);var da=Object.defineProperty,fa=(e,t)=>da(e,`name`,{value:t,configurable:!0}),pa=`Checkbox`,[ma,ha]=xt(pa),[ga,_a]=ma(pa);function va(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=$t({prop:n,defaultProp:i??!1,onChange:c,caller:pa}),[m,h]=v.useState(null),[g,_]=v.useState(null),[y,b]=v.useState(null),x=!m||!!o||!!m.closest(`form`),S={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,userClick:y,onUserClick:b,required:l,defaultChecked:!Da(i)&&i,isFormControl:x,bubbleInput:g,setBubbleInput:_};return(0,U.jsx)(ga,{scope:t,...S,children:Ea(d)?d(S):r})}fa(va,`CheckboxProvider`);var ya=`CheckboxTrigger`,ba=v.forwardRef(fa(function({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i){let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=_a(ya,e),h=H(i,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?.form;if(e){let t=fa(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,U.jsx)(W.button,{type:`button`,role:`checkbox`,"aria-checked":Da(c)?`mixed`:c,"aria-required":l,"data-state":Oa(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:G(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:G(n,e=>{let t=e.isPropagationStopped();f({requestedChecked:Da(c)?!0:!c,hasConsumerStoppedPropagation:t}),d(e=>Da(e)?!0:!e),m&&p&&(t||e.stopPropagation())})})},`CheckboxTrigger`)),xa=v.forwardRef(fa(function(e,t){let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,U.jsx)(va,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ba,{...d,ref:t,__scopeCheckbox:n}),e&&(0,U.jsx)(Ta,{__scopeCheckbox:n})]})})},`Checkbox`)),Sa=`CheckboxIndicator`,Ca=v.forwardRef(fa(function(e,t){let{__scopeCheckbox:n,forceMount:r,...i}=e,a=_a(Sa,n);return(0,U.jsx)(cn,{present:r||Da(a.checked)||a.checked===!0,children:(0,U.jsx)(W.span,{"data-state":Oa(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})},`CheckboxIndicator`)),wa=`CheckboxBubbleInput`,Ta=v.forwardRef(fa(function({__scopeCheckbox:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=_a(wa,e),h=H(r,m),g=ua(i),_=v.useRef(!1),y=v.useRef(o),b=v.useRef(a),x=v.useRef(null);v.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=y.current!==o;y.current=o;let i=a!==null&&a!==b.current;if(b.current=a,i)x.current=r?null:a,r&&(e.indeterminate=Da(o),n.call(e,!Da(o)&&o)),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=x.current;x.current=null;let r=t?.requestedChecked===o;_.current=!0,e.indeterminate=Da(o),n.call(e,!Da(o)&&o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let S=v.useRef(!Da(o)&&o);return(0,U.jsx)(W.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??S.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:G(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`CheckboxBubbleInput`));function Ea(e){return typeof e==`function`}fa(Ea,`isFunction`);function Da(e){return e===`indeterminate`}fa(Da,`isIndeterminate`);function Oa(e){return Da(e)?`indeterminate`:e?`checked`:`unchecked`}fa(Oa,`getState`);var ka=[`top`,`right`,`bottom`,`left`],Aa=Math.min,ja=Math.max,Ma=Math.round,Na=Math.floor,Pa=e=>({x:e,y:e}),Fa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ia(e,t,n){return ja(e,Aa(t,n))}function La(e,t){return typeof e==`function`?e(t):e}function Ra(e){return e.split(`-`)[0]}function za(e){return e.split(`-`)[1]}function Ba(e){return e===`x`?`y`:`x`}function Va(e){return e===`y`?`height`:`width`}function Ha(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Ua(e){return Ba(Ha(e))}function Wa(e,t,n){n===void 0&&(n=!1);let r=za(e),i=Ua(e),a=Va(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=$a(o)),[o,$a(o)]}function Ga(e){let t=$a(e);return[Ka(e),t,Ka(t)]}function Ka(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var qa=[`left`,`right`],Ja=[`right`,`left`],Ya=[`top`,`bottom`],Xa=[`bottom`,`top`];function Za(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ja:qa:t?qa:Ja;case`left`:case`right`:return t?Ya:Xa;default:return[]}}function Qa(e,t,n,r){let i=za(e),a=Za(Ra(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ka)))),a}function $a(e){let t=Ra(e);return Fa[t]+e.slice(t.length)}function eo(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function to(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:eo(e)}function no(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ro(e,t,n){let{reference:r,floating:i}=e,a=Ha(t),o=Ua(t),s=Va(o),c=Ra(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=za(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function io(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=La(t,e),p=to(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=no(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=no(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var ao=50,oo=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:io},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ro(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<ao&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=ro(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},so=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=La(e,t)||{};if(l==null)return{};let d=to(u),f={x:n,y:r},p=Ua(i),m=Va(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Aa(d[_],T),D=Aa(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Ia(E,k,O),j=!c.arrow&&za(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,ee=j?k<E?k-E:k-O:0;return{[p]:f[p]+ee,data:{[p]:A,centerOffset:k-A-ee,...j&&{alignmentOffset:ee}},reset:j}}}),co=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=La(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ra(r),_=Ha(o),v=Ra(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[$a(o)]:Ga(o)),x=p!==`none`;!d&&x&&b.push(...Qa(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Wa(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ha(t)||T.every(e=>Ha(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ha(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function lo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uo(e){return ka.some(t=>e[t]>=0)}var fo=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=La(e,t);switch(i){case`referenceHidden`:{let e=lo(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:uo(e)}}}case`escaped`:{let e=lo(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:uo(e)}}}default:return{}}}}},po=new Set([`left`,`top`]);async function mo(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ra(n),s=za(n),c=Ha(n)===`y`,l=po.has(o)?-1:1,u=a&&c?-1:1,d=La(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ho=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await mo(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},go=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=La(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ha(i),p=Ba(f),m=u[p],h=u[f],g=(e,t)=>Ia(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},_o=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=La(e,t),u={x:n,y:r},d=Ha(i),f=Ba(d),p=u[f],m=u[d],h=La(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=po.has(Ra(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},vo=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=La(e,t),c=await i.detectOverflow(t,s),l=Ra(n),u=za(n),d=Ha(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Aa(p-c[m],g),y=Aa(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*ja(c.left,c.right):S=p-2*ja(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function yo(){return typeof window<`u`}function bo(e){return Co(e)?(e.nodeName||``).toLowerCase():`#document`}function xo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function So(e){return((Co(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Co(e){return yo()?e instanceof Node||e instanceof xo(e).Node:!1}function wo(e){return yo()?e instanceof Element||e instanceof xo(e).Element:!1}function To(e){return yo()?e instanceof HTMLElement||e instanceof xo(e).HTMLElement:!1}function Eo(e){return!yo()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof xo(e).ShadowRoot}function Do(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Oo(e){return/^(table|td|th)$/.test(bo(e))}function ko(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ao=/transform|translate|scale|rotate|perspective|filter/,jo=/paint|layout|strict|content/,Mo=e=>!!e&&e!==`none`,No;function Po(e){let t=wo(e)?K(e):e;return Mo(t.transform)||Mo(t.translate)||Mo(t.scale)||Mo(t.rotate)||Mo(t.perspective)||!Io()&&(Mo(t.backdropFilter)||Mo(t.filter))||Ao.test(t.willChange||``)||jo.test(t.contain||``)}function Fo(e){let t=zo(e);for(;To(t)&&!Lo(t);){if(Po(t))return t;if(ko(t))return null;t=zo(t)}return null}function Io(){return No??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),No}function Lo(e){return/^(html|body|#document)$/.test(bo(e))}function K(e){return xo(e).getComputedStyle(e)}function Ro(e){return wo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zo(e){if(bo(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Eo(e)&&e.host||So(e);return Eo(t)?t.host:t}function Bo(e){let t=zo(e);return Lo(t)?(e.ownerDocument||e).body:To(t)&&Do(t)?t:Bo(t)}function Vo(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Bo(e),i=r===e.ownerDocument?.body,a=xo(r);if(i){let e=Ho(a);return t.concat(a,a.visualViewport||[],Do(r)?r:[],e&&n?Vo(e):[])}return t.concat(r,Vo(r,[],n))}function Ho(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uo(e){let t=K(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=To(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ma(n)!==a||Ma(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Wo(e){return wo(e)?e:e.contextElement}function Go(e){let t=Wo(e);if(!To(t))return Pa(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Uo(t),o=(a?Ma(n.width):n.width)/r,s=(a?Ma(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ko=Pa(0);function qo(e){let t=xo(e);return!Io()||!t.visualViewport?Ko:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jo(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===xo(e)}function Yo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Wo(e),o=Pa(1);t&&(r?wo(r)&&(o=Go(r)):o=Go(e));let s=Jo(a,n,r)?qo(a):Pa(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=xo(a),t=wo(r)?xo(r):r,n=e,i=Ho(n);for(;i&&t!==n;){let e=Go(i),t=i.getBoundingClientRect(),r=K(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=xo(i),i=Ho(n)}}return no({width:u,height:d,x:c,y:l})}function Xo(e,t){let n=Ro(e).scrollLeft;return t?t.left+n:Yo(So(e)).left+n}function Zo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Xo(e,n),y:n.top+t.scrollTop}}function Qo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=So(r),s=t?ko(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Pa(1),u=Pa(0),d=To(r);if((d||!a)&&((bo(r)!==`body`||Do(o))&&(c=Ro(r)),d)){let e=Yo(r);l=Go(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Zo(o,c):Pa(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function $o(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function es(e){let t=Ro(e),n=e.ownerDocument.body,r=ja(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ja(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Xo(e),o=-t.scrollTop;return K(n).direction===`rtl`&&(a+=ja(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ts=25;function ns(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=xo(e),a=So(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Io()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Xo(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ts&&(s-=o)}return{width:s,height:c,x:l,y:u}}function rs(e,t){let n=Yo(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Go(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function is(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ns(e,n,t);else if(t===`document`)r=es(So(e));else if(wo(t))r=rs(t,n);else{let n=qo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return no(r)}function as(e,t){let n=t.get(e);if(n)return n;let r=Vo(e,[],!1).filter(e=>wo(e)&&bo(e)!==`body`),i=null,a=K(e).position===`fixed`,o=a?zo(e):e;for(;wo(o)&&!Lo(o);){let e=K(o),t=Po(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=zo(o)}return t.set(e,r),r}function os(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ko(t)?[]:as(t,this._c):[].concat(n),r],o=is(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=is(t,a[e],i);s=ja(n.top,s),c=Aa(n.right,c),l=Aa(n.bottom,l),u=ja(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function ss(e){let{width:t,height:n}=Uo(e);return{width:t,height:n}}function cs(e,t,n){let r=To(t),i=So(t),a=n===`fixed`,o=Yo(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Pa(0);if((r||!a)&&((bo(t)!==`body`||Do(i))&&(s=Ro(t)),r)){let e=Yo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Xo(i));let l=i&&!r&&!a?Zo(i,s):Pa(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function ls(e){return K(e).position===`static`}function us(e,t){if(!To(e)||K(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return So(e)===n&&(n=n.ownerDocument.body),n}function ds(e,t){let n=xo(e);if(ko(e))return n;if(!To(e)){let t=zo(e);for(;t&&!Lo(t);){if(wo(t)&&!ls(t))return t;t=zo(t)}return n}let r=us(e,t);for(;r&&Oo(r)&&ls(r);)r=us(r,t);return r&&Lo(r)&&ls(r)&&!Po(r)?n:r||Fo(e)||n}var fs=async function(e){let t=this.getOffsetParent||ds,n=this.getDimensions,r=await n(e.floating);return{reference:cs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ps(e){return K(e).direction===`rtl`}var ms={convertOffsetParentRelativeRectToViewportRelativeRect:Qo,getDocumentElement:So,getClippingRect:os,getOffsetParent:ds,getElementRects:fs,getClientRects:$o,getDimensions:ss,getScale:Go,isElement:wo,isRTL:ps};function hs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gs(e,t,n){let r=null,i,a=So(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Na(d),h=Na(a.clientWidth-(u+f)),g=Na(a.clientHeight-(d+p)),_=Na(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ja(0,Aa(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!hs(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=xo(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function _s(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Wo(e),u=i||a?[...l?Vo(l):[],...t?Vo(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?gs(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Yo(e):null;c&&g();function g(){let t=Yo(e);h&&!hs(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var vs=ho,ys=go,bs=co,xs=vo,Ss=fo,Cs=so,ws=_o,Ts=(e,t,n)=>{let r=new Map,i=n??{},a={...ms,...i.platform,_c:r};return oo(e,t,{...i,platform:a})},Es=typeof document<`u`?v.useLayoutEffect:function(){};function Ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ds(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ds(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Os(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ks(e,t){let n=Os(e);return Math.round(t*n)/n}function As(e){let t=v.useRef(e);return Es(()=>{t.current=e}),t}function js(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Ds(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=As(c),O=As(i),k=As(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Ts(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Ds(T.current,t)&&(T.current=t,pt.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);Es(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);Es(()=>(j.current=!0,()=>{j.current=!1}),[]),Es(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let ee=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),M=v.useMemo(()=>({reference:x,floating:S}),[x,S]),N=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=ks(M.floating,u.x),r=ks(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Os(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:ee,elements:M,floatingStyles:N}),[u,A,ee,M,N])}var Ms=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Cs({element:r.current,padding:i}).fn(n):r?Cs({element:r,padding:i}).fn(n):{}}}},Ns=(e,t)=>{let n=vs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ps=(e,t)=>{let n=ys(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fs=(e,t)=>({fn:ws(e).fn,options:[e,t]}),Is=(e,t)=>{let n=bs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ls=(e,t)=>{let n=xs(e);return{name:n.name,fn:n.fn,options:[e,t]}},Rs=(e,t)=>{let n=Ss(e);return{name:n.name,fn:n.fn,options:[e,t]}},zs=(e,t)=>{let n=Ms(e);return{name:n.name,fn:n.fn,options:[e,t]}},Bs=Object.defineProperty,Vs=(e,t)=>Bs(e,`name`,{value:t,configurable:!0}),Hs={Partial:`partial`,Always:`always`},Us={Optimized:`optimized`,Always:`always`},Ws=`Popper`,[Gs,Ks]=xt(Ws),[qs,Js]=Gs(Ws),Ys=Vs(e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,U.jsx)(qs,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),Xs=`PopperAnchor`,Zs=v.forwardRef(Vs(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=Js(Xs,n),o=v.useRef(null),s=a.onAnchorChange,c=H(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&ic(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,U.jsx)(W.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),Qs=`PopperContent`,[$s,ec]=Gs(Qs),tc=v.forwardRef(Vs(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=Hs.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=Us.Optimized,onPlaced:m,...h}=e,g=Js(Qs,n),[_,y]=v.useState(null),b=H(t,y),[x,S]=v.useState(null),C=ua(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(nc),altBoundary:k},{refs:j,floatingStyles:ee,placement:M,isPositioned:N,middlewareData:P}=js({strategy:`fixed`,placement:E,whileElementsMounted:Vs((...e)=>_s(...e,{animationFrame:p===Us.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Ns({mainAxis:i+T,alignmentAxis:o}),c&&Ps({mainAxis:!0,crossAxis:!1,...d===Hs.Partial?{limiter:Fs()}:{},...A}),c&&Is({...A}),Ls({...A,apply:Vs(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&zs({element:x,padding:s}),rc({arrowWidth:w,arrowHeight:T}),f&&Rs(k?{strategy:`referenceHidden`,...A}:{strategy:`referenceHidden`,padding:A.padding,altBoundary:A.altBoundary})]}),F=g.setPlacementState;Ct(()=>(F(M),()=>{F(void 0)}),[M,F]);let[I,L]=ic(M),te=Dn(m);Ct(()=>{N&&te?.()},[N,te]);let ne=P.arrow?.x,re=P.arrow?.y,ie=P.arrow?.centerOffset!==0,[ae,oe]=v.useState();return Ct(()=>{_&&oe(window.getComputedStyle(_).zIndex)},[_]),(0,U.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...ee,transform:N?ee.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ae,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(` `),...P.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)($s,{scope:n,placedSide:I,placedAlign:L,onArrowChange:S,arrowX:ne,arrowY:re,shouldHideArrow:ie,children:(0,U.jsx)(W.div,{"data-side":I,"data-align":L,...h,ref:b,style:{...h.style,animation:N?h.style?.animation:`none`}})})})},`PopperContent`));function nc(e){return e!==null}Vs(nc,`isNotNull`);var rc=Vs(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=ic(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function ic(e){let[t,n=`center`]=e.split(`-`);return[t,n]}Vs(ic,`getSideAndAlignFromPlacement`);var ac=Object.defineProperty,oc=(e,t)=>ac(e,`name`,{value:t,configurable:!0}),sc=!1;function cc(){let[e,t]=v.useState(sc);return v.useEffect(()=>{sc||(sc=!0,t(!0))},[]),e}oc(cc,`useIsHydrated`);var lc=v.useSyncExternalStore;function uc(){return()=>{}}oc(uc,`subscribe`);function dc(){return lc(uc,()=>!0,()=>!1)}oc(dc,`useIsHydratedModern`);var fc=typeof lc==`function`?dc:cc,pc=Object.defineProperty,mc=(e,t)=>pc(e,`name`,{value:t,configurable:!0}),hc=`rovingFocusGroup.onEntryFocus`,gc={bubbles:!1,cancelable:!0},_c=`RovingFocusGroup`,[vc,yc,bc]=Et(_c),[xc,Sc]=xt(_c,[bc]),Cc={Vertical:`vertical`,Horizontal:`horizontal`},wc={LTR:`ltr`,RTL:`rtl`},[Tc,Ec]=xc(_c),Dc=v.forwardRef(mc(function(e,t){return(0,U.jsx)(vc.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(vc.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,U.jsx)(Oc,{...e,ref:t})})})},`RovingFocusGroup`)),Oc=v.forwardRef(mc(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=v.useRef(null),p=H(t,f),m=Cn(a),[h,g]=$t({prop:o,defaultProp:s??null,onChange:c,caller:_c}),[_,y]=v.useState(!1),b=Dn(l),x=yc(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(hc,b),()=>e.removeEventListener(hc,b)},[b]),(0,U.jsx)(Tc,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:v.useCallback(e=>g(e),[g]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:v.useCallback(()=>w(e=>e-1),[]),children:(0,U.jsx)(W.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:G(e.onMouseDown,()=>{S.current=!0}),onFocus:G(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(hc,gc);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);Pc([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:G(e.onBlur,()=>y(!1))})})},`RovingFocusGroupImpl`)),kc=`RovingFocusGroupItem`,Ac=v.forwardRef(mc(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=vn(),l=a||c,u=Ec(kc,n),d=u.currentTabStopId===l,f=yc(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=fc();return Ct(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,U.jsx)(vc.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,U.jsx)(W.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:G(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:G(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:G(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Nc(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Fc(n,r+1):n.slice(r+1)}setTimeout(()=>Pc(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),jc={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Mc(e,t){return t===wc.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}mc(Mc,`getDirectionAwareKey`);function Nc(e,t,n){let r=Mc(e.key,n);if(!(t===Cc.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Cc.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return jc[r]}mc(Nc,`getFocusIntent`);function Pc(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}mc(Pc,`focusFirst`);function Fc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}mc(Fc,`wrapArray`);var Ic=Object.defineProperty,Lc=(e,t)=>Ic(e,`name`,{value:t,configurable:!0}),Rc=[`Enter`,` `],zc=[`ArrowDown`,`PageUp`,`Home`],Bc=[`ArrowUp`,`PageDown`,`End`],Vc=[...zc,...Bc];[...Rc],[...Rc];var Hc=`Menu`,[Uc,Wc,Gc]=Et(Hc),[Kc,qc]=xt(Hc,[Gc,Ks,Sc]),Jc=Ks(),Yc=Sc(),[Xc,Zc]=Kc(Hc),[Qc,$c]=Kc(Hc),el=Lc(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Jc(t),[c,l]=v.useState(null),u=v.useRef(!1),d=Dn(a),f=Cn(i);return v.useEffect(()=>{let e=Lc(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Lc(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),v.useEffect(()=>{if(!n)return;let e=Lc(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,U.jsx)(Ys,{...s,children:(0,U.jsx)(Xc,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,U.jsx)(Qc,{scope:t,onClose:v.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),tl=v.forwardRef(Lc(function(e,t){let{__scopeMenu:n,...r}=e,i=Jc(n);return(0,U.jsx)(Zs,{...i,...r,ref:t})},`MenuAnchor`)),nl=`MenuPortal`,[rl,il]=Kc(nl,{forceMount:void 0}),al=Lc(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Zc(nl,t);return(0,U.jsx)(rl,{scope:t,forceMount:n,children:(0,U.jsx)(cn,{present:n||a.open,children:(0,U.jsx)(ur,{asChild:!0,container:i,children:r})})})},`MenuPortal`),ol=`MenuContent`,[sl,cl]=Kc(ol),ll=v.forwardRef(Lc(function(e,t){let n=il(ol,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Zc(ol,e.__scopeMenu),o=$c(ol,e.__scopeMenu);return(0,U.jsx)(Uc.Provider,{scope:e.__scopeMenu,children:(0,U.jsx)(cn,{present:r||a.open,children:(0,U.jsx)(Uc.Slot,{scope:e.__scopeMenu,children:o.modal?(0,U.jsx)(ul,{...i,ref:t}):(0,U.jsx)(dl,{...i,ref:t})})})})},`MenuContent`)),ul=v.forwardRef(Lc(function(e,t){let n=Zc(ol,e.__scopeMenu),r=v.useRef(null),i=H(t,r);return v.useEffect(()=>{let e=r.current;if(e)return Pi(e)},[]),(0,U.jsx)(pl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),dl=v.forwardRef(Lc(function(e,t){let n=Zc(ol,e.__scopeMenu);return(0,U.jsx)(pl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),fl=Ye(`MenuContent.ScrollLock`),pl=v.forwardRef(Lc(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=Zc(ol,n),_=$c(ol,n),y=Jc(n),b=Yc(n),x=Wc(n),[S,C]=v.useState(null),w=v.useRef(null),[T,E]=v.useState(null);Zn(T);let{nodes:D,registry:O}=Xn(),k=!!(i||m),A=H(t,w,g.onContentChange,E),j=v.useRef(0),ee=v.useRef(``),M=v.useRef(0),N=v.useRef(null),P=v.useRef(`right`),F=v.useRef(0),I=v.useMemo(()=>m?[w,...D.map(e=>({current:e}))]:[],[w,D,m]),L=m?Ti:v.Fragment,te=m?{as:fl,allowPinchZoom:!0,shards:I}:void 0,ne=Lc(e=>{let t=ee.current+e,n=x().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Al(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){ee.current=e,window.clearTimeout(j.current),e!==``&&(j.current=window.setTimeout(()=>s(``),1e3))}Lc(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);v.useEffect(()=>()=>window.clearTimeout(j.current),[]),gr();let re=v.useCallback(e=>P.current===N.current?.side&&Ml(e,N.current?.area),[]);return(0,U.jsx)(sl,{scope:n,searchRef:ee,onItemEnter:v.useCallback(e=>{re(e)&&e.preventDefault()},[re]),onItemLeave:v.useCallback(e=>{re(e)||(w.current?.focus(),C(null))},[re]),onTriggerLeave:v.useCallback(e=>{re(e)&&e.preventDefault()},[re]),pointerGraceTimerRef:M,onPointerGraceIntentChange:v.useCallback(e=>{N.current=e},[]),children:(0,U.jsx)(Yn,{registry:k?O:null,children:(0,U.jsx)(L,{...te,children:(0,U.jsx)(qn,{asChild:!0,trapped:i,branches:D,onMountAutoFocus:G(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,U.jsx)(Fn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,U.jsx)(Dc,{asChild:!0,...b,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:G(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,U.jsx)(tc,{role:`menu`,"aria-orientation":`vertical`,"data-state":Tl(g.open),"data-radix-menu-content":``,dir:_.dir,...y,...h,ref:A,style:{outline:`none`,...h.style},onKeyDown:G(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ne(e.key));let i=w.current;if(e.target!==i||!Vc.includes(e.key))return;e.preventDefault();let a=x().filter(e=>!e.disabled).map(e=>e.ref.current);Bc.includes(e.key)&&a.reverse(),Ol(a)}),onBlur:G(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),ee.current=``)}),onPointerMove:G(e.onPointerMove,Nl(e=>{let t=e.target,n=F.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>F.current?`right`:`left`;P.current=t,F.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),ml=`MenuItem`,hl=`menu.itemSelect`,gl=v.forwardRef(Lc(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=v.useRef(null),o=$c(ml,e.__scopeMenu),s=cl(ml,e.__scopeMenu),c=H(t,a),l=v.useRef(!1),u=Lc(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(hl,{bubbles:!0,cancelable:!0});e.addEventListener(hl,e=>r?.(e),{once:!0}),gt(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,U.jsx)(_l,{...i,ref:c,disabled:n,onClick:G(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:G(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:G(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&Rc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),_l=v.forwardRef(Lc(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=cl(ml,n),s=Yc(n),c=v.useRef(null),l=H(t,c),[u,d]=v.useState(!1),[f,p]=v.useState(``);return v.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,U.jsx)(Uc.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,U.jsx)(Ac,{asChild:!0,...s,focusable:!r,children:(0,U.jsx)(W.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:G(e.onPointerMove,Nl(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,Nl(e=>o.onItemLeave(e))),onFocus:G(e.onFocus,()=>d(!0)),onBlur:G(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[vl,yl]=Kc(`MenuRadioGroup`,{value:void 0,onValueChange:Lc(()=>{},`onValueChange`)}),[bl,xl]=Kc(`MenuItemIndicator`,{checked:!1}),Sl=v.forwardRef(Lc(function(e,t){let{__scopeMenu:n,...r}=e;return(0,U.jsx)(W.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[Cl,wl]=Kc(`MenuSub`);function Tl(e){return e?`open`:`closed`}Lc(Tl,`getOpenState`);function El(e){return e===`indeterminate`}Lc(El,`isIndeterminate`);function Dl(e){return El(e)?`indeterminate`:e?`checked`:`unchecked`}Lc(Dl,`getCheckedState`);function Ol(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Lc(Ol,`focusFirst`);function kl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Lc(kl,`wrapArray`);function Al(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=kl(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Lc(Al,`getNextMatch`);function jl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Lc(jl,`isPointInPolygon`);function Ml(e,t){return t?jl({x:e.clientX,y:e.clientY},t):!1}Lc(Ml,`isPointerInGraceArea`);function Nl(e){return t=>t.pointerType===`mouse`?e(t):void 0}Lc(Nl,`whenMouse`);var Pl=Object.defineProperty,Fl=(e,t)=>Pl(e,`name`,{value:t,configurable:!0}),Il=`DropdownMenu`,[Ll,Rl]=xt(Il,[qc]),zl=qc(),[Bl,Vl]=Ll(Il),Hl=Fl(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=zl(t),l=v.useRef(null),[u,d]=$t({prop:i,defaultProp:a??!1,onChange:o,caller:Il});return(0,U.jsx)(Bl,{scope:t,triggerId:vn(),triggerRef:l,contentId:vn(),open:u,onOpenChange:d,onOpenToggle:v.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,U.jsx)(el,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Ul=`DropdownMenuTrigger`,Wl=v.forwardRef(Fl(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Vl(Ul,n),o=zl(n),s=H(t,a.triggerRef);return(0,U.jsx)(tl,{asChild:!0,...o,children:(0,U.jsx)(W.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:G(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:G(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),Gl=Fl(e=>{let{__scopeDropdownMenu:t,...n}=e,r=zl(t);return(0,U.jsx)(al,{...r,...n})},`DropdownMenuPortal`),Kl=`DropdownMenuContent`,ql=v.forwardRef(Fl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Vl(Kl,n),a=zl(n),o=v.useRef(!1);return(0,U.jsx)(ll,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:G(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),Jl=v.forwardRef(Fl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=zl(n);return(0,U.jsx)(gl,{...i,...r,ref:t})},`DropdownMenuItem`)),Yl=v.forwardRef(Fl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=zl(n);return(0,U.jsx)(Sl,{...i,...r,ref:t})},`DropdownMenuSeparator`)),Xl=Object.defineProperty,Zl=v.forwardRef(((e,t)=>Xl(e,`name`,{value:t,configurable:!0}))(function(e,t){return(0,U.jsx)(W.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})},`Label`)),Ql=Object.defineProperty,$l=(e,t)=>Ql(e,`name`,{value:t,configurable:!0});function eu(e,[t,n]){return Math.min(n,Math.max(t,e))}$l(eu,`clamp`);var tu=Object.defineProperty,q=(e,t)=>tu(e,`name`,{value:t,configurable:!0});function nu(e,t){return v.useReducer((e,n)=>t[e][n]??e,e)}q(nu,`useStateMachine`);var ru={Auto:`auto`,Always:`always`,Scroll:`scroll`,Hover:`hover`},iu={Vertical:`vertical`,Horizontal:`horizontal`},au={LTR:`ltr`,RTL:`rtl`},ou=`ScrollArea`,[su,cu]=xt(ou),[lu,uu]=su(ou),du=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,type:r=ru.Hover,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=v.useState(null),[l,u]=v.useState(null),[d,f]=v.useState(null),[p,m]=v.useState(null),[h,g]=v.useState(null),[_,y]=v.useState(0),[b,x]=v.useState(0),[S,C]=v.useState(!1),[w,T]=v.useState(!1),E=H(t,c),D=Cn(i);return(0,U.jsx)(lu,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:x,children:(0,U.jsx)(W.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":b+`px`,...e.style}})})},`ScrollArea`)),fu=`ScrollAreaViewport`,pu=Qe(fu),mu=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,children:r,nonce:i,disableImplicitContentElement:a,...o}=e,s=uu(fu,n),c=H(t,v.useRef(null),s.onViewportChange),l=v.isValidElement(r);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(hu,{nonce:i}),(0,U.jsx)(W.div,{"data-radix-scroll-area-viewport":``,...o,ref:c,style:{overflowX:s.scrollbarXEnabled?`scroll`:`hidden`,overflowY:s.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:a?r:l?(0,U.jsx)(pu,{child:r,children:e=>(0,U.jsx)(_u,{__scopeScrollArea:n,children:e})}):(0,U.jsx)(pu,{children:(0,U.jsx)(_u,{__scopeScrollArea:n,children:r})})})]})},`ScrollAreaViewport`)),hu=v.memo(q(function({nonce:e}){return(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:e})},`ScrollAreaViewportStyle`),(e,t)=>e.nonce===t.nonce),gu=`ScrollAreaContent`,_u=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,children:r,...i}=e,a=H(t,uu(gu,n).onContentChange);return(0,U.jsx)(W.div,{...i,ref:a,style:{minWidth:`100%`,display:`table`,...e.style},children:r})},`ScrollAreaContent`)),vu=`ScrollAreaScrollbar`,yu=v.forwardRef(q(function(e,t){let{forceMount:n,...r}=e,i=uu(vu,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===iu.Horizontal;return v.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===ru.Hover?(0,U.jsx)(bu,{...r,ref:t,forceMount:n}):i.type===ru.Scroll?(0,U.jsx)(xu,{...r,ref:t,forceMount:n}):i.type===ru.Auto?(0,U.jsx)(Su,{...r,ref:t,forceMount:n}):i.type===ru.Always?(0,U.jsx)(Cu,{...r,ref:t,"data-state":`visible`}):null},`ScrollAreaScrollbar`)),bu=v.forwardRef(q(function(e,t){let{forceMount:n,...r}=e,i=uu(vu,e.__scopeScrollArea),[a,o]=v.useState(!1);return v.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=q(()=>{window.clearTimeout(t),o(!0)},`handlePointerEnter`),r=q(()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)},`handlePointerLeave`);return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,U.jsx)(cn,{present:n||a,children:(0,U.jsx)(Su,{"data-state":a?`visible`:`hidden`,...r,ref:t})})},`ScrollAreaScrollbarHover`)),xu=v.forwardRef(q(function(e,t){let{forceMount:n,...r}=e,i=uu(vu,e.__scopeScrollArea),a=e.orientation===iu.Horizontal,o=Uu(()=>c(`SCROLL_END`),100),[s,c]=nu(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return v.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),v.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=q(()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r},`handleScroll`);return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,U.jsx)(cn,{present:n||s!==`hidden`,children:(0,U.jsx)(Cu,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:G(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:G(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})},`ScrollAreaScrollbarScroll`)),Su=v.forwardRef(q(function(e,t){let n=uu(vu,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=v.useState(!1),s=e.orientation===iu.Horizontal,c=Uu(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return Wu(n.viewport,c),Wu(n.content,c),(0,U.jsx)(cn,{present:r||a,children:(0,U.jsx)(Cu,{"data-state":a?`visible`:`hidden`,...i,ref:t})})},`ScrollAreaScrollbarAuto`)),Cu=v.forwardRef(q(function(e,t){let{orientation:n=iu.Vertical,...r}=e,i=uu(vu,e.__scopeScrollArea),a=v.useRef(null),o=v.useRef(0),[s,c]=v.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Iu(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:q(e=>a.current=e,`onThumbChange`),onThumbPointerUp:q(()=>o.current=0,`onThumbPointerUp`),onThumbPointerDown:q(e=>o.current=e,`onThumbPointerDown`)};function d(e,t){return Ru(e,o.current,s,t)}return q(d,`getScrollPosition`),n===iu.Horizontal?(0,U.jsx)(wu,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=zu(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===iu.Vertical?(0,U.jsx)(Tu,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=zu(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null},`ScrollAreaScrollbarVisible`)),wu=v.forwardRef(q(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=uu(vu,e.__scopeScrollArea),[o,s]=v.useState(),c=v.useRef(null),l=H(t,c,a.onScrollbarXChange);return v.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(Ou,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===au.RTL?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===au.LTR?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":Lu(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Vu(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Fu(o.paddingLeft),paddingEnd:Fu(o.paddingRight)}})}})},`ScrollAreaScrollbarX`)),Tu=v.forwardRef(q(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=uu(vu,e.__scopeScrollArea),[o,s]=v.useState(),c=v.useRef(null),l=H(t,c,a.onScrollbarYChange);return v.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,U.jsx)(Ou,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===au.LTR?0:void 0,left:a.dir===au.RTL?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":Lu(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Vu(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Fu(o.paddingTop),paddingEnd:Fu(o.paddingBottom)}})}})},`ScrollAreaScrollbarY`)),[Eu,Du]=su(vu),Ou=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=uu(vu,n),[m,h]=v.useState(null),g=H(t,h),_=v.useRef(null),y=v.useRef(``),b=p.viewport,x=r.content-r.viewport,S=Dn(u),C=Dn(c),w=Uu(d,10);function T(e){if(_.current){let t=e.clientX-_.current.left,n=e.clientY-_.current.top;l({x:t,y:n})}}return q(T,`handleDragScroll`),v.useEffect(()=>{let e=q(e=>{let t=e.target;m?.contains(t)&&S(e,x)},`handleWheel`);return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[b,m,x,S]),v.useEffect(C,[r,C]),Wu(m,w),Wu(p.content,w),(0,U.jsx)(Eu,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Dn(a),onThumbPointerUp:Dn(o),onThumbPositionChange:C,onThumbPointerDown:Dn(s),children:(0,U.jsx)(W.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:G(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:G(e.onPointerMove,T),onPointerUp:G(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})},`ScrollAreaScrollbarImpl`)),ku=`ScrollAreaThumb`,Au=v.forwardRef(q(function(e,t){let{forceMount:n,...r}=e,i=Du(ku,e.__scopeScrollArea);return(0,U.jsx)(cn,{present:n||i.hasThumb,children:(0,U.jsx)(ju,{ref:t,...r})})},`ScrollAreaThumb`)),ju=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,style:r,...i}=e,a=uu(ku,n),o=Du(ku,n),{onThumbPositionChange:s}=o,c=H(t,o.onThumbChange),l=v.useRef(void 0),u=Uu(()=>{l.current&&=(l.current(),void 0)},100);return v.useEffect(()=>{let e=a.viewport;if(e){let t=q(()=>{if(u(),!l.current){let t=Hu(e,s);l.current=t,s()}},`handleScroll`);return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,U.jsx)(W.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:G(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:G(e.onPointerUp,o.onThumbPointerUp)})},`ScrollAreaThumbImpl`)),Mu=`ScrollAreaCorner`,Nu=v.forwardRef(q(function(e,t){let n=uu(Mu,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==ru.Scroll&&r?(0,U.jsx)(Pu,{...e,ref:t}):null},`ScrollAreaCorner`)),Pu=v.forwardRef(q(function(e,t){let{__scopeScrollArea:n,...r}=e,i=uu(Mu,n),[a,o]=v.useState(0),[s,c]=v.useState(0),l=!!(a&&s),{onCornerWidthChange:u,onCornerHeightChange:d}=i;return Wu(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),Wu(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),v.useEffect(()=>()=>{u(0),d(0)},[u,d]),l?(0,U.jsx)(W.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===au.LTR?0:void 0,left:i.dir===au.RTL?0:void 0,bottom:0,...e.style}}):null},`ScrollAreaCornerImpl`));function Fu(e){return e?parseInt(e,10):0}q(Fu,`toInt`);function Iu(e,t){let n=e/t;return isNaN(n)?0:n}q(Iu,`getThumbRatio`);function Lu(e){let t=Iu(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}q(Lu,`getThumbSize`);function Ru(e,t,n,r=au.LTR){let i=Lu(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===au.LTR?[0,u]:[u*-1,0];return Bu([c,l],d)(e)}q(Ru,`getScrollPositionFromPointer`);function zu(e,t,n=au.LTR){let r=Lu(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=eu(e,n===au.LTR?[0,o]:[o*-1,0]);return Bu([0,o],[0,s])(c)}q(zu,`getThumbOffsetFromScroll`);function Bu(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}q(Bu,`linearScale`);function Vu(e,t){return e>0&&e<t}q(Vu,`isScrollingWithinScrollbarBounds`);var Hu=q((e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}return q(i,`loop`),i(),()=>window.cancelAnimationFrame(r)},`addUnlinkedScrollListener`);function Uu(e,t){let n=Dn(e),r=v.useRef(0);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),v.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}q(Uu,`useDebounceCallback`);function Wu(e,t){let n=Dn(t);Ct(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}q(Wu,`useResizeObserver`);var Gu=Object.defineProperty,Ku=(e,t)=>Gu(e,`name`,{value:t,configurable:!0}),qu={ItemAligned:`item-aligned`,Popper:`popper`},Ju={LTR:`ltr`,RTL:`rtl`},Yu=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Xu=[` `,`Enter`],Zu=`Select`,[Qu,$u,ed]=Et(Zu),[td,nd]=xt(Zu,[ed,Ks]),rd=Ks(),[id,ad]=td(Zu),[od,sd]=td(Zu);function cd(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=rd(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=Cn(l),[T,E]=$t({prop:r,defaultProp:i??!1,onChange:a,caller:Zu}),[D,O]=$t({prop:o,defaultProp:s,onChange:c,caller:Zu}),k=v.useRef(null),A=v.useRef(!1),[j,ee]=v.useState(null),M=Ku(e=>{ee({value:e,hasConsumerStoppedPropagation:A.current}),O(e)},`handleUserSelect`),N=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Ku(()=>O(N.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let P=!_||!!m||!!_.closest(`form`),[F,I]=v.useState(new Set),L=vn(),te=Array.from(F).map(e=>e.props.value).join(`;`),ne=v.useCallback(e=>{I(t=>new Set(t).add(e))},[]),re=v.useCallback(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),ie={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:L,value:D,onValueChange:O,hasConsumerStoppedPropagationRef:A,userSelection:j,onUserSelect:M,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:F,nativeSelectKey:te,isFormControl:P};return(0,U.jsx)(Ys,{...g,children:(0,U.jsx)(id,{scope:t,...ie,children:(0,U.jsx)(Qu.Provider,{scope:t,children:(0,U.jsx)(od,{scope:t,onNativeOptionAdd:ne,onNativeOptionRemove:re,children:Yd(h)?h(ie):n})})})})}Ku(cd,`SelectProvider`);var ld=Ku(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,U.jsx)(cd,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,U.jsxs)(U.Fragment,{children:[n,e?(0,U.jsx)(Jd,{__scopeSelect:t}):null]})})},`Select`),ud=`SelectTrigger`,dd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=rd(n),o=ad(ud,n),s=o.disabled||r,c=H(t,o.onTriggerChange),l=$u(n),u=v.useRef(`touch`),[d,f,p]=Zd(e=>{let t=l().filter(e=>!e.disabled),n=Qd(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=Ku(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,U.jsx)(Zs,{asChild:!0,...a,children:(0,U.jsx)(W.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Xd(o.value)?``:void 0,...i,ref:c,onClick:G(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:G(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:G(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),!(t&&e.key===` `)&&Yu.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),fd=`SelectValue`,pd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=ad(fd,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=H(t,c.onValueNodeChange);Ct(()=>{l(u)},[l,u]);let f=Xd(c.value);return(0,U.jsx)(W.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,U.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),md=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,U.jsx)(W.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[hd,gd]=td(`SelectPortal`,{forceMount:void 0}),_d=Ku(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,U.jsx)(hd,{scope:e.__scopeSelect,forceMount:n,children:(0,U.jsx)(ur,{asChild:!0,...r})})},`SelectPortal`),vd=`SelectContent`,yd=v.forwardRef(Ku(function(e,t){let n=gd(vd,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=ad(vd,e.__scopeSelect),[o,s]=v.useState();return Ct(()=>{s(new DocumentFragment)},[]),(0,U.jsx)(cn,{present:r||a.open,children:({present:e})=>e?(0,U.jsx)(Td,{...i,ref:t}):(0,U.jsx)(bd,{...i,fragment:o})})},`SelectContent`)),bd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?pt.createPortal((0,U.jsx)(Sd,{scope:n,children:(0,U.jsx)(Qu.Slot,{scope:n,children:(0,U.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),xd=10,[Sd,Cd]=td(vd),wd=Ye(`SelectContent.RemoveScroll`),Td=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n}=e,{position:r=qu.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=ad(vd,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=H(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),k=$u(n),[A,j]=v.useState(!1),ee=v.useRef(!1),M=v.useRef(!1),N=v.useRef(!1);v.useEffect(()=>{if(b)return Pi(b)},[b]),gr();let P=v.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),F=v.useCallback(()=>P([T,b]),[P,T,b]);v.useEffect(()=>{A&&F()},[A,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=Ku(t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},`handlePointerMove`),n=Ku(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null},`handlePointerUp`);return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,I,L]),v.useEffect(()=>{let e=Ku(()=>I(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[te,ne]=Zd(e=>{let t=k().filter(e=>!e.disabled),n=Qd(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=v.useCallback((e,t,n)=>{let r=!M.current;r&&(M.current=!0);let i=!ee.current&&!n;y.value!==void 0&&y.value===t||i?(E(e),i&&(ee.current=!0)):r&&E(e)},[y.value]),ie=v.useCallback(()=>b?.focus(),[b]),ae=v.useCallback((e,t,n)=>{if(!e)return;let r=!N.current;r&&(N.current=!0);let i=!ee.current&&!n;(y.value!==void 0&&y.value===t||i||r)&&O(e)},[y.value]),oe=r===qu.Popper?Dd:Ed,se=oe===Dd?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,U.jsx)(Sd,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:re,selectedItem:T,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:F,selectedItemText:D,position:r,isPositioned:A,searchRef:te,children:(0,U.jsx)(Ti,{as:wd,allowPinchZoom:!0,children:(0,U.jsx)(qn,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:G(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,U.jsx)(Fn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,U.jsx)(oe,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...se,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:G(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),Ed=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=ad(vd,n),o=Cd(vd,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=H(t,u),f=$u(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==Ju.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xd,d=eu(a,[xd,Math.max(xd,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-xd,d=eu(a,[xd,Math.max(xd,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-xd*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-xd,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${xd}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Ct(()=>b(),[b]);let[x,S]=v.useState();Ct(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]);return(0,U.jsx)(Od,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,U.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,U.jsx)(W.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),Dd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=xd,...a}=e,o=rd(n);return(0,U.jsx)(tc,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[Od,kd]=td(vd,{}),Ad=`SelectViewport`,jd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=Cd(Ad,n),o=kd(Ad,n),s=H(t,a.onViewportChange),c=v.useRef(0);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,U.jsx)(Qu.Slot,{scope:n,children:(0,U.jsx)(W.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:G(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-xd*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Md,Nd]=td(`SelectGroup`),Pd=`SelectItem`,[Fd,Id]=td(Pd),Ld=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=ad(Pd,n),c=Cd(Pd,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=H(t,Dn(e=>c.itemRefCallback?.(e,r,i))),h=vn(),g=v.useRef(`touch`);function _(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return Ku(_,`handleSelect`),(0,U.jsx)(Fd,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,U.jsx)(Qu.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,U.jsx)(W.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:G(o.onFocus,()=>p(!0)),onBlur:G(o.onBlur,()=>p(!1)),onClick:G(o.onClick,e=>{i||g.current!==`mouse`&&_(e)}),onPointerUp:G(o.onPointerUp,e=>{i||g.current===`mouse`&&_(e)}),onPointerDown:G(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:G(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:G(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:G(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Xu.includes(e.key)&&_(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),Rd=`SelectItemText`,zd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=ad(Rd,n),s=Cd(Rd,n),c=Id(Rd,n),l=sd(Rd,n),[u,d]=v.useState(null),f=Dn(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=H(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,U.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Ct(()=>(g(h),()=>_(h)),[g,_,h]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(W.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Xd(o.value)?pt.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),Bd=`SelectItemIndicator`,Vd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,...r}=e;return Id(Bd,n).isSelected?(0,U.jsx)(W.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Hd=`SelectScrollUpButton`,Ud=v.forwardRef(Ku(function(e,t){let n=Cd(Hd,e.__scopeSelect),r=kd(Hd,e.__scopeSelect),[i,a]=v.useState(!1),o=H(t,r.onScrollButtonChange);return Ct(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Ku(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(Kd,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Wd=`SelectScrollDownButton`,Gd=v.forwardRef(Ku(function(e,t){let n=Cd(Wd,e.__scopeSelect),r=kd(Wd,e.__scopeSelect),[i,a]=v.useState(!1),o=H(t,r.onScrollButtonChange);return Ct(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Ku(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,U.jsx)(Kd,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Kd=v.forwardRef(Ku(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Cd(`SelectScrollButton`,n),o=v.useRef(null),s=$u(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Ct(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,U.jsx)(W.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:G(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:G(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:G(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),qd=`SelectBubbleInput`,Jd=v.forwardRef(Ku(function({__scopeSelect:e,...t},n){let r=ad(qd,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=v.useRef(null),h=H(n,m),g=i??``,_=v.useRef(g),y=v.useRef(d),b=v.useRef(!1),x=Array.from(f).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==y.current;y.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){b.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{b.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,U.jsxs)(W.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{b.current||a(e.target.value)},...t,style:{..._t,...t.style},ref:h,defaultValue:g,children:[Xd(i)&&!x?(0,U.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function Yd(e){return typeof e==`function`}Ku(Yd,`isFunction`);function Xd(e){return e===``||e===void 0}Ku(Xd,`shouldShowPlaceholder`);function Zd(e){let t=Dn(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}Ku(a,`updateSearch`),a(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Ku(Zd,`useTypeaheadSearch`);function Qd(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=$d(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Ku(Qd,`findNextItem`);function $d(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Ku($d,`wrapArray`);var ef=Object.defineProperty,tf=(e,t)=>ef(e,`name`,{value:t,configurable:!0}),nf={Horizontal:`horizontal`,Vertical:`vertical`},rf=nf.Horizontal,af=Object.values(nf),of=v.forwardRef(tf(function(e,t){let{decorative:n,orientation:r=rf,...i}=e,a=sf(r)?r:rf,o=a===nf.Vertical?a:void 0,s=n?{role:`none`}:{"aria-orientation":o,role:`separator`};return(0,U.jsx)(W.div,{"data-orientation":a,...s,...i,ref:t})},`Separator`));function sf(e){return af.includes(e)}tf(sf,`isValidOrientation`);var cf=Object.defineProperty,lf=(e,t)=>cf(e,`name`,{value:t,configurable:!0}),uf=`Switch`,[df,ff]=xt(uf),[pf,mf]=df(uf);function hf(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=$t({prop:n,defaultProp:i??!1,onChange:c,caller:uf}),[m,h]=v.useState(null),[g,_]=v.useState(null),[y,b]=v.useState(null),x={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,userClick:y,onUserClick:b,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,U.jsx)(pf,{scope:t,...x,children:Cf(d)?d(x):r})}lf(hf,`SwitchProvider`);var gf=`SwitchTrigger`,_f=v.forwardRef(lf(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=mf(gf,e),h=H(r,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=lf(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,U.jsx)(W.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":wf(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:G(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),m&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),vf=v.forwardRef(lf(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,U.jsx)(hf,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_f,{...d,ref:t,__scopeSwitch:n}),e&&(0,U.jsx)(Sf,{__scopeSwitch:n})]})})},`Switch`)),yf=`SwitchThumb`,bf=v.forwardRef(lf(function(e,t){let{__scopeSwitch:n,...r}=e,i=mf(yf,n);return(0,U.jsx)(W.span,{"data-state":wf(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),xf=`SwitchBubbleInput`,Sf=v.forwardRef(lf(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=mf(xf,e),h=H(r,m),g=ua(i),_=v.useRef(!1),y=v.useRef(o),b=v.useRef(a),x=v.useRef(null);v.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=y.current!==o;y.current=o;let i=a!==null&&a!==b.current;if(b.current=a,i)x.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=x.current;x.current=null;let r=t?.requestedChecked===o;_.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let S=v.useRef(o);return(0,U.jsx)(W.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??S.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:G(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function Cf(e){return typeof e==`function`}lf(Cf,`isFunction`);function wf(e){return e?`checked`:`unchecked`}lf(wf,`getState`);var Tf=Object.defineProperty,Ef=(e,t)=>Tf(e,`name`,{value:t,configurable:!0}),Df={Automatic:`automatic`,Manual:`manual`},Of=`Tabs`,[kf,Af]=xt(Of,[Sc]),jf=Sc(),[Mf,Nf]=kf(Of),Pf=v.forwardRef(Ef(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=Df.Automatic,...l}=e,u=Cn(s),[d,f]=$t({prop:r,onChange:i,defaultProp:a??``,caller:Of});return(0,U.jsx)(Mf,{scope:n,baseId:vn(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,U.jsx)(W.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),Ff=`TabsList`,If=v.forwardRef(Ef(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=Nf(Ff,n),o=jf(n);return(0,U.jsx)(Dc,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,U.jsx)(W.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),Lf=`TabsTrigger`,Rf=v.forwardRef(Ef(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Nf(Lf,n),s=jf(n),c=Vf(o.baseId,r),l=Hf(o.baseId,r),u=r===o.value;return(0,U.jsx)(Ac,{asChild:!0,...s,focusable:!i,active:u,children:(0,U.jsx)(W.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:G(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:G(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:G(e.onFocus,()=>{let e=o.activationMode!==Df.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),zf=`TabsContent`,Bf=v.forwardRef(Ef(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Nf(zf,n),c=Vf(s.baseId,r),l=Hf(s.baseId,r),u=r===s.value,d=v.useRef(u);return v.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,U.jsx)(cn,{present:i||u,children:({present:n})=>(0,U.jsx)(W.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function Vf(e,t){return`${e}-trigger-${t}`}Ef(Vf,`makeTriggerId`);function Hf(e,t){return`${e}-content-${t}`}Ef(Hf,`makeContentId`);var Uf=He(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function J({className:e,variant:t=`default`,asChild:n=!1,...r}){let i=n?Xe:`span`;return(0,U.jsx)(i,{"data-slot":`badge`,"data-variant":t,className:B(Uf({variant:t}),e),...r})}var Wf=He(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Y({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Xe:`button`;return(0,U.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:B(Wf({variant:t,size:n,className:e})),...i})}function Gf({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`card`,className:B(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function Kf({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`card-header`,className:B(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function qf({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`card-title`,className:B(`leading-none font-semibold`,e),...t})}function Jf({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`card-content`,className:B(`px-6`,e),...t})}function Yf({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`card-footer`,className:B(`flex items-center px-6 [.border-t]:pt-6`,e),...t})}var Xf=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Zf(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Xf(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Qf=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},$f=e=>{let t=Qf(e);return t.charAt(0).toUpperCase()+t.slice(1)},ep=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),tp={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function np(e){return e!=null}function rp(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??tp.width,a=e.size??e.height??tp.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?ep(...c):ep(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??tp[`stroke-width`])*Number(e.size??e.width??tp.width)/Number(t.size??t.width??tp.width):t.strokeWidth??tp[`stroke-width`];return[`svg`,{...Object.entries(tp).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&np(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&np(t.width)&&{[r(`width`)]:t.width},...`height`in t&&np(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ip(e,t={}){return rp(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ap=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},op=(0,v.createContext)({}),sp=()=>(0,v.useContext)(op),cp=(0,v.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:y=``}=sp()??{},b=!!c||ap(d),[x,S,C=[]]=ip(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:ep(y,s),hasA11yProp:b,attributes:d});return(0,v.createElement)(x,{ref:f,...S},[...C.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function X(e,t=[],n=[]){let r=typeof e==`string`?Zf(e,t,n):e,i=(0,v.forwardRef)(({className:e,...t},n)=>(0,v.createElement)(cp,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=$f(r.name)),i}var lp={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};lp.node;var up=X(lp),dp={name:`align-end-vertical`,size:24,node:[[`rect`,{width:`16`,height:`6`,x:`2`,y:`4`,rx:`2`,key:`10wcwx`}],[`rect`,{width:`9`,height:`6`,x:`9`,y:`14`,rx:`2`,key:`4p5bwg`}],[`path`,{d:`M22 22V2`,key:`12ipfv`}]]};dp.node;var fp=X(dp),pp={name:`align-start-vertical`,size:24,node:[[`rect`,{width:`9`,height:`6`,x:`6`,y:`14`,rx:`2`,key:`lpm2y7`}],[`rect`,{width:`16`,height:`6`,x:`6`,y:`4`,rx:`2`,key:`rdj6ps`}],[`path`,{d:`M2 2v20`,key:`1ivd8o`}]]};pp.node;var mp=X(pp),hp={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};hp.node;var gp=X(hp),_p={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};_p.node;var vp=X(_p),yp={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};yp.node;var bp=X(yp),xp={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};xp.node;var Sp=X(xp),Cp={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Cp.node;var wp=X(Cp),Tp={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};Tp.node;var Ep=X(Tp),Dp={name:`chart-line`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`m19 9-5 5-4-4-3 3`,key:`2osh9i`}]],aliases:[`line-chart`]};Dp.node;var Op=X(Dp),kp={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};kp.node;var Ap=X(kp),jp={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};jp.node;var Mp=X(jp),Np={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};Np.node;var Pp=X(Np),Fp={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Fp.node;var Ip=X(Fp),Lp={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};Lp.node;var Rp=X(Lp),zp={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};zp.node;var Bp=X(zp),Vp={name:`clipboard-list`,size:24,node:[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};Vp.node;var Hp=X(Vp),Up={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};Up.node;var Wp=X(Up),Gp={name:`cloud-off`,size:24,node:[[`path`,{d:`M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057`,key:`1uxyv8`}],[`path`,{d:`M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78`,key:`99tcn7`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Gp.node;var Kp=X(Gp),qp={name:`cloud-upload`,size:24,node:[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]],aliases:[`upload-cloud`]};qp.node;var Jp=X(qp),Yp={name:`copy`,size:24,node:[[`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`}]]};Yp.node;var Xp=X(Yp),Zp={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};Zp.node;var Qp=X(Zp),$p={name:`crosshair`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`22`,x2:`18`,y1:`12`,y2:`12`,key:`l9bcsi`}],[`line`,{x1:`6`,x2:`2`,y1:`12`,y2:`12`,key:`13hhkx`}],[`line`,{x1:`12`,x2:`12`,y1:`6`,y2:`2`,key:`10w3f3`}],[`line`,{x1:`12`,x2:`12`,y1:`22`,y2:`18`,key:`15g9kq`}]]};$p.node;var em=X($p),tm={name:`database`,size:24,node:[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]};tm.node;var nm=X(tm),rm={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};rm.node;var im=X(rm),am={name:`ellipsis-vertical`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]],aliases:[`more-vertical`]};am.node;var om=X(am),sm={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};sm.node;var cm=X(sm),lm={name:`factory`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M16 16h.01`,key:`1f9h7w`}],[`path`,{d:`M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z`,key:`1iv0i2`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]};lm.node;var um=X(lm),dm={name:`file-clock`,size:24,node:[[`path`,{d:`M16 22h2a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v2.85`,key:`ryk6xj`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 14v2.2l1.6 1`,key:`6m4bie`}],[`circle`,{cx:`8`,cy:`16`,r:`6`,key:`10v15b`}]]};dm.node;var fm=X(dm),pm={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};pm.node;var mm=X(pm),hm={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};hm.node;var gm=X(hm),_m={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`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`}]]};_m.node;var vm=X(_m),ym={name:`folder`,size:24,node:[[`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`}]]};ym.node;var bm=X(ym),xm={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};xm.node;var Sm=X(xm),Cm={name:`globe`,size:24,node:[[`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`}]]};Cm.node;var wm=X(Cm),Tm={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};Tm.node;var Em=X(Tm),Dm={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};Dm.node;var Om=X(Dm),km={name:`info`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]};km.node;var Am=X(km),jm={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};jm.node;var Mm=X(jm),Nm={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Nm.node;var Pm=X(Nm),Fm={name:`layout-grid`,size:24,node:[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]};Fm.node;var Im=X(Fm),Lm={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};Lm.node;var Rm=X(Lm),zm={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};zm.node;var Bm=X(zm),Vm={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Vm.node;var Hm=X(Vm),Um={name:`lock`,size:24,node:[[`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`}]]};Um.node;var Wm=X(Um),Gm={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};Gm.node;var Km=X(Gm),qm={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};qm.node;var Jm=X(qm),Ym={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};Ym.node;var Xm=X(Ym),Zm={name:`monitor-cog`,size:24,node:[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]};Zm.node;var Qm=X(Zm),$m={name:`monitor`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]};$m.node;var eh=X($m),th={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};th.node;var nh=X(th),rh={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};rh.node;var ih=X(rh),ah={name:`octagon-x`,size:24,node:[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-octagon`]};ah.node;var oh=X(ah),sh={name:`paperclip`,size:24,node:[[`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`}]]};sh.node;var ch=X(sh),lh={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};lh.node;var uh=X(lh),dh={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};dh.node;var fh=X(dh),ph={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};ph.node;var mh=X(ph),hh={name:`puzzle`,size:24,node:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]};hh.node;var gh=X(hh),_h={name:`radar`,size:24,node:[[`path`,{d:`M19.07 4.93A10 10 0 0 0 6.99 3.34`,key:`z3du51`}],[`path`,{d:`M4 6h.01`,key:`oypzma`}],[`path`,{d:`M2.29 9.62A10 10 0 1 0 21.31 8.35`,key:`qzzz0`}],[`path`,{d:`M16.24 7.76A6 6 0 1 0 8.23 16.67`,key:`1yjesh`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M17.99 11.66A6 6 0 0 1 15.77 16.67`,key:`1u2y91`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`m13.41 10.59 5.66-5.66`,key:`mhq4k0`}]]};_h.node;var vh=X(_h),yh={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};yh.node;var bh=X(yh),xh={name:`rocket`,size:24,node:[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]};xh.node;var Sh=X(xh),Ch={name:`rotate-ccw-clock`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]],aliases:[`history`]};Ch.node;var wh=X(Ch),Th={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Th.node;var Eh=X(Th),Dh={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Dh.node;var Oh=X(Dh),kh={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};kh.node;var Ah=X(kh),jh={name:`server`,size:24,node:[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]};jh.node;var Mh=X(jh),Nh={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};Nh.node;var Ph=X(Nh),Fh={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};Fh.node;var Ih=X(Fh),Lh={name:`shield-alert`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]};Lh.node;var Rh=X(Lh),zh={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};zh.node;var Bh=X(zh),Vh={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};Vh.node;var Hh=X(Vh),Uh={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Uh.node;var Wh=X(Uh),Gh={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};Gh.node;var Kh=X(Gh),qh={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};qh.node;var Jh=X(qh),Yh={name:`stretch-horizontal`,size:24,node:[[`rect`,{width:`20`,height:`6`,x:`2`,y:`4`,rx:`2`,key:`qdearl`}],[`rect`,{width:`20`,height:`6`,x:`2`,y:`14`,rx:`2`,key:`1xrn6j`}]]};Yh.node;var Xh=X(Yh),Zh={name:`stretch-vertical`,size:24,node:[[`rect`,{width:`6`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`19qu7m`}],[`rect`,{width:`6`,height:`20`,x:`14`,y:`2`,rx:`2`,key:`24v0nk`}]]};Zh.node;var Qh=X(Zh),$h={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};$h.node;var eg=X($h),tg={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};tg.node;var ng=X(tg),rg={name:`trending-up`,size:24,node:[[`path`,{d:`M16 7h6v6`,key:`box55l`}],[`path`,{d:`m22 7-8.5 8.5-5-5L2 17`,key:`1t1m79`}]]};rg.node;var ig=X(rg),ag={name:`triangle-alert`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`]};ag.node;var og=X(ag),sg={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};sg.node;var cg=X(sg),lg={name:`wifi`,size:24,node:[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]};lg.node;var ug=X(lg),dg={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};dg.node;var fg=X(dg),pg={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};pg.node;var mg=X(pg);function hg({className:e,...t}){return(0,U.jsx)(xa,{"data-slot":`checkbox`,className:B(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,U.jsx)(Ca,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,U.jsx)(Ap,{className:`size-3.5`})})})}function gg({...e}){return(0,U.jsx)(Hi,{"data-slot":`dialog`,...e})}function _g({...e}){return(0,U.jsx)(Ki,{"data-slot":`dialog-portal`,...e})}function vg({className:e,...t}){return(0,U.jsx)(Ji,{"data-slot":`dialog-overlay`,className:B(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function yg({className:e,children:t,showCloseButton:n=!0,...r}){return(0,U.jsxs)(_g,{"data-slot":`dialog-portal`,children:[(0,U.jsx)(vg,{}),(0,U.jsxs)(Qi,{"data-slot":`dialog-content`,className:B(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,U.jsxs)(aa,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,U.jsx)(mg,{}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function bg({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`dialog-header`,className:B(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function xg({className:e,showCloseButton:t=!1,children:n,...r}){return(0,U.jsxs)(`div`,{"data-slot":`dialog-footer`,className:B(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,U.jsx)(aa,{asChild:!0,children:(0,U.jsx)(Y,{variant:`outline`,children:`Close`})})]})}function Sg({className:e,...t}){return(0,U.jsx)(na,{"data-slot":`dialog-title`,className:B(`text-lg leading-none font-semibold`,e),...t})}function Cg({className:e,...t}){return(0,U.jsx)(ra,{"data-slot":`dialog-description`,className:B(`text-sm text-muted-foreground`,e),...t})}function wg({className:e,type:t,...n}){return(0,U.jsx)(`input`,{type:t,"data-slot":`input`,className:B(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function Tg({className:e,...t}){return(0,U.jsx)(Zl,{"data-slot":`label`,className:B(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function Eg({...e}){return(0,U.jsx)(ld,{"data-slot":`select`,...e})}function Dg({...e}){return(0,U.jsx)(pd,{"data-slot":`select-value`,...e})}function Og({className:e,size:t=`default`,children:n,...r}){return(0,U.jsxs)(dd,{"data-slot":`select-trigger`,"data-size":t,className:B(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,U.jsx)(md,{asChild:!0,children:(0,U.jsx)(Mp,{className:`size-4 opacity-50`})})]})}function kg({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,U.jsx)(_d,{children:(0,U.jsxs)(yd,{"data-slot":`select-content`,className:B(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,U.jsx)(jg,{}),(0,U.jsx)(jd,{className:B(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,U.jsx)(Mg,{})]})})}function Ag({className:e,children:t,...n}){return(0,U.jsxs)(Ld,{"data-slot":`select-item`,className:B(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,U.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,U.jsx)(Vd,{children:(0,U.jsx)(Ap,{className:`size-4`})})}),(0,U.jsx)(zd,{children:t})]})}function jg({className:e,...t}){return(0,U.jsx)(Ud,{"data-slot":`select-scroll-up-button`,className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,U.jsx)(Ip,{className:`size-4`})})}function Mg({className:e,...t}){return(0,U.jsx)(Gd,{"data-slot":`select-scroll-down-button`,className:B(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,U.jsx)(Mp,{className:`size-4`})})}function Ng(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Pg=e=>{switch(e){case`success`:return Lg;case`info`:return zg;case`warning`:return Rg;case`error`:return Bg;default:return null}},Fg=Array(12).fill(0),Ig=({visible:e,className:t})=>v.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},v.createElement(`div`,{className:`sonner-spinner`},Fg.map((e,t)=>v.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Lg=v.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},v.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Rg=v.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},v.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),zg=v.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},v.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Bg=v.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},v.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Vg=v.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},v.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),v.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Hg=()=>{let[e,t]=v.useState(document.hidden);return v.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},Ug=1,Wg=100,Gg=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:Ug++,Kg=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-Wg;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=Gg(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],v.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Jg(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!v.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!v.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!v.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!v.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=Gg(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},qg=(e,t)=>Kg.message(e,t),Jg=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Z=Object.assign(qg,{success:Kg.success,info:Kg.info,warning:Kg.warning,error:Kg.error,custom:Kg.custom,message:Kg.message,promise:Kg.promise,dismiss:Kg.dismiss,loading:Kg.loading},{getHistory:()=>Kg.toasts,getToasts:()=>Kg.getActiveToasts()});Ng(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Yg(e){return e.label!==void 0}var Xg=3,Zg=`24px`,Qg=`16px`,$g=4e3,e_=356,t_=14,n_=45,r_=200;function i_(...e){return e.filter(Boolean).join(` `)}function a_(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var o_=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:y=``,duration:b,position:x,gap:S,expandByDefault:C,classNames:w,icons:T,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=v.useState(null),[k,A]=v.useState(null),[j,ee]=v.useState(!1),[M,N]=v.useState(!1),[P,F]=v.useState(!1),[I,L]=v.useState(!1),[te,ne]=v.useState(!1),[re,ie]=v.useState(0),[ae,oe]=v.useState(0),se=v.useRef(n.duration||b||$g),ce=v.useRef(null),le=v.useRef(null),ue=c===0,de=c+1<=o,fe=n.type,R=fe??`default`,z=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,he=v.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ge=v.useMemo(()=>n.closeButton??p,[n.closeButton,p]),_e=v.useMemo(()=>n.duration||b||$g,[n.duration,b]),ve=v.useRef(0),ye=v.useRef(0),be=v.useRef(0),xe=v.useRef(null),[Se,Ce]=x.split(`-`),we=v.useMemo(()=>s.reduce((e,t,n)=>n>=he?e:e+t.height,0),[s,he]),Te=Hg(),Ee=v.useMemo(()=>e.swipeDirections??a_(x),[e.swipeDirections,x]),B=n.invert||t,De=fe===`loading`;ye.current=v.useMemo(()=>he*S+we,[he,we]),v.useEffect(()=>{se.current=_e},[_e]),v.useEffect(()=>{ee(!0)},[]),v.useEffect(()=>{let e=le.current;if(e){let t=e.getBoundingClientRect().height;return oe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),v.useLayoutEffect(()=>{if(!j)return;let e=le.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,oe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let V=v.useCallback(()=>{N(!0),ie(ye.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},r_)},[n,d,a,ye]);v.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Te?(()=>{if(be.current<ve.current){let e=new Date().getTime()-ve.current;se.current-=e}be.current=new Date().getTime()})():se.current!==1/0&&(ve.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),V()},se.current)),()=>clearTimeout(e)},[u,i,n,fe,Te,V]),v.useEffect(()=>{n.delete&&(V(),n.onDismiss==null||n.onDismiss.call(n,n))},[V,n.delete]);function Oe(){return T?.loading?v.createElement(`div`,{className:i_(w?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},T.loading):v.createElement(Ig,{className:i_(w?.loader,n?.classNames?.loader),visible:fe===`loading`})}let ke=n.icon||T?.[fe]||Pg(fe);return v.createElement(`li`,{tabIndex:0,ref:le,className:i_(_,pe,w?.toast,n?.classNames?.toast,w?.[R],n?.classNames?.[R]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":te,"data-removed":M,"data-visible":de,"data-y-position":Se,"data-x-position":Ce,"data-index":c,"data-front":ue,"data-swiping":P,"data-dismissible":z,"data-type":fe,"data-invert":B,"data-swipe-out":I,"data-swipe-direction":k,"data-expanded":!!(u||C&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?re:ye.current}px`,"--initial-height":C?`auto`:`${ae}px`,...m,...n.style},onDragEnd:()=>{F(!1),O(null),xe.current=null},onPointerDown:e=>{e.button!==2&&!De&&z&&(ce.current=new Date,ie(ye.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),xe.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(I||!z)return;xe.current=null;let e=Number(le.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(le.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ce.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if((D===`x`?Ee.includes(e>0?`right`:`left`):Ee.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=n_||a>.11))ie(ye.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),V(),L(!0);else{var o,s;(o=le.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=le.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ne(!1),F(!1),O(null)}},onPointerMove:e=>{var t,n;if(!xe.current||!z||window.getSelection()?.toString().length>0)return;let r=e.clientY-xe.current.y,i=e.clientX-xe.current.x;!D&&(Math.abs(i)>1||Math.abs(r)>1)&&O(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(Ee.includes(`top`)||Ee.includes(`bottom`)){if(Ee.includes(`top`)&&r<0||Ee.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(D===`x`&&(Ee.includes(`left`)||Ee.includes(`right`))){if(Ee.includes(`left`)&&i<0||Ee.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ne(!0),(t=le.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=le.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ge&&!n.jsx&&fe!==`loading`?v.createElement(`button`,{"aria-label":E,"data-disabled":De,"data-close-button":!0,onClick:De||!z?()=>{}:()=>{V(),n.onDismiss==null||n.onDismiss.call(n,n)},className:i_(w?.closeButton,n?.classNames?.closeButton)},T?.close??Vg):null,(fe||n.icon||n.promise)&&n.icon!==null&&(T?.[fe]!==null||n.icon)?v.createElement(`div`,{"data-icon":``,className:i_(w?.icon,n?.classNames?.icon)},fe===`loading`?n.icon||Oe():n.promise?Oe():null,fe===`loading`?null:ke):null,v.createElement(`div`,{"data-content":``,className:i_(w?.content,n?.classNames?.content)},v.createElement(`div`,{"data-title":``,className:i_(w?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?v.createElement(`div`,{"data-description":``,className:i_(y,me,w?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),v.isValidElement(n.cancel)?n.cancel:n.cancel&&Yg(n.cancel)?v.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Yg(n.cancel)&&z&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),V())},className:i_(w?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,v.isValidElement(n.action)?n.action:n.action&&Yg(n.action)?v.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Yg(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&V())},className:i_(w?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function s_(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function c_(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?Qg:Zg;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var l_=v.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=Xg,toastOptions:g,dir:_=s_(),gap:y=t_,icons:b,customAriaLabel:x,containerAriaLabel:S=`Notifications`}=e,[C,w]=v.useState([]),T=v.useMemo(()=>n?C.filter(e=>e.toasterId===n):C.filter(e=>!e.toasterId),[C,n]),E=v.useMemo(()=>Array.from(new Set([i].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,i]),[D,O]=v.useState([]),[k,A]=v.useState(!1),[j,ee]=v.useState(!1),[M,N]=v.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=v.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),I=v.useRef(null),L=v.useRef(!1),te=v.useCallback(e=>{w(t=>(t.find(t=>t.id===e.id)?.delete||Kg.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return v.useEffect(()=>Kg.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{w(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{pt.flushSync(()=>{w(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),v.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),v.useEffect(()=>{C.length<=1&&A(!1)},[C]),v.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;A(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&A(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),v.useEffect(()=>{if(P.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,L.current=!1)}},[P.current]),v.createElement(`section`,{ref:t,"aria-label":x??`${S} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((t,n)=>{let[i,a]=t.split(`-`);return T.length?v.createElement(`ol`,{key:t,dir:_===`auto`?s_():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${D[0]?.height||0}px`,"--width":`${e_}px`,"--gap":`${y}px`,...m,...c_(l,u)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,I.current&&=(I.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||L.current||(L.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{j||A(!1)},onDragEnd:()=>A(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ee(!0)},onPointerUp:()=>ee(!1)},T.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>v.createElement(o_,{key:n.id,icons:b,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:j,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:te,toasts:T.filter(e=>e.position==n.position),heights:D.filter(e=>e.position==n.position),setHeights:O,expandByDefault:o,gap:y,expanded:k,swipeDirections:e.swipeDirections}))):null}))});function u_(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;return t%360}var d_=e=>({"--agent-h":String(u_(e))}),f_=e=>{let t=u_(e);return`linear-gradient(135deg, oklch(0.6 0.14 ${t}), oklch(0.45 0.12 ${(t+45)%360}))`};function p_({id:e,name:t,size:n=`md`}){return(0,U.jsx)(`span`,{className:B(`flex shrink-0 items-center justify-center rounded-lg text-[10px] font-bold text-white`,n===`md`?`h-6 w-6 text-[11px]`:`h-5 w-5`),style:{background:f_(e)},children:(t||`?`).trim().charAt(0).toUpperCase()})}var m_=[`exec`,`data_describe`,`data_query`,`search_knowledge`,`save_experience`],h_=[{id:`observer`,emoji:`👀`,title:`只读参谋`,desc:`能查数据、检索知识、给建议——不会动手改任何东西,适合先试试水`,autonomy:`L1`},{id:`worker`,emoji:`🔧`,title:`干活帮手`,desc:`能执行命令、读写数据集、跑配置的动作——重要写操作会先弹卡问你`,autonomy:`L2`,recommended:!0},{id:`full`,emoji:`🚀`,title:`全自主干将`,desc:`以上全部,且写操作免确认——只给完全信任、可承受失误的场景`,autonomy:`L3`}];function g_({onOpen:e}){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!0),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)(!1),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)([]),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!0),[_,y]=(0,v.useState)(null),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(`all`),[w,T]=(0,v.useState)(()=>localStorage.getItem(`aims.guide-done`)===`1`),[E,D]=(0,v.useState)(``),O=(0,v.useRef)(``),[k,A]=(0,v.useState)(!1),[j,ee]=(0,v.useState)([]),[M,N]=(0,v.useState)(null),[P,F]=(0,v.useState)(``),[I,L]=(0,v.useState)(`L2`),[te,ne]=(0,v.useState)(m_),[re,ie]=(0,v.useState)(`worker`),[ae,oe]=(0,v.useState)(!1),[se,ce]=(0,v.useState)(!1),[le,ue]=(0,v.useState)(null),[de,fe]=(0,v.useState)(null),[R,z]=(0,v.useState)(null),[pe,me]=(0,v.useState)(null),[he,ge]=(0,v.useState)(!1),[_e,ve]=(0,v.useState)(!1),[ye,be]=(0,v.useState)(1),[xe,Se]=(0,v.useState)(``),[Ce,we]=(0,v.useState)(``),[Te,Ee]=(0,v.useState)(``),[De,je]=(0,v.useState)(!1),[Me,Ne]=(0,v.useState)(!1),[Pe,Fe]=(0,v.useState)(``),[Ie,Re]=(0,v.useState)([]),[ze,Be]=(0,v.useState)([]),Ve=(0,v.useMemo)(()=>new Set(ze.map(e=>e.id)),[ze]),He=async(e=!0)=>{if(!Ce.trim())Z.error(`请先描述你想让小助手做什么`);else{je(!0);try{let t=await Oe(`/api/agents/draft-prompt`,{name:xe.trim(),description:Ce.trim()});Ee(t.prompt),t.name&&!xe.trim()&&Se(t.name),e&&be(2)}catch(e){Z.error(String(e.message))}finally{je(!1)}}},Ue=async()=>{try{let e=await V(`/api/agents/knowledges?keyword=${encodeURIComponent(Pe.trim())}`);Re(e.items||[]),e.error&&Z.warning(`ARM 知识检索不可达`,{description:e.error})}catch(e){Z.error(String(e.message))}},We=async()=>{Ne(!0);try{let e=await Oe(`/api/agents/create`,{name:xe.trim(),description:Ce.trim(),prompt:Te.trim(),knowledge_ids:ze.map(e=>e.id)});e.local?Z.warning(`${e.manifest.name} 已创建为本地助手(ARM 不可达)`,{description:`离线可用:对话/工作台/数据集正常,编辑仅写本地。恢复连接后在卡片上点「发布」转正到 ARM(身份不变)。`,duration:7e3}):Z.success(`${e.manifest.name} ${e.manifest.version} 已创建并下载到本地${e.knowledges_bound?`(绑定知识 ${e.knowledges_bound} 条)`:``}——下一步完成上岗配置`),ve(!1),Se(``),we(``),Ee(``),Be([]),Re([]),Fe(``),await Ge(),nt({agent_id:e.agent_id,name:e.manifest.name})}catch(e){Z.error(String(e.message))}finally{Ne(!1)}},Ge=async(e=O.current)=>{try{let t=await V(`/api/agents${e?`?keyword=${encodeURIComponent(e)}`:``}`);if(e!==O.current)return;n(t.agents),i(t.online),c(!!t.auth_error),o(t.me||null),t.source&&u(t.source),t.sources&&f(t.sources)}catch{e===O.current&&(i(!1),c(!1),o(null))}finally{e===O.current&&(g(!1),A(!1))}},Ke=async e=>{if(e&&e!==l?.id&&!p){m(!0),g(!0);try{let t=await Oe(`/api/arm/sources/${encodeURIComponent(e)}/select`);t.probe.online?Z.success(`已切换到 ARM 源「${t.source.name}」`,{description:`连通 ${t.probe.latency_ms}ms——目录、下载、新建、发布、经验回流现在都打这个源`}):Z.warning(`已切换到 ARM 源「${t.source.name}」,但当前不可达`,{description:`${t.probe.error||``};显示本地库,可随时切回`.replace(/^;/,``)}),await Ge()}catch(e){Z.error(String(e.message))}finally{m(!1),g(!1)}}};(0,v.useEffect)(()=>{Ge(``),V(`/api/tools`).then(e=>ee(e.tools))},[]),(0,v.useEffect)(()=>{if(O.current=E,!E){Ge(``);return}A(!0);let e=setTimeout(()=>Ge(E),400);return()=>clearTimeout(e)},[E]);let H=(0,v.useMemo)(()=>t.filter(e=>e.deployed),[t]),qe=(0,v.useMemo)(()=>t.filter(e=>e.installed),[t]),Je=(0,v.useMemo)(()=>t.filter(e=>e.update_available),[t]),Ye=(0,v.useMemo)(()=>({all:t,deployed:H,installed:qe,updates:Je})[S],[t,H,qe,Je,S]),Xe=async()=>{x(!0);try{let e=await Oe(`/api/arm/sync`),{new:t,update:n,delisted:r}=e.events,i=[`目录 ${e.remote_count} 名`];t.length&&i.push(`${t.length} 名新助手`),n.length&&i.push(`${n.length} 名可升级`),r.length&&i.push(`${r.length} 名已下架`),e.outbox_flushed&&i.push(`回流 ${e.outbox_flushed} 条离线经验`),Z.success(`已同步:${i.join(` · `)}`),await Ge()}catch(e){Z.error(String(e.message))}finally{x(!1)}},Ze=async(e,t)=>{y(e.agent_id);try{let n=await Oe(`/api/agents/${e.agent_id}/${t}`);Z.success(`${n.manifest.name} ${n.manifest.version} 已${t===`upgrade`?`升级`:`下载`}(本地知识 ${n.manifest.knowledges_local} 条,工作台与数据不受影响)`),await Ge(),t===`upgrade`&&ue(null)}catch(e){Z.error(String(e.message))}finally{y(null)}},Qe=async e=>{fe(e);try{z(await V(`/api/agents/${e.agent_id}/versions`))}catch(e){Z.error(String(e.message))}},$e=async(e,t)=>{try{await Oe(`/api/agents/${e.agent_id}/rollback`,{version:t}),Z.success(`已回滚到 ${t}`),z(await V(`/api/agents/${e.agent_id}/versions`)),await Ge()}catch(e){Z.error(String(e.message))}},et=async e=>{y(e.agent_id);try{await Ae(`/api/agents/${e.agent_id}`,{force:!0,purge_workspaces:he}),Z.success(`${e.name} 已卸载${he?`(工作区数据已清除)`:`(工作区数据已保留)`}`),me(null),ge(!1),await Ge()}catch(e){Z.error(String(e.message))}finally{y(null)}},tt=e=>{let t=h_.find(t=>t.id===e);t&&(L(t.autonomy),ne(e===`observer`?m_:j.map(e=>e.name)),ie(e))},nt=e=>{N(e),F(e.name),oe(!1),ne(j.map(e=>e.name)),L(`L2`),ie(`worker`)},rt=async e=>{try{let t=(await V(`/api/deployment?agent_id=${e.agent_id}`)).deployment;N(e),F(t.name||e.name),oe(!0),ie(`custom`),L(t.default_autonomy||`L2`),ne((t.toolset||[]).map(e=>e.tool))}catch(e){Z.error(String(e.message))}},it=e=>e.local_only||!e.foreign&&r&&!!a&&(a.role===`ADMIN`||!!e.created_by_id&&a.id===e.created_by_id),[at,ot]=(0,v.useState)(null),[st,ct]=(0,v.useState)(``),[lt,ut]=(0,v.useState)(``),[dt,ft]=(0,v.useState)(``),[pt,mt]=(0,v.useState)(!1),[ht,W]=(0,v.useState)(null),[gt,_t]=(0,v.useState)(!1),[vt,yt]=(0,v.useState)(``),[bt,xt]=(0,v.useState)([]),[St,Ct]=(0,v.useState)(``),[wt,Tt]=(0,v.useState)([]),[Et,Dt]=(0,v.useState)(`essential`),[Ot,kt]=(0,v.useState)(null),[At,jt]=(0,v.useState)(!1),[Mt,Nt]=(0,v.useState)(!1),[Pt,Ft]=(0,v.useState)(null),[It,Lt]=(0,v.useState)(``),[Rt,zt]=(0,v.useState)(!1),[Bt,G]=(0,v.useState)(null),[Vt,Ht]=(0,v.useState)(!1),Ut=async()=>{if(Bt){Ht(!0);try{let e=await Oe(`/api/agents/${Bt.agent_id}/publish`),t=[`知识 ${e.copied.knowledges} 条已复制${e.copied.failed?`(${e.copied.failed} 条失败)`:``}`];(e.skipped.skills||e.skipped.ui_bindings)&&t.push(`未复制:技能 ${e.skipped.skills} / UI 资产 ${e.skipped.ui_bindings}(ARM 侧资产,可在编辑里重绑)`),t.push(`本地身份与数据不变(档案/配置分离)`),Z.success(`「${e.manifest.name}」已发布到「${e.target.name}」${e.manifest.version}`,{description:t.join(`;`),duration:7e3}),G(null),await Ge()}catch(e){Z.error(String(e.message))}finally{Ht(!1)}}},Wt=async e=>{try{W(await V(`/api/agents/${e}/bindings`))}catch(e){W(null),Z.error(String(e.message))}},Gt=async()=>{try{let e=await V(`/api/agents/skills?keyword=${encodeURIComponent(vt.trim())}`);xt(e.items||[]),e.error&&Z.error(e.error)}catch(e){Z.error(String(e.message))}},Kt=async()=>{try{let e=await V(`/api/agents/knowledges?keyword=${encodeURIComponent(St.trim())}`);Tt(e.items||[]),e.error&&Z.error(e.error)}catch(e){Z.error(String(e.message))}},qt=async(e,t,n)=>{if(at){_t(!0);try{await Oe(`/api/agents/${at.agent_id}/bindings`,{type:e,ref_id:t,kind:n}),Z.success(e===`skill`?`技能已绑定(本地档案已同步物化)`:`知识已绑定(本地档案已同步物化)`),xt([]),Tt([]),await Wt(at.agent_id)}catch(e){Z.error(String(e.message))}finally{_t(!1)}}},Jt=async(e,t,n)=>{if(at){_t(!0);try{await Ae(`/api/agents/${at.agent_id}/bindings`,{type:e,binding_id:t}),Z.success(`已解绑 ${n}(本地档案已同步物化)`),await Wt(at.agent_id)}catch(e){Z.error(String(e.message))}finally{_t(!1)}}},Yt=async e=>{ot(e),ct(e.name),ut(e.description||``),ft(`(读取档案…)`),W(null),xt([]),Tt([]),yt(``),Ct(``),Wt(e.agent_id);try{let t=await V(`/api/agents/${e.agent_id}/profile`);ct(t.name),ut(t.description),ft(t.prompt)}catch(e){ft(``),Z.error(String(e.message))}},Xt=async()=>{if(at){mt(!0);try{await ke(`/api/agents/${at.agent_id}`,{name:st.trim(),description:lt.trim(),prompt:dt.trim()}),Z.success(`档案已更新(ARM + 本地已同步)`),ot(null),await Ge()}catch(e){Z.error(String(e.message))}finally{mt(!1)}}},Zt=async()=>{if(Ot){Nt(!0);try{await Oe(`/api/agents/${Ot.agent_id}/arm-delete`,{also_uninstall:!0,purge_workspaces:At}),Z.success(`${Ot.name} 已从 ARM 删除${Ot.installed?`(本地档案已一并卸载)`:``}`),kt(null),jt(!1),await Ge()}catch(e){Z.error(String(e.message))}finally{Nt(!1)}}},Qt=async()=>{if(Pt){zt(!0);try{let e=await Oe(`/api/agents/${Pt.agent_id}/clone`,{name:It.trim()});Z.success(`已创建「${e.name}」`,{description:`档案已物化本地 · 复制绑定:技能 ${e.copied.skills} · 知识 ${e.copied.knowledges} · UI 资产 ${e.copied.ui_assets}${e.copied.failed?`(${e.copied.failed} 条失败可稍后在编辑里补绑)`:``}——副本归你所有,可自由编辑`,duration:6e3}),Ft(null),await Ge()}catch(e){Z.error(String(e.message))}finally{zt(!1)}}},$t=async()=>{if(M){ce(!0);try{if(await ke(`/api/deployment`,{agent_id:M.agent_id,name:P,default_autonomy:I,toolset:te.map(e=>({tool:e})),knowledge_slices:[`ARM经验库(检索式注入)`]}),await Ge(),ae){Z.success(`已更新 ${P} 的权限`,{description:`工具 ${te.length} 项 · ${I} · 即时生效`}),N(null);return}Z.success(`🎉 ${M.name} 已上岗!`,{description:`档案已物化本地(离线可用),工位已就绪——跟它说的第一句话开始吧`,duration:6e3}),N(null),V(`/api/dev/inspirations?agent_id=${M.agent_id}`).catch(()=>{}),e(M.agent_id,P,`workbench`)}catch(e){Z.error(String(e.message))}finally{ce(!1)}}},en=e=>(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-1 text-[10px] text-muted-foreground`,children:[e.installed?(0,U.jsxs)(J,{variant:`outline`,className:`h-5 text-[10px] text-primary`,children:[`已下载 `,e.installed_version]}):(0,U.jsx)(J,{variant:`outline`,className:`h-5 text-[10px]`,children:e.version}),(0,U.jsxs)(J,{variant:`outline`,className:`h-5 text-[10px]`,children:[(0,U.jsx)(fg,{className:`mr-0.5 h-2.5 w-2.5`}),e.skills,` 技能`]}),(0,U.jsxs)(J,{variant:`outline`,className:`h-5 text-[10px]`,children:[(0,U.jsx)(Sp,{className:`mr-0.5 h-2.5 w-2.5`}),e.knowledges,` 知识`]}),e.local_only&&(0,U.jsx)(J,{className:`h-5 bg-warning/15 text-[10px] text-warning hover:bg-warning/25`,title:`离线创建的本地档案——仅本机可见可用;恢复 ARM 连接后在卡片上点「发布」转正(身份与数据不变)`,children:`未发布`}),e.foreign&&e.source_name&&(0,U.jsx)(J,{className:`h-5 max-w-40 bg-ai/10 text-[10px] text-ai hover:bg-ai/20`,title:`来自 ARM 源「${e.source_name}」,当前源「${l?.name||``}」的目录里没有它——升级/编辑请切回来源源;也可点「发布」把它推送到当前源(同 id,身份不变)`,children:(0,U.jsxs)(`span`,{className:`truncate`,children:[`来自 `,e.source_name]})}),e.created_by&&a&&e.created_by_id!==a.id&&(0,U.jsx)(J,{variant:`outline`,className:`h-5 max-w-36 text-[10px]`,title:`由 ${e.created_by} 创建——编辑需联系作者或管理员,或点卡片上的克隆图标复制一份自己改`,children:(0,U.jsxs)(`span`,{className:`truncate`,children:[`by `,e.created_by]})})]});return(0,U.jsxs)(`div`,{className:`h-full overflow-auto p-5`,children:[(0,U.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-end justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-bold`,children:[(0,U.jsx)(cg,{className:`h-5 w-5 text-primary`}),`助手大厅`]}),(0,U.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`档案物化到本地助手库(离线可用)· 上岗配置由平台管理(档案/配置分离)· 升级不触碰工作台与数据`})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,U.jsxs)(J,{variant:`secondary`,children:[`共 `,t.length,` 名`]}),(0,U.jsxs)(J,{className:`bg-success/15 text-success hover:bg-success/25`,children:[`在岗 `,H.length]}),Je.length>0&&(0,U.jsxs)(J,{className:`bg-warning/15 text-warning hover:bg-warning/25`,children:[`可升级 `,Je.length]}),a&&(0,U.jsxs)(J,{variant:`outline`,className:`font-normal`,title:`ARM 令牌身份(编辑/删除按此判定):${a.name||a.id.slice(0,8)}${a.role===`ADMIN`?`——管理员可管理全部助手`:`——可编辑自己创建的助手`}`,children:[a.name||`已认证`,a.role===`ADMIN`?` · 管理员`:``]}),d.length>1?(0,U.jsxs)(Eg,{value:l?.id||``,onValueChange:Ke,disabled:p,children:[(0,U.jsxs)(Og,{className:`h-8 w-44 text-xs data-[size=default]:h-8`,title:`当前 ARM 源:${l?.name||``}(${l?.base||``})——目录检索、下载、新建、发布、经验回流都打这个源;公库/私库随时切换,本地库不受影响`,children:[(0,U.jsx)(Mh,{className:`mr-1 h-3.5 w-3.5 shrink-0 text-primary`}),(0,U.jsx)(Dg,{placeholder:`ARM 源`})]}),(0,U.jsx)(kg,{children:d.map(e=>(0,U.jsx)(Ag,{value:e.id,className:`text-xs`,children:e.name},e.id))})]}):l&&(0,U.jsxs)(J,{variant:`outline`,className:`h-8 gap-1 px-2 font-normal`,title:`ARM 源:${l.base}——在「系统设置 · ARM 源」可添加私库/其他站点,大厅随时切换`,children:[(0,U.jsx)(Mh,{className:`h-3.5 w-3.5 text-primary`}),l.name]}),(0,U.jsxs)(Y,{size:`sm`,className:`gap-1 text-xs`,onClick:()=>{be(1),ve(!0)},title:`描述需求,AI 起草档案 → ARM 创建 → 上岗,一条链完成`,children:[(0,U.jsx)(Wh,{className:`h-3.5 w-3.5`}),`新建助手`]}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`gap-1 text-xs`,disabled:b||!r,onClick:Xe,title:r?`比对 ARM 远端目录`:`离线模式`,children:[(0,U.jsx)(bh,{className:`h-3.5 w-3.5 ${b?`animate-spin`:``}`}),`检查更新`]})]})]}),!r&&s&&(0,U.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning`,children:[(0,U.jsx)(Mm,{className:`h-4 w-4 shrink-0`}),`ARM 源「`,l?.name||`ARM`,`」令牌未配置或无权限——请到该 ARM 站点生成访问令牌(arm_pat_…),再到「系统设置 · ARM 源」粘贴保存。`,(0,U.jsx)(`a`,{href:l?.base||`http://arm.agent-platform.dev.aimstek.cn`,target:`_blank`,rel:`noreferrer`,className:`ml-auto shrink-0 underline underline-offset-2 hover:text-warning/80`,children:`打开 ARM →`})]}),!r&&!s&&(0,U.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 rounded-md border border-warning/40 bg-warning/10 px-3 py-2 text-xs text-warning`,children:[(0,U.jsx)(Kp,{className:`h-4 w-4 shrink-0`}),`离线模式:ARM 源「`,l?.name||`ARM`,`」不可达,以上为本地助手库(`,qe.length,` 名,对话/工作台/数据集可继续使用);下载与升级需恢复连接`,d.length>1?`,或切换到其他 ARM 源`:``,`。`]}),(0,U.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,U.jsxs)(`div`,{className:`relative w-64 shrink-0`,children:[(0,U.jsx)(Oh,{className:`pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground ${k?`animate-pulse text-primary`:``}`}),(0,U.jsx)(wg,{value:E,onChange:e=>D(e.target.value),placeholder:`搜索助手(名称/描述,检索 ARM 目录)`,className:`h-8 pl-8 pr-7 text-xs`}),E&&(0,U.jsx)(`button`,{onClick:()=>D(``),title:`清空搜索`,className:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,children:(0,U.jsx)(mg,{className:`h-3.5 w-3.5`})})]}),!w&&H.length===0&&!h&&(0,U.jsxs)(`div`,{className:`mb-4 flex items-center gap-3 rounded-xl border border-primary/30 bg-primary/5 px-3.5 py-2.5`,children:[(0,U.jsx)(Wh,{className:`h-4 w-4 shrink-0 text-primary`}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-wrap items-center gap-x-2 gap-y-1 text-[11px]`,children:[(0,U.jsx)(`span`,{className:`font-semibold text-primary`,children:`30 秒上手`}),(0,U.jsx)(`span`,{children:`① 从下面挑一名助手,点「上岗配置」`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,U.jsx)(`span`,{children:`② 在工作台跟它说第一句话`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,U.jsx)(`span`,{children:`③ 说「右上加一个最近告警」,看着界面长出来`})]}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-2 text-[11px]`,onClick:()=>{localStorage.setItem(`aims.guide-done`,`1`),T(!0)},children:`知道了`})]}),(0,U.jsx)(`div`,{className:`flex gap-1.5 text-xs`,children:[[`all`,`全部 ${t.length}`],[`deployed`,`在岗 ${H.length}`],[`installed`,`已下载 ${qe.length}`],[`updates`,`可更新 ${Je.length}`]].map(([e,t])=>(0,U.jsx)(`button`,{onClick:()=>C(e),className:`rounded-full border px-2.5 py-1 transition-colors ${S===e?`border-primary/60 bg-primary/15 text-primary`:`border-border text-muted-foreground hover:text-foreground`}`,children:t},e))})]}),h?(0,U.jsx)(`div`,{className:`grid grid-cols-2 gap-3 xl:grid-cols-4`,children:[...Array(8)].map((e,t)=>(0,U.jsx)(Gf,{className:`h-44 animate-pulse`},t))}):(0,U.jsx)(`div`,{className:`grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4`,children:Ye.map(t=>(0,U.jsxs)(Gf,{className:`flex flex-col ${t.deployed?`border-primary/40`:``} ${!r&&!t.installed?`opacity-50`:``}`,children:[(0,U.jsx)(Kf,{className:`pb-2`,children:(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-1.5 text-sm leading-snug`,children:[(0,U.jsx)(p_,{id:t.agent_id,name:t.name}),t.name]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[t.update_available&&(0,U.jsxs)(J,{className:`h-5 bg-warning/15 text-[10px] text-warning hover:bg-warning/25`,children:[(0,U.jsx)(Rp,{className:`mr-0.5 h-2.5 w-2.5`}),t.remote_version]}),t.delisted&&(0,U.jsx)(J,{variant:`outline`,className:`h-5 text-[10px] text-destructive`,children:`已下架`}),t.deployed&&(0,U.jsx)(J,{className:`h-5 bg-success/15 text-[10px] text-success hover:bg-success/25`,children:`在岗`})]})]})}),(0,U.jsxs)(Jf,{className:`flex-1 space-y-2 pb-2`,children:[(0,U.jsx)(`p`,{className:`line-clamp-2 h-8 text-[11px] text-muted-foreground`,children:t.description||`(ARM 档案无描述)`}),en(t)]}),(0,U.jsxs)(Yf,{className:`gap-1.5`,children:[t.deployed?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Y,{size:`sm`,className:`flex-1 text-xs`,onClick:()=>e(t.agent_id,t.name,`workbench`),children:`进入工作台 →`}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 shrink-0 p-0`,onClick:()=>rt(t),title:`调整权限(工具集/自主级别,即时生效)`,children:(0,U.jsx)(Hh,{className:`h-3.5 w-3.5`})})]}):!r&&!t.installed?(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`flex-1 text-xs`,disabled:!0,title:`离线模式:恢复 ARM 连接后可上岗`,children:`上岗配置(离线不可用)`}):(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`flex-1 text-xs`,onClick:()=>nt(t),children:[(0,U.jsx)(Wh,{className:`mr-1 h-3 w-3`}),`上岗配置`]}),t.update_available&&(0,U.jsxs)(Y,{size:`sm`,className:`text-xs`,disabled:_===t.agent_id,onClick:()=>ue(t),children:[(0,U.jsx)(Rp,{className:`mr-1 h-3 w-3`}),`升级`]}),!t.update_available&&!t.installed&&r&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`text-xs`,disabled:_===t.agent_id,onClick:()=>Ze(t,`download`),title:`下载档案到本地,离线可用`,children:(0,U.jsx)(im,{className:`h-3.5 w-3.5`})}),t.installed&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,onClick:()=>Qe(t),title:`版本历史 / 回滚 / 卸载`,children:(0,U.jsx)(om,{className:`h-3.5 w-3.5`})}),(t.local_only||t.foreign)&&r&&(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-7 gap-1 px-2 text-[11px] text-warning hover:text-warning`,disabled:_===t.agent_id,onClick:()=>G(t),title:t.foreign?`发布到当前源「${l?.name||``}」:来自「${t.source_name||``}」的助手以同一身份推送过去(档案 + 知识全文;技能/UI 资产不复制)`:`发布到「${l?.name||`ARM`}」:团队可见、可绑定技能/知识;助手身份与本地数据不变`,children:[(0,U.jsx)(Jp,{className:`h-3.5 w-3.5`}),`发布`]}),r&&!t.foreign&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,disabled:_===t.agent_id,onClick:()=>{Ft(t),Lt(`${t.name}-副本`)},title:`克隆为新助手(复制档案与全部绑定,副本归你所有可自由编辑)——无编辑权限或想做类似助手时用`,children:(0,U.jsx)(Xp,{className:`h-3.5 w-3.5`})}),it(t)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,disabled:_===t.agent_id,onClick:()=>Yt(t),title:`编辑档案(名称/Prompt/技能与知识绑定)${t.created_via_workstation?`· 工作站创建`:``}`,children:(0,U.jsx)(Kh,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0 text-destructive hover:text-destructive`,disabled:_===t.agent_id,onClick:()=>{kt(t),jt(!1)},title:`从 ARM 删除(不可恢复)`,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})})]})]})]},t.agent_id))}),Ye.length===0&&(0,U.jsx)(`div`,{className:`mt-10 text-center text-sm text-muted-foreground`,children:r?E?`没有匹配「${E}」的助手——换个关键词试试`:`没有匹配的助手`:E?`本地库中没有匹配「${E}」的助手(离线模式不检索 ARM 目录)`:`本地库为空:恢复 ARM 连接后点「检查更新」下载助手`}),(0,U.jsx)(gg,{open:_e,onOpenChange:e=>{!Me&&!De&&ve(e)},children:(0,U.jsxs)(yg,{className:`flex max-h-[88vh] max-w-2xl flex-col overflow-hidden sm:max-w-2xl`,children:[(0,U.jsxs)(bg,{children:[(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Wh,{className:`h-4 w-4 text-primary`}),`新建助手`]}),(0,U.jsx)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[[`1`,`描述`],[`2`,`档案`],[`3`,`上岗`]].map(([e,t],n)=>(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[n>0&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,U.jsx)(`span`,{className:`flex h-4 w-4 items-center justify-center rounded-full text-[9px] ${ye>n?`bg-primary text-primary-foreground`:`border border-border text-muted-foreground`}`,children:e}),(0,U.jsx)(`span`,{className:ye>n?`font-medium text-foreground`:`text-muted-foreground`,children:t})]},e))})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto pr-0.5`,children:ye===1?(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm font-medium`,children:`你想让小助手帮你做什么?`}),(0,U.jsx)(`p`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:`用一段话描述职责,AI 起草名称与 System Prompt,下一步可自由编辑。`})]}),(0,U.jsx)(`textarea`,{value:Ce,onChange:e=>we(e.target.value),spellCheck:!1,rows:5,placeholder:`例如:帮我盯冷库温度,出现异常时结合传感器读数和压缩机状态给出处置建议;每天早上汇总告警……`,className:`w-full resize-y rounded-md border bg-background p-2.5 text-xs leading-relaxed`}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`试试:`}),[`排查WMS日志报错并给出定位`,`汇总每日告警生成晨报`,`回答新人运维常见问题`,`冷库温度异常诊断`].map(e=>(0,U.jsx)(`button`,{onClick:()=>we(e),className:`rounded-full border border-border px-2 py-0.5 text-[10px] text-muted-foreground transition-colors hover:border-primary/60 hover:text-primary`,children:e},e))]})]}):(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`名称(ARM 全局唯一)`}),(0,U.jsx)(wg,{value:xe,onChange:e=>Se(e.target.value),placeholder:`如:冷库温控诊断助手`,className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`描述(≤512 字,可选)`}),(0,U.jsx)(wg,{value:Ce,onChange:e=>we(e.target.value),placeholder:`一句话职责说明`,className:`text-xs`})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`System Prompt`,(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-6 gap-1 px-1.5 text-[10px]`,disabled:De,onClick:()=>He(!1),children:[(0,U.jsx)(Wh,{className:`h-3 w-3 ${De?`animate-pulse`:``}`}),De?`起草中…`:`重新起草`]}),(0,U.jsx)(`span`,{className:`text-[10px] font-normal text-muted-foreground`,children:`按左侧描述重新生成`})]}),(0,U.jsx)(`textarea`,{value:Te,onChange:e=>Ee(e.target.value),spellCheck:!1,rows:8,className:`w-full resize-y rounded-md border bg-background p-2 font-mono text-xs leading-relaxed`})]}),(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`绑定知识(可选)——助手创建后即可检索这些经验`,ze.length>0&&(0,U.jsxs)(J,{variant:`secondary`,className:`h-4 px-1 text-[9px]`,children:[`已选 `,ze.length]})]}),ze.length>0&&(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:ze.map(e=>(0,U.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-1.5 py-0.5 text-[10px]`,children:[(0,U.jsx)(`span`,{className:`max-w-56 truncate`,title:e.name,children:e.name}),(0,U.jsx)(`button`,{className:`shrink-0 text-muted-foreground hover:text-destructive`,onClick:()=>Be(t=>t.filter(t=>t.id!==e.id)),children:(0,U.jsx)(mg,{className:`h-2.5 w-2.5`})})]},e.id))}),(0,U.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,U.jsx)(wg,{value:Pe,onChange:e=>Fe(e.target.value),placeholder:`按关键词检索 ARM 知识库,如 wms / 告警 / dockerfile`,className:`text-xs`,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),Ue())}}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-8 shrink-0 text-xs`,disabled:!Pe.trim(),onClick:Ue,children:`检索`})]}),Ie.length>0&&(0,U.jsx)(`div`,{className:`max-h-36 space-y-0.5 overflow-y-auto rounded-md border p-1`,children:Ie.map(e=>{let t=Ve.has(e.id);return(0,U.jsxs)(`button`,{onClick:()=>Be(n=>t?n.filter(t=>t.id!==e.id):[...n,{id:e.id,name:e.name}]),className:`flex w-full min-w-0 items-start gap-2 rounded px-1.5 py-1 text-left transition-colors hover:bg-accent`,children:[t?(0,U.jsx)(Bp,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-primary`}):(0,U.jsx)(mh,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block truncate text-[11px] font-medium`,title:e.name,children:e.name}),e.description&&(0,U.jsx)(`span`,{className:`block truncate text-[10px] text-muted-foreground`,title:e.description,children:e.description})]})]},e.id)})})]})]})}),(0,U.jsx)(xg,{children:ye===1?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Y,{variant:`ghost`,className:`text-xs text-muted-foreground`,onClick:()=>be(2),children:`跳过,手动填写 →`}),(0,U.jsxs)(Y,{className:`gap-1 text-xs`,disabled:De||!Ce.trim(),onClick:()=>He(!0),children:[(0,U.jsx)(Wh,{className:`h-3.5 w-3.5 ${De?`animate-pulse`:``}`}),De?`AI 起草中…`:`AI 起草档案 →`]})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:Me,onClick:()=>be(1),children:`← 上一步`}),(0,U.jsx)(Y,{disabled:Me||!xe.trim()||!Te.trim(),onClick:We,children:Me?`创建中…`:`创建并进入上岗配置`})]})})]})}),(0,U.jsx)(gg,{open:!!at,onOpenChange:e=>{!e&&!pt&&!gt&&(ot(null),W(null),Ge())},children:(0,U.jsxs)(yg,{className:`flex max-h-[88vh] max-w-2xl flex-col overflow-hidden sm:max-w-2xl`,children:[(0,U.jsxs)(bg,{children:[(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Kh,{className:`h-4 w-4 text-primary`}),`编辑档案 · `,at?.name,at?.created_via_workstation&&(0,U.jsx)(J,{variant:`secondary`,className:`h-4 px-1 text-[9px]`,children:`工作站创建`})]}),(0,U.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:at?.local_only?`本地未发布档案——保存仅写本地(版本前进可回滚);发布到 ARM 后编辑将同步远端。恢复连接前暂不能绑定技能/知识。`:`档案存于 ARM(创建者或管理员可改);保存/绑定后本地档案同步物化(版本前进,可回滚)。`})]}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto pr-0.5`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`名称`}),(0,U.jsx)(wg,{value:st,onChange:e=>ct(e.target.value),className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`描述`}),(0,U.jsx)(wg,{value:lt,onChange:e=>ut(e.target.value),className:`text-xs`})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`System Prompt(保存后本地档案同步更新)`}),(0,U.jsx)(`textarea`,{value:dt,onChange:e=>ft(e.target.value),spellCheck:!1,rows:8,className:`w-full resize-y rounded-md border bg-background p-2 font-mono text-xs leading-relaxed`})]}),(0,U.jsxs)(`div`,{className:`space-y-2 border-t pt-3`,children:[(0,U.jsxs)(Tg,{className:`text-xs`,children:[`绑定技能(`,ht?.skills.length??`…`,`)——立即生效,无需保存`]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[ht&&ht.skills.length===0&&(0,U.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`暂无绑定`}),(ht?.skills||[]).map(e=>(0,U.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-1.5 py-0.5 text-[10px]`,title:e.description,children:[(0,U.jsx)(fg,{className:`h-2.5 w-2.5 shrink-0 text-primary`}),(0,U.jsx)(`span`,{className:`max-w-56 truncate`,children:e.name}),(0,U.jsx)(`button`,{disabled:gt,className:`shrink-0 text-muted-foreground hover:text-destructive`,title:`解绑`,onClick:()=>Jt(`skill`,e.binding_id,e.name),children:(0,U.jsx)(mg,{className:`h-2.5 w-2.5`})})]},e.binding_id))]}),(0,U.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,U.jsx)(wg,{value:vt,onChange:e=>yt(e.target.value),placeholder:at?.local_only?`本地未发布档案,发布后可绑定技能`:`按关键词检索 ARM 技能库`,className:`text-xs`,disabled:!!at?.local_only,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),Gt())}}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-8 shrink-0 text-xs`,disabled:!vt.trim()||!!at?.local_only,onClick:Gt,children:`检索`})]}),bt.length>0&&(0,U.jsx)(`div`,{className:`max-h-28 space-y-0.5 overflow-y-auto rounded-md border p-1`,children:bt.map(e=>{let t=ht?.skills.some(t=>t.ref_id===e.id);return(0,U.jsxs)(`button`,{disabled:gt||t,onClick:()=>qt(`skill`,e.id),className:`flex w-full min-w-0 items-start gap-2 rounded px-1.5 py-1 text-left transition-colors hover:bg-accent disabled:opacity-50`,children:[t?(0,U.jsx)(Bp,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-primary`}):(0,U.jsx)(mh,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block truncate text-[11px] font-medium`,title:e.name,children:e.name}),e.description&&(0,U.jsx)(`span`,{className:`block truncate text-[10px] text-muted-foreground`,title:e.description,children:e.description})]})]},e.id)})})]}),(0,U.jsxs)(`div`,{className:`space-y-2 border-t pt-3`,children:[(0,U.jsxs)(Tg,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[`绑定知识(`,ht?.knowledges.length??`…`,`)——立即生效,无需保存`,(0,U.jsxs)(Eg,{value:Et,onValueChange:Dt,children:[(0,U.jsx)(Og,{className:`h-6 w-28 text-[10px] data-[size=default]:h-6`,children:(0,U.jsx)(Dg,{})}),(0,U.jsxs)(kg,{children:[(0,U.jsx)(Ag,{value:`essential`,className:`text-xs`,children:`核心知识`}),(0,U.jsx)(Ag,{value:`experience`,className:`text-xs`,children:`经验`})]})]}),(0,U.jsx)(`span`,{className:`text-[10px] font-normal text-muted-foreground`,children:`新增绑定按此类型写入`})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[ht&&ht.knowledges.length===0&&(0,U.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`暂无绑定`}),(ht?.knowledges||[]).map(e=>(0,U.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-1.5 py-0.5 text-[10px]`,title:e.description,children:[(0,U.jsx)(Sp,{className:`h-2.5 w-2.5 shrink-0 text-primary`}),(0,U.jsx)(`span`,{className:`max-w-56 truncate`,children:e.name}),e.kind&&(0,U.jsx)(J,{variant:`outline`,className:`h-3.5 px-1 text-[8px]`,children:e.kind===`essential`?`核心`:`经验`}),(0,U.jsx)(`button`,{disabled:gt,className:`shrink-0 text-muted-foreground hover:text-destructive`,title:`解绑`,onClick:()=>Jt(`knowledge`,e.binding_id,e.name),children:(0,U.jsx)(mg,{className:`h-2.5 w-2.5`})})]},e.binding_id))]}),(0,U.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,U.jsx)(wg,{value:St,onChange:e=>Ct(e.target.value),placeholder:at?.local_only?`本地未发布档案,发布后可绑定知识`:`按关键词检索 ARM 知识库`,className:`text-xs`,disabled:!!at?.local_only,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),Kt())}}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-8 shrink-0 text-xs`,disabled:!St.trim()||!!at?.local_only,onClick:Kt,children:`检索`})]}),wt.length>0&&(0,U.jsx)(`div`,{className:`max-h-28 space-y-0.5 overflow-y-auto rounded-md border p-1`,children:wt.map(e=>{let t=ht?.knowledges.some(t=>t.ref_id===e.id);return(0,U.jsxs)(`button`,{disabled:gt||t,onClick:()=>qt(`knowledge`,e.id,Et),className:`flex w-full min-w-0 items-start gap-2 rounded px-1.5 py-1 text-left transition-colors hover:bg-accent disabled:opacity-50`,children:[t?(0,U.jsx)(Bp,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-primary`}):(0,U.jsx)(mh,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block truncate text-[11px] font-medium`,title:e.name,children:e.name}),e.description&&(0,U.jsx)(`span`,{className:`block truncate text-[10px] text-muted-foreground`,title:e.description,children:e.description})]})]},e.id)})})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:pt||gt,onClick:()=>{ot(null),W(null),Ge()},children:`关闭`}),(0,U.jsx)(Y,{disabled:pt||!st.trim()||!dt.trim(),onClick:Xt,children:pt?`保存中…`:`保存档案(ARM + 本地)`})]})]})}),(0,U.jsx)(gg,{open:!!Pt,onOpenChange:e=>{Rt||Ft(e?Pt:null)},children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Xp,{className:`h-4 w-4 text-primary`}),`克隆助手 · `,Pt?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,U.jsxs)(`p`,{className:`text-muted-foreground`,children:[`复制档案(Prompt/描述)与全部绑定(技能 `,Pt?.skills??0,` · 知识 `,Pt?.knowledges??0,`),创建一个`,(0,U.jsx)(`span`,{className:`font-medium text-foreground`,children:`归你所有`}),`的新助手——可自由编辑,不影响原助手。`,!Pt?.installed&&`(原助手未下载也无妨,克隆直接读 ARM 档案)`]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`新助手名称(ARM 全局唯一)`}),(0,U.jsx)(wg,{value:It,onChange:e=>Lt(e.target.value),placeholder:`${Pt?.name||``}-副本`,className:`text-xs`,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&It.trim()&&!Rt&&(e.preventDefault(),Qt())}})]}),(0,U.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`创建后档案自动物化本地;克隆完成即可「上岗配置」或进编辑调整 Prompt。`})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:Rt,onClick:()=>Ft(null),children:`取消`}),(0,U.jsx)(Y,{disabled:Rt||!It.trim(),onClick:Qt,children:Rt?`克隆中…`:`创建副本`})]})]})}),(0,U.jsx)(gg,{open:!!Bt,onOpenChange:e=>{Vt||G(e?Bt:null)},children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Jp,{className:`h-4 w-4 text-warning`}),`发布到「`,l?.name||`ARM`,`」 · `,Bt?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[Bt?.foreign?(0,U.jsxs)(`p`,{className:`leading-relaxed text-muted-foreground`,children:[`该助手来自 ARM 源「`,Bt.source_name,`」。发布后以`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`同一身份(id)`}),`出现在当前源「`,l?.name,`」: 档案(名称 / 描述 / Prompt)与本地已物化的`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`知识全文`}),`一并创建并绑定;技能与 UI 资产属 ARM 侧资产`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`不复制`}),`(发布后可在编辑里重新绑定)。 本地在岗状态、工作台与数据不受影响。`]}):(0,U.jsxs)(`p`,{className:`leading-relaxed text-muted-foreground`,children:[`该助手创建于离线环境(档案仅在本机)。发布后:`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`团队可见`}),`、可绑定技能/知识/UI 资产、进入版本升级链路。 助手身份与本地数据`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`保持不变`}),`(档案/配置分离),在岗状态与工作台不受影响。`]}),(0,U.jsx)(`p`,{className:`rounded-md border border-warning/30 bg-warning/10 px-2.5 py-1.5 text-warning`,children:`名称在该 ARM 源内全局唯一——若他人已用同名(含其本人发布同款),发布会提示冲突,改名后重试即可。`})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:Vt,onClick:()=>G(null),children:`取消`}),(0,U.jsx)(Y,{disabled:Vt,onClick:Ut,children:Vt?`发布中…`:`发布到「${l?.name||`ARM`}」`})]})]})}),(0,U.jsx)(gg,{open:!!Ot,onOpenChange:e=>{Mt||kt(e?Ot:null)},children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-2 text-destructive`,children:[(0,U.jsx)(ng,{className:`h-4 w-4`}),Ot?.local_only?`删除本地档案「${Ot?.name}」?`:`从 ARM 删除「${Ot?.name}」?`]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[Ot?.local_only?(0,U.jsxs)(`p`,{className:`leading-relaxed`,children:[`该助手是离线创建的`,(0,U.jsx)(`b`,{children:`本地未发布档案`}),`(ARM 上不存在)——删除仅移除本机的档案/配置/工作台,不影响其他人。`]}):(0,U.jsxs)(`p`,{className:`leading-relaxed`,children:[`将调用 ARM 删除接口`,(0,U.jsx)(`b`,{children:`永久移除该助手档案`}),`(含已绑定的知识与版本记录),所有工作站将不再可见,此操作不可恢复。`,Ot?.deployed&&` 该助手当前在岗,删除将同时移除上岗配置、工作台与本地档案。`]}),Ot?.installed&&!Ot?.deployed&&(0,U.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 p-2.5`,children:[(0,U.jsx)(hg,{checked:At,onCheckedChange:e=>jt(!!e)}),(0,U.jsx)(`span`,{children:`同时清除工作区数据(数据集库与文件;不勾选则保留在磁盘)`})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:Mt,onClick:()=>kt(null),children:`取消`}),(0,U.jsx)(Y,{variant:`destructive`,disabled:Mt,onClick:Zt,children:Mt?`删除中…`:Ot?.local_only?`确认删除本地档案`:`确认从 ARM 删除`})]})]})}),(0,U.jsx)(gg,{open:!!M,onOpenChange:e=>!se&&N(e?M:null),children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[ae?`调整权限`:`上岗配置`,` · `,M?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`岗位名称`}),(0,U.jsx)(wg,{value:P,onChange:e=>F(e.target.value),className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`它能做什么?(选一档,工具与确认策略一次配好)`}),(0,U.jsxs)(`div`,{className:`grid gap-1.5`,children:[h_.map(e=>{let t=re===e.id,n=e.id===`observer`?m_.length:j.length,r=e.autonomy===`L3`?`免确认`:e.autonomy===`L2`?`写操作先确认`:`不动手`;return(0,U.jsxs)(`button`,{type:`button`,onClick:()=>tt(e.id),className:B(`flex items-start gap-2 rounded-lg border p-2.5 text-left transition-colors`,t?`border-primary bg-primary/10`:`border-border hover:border-primary/50`),children:[(0,U.jsx)(`span`,{className:`pt-0.5 text-sm leading-none`,children:e.emoji}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 text-xs font-medium`,children:[e.title,`recommended`in e&&e.recommended&&(0,U.jsx)(J,{className:`h-4 bg-primary/15 px-1 text-[9px] text-primary`,children:`推荐`}),t&&(0,U.jsx)(Bp,{className:`h-3.5 w-3.5 text-primary`})]}),(0,U.jsx)(`span`,{className:`mt-0.5 block text-[10px] leading-relaxed text-muted-foreground`,children:e.desc}),(0,U.jsxs)(`span`,{className:`mt-0.5 block text-[9px] text-muted-foreground`,children:[n,` 项工具 · `,r,`(`,e.autonomy,`)`]})]})]},e.id)}),re===`custom`&&(0,U.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`当前为手动微调的自定义组合`})]})]}),(0,U.jsxs)(`details`,{className:`rounded-md border`,children:[(0,U.jsx)(`summary`,{className:`cursor-pointer select-none px-2.5 py-2 text-[11px] text-muted-foreground hover:text-foreground`,children:`高级:逐项微调工具与自主级别`}),(0,U.jsxs)(`div`,{className:`space-y-2 border-t p-2.5`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`自主级别(写操作要不要先问你)`}),(0,U.jsxs)(Eg,{value:I,onValueChange:e=>{L(e),ie(`custom`)},children:[(0,U.jsx)(Og,{className:`text-xs`,children:(0,U.jsx)(Dg,{})}),(0,U.jsxs)(kg,{children:[(0,U.jsx)(Ag,{value:`L0`,className:`text-xs`,children:`只回答不动手(L0)`}),(0,U.jsx)(Ag,{value:`L1`,className:`text-xs`,children:`给建议不动手(L1)`}),(0,U.jsx)(Ag,{value:`L2`,className:`text-xs`,children:`做了等我确认(L2)`}),(0,U.jsx)(Ag,{value:`L3`,className:`text-xs text-destructive`,children:`全自动免确认(L3)`})]})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`text-xs`,children:[`工具(`,te.length,`/`,j.length,` 项)`]}),(0,U.jsx)(`div`,{className:`grid grid-cols-1 gap-1.5 rounded-md border p-2`,children:j.map(e=>(0,U.jsxs)(`label`,{className:`flex items-start gap-2 text-xs`,children:[(0,U.jsx)(hg,{checked:te.includes(e.name),onCheckedChange:t=>{ne(n=>t?[...n,e.name]:n.filter(t=>t!==e.name)),ie(`custom`)}}),(0,U.jsxs)(`span`,{className:`min-w-0`,children:[(0,U.jsx)(`span`,{className:`font-mono`,children:e.name}),(0,U.jsx)(`span`,{className:`ml-1.5 text-[10px] text-muted-foreground`,children:e.description.slice(0,40)}),e.min_level>=2&&(0,U.jsx)(J,{variant:`outline`,className:`ml-1 h-4 px-1 text-[9px] text-warning`,children:`写·L2`})]})]},e.name))})]})]})]}),(0,U.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:ae?`保存后即时生效,不影响会话与数据`:`保存后自动下载档案到本地(离线可用)并生成初版工作台与默认工作区`})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:se,onClick:()=>N(null),children:`取消`}),(0,U.jsx)(Y,{disabled:se,onClick:$t,children:se?ae?`保存中…`:`上岗中…`:ae?`保存调整`:`确认上岗`})]})]})}),(0,U.jsx)(gg,{open:!!le,onOpenChange:e=>!e&&ue(null),children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[`升级 · `,le?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(J,{variant:`outline`,children:le?.installed_version}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,U.jsx)(J,{className:`bg-warning/15 text-warning hover:bg-warning/25`,children:le?.remote_version})]}),(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`将从 ARM 拉取新版本档案(prompt + 绑定知识全文)物化到本地版本目录,原版本保留可回滚。若该助手在 ARM 绑定了 UI 资产(三资产模型),将一并物化为工作台新版本(历史可回滚)。`}),(0,U.jsx)(`p`,{className:`rounded-md border border-success/30 bg-success/10 px-2.5 py-1.5 text-success`,children:`你的工作台、插件、工作区与数据将完整保留(档案/配置分离);UI 资产物化只前进版本号不覆盖历史。档案实质变更后,可在「定制工作台」让工程师基于新能力重新定制。`})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,onClick:()=>ue(null),children:`稍后`}),(0,U.jsx)(Y,{disabled:_===le?.agent_id,onClick:()=>le&&Ze(le,`upgrade`),children:_===le?.agent_id?`升级中…`:`升级并保留配置`})]})]})}),(0,U.jsx)(gg,{open:!!de,onOpenChange:e=>{e||(fe(null),z(null))},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[`本地版本 · `,de?.name]})}),(0,U.jsxs)(`div`,{className:`max-h-72 space-y-1.5 overflow-auto text-xs`,children:[!R&&(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`加载中…`}),R?.versions.length===0&&(0,U.jsx)(`p`,{className:`text-muted-foreground`,children:`无本地版本`}),R?.versions.map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border px-2.5 py-2`,children:[(0,U.jsx)(wh,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`font-mono`,children:e.version}),e.current&&(0,U.jsx)(J,{className:`h-4 bg-primary/15 px-1 text-[9px] text-primary`,children:`当前`}),R.remote_version===e.version&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:`与远端一致`})]}),(0,U.jsxs)(`p`,{className:`text-[10px] text-muted-foreground`,children:[Le(e.downloaded_at,`dts`),` · 本地知识 `,e.knowledges,` 条`]})]}),!e.current&&(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-7 text-[11px]`,onClick:()=>de&&$e(de,e.version),children:`回滚到此版`})]},e.version))]}),(0,U.jsxs)(xg,{className:`sm:justify-between`,children:[(0,U.jsxs)(Y,{variant:`outline`,size:`sm`,className:`gap-1 text-xs text-destructive hover:text-destructive`,onClick:()=>de&&me(de),children:[(0,U.jsx)(ng,{className:`h-3.5 w-3.5`}),`卸载该助手`]}),(0,U.jsx)(Y,{variant:`outline`,onClick:()=>{fe(null),z(null)},children:`关闭`})]})]})}),(0,U.jsx)(gg,{open:!!pe,onOpenChange:e=>{e||(me(null),ge(!1))},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[`卸载 · `,pe?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,U.jsxs)(`p`,{children:[`将删除:本地档案(全部版本)、上岗配置、工作台定义与草稿`,pe?.deployed?`(该助手在岗,将一并下岗)`:``,`。`]}),(0,U.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 p-2.5`,children:[(0,U.jsx)(hg,{checked:he,onCheckedChange:e=>ge(!!e)}),(0,U.jsx)(`span`,{children:`同时清除工作区数据(默认工作区目录 + 数据集库;自定义路径只删登记、不动用户文件)`})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,onClick:()=>me(null),children:`取消`}),(0,U.jsx)(Y,{variant:`destructive`,disabled:_===pe?.agent_id,onClick:()=>pe&&et(pe),children:_===pe?.agent_id?`卸载中…`:`确认卸载`})]})]})})]})}function __(e){return e?.views?.length?e.views:[{id:`main`,name:`主视图`,panels:e?.panels||[]}]}function v_(e){let t=__(e).map(e=>({...e,panels:[...e.panels]}));return{...e,views:t,panels:t.flatMap(e=>e.panels)}}var y_=He(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function b_({className:e,variant:t,...n}){return(0,U.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:B(y_({variant:t}),e),...n})}function x_({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`alert-title`,className:B(`col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight`,e),...t})}function S_({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`alert-description`,className:B(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}function C_(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var w_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E_={};function D_(e,t){return((t||E_).jsx?T_:w_).test(e)}var O_=/[ \t\n\f\r]/g;function k_(e){return typeof e==`object`?e.type===`text`&&A_(e.value):A_(e)}function A_(e){return e.replace(O_,``)===``}var j_=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};j_.prototype.normal={},j_.prototype.property={},j_.prototype.space=void 0;function M_(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new j_(n,r,t)}function N_(e){return e.toLowerCase()}var P_=class{constructor(e,t){this.attribute=t,this.property=e}};P_.prototype.attribute=``,P_.prototype.booleanish=!1,P_.prototype.boolean=!1,P_.prototype.commaOrSpaceSeparated=!1,P_.prototype.commaSeparated=!1,P_.prototype.defined=!1,P_.prototype.mustUseProperty=!1,P_.prototype.number=!1,P_.prototype.overloadedBoolean=!1,P_.prototype.property=``,P_.prototype.spaceSeparated=!1,P_.prototype.space=void 0;var F_=s({boolean:()=>L_,booleanish:()=>R_,commaOrSpaceSeparated:()=>H_,commaSeparated:()=>V_,number:()=>Q,overloadedBoolean:()=>z_,spaceSeparated:()=>B_}),I_=0,L_=U_(),R_=U_(),z_=U_(),Q=U_(),B_=U_(),V_=U_(),H_=U_();function U_(){return 2**++I_}var W_=Object.keys(F_),G_=class extends P_{constructor(e,t,n,r){let i=-1;if(super(e,t),K_(this,`space`,r),typeof n==`number`)for(;++i<W_.length;){let e=W_[i];K_(this,W_[i],(n&F_[e])===F_[e])}}};G_.prototype.defined=!0;function K_(e,t,n){n&&(e[t]=n)}function q_(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new G_(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[N_(r)]=r,n[N_(a.attribute)]=r}return new j_(t,n,e.space)}var J_=q_({properties:{ariaActiveDescendant:null,ariaAtomic:R_,ariaAutoComplete:null,ariaBusy:R_,ariaChecked:R_,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:B_,ariaCurrent:null,ariaDescribedBy:B_,ariaDetails:null,ariaDisabled:R_,ariaDropEffect:B_,ariaErrorMessage:null,ariaExpanded:R_,ariaFlowTo:B_,ariaGrabbed:R_,ariaHasPopup:null,ariaHidden:R_,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:B_,ariaLevel:Q,ariaLive:null,ariaModal:R_,ariaMultiLine:R_,ariaMultiSelectable:R_,ariaOrientation:null,ariaOwns:B_,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:R_,ariaReadOnly:R_,ariaRelevant:null,ariaRequired:R_,ariaRoleDescription:B_,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:R_,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Y_(e,t){return t in e?e[t]:t}function X_(e,t){return Y_(e,t.toLowerCase())}var Z_=q_({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:V_,acceptCharset:B_,accessKey:B_,action:null,allow:null,allowFullScreen:L_,allowPaymentRequest:L_,allowUserMedia:L_,alpha:L_,alt:null,as:null,async:L_,autoCapitalize:null,autoComplete:B_,autoFocus:L_,autoPlay:L_,blocking:B_,capture:null,charSet:null,checked:L_,cite:null,className:B_,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:R_,controls:L_,controlsList:B_,coords:Q|V_,crossOrigin:null,data:null,dateTime:null,decoding:null,default:L_,defer:L_,dir:null,dirName:null,disabled:L_,download:z_,draggable:R_,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:L_,formTarget:null,headers:B_,height:Q,hidden:z_,high:Q,href:null,hrefLang:null,htmlFor:B_,httpEquiv:B_,id:null,imageSizes:null,imageSrcSet:null,inert:L_,inputMode:null,integrity:null,is:null,isMap:L_,itemId:null,itemProp:B_,itemRef:B_,itemScope:L_,itemType:B_,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:L_,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:L_,muted:L_,name:null,nonce:null,noModule:L_,noValidate:L_,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:L_,optimum:Q,pattern:null,ping:B_,placeholder:null,playsInline:L_,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:L_,referrerPolicy:null,rel:B_,required:L_,reversed:L_,rows:Q,rowSpan:Q,sandbox:B_,scope:null,scoped:L_,seamless:L_,selected:L_,shadowRootClonable:L_,shadowRootCustomElementRegistry:L_,shadowRootDelegatesFocus:L_,shadowRootMode:null,shadowRootSerializable:L_,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:R_,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:L_,useMap:null,value:R_,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:B_,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:L_,declare:L_,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:L_,noHref:L_,noShade:L_,noWrap:L_,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:R_,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:L_,disablePictureInPicture:L_,disableRemotePlayback:L_,exportParts:V_,part:B_,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:X_}),Q_=q_({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`,maskType:`mask-type`,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:H_,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:B_,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:L_,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:V_,g2:V_,glyphName:V_,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:H_,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:B_,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:H_,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:H_,rev:H_,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:H_,requiredFeatures:H_,requiredFonts:H_,requiredFormats:H_,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:H_,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:H_,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:H_,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Y_}),$_=q_({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ev=q_({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:X_}),tv=q_({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),nv={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`},rv=/[A-Z]/g,iv=/-[a-z]/g,av=/^data[-\w.:]+$/i;function ov(e,t){let n=N_(t),r=t,i=P_;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&av.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(iv,cv);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!iv.test(e)){let n=e.replace(rv,sv);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=G_}return new i(r,t)}function sv(e){return`-`+e.toLowerCase()}function cv(e){return e.charAt(1).toUpperCase()}var lv=M_([J_,Z_,$_,ev,tv],`html`),uv=M_([J_,Q_,$_,ev,tv],`svg`);function dv(e){return e.join(` `).trim()}var fv=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
53
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pv=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(fv());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),mv=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hv=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pv()),r=mv();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),gv=vv(`end`),_v=vv(`start`);function vv(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yv(e){let t=_v(e),n=gv(e);if(t&&n)return{start:t,end:n}}function bv(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Sv(e.position):`start`in e||`end`in e?Sv(e):`line`in e||`column`in e?xv(e):``}function xv(e){return Cv(e&&e.line)+`:`+Cv(e&&e.column)}function Sv(e){return xv(e&&e.start)+`-`+xv(e&&e.end)}function Cv(e){return e&&typeof e==`number`?e:1}var wv=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=bv(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wv.prototype.file=``,wv.prototype.name=``,wv.prototype.reason=``,wv.prototype.message=``,wv.prototype.stack=``,wv.prototype.column=void 0,wv.prototype.line=void 0,wv.prototype.ancestors=void 0,wv.prototype.cause=void 0,wv.prototype.fatal=void 0,wv.prototype.place=void 0,wv.prototype.ruleId=void 0,wv.prototype.source=void 0;var Tv=l(hv(),1),Ev={}.hasOwnProperty,Dv=new Map,Ov=/[A-Z]/g,kv=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Av=new Set([`td`,`th`]),jv=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Mv(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Uv(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Hv(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?uv:lv,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Nv(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Nv(e,t,n){if(t.type===`element`)return Pv(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Fv(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Lv(e,t,n);if(t.type===`mdxjsEsm`)return Iv(e,t);if(t.type===`root`)return Rv(e,t,n);if(t.type===`text`)return zv(e,t)}function Pv(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=uv,e.schema=i),e.ancestors.push(t);let a=Yv(e,t.tagName,!1),o=Wv(e,t),s=Kv(e,t);return kv.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!k_(e)})),Bv(e,o,a,t),Vv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fv(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Xv(e,t.position)}function Iv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Xv(e,t.position)}function Lv(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=uv,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Yv(e,t.name,!0),o=Gv(e,t),s=Kv(e,t);return Bv(e,o,a,t),Vv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rv(e,t,n){let r={};return Vv(r,Kv(e,t)),e.create(t,e.Fragment,r,n)}function zv(e,t){return t.value}function Bv(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Vv(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Hv(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Uv(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_v(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Wv(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ev.call(t.properties,i)){let a=qv(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Av.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Gv(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Xv(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Xv(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Kv(e,t){let n=[],r=-1,i=e.passKeys?new Map:Dv;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Nv(e,a,o);s!==void 0&&n.push(s)}return n}function qv(e,t,n){let r=ov(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?C_(n):dv(n)),r.property===`style`){let t=typeof n==`object`?n:Jv(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Zv(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?nv[r.property]||r.property:r.attribute,n]}}function Jv(e,t){try{return(0,Tv.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new wv("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=jv+`#cannot-parse-style-attribute`,r}}function Yv(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=D_(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=D_(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Ev.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Xv(e)}function Xv(e,t){let n=new wv("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=jv+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Zv(e){let t={},n;for(n in e)Ev.call(e,n)&&(t[Qv(n)]=e[n]);return t}function Qv(e){let t=e.replace(Ov,$v);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function $v(e){return`-`+e.toLowerCase()}var ey={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`]},ty={};function ny(e,t){let n=t||ty;return ry(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function ry(e,t,n){if(ay(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return iy(e.children,t,n)}return Array.isArray(e)?iy(e,t,n):``}function iy(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=ry(e[i],t,n);return r.join(``)}function ay(e){return!!(e&&typeof e==`object`)}var oy=document.createElement(`i`);function sy(e){let t=`&`+e+`;`;oy.innerHTML=t;let n=oy.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function cy(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ly(e,t){return e.length>0?(cy(e,e.length,0,t),e):t}var uy={}.hasOwnProperty;function dy(e){let t={},n=-1;for(;++n<e.length;)fy(t,e[n]);return t}function fy(e,t){let n;for(n in t){let r=(uy.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){uy.call(r,a)||(r[a]=[]);let e=i[a];py(r[a],Array.isArray(e)?e:e?[e]:[])}}}function py(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);cy(e,0,0,r)}function my(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function hy(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var gy=Dy(/[A-Za-z]/),_y=Dy(/[\dA-Za-z]/),vy=Dy(/[#-'*+\--9=?A-Z^-~]/);function yy(e){return e!==null&&(e<32||e===127)}var by=Dy(/\d/),xy=Dy(/[\dA-Fa-f]/),Sy=Dy(/[!-/:-@[-`{-~]/);function $(e){return e!==null&&e<-2}function Cy(e){return e!==null&&(e<0||e===32)}function wy(e){return e===-2||e===-1||e===32}var Ty=Dy(/\p{P}|\p{S}/u),Ey=Dy(/\s/);function Dy(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Oy(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&_y(e.charCodeAt(n+1))&&_y(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ky(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return wy(r)?(e.enter(n),s(r)):t(r)}function s(r){return wy(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Ay(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&wy(t)?(e.enter(r),c(t)):l(t)}function c(t){return wy(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var jy={tokenize:My};function My(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ky(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return $(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Ny=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Py(this,e,t,n,!1)}addBefore(e,t,n){Py(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Py(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var Fy={tokenize:Ly},Iy={tokenize:Ry};function Ly(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Ny;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Iy,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Iy,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return $(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Ny;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ry(e,t,n){return ky(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function zy(e){if(e===null||Cy(e)||Ey(e))return 1;if(Ty(e))return 2}function By(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Vy={name:`attention`,resolveAll:Hy,tokenize:Uy};function Hy(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Wy(o,-a),Wy(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ly(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=ly(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=ly(r,By(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ly(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=ly(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),cy(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Uy(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=zy(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=zy(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Wy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Gy={name:`autolink`,tokenize:Ky};function Ky(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return gy(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||_y(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||_y(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||yy(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):vy(t)?(e.consume(t),l):n(t)}function u(e){return _y(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||_y(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var qy={partial:!0,tokenize:Jy};function Jy(e,t,n){return r;function r(t){return wy(t)?ky(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||$(e)?t(e):n(e)}}var Yy={continuation:{tokenize:Zy},exit:Qy,name:`blockQuote`,tokenize:Xy};function Xy(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return wy(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Zy(e,t,n){let r=this;return i;function i(t){return wy(t)?ky(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Yy,t,n)(r)}}function Qy(e){e.exit(`blockQuote`)}var $y={name:`characterEscape`,tokenize:eb};function eb(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Sy(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var tb={name:`characterReference`,tokenize:nb};function nb(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=_y,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=xy,u):(e.enter(`characterReferenceValue`),a=7,o=by,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===_y&&!sy(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var rb={partial:!0,tokenize:ib};function ib(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var ab={concrete:!0,name:`codeFenced`,tokenize:ob};function ob(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),wy(t)?ky(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||$(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(rb,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):wy(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),ky(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||$(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&wy(t)?ky(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||$(t)?e.check(rb,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||$(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),wy(t)?ky(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),wy(t)?ky(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||$(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var sb={name:`codeIndented`,tokenize:lb},cb={partial:!0,tokenize:ub};function lb(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Ay(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):$(t)?e.attempt(cb,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||$(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function ub(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):$(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Ay(e,t,a,`linePrefix`,4,4)(o)}function a(e){return $(e)?i(e):n(e)}}var db={name:`codeText`,previous:pb,resolve:fb,tokenize:mb};function fb(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function pb(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function mb(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||$(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var hb=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&gb(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),gb(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gb(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);gb(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);gb(this.left,t.reverse())}}}};function gb(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function _b(e){let t={},n=-1,r,i,a,o,s,c,l,u=new hb(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,vb(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return cy(e,0,1/0,u.slice(0)),!l}function vb(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var yb={resolve:xb,tokenize:Sb},bb={partial:!0,tokenize:Cb};function xb(e){return _b(e),e}function Sb(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):$(t)?e.check(bb,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Cb(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ky(e,a,`linePrefix`)}function a(i){if(i===null||$(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function wb(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||yy(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||$(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Cy(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||yy(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Tb(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):$(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||$(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!wy(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Eb(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):$(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ky(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||$(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Db(e,t){let n;return r;function r(i){return $(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):wy(i)?ky(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ob={name:`definition`,tokenize:Ab},kb={partial:!0,tokenize:jb};function Ab(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Tb.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=hy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Cy(t)?Db(e,l)(t):l(t)}function l(t){return wb(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(kb,d,d)(t)}function d(t){return wy(t)?ky(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||$(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function jb(e,t,n){return r;function r(t){return Cy(t)?Db(e,i)(t):n(t)}function i(t){return Eb(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return wy(t)?ky(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||$(e)?t(e):n(e)}}var Mb={name:`hardBreakEscape`,tokenize:Nb};function Nb(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return $(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Pb={name:`headingAtx`,resolve:Fb,tokenize:Ib};function Fb(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};cy(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Ib(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Cy(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||$(n)?(e.exit(`atxHeading`),t(n)):wy(n)?ky(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Cy(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Lb=`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`.split(`.`),Rb=[`pre`,`script`,`style`,`textarea`],zb={concrete:!0,name:`htmlFlow`,resolveTo:Vb,tokenize:Hb},Bb={partial:!0,tokenize:Ub};function Vb(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Hb(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):gy(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):gy(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return gy(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Cy(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Rb.includes(l)?(i=1,r.interrupt?t(s):O(s)):Lb.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||_y(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return wy(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||gy(t)?(e.consume(t),b):wy(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||_y(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):wy(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):wy(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||$(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Cy(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||wy(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||$(t)?O(t):wy(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),ee):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),I):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):$(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Bb,L,k)(t)):t===null||$(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(rb,A,L)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||$(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function ee(t){return t===45?(e.consume(t),F):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return Rb.includes(n)?(e.consume(t),I):O(t)}return gy(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),I):t===45&&i===2?(e.consume(t),F):O(t)}function I(t){return t===null||$(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),I)}function L(n){return e.exit(`htmlFlow`),t(n)}}function Ub(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(qy,t,n)}}var Wb={name:`htmlText`,tokenize:Gb};function Gb(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):gy(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):gy(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):$(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ee(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):$(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ee(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ee(t):$(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):$(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?ee(e):y(e)}function x(t){return gy(t)?(e.consume(t),S):n(t)}function S(t){return t===45||_y(t)?(e.consume(t),S):C(t)}function C(t){return $(t)?(o=C,M(t)):wy(t)?(e.consume(t),C):ee(t)}function w(t){return t===45||_y(t)?(e.consume(t),w):t===47||t===62||Cy(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),ee):t===58||t===95||gy(t)?(e.consume(t),E):$(t)?(o=T,M(t)):wy(t)?(e.consume(t),T):ee(t)}function E(t){return t===45||t===46||t===58||t===95||_y(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):$(t)?(o=D,M(t)):wy(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):$(t)?(o=O,M(t)):wy(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):$(t)?(o=k,M(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Cy(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Cy(e)?T(e):n(e)}function ee(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return wy(t)?ky(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var Kb={name:`labelEnd`,resolveAll:Xb,resolveTo:Zb,tokenize:Qb},qb={tokenize:$b},Jb={tokenize:ex},Yb={tokenize:tx};function Xb(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&cy(e,0,e.length,n),e}function Zb(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=ly(o,e.slice(i+1,i+r+3)),o=ly(o,[[`enter`,l,t]]),o=ly(o,By(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=ly(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=ly(o,e.slice(a+1)),o=ly(o,[[`exit`,s,t]]),cy(e,i,e.length,o),e}function Qb(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(hy(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(qb,u,o?u:d)(t):t===91?e.attempt(Jb,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Yb,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function $b(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Cy(t)?Db(e,a)(t):a(t)}function a(t){return t===41?u(t):wb(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Cy(t)?Db(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Eb(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Cy(t)?Db(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function ex(e,t,n){let r=this;return i;function i(t){return Tb.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(hy(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function tx(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var nx={name:`labelStartImage`,resolveAll:Kb.resolveAll,tokenize:rx};function rx(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ix={name:`labelStartLink`,resolveAll:Kb.resolveAll,tokenize:ax};function ax(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var ox={name:`lineEnding`,tokenize:sx};function sx(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),ky(e,t,`linePrefix`)}}var cx={name:`thematicBreak`,tokenize:lx};function lx(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||$(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),wy(t)?ky(e,s,`whitespace`)(t):s(t))}}var ux={continuation:{tokenize:mx},exit:gx,name:`list`,tokenize:px},dx={partial:!0,tokenize:_x},fx={partial:!0,tokenize:hx};function px(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:by(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(cx,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return by(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(qy,r.interrupt?n:u,e.attempt(dx,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return wy(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function mx(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(qy,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ky(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!wy(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(fx,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,ky(e,e.attempt(ux,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function hx(e,t,n){let r=this;return ky(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function gx(e){e.exit(this.containerState.type)}function _x(e,t,n){let r=this;return ky(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!wy(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var vx={name:`setextUnderline`,resolveTo:yx,tokenize:bx};function yx(e,t){let n=new Ny,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function bx(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),wy(t)?ky(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||$(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var xx={tokenize:Sx};function Sx(e){let t=this,n=e.attempt(qy,r,e.attempt(this.parser.constructs.flowInitial,i,ky(e,e.attempt(this.parser.constructs.flow,i,e.attempt(yb,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Cx={resolveAll:Dx()},wx=Ex(`string`),Tx=Ex(`text`);function Ex(e){return{resolveAll:Dx(e===`text`?Ox:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Dx(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Ox(e,t){let n=new Ny,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var kx=s({attentionMarkers:()=>Lx,contentInitial:()=>jx,disable:()=>Rx,document:()=>Ax,flow:()=>Nx,flowInitial:()=>Mx,insideSpan:()=>Ix,string:()=>Px,text:()=>Fx}),Ax={42:ux,43:ux,45:ux,48:ux,49:ux,50:ux,51:ux,52:ux,53:ux,54:ux,55:ux,56:ux,57:ux,62:Yy},jx={91:Ob},Mx={[-2]:sb,[-1]:sb,32:sb},Nx={35:Pb,42:cx,45:[vx,cx],60:zb,61:vx,95:cx,96:ab,126:ab},Px={38:tb,92:$y},Fx={[-5]:ox,[-4]:ox,[-3]:ox,33:nx,38:tb,42:Vy,60:[Gy,Wb],91:ix,92:[Mb,$y],93:Kb,95:Vy,96:db},Ix={null:[Vy,Cx]},Lx={null:[42,95]},Rx={null:[]};function zx(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ly(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=By(a,l.events,l),l.events):[]}function f(e,t){return Vx(p(e),t)}function p(e){return Bx(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){$(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&cy(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Bx(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Vx(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
54
|
+
`;break;case-3:o=`\r
|
|
55
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Hx(e){let t={constructs:dy([kx,...(e||{}).extensions||[]]),content:n(jy),defined:[],document:n(Fy),flow:n(xx),lazy:{},string:n(wx),text:n(Tx)};return t;function n(e){return n;function n(n){return zx(t,e,n)}}}function Ux(e){for(;!_b(e););return e}var Wx=/[\0\t\n\r]/g;function Gx(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){Wx.lastIndex=c;let n=Wx.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Kx=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qx(e){return e.replace(Kx,Jx)}function Jx(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return my(n.slice(t?2:1),t?16:10)}return sy(n)||e}var Yx={}.hasOwnProperty;function Xx(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Zx(n)(Ux(Hx(n).document().write(Gx()(e,t,!0))))}function Zx(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ge),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(z),blockQuote:o(le),characterEscape:E,characterReference:E,codeFenced:o(ue),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(ue,s),codeText:o(de,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(fe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(R),hardBreakEscape:o(pe),hardBreakTrailing:o(pe),htmlFlow:o(me,s),htmlFlowData:E,htmlText:o(me,s),htmlTextData:E,image:o(he),label:s,link:o(ge),listItem:o(ve),listItemValue:p,listOrdered:o(_e,f),listUnordered:o(_e),paragraph:o(ye),reference:ne,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(z),strong:o(be),thematicBreak:o(Se)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:ie,characterReferenceMarkerNumeric:ie,characterReferenceValue:ae,characterReference:oe,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(ee),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(N),label:F,labelText:P,lineEnding:O,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:I,resourceTitleString:L,resource:te,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};$x(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Yx.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||tS).call(o,void 0,e[0])}for(r.position={start:Qx(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Qx(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Qx(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+bv({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||tS).call(this,e,r[0])),n.position.end=Qx(e.end)}function d(){return ny(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hy(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=xe(),n.position={start:Qx(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Qx(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Qx(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=qx(t),n.identifier=hy(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function te(){this.data.inReference=void 0}function ne(){this.data.referenceType=`collapsed`}function re(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=hy(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ie(e){this.data.characterReferenceType=e.type}function ae(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=my(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=sy(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=Qx(e.end)}function se(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[],position:void 0}}function ue(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function de(){return{type:`inlineCode`,value:``,position:void 0}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function R(){return{type:`emphasis`,children:[],position:void 0}}function z(){return{type:`heading`,depth:0,children:[],position:void 0}}function pe(){return{type:`break`,position:void 0}}function me(){return{type:`html`,value:``,position:void 0}}function he(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ge(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function _e(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function ve(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function ye(){return{type:`paragraph`,children:[],position:void 0}}function be(){return{type:`strong`,children:[],position:void 0}}function xe(){return{type:`text`,value:``,position:void 0}}function Se(){return{type:`thematicBreak`,position:void 0}}}function Qx(e){return{line:e.line,column:e.column,offset:e.offset}}function $x(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?$x(e,r):eS(e,r)}}function eS(e,t){let n;for(n in t)if(Yx.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function tS(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+bv({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+bv({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+bv({start:t.start,end:t.end})+`) is still open`)}function nS(e){let t=this;t.parser=n;function n(n){return Xx(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function rS(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function iS(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
56
|
+
`}]}function aS(e,t){let n=t.value?t.value+`
|
|
57
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function oS(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sS(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cS(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Oy(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function lS(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uS(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function dS(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function fS(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dS(e,t);let i={src:Oy(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function pS(e,t){let n={src:Oy(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function mS(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function hS(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return dS(e,t);let i={href:Oy(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function gS(e,t){let n={href:Oy(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function _S(e,t,n){let r=e.all(t),i=n?vS(n):yS(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
58
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
59
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function vS(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=yS(n[r])}return t}function yS(e){return e.spread??e.children.length>1}function bS(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function xS(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SS(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function CS(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wS(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_v(t.children[1]),o=gv(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function TS(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function ES(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var DS=9,OS=32;function kS(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(AS(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(AS(t.slice(i),i>0,!1)),a.join(``)}function AS(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===DS||t===OS;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===DS||t===OS;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function jS(e,t){let n={type:`text`,value:kS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MS(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var NS={blockquote:rS,break:iS,code:aS,delete:oS,emphasis:sS,footnoteReference:cS,heading:lS,html:uS,imageReference:fS,image:pS,inlineCode:mS,linkReference:hS,link:gS,listItem:_S,list:bS,paragraph:xS,root:SS,strong:CS,table:wS,tableCell:ES,tableRow:TS,text:jS,thematicBreak:MS,toml:PS,yaml:PS,definition:PS,footnoteDefinition:PS};function PS(){}var{defineProperty:FS}=Object,IS=typeof self==`object`?self:globalThis,LS=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new IS[e](t)},RS=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?FS(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof IS[e]==`function`?LS(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(LS(a,o),i)};return r},zS=e=>RS(new Map,e)(0),BS=``,{toString:VS}={},{keys:HS,is:US}=Object,WS=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=VS.call(e).slice(8,-1);switch(n){case`Array`:return[1,BS];case`Object`:return[2,BS];case`Date`:return[3,BS];case`RegExp`:return[4,BS];case`Map`:return[5,BS];case`Set`:return[6,BS];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},GS=([e,t])=>e===0&&(t===`function`||t===`symbol`),KS=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=WS(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&US(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of HS(o))(e||!GS(WS(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?BS:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(GS(WS(n))||GS(WS(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!GS(WS(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},qS=(e,{json:t,lossy:n}={})=>{let r=[];return KS(!(t||n),!!t,new Map,r)(e),r},JS=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?zS(qS(e,t)):structuredClone(e):(e,t)=>zS(qS(e,t));function YS(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function XS(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ZS(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||YS,r=e.options.footnoteBackLabel||XS,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Oy(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...JS(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
60
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
61
|
+
`}]}}var QS=(function(e){if(e==null)return rC;if(typeof e==`function`)return nC(e);if(typeof e==`object`)return Array.isArray(e)?$S(e):eC(e);if(typeof e==`string`)return tC(e);throw Error(`Expected function, string, or object as test`)});function $S(e){let t=[],n=-1;for(;++n<e.length;)t[n]=QS(e[n]);return nC(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function eC(e){let t=e;return nC(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function tC(e){return nC(t);function t(t){return t&&t.type===e}}function nC(e){return t;function t(t,n,r){return!!(iC(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function rC(){return!0}function iC(e){return typeof e==`object`&&!!e&&`type`in e}function aC(e){return e}var oC=[];function sC(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=QS(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+aC(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=oC,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=cC(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function cC(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?oC:[e]}function lC(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),sC(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var uC={}.hasOwnProperty,dC={};function fC(e,t){let n=t||dC,r=new Map,i=new Map,a={all:s,applyData:mC,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...NS,...n.handlers},one:o,options:n,patch:pC,wrap:gC};return lC(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(uC.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=JS(n);return r.children=a.all(e),r}return JS(e)}return(a.options.unknownHandler||hC)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=_C(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=_C(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function pC(e,t){e.position&&(t.position=yv(e))}function mC(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,JS(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function hC(e,t){let n=t.data||{},r=`value`in t&&!(uC.call(n,`hProperties`)||uC.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gC(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
62
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
63
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
64
|
+
`}),n}function _C(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function vC(e,t){let n=fC(e,t),r=n.one(e,void 0),i=ZS(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
65
|
+
`},i)),a}function yC(e,t){return e&&`run`in e?async function(n,r){let i=vC(n,{file:r,...t});await e.run(i,r)}:function(n,r){return vC(n,{file:r,...e||t})}}function bC(e){if(e)throw e}var xC=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function SC(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function CC(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?wC(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function wC(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var TC={basename:EC,dirname:DC,extname:OC,join:kC,sep:`/`};function EC(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);MC(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function DC(e){if(MC(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function OC(e){MC(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function kC(...e){let t=-1,n;for(;++t<e.length;)MC(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:AC(n)}function AC(e){MC(e);let t=e.codePointAt(0)===47,n=jC(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function jC(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function MC(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var NC={cwd:PC};function PC(){return`/`}function FC(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function IC(e){if(typeof e==`string`)e=new URL(e);else if(!FC(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return LC(e)}function LC(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var RC=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],zC=class{constructor(e){let t;t=e?FC(e)?{path:e}:typeof e==`string`||UC(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:NC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<RC.length;){let e=RC[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)RC.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?TC.basename(this.path):void 0}set basename(e){VC(e,`basename`),BC(e,`basename`),this.path=TC.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?TC.dirname(this.path):void 0}set dirname(e){HC(this.basename,`dirname`),this.path=TC.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?TC.extname(this.path):void 0}set extname(e){if(BC(e,`extname`),HC(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=TC.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){FC(e)&&(e=IC(e)),VC(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?TC.basename(this.path,this.extname):void 0}set stem(e){VC(e,`stem`),BC(e,`stem`),this.path=TC.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new wv(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function BC(e,t){if(e&&e.includes(TC.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+TC.sep+"`")}function VC(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function HC(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function UC(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var WC=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),GC=l(xC(),1),KC={}.hasOwnProperty,qC=new class e extends WC{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=CC()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,GC.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(XC(`data`,this.frozen),this.namespace[e]=t,this):KC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(XC(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=$C(e),n=this.parser||this.Parser;return JC(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),JC(`process`,this.parser||this.Parser),YC(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=$C(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);tw(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),JC(`processSync`,this.parser||this.Parser),YC(`processSync`,this.compiler||this.Compiler),this.process(e,r),QC(`processSync`,`process`,t),n;function r(e,r){t=!0,bC(e),n=r}}run(e,t,n){ZC(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=$C(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),QC(`runSync`,`run`,n),r;function i(e,t){bC(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=$C(t),r=this.compiler||this.Compiler;return YC(`stringify`,r),ZC(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(XC(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,GC.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];SC(o)&&SC(r)&&(r=(0,GC.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function JC(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function YC(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function XC(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZC(e){if(!SC(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function QC(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function $C(e){return ew(e)?e:new zC(e)}function ew(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function tw(e){return typeof e==`string`||nw(e)}function nw(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var rw=[],iw={allowDangerousHtml:!0},aw=/^(https?|ircs?|mailto|xmpp)$/i,ow=[{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 sw(e){let t=cw(e),n=lw(e);return uw(t.runSync(t.parse(n),n),e)}function cw(e){let t=e.rehypePlugins||rw,n=e.remarkPlugins||rw,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...iw}:iw;return qC().use(nS).use(n).use(yC,r).use(t)}function lw(e){let t=e.children||``,n=new zC;return typeof t==`string`?n.value=t:``+t,n}function uw(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||dw;for(let e of ow)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return lC(e,l),Mv(e,{Fragment:U.Fragment,components:i,ignoreInvalidStyle:!0,jsx:U.jsx,jsxs:U.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ey)if(Object.hasOwn(ey,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ey[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function dw(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||aw.test(e.slice(0,t))?e:``}function fw(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function pw(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function mw(e,t,n){let r=QS((n||{}).ignore||[]),i=hw(t),a=-1;for(;++a<i.length;)sC(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function hw(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([gw(e[0]),_w(e[1])])}return t}function gw(e){return typeof e==`string`?new RegExp(pw(e),`g`):e}function _w(e){return typeof e==`function`?e:function(){return e}}var vw=`phrasing`,yw=[`autolink`,`link`,`image`,`label`];function bw(){return{transforms:[Ow],enter:{literalAutolink:Sw,literalAutolinkEmail:Cw,literalAutolinkHttp:Cw,literalAutolinkWww:Cw},exit:{literalAutolink:Dw,literalAutolinkEmail:Ew,literalAutolinkHttp:ww,literalAutolinkWww:Tw}}}function xw(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:vw,notInConstruct:yw},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:vw,notInConstruct:yw},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:vw,notInConstruct:yw}]}}function Sw(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Cw(e){this.config.enter.autolinkProtocol.call(this,e)}function ww(e){this.config.exit.autolinkProtocol.call(this,e)}function Tw(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Ew(e){this.config.exit.autolinkEmail.call(this,e)}function Dw(e){this.exit(e)}function Ow(e){mw(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Aw]],{ignore:[`link`,`linkReference`]})}function kw(e,t,n,r,i){let a=``;if(!Nw(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!jw(n)))return!1;let o=Mw(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Aw(e,t,n,r){return!Nw(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function jw(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Mw(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=fw(e,`(`),a=fw(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Nw(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Ey(n)||Ty(n))&&(!t||n!==47)}Uw.peek=Hw;function Pw(){this.buffer()}function Fw(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Iw(){this.buffer()}function Lw(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Rw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hy(this.sliceSerialize(e)).toLowerCase(),n.label=t}function zw(e){this.exit(e)}function Bw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=hy(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vw(e){this.exit(e)}function Hw(){return`[`}function Uw(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ww(){return{enter:{gfmFootnoteCallString:Pw,gfmFootnoteCall:Fw,gfmFootnoteDefinitionLabelString:Iw,gfmFootnoteDefinition:Lw},exit:{gfmFootnoteCallString:Rw,gfmFootnoteCall:zw,gfmFootnoteDefinitionLabelString:Bw,gfmFootnoteDefinition:Vw}}}function Gw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Uw},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
66
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?qw:Kw))),s(),o}}function Kw(e,t,n){return t===0?e:qw(e,t,n)}function qw(e,t,n){return(n?``:` `)+e}var Jw=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];$w.attention=eT,$w.peek=tT;function Yw(){return{canContainEols:[`delete`],enter:{strikethrough:Zw},exit:{strikethrough:Qw}}}function Xw(){return{handlers:{delete:$w},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Jw}]}}function Zw(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Qw(e){this.exit(e)}function $w(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function eT(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function tT(){return`~`}function nT(e){return e.length}function rT(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||nT,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=iT(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=aT(r[d]);else{let e=aT(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
67
|
+
`)}function iT(e){return e==null?``:String(e)}function aT(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var oT=QS([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function sT(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),cT);return i(),o}function cT(e,t,n){return`>`+(n?``:` `)+e}function lT(e,t){return uT(e,t.inConstruct,!0)&&!uT(e,t.notInConstruct,!1)}function uT(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function dT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
|
|
68
|
+
`&&!e.before&&!e.after&&lT(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
|
|
69
|
+
`}function fT(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function pT(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function mT(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function hT(e,t,n,r){let i=mT(n),a=e.value||``;if(pT(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,gT);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(fT(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
70
|
+
`,encode:["`"],...o.current()})),t()}return u+=o.move(`
|
|
71
|
+
`),a&&(u+=o.move(a+`
|
|
72
|
+
`)),u+=o.move(s),c(),u}function gT(e,t,n){return(n?``:` `)+e}function _T(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function vT(e,t,n,r){let i=_T(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
73
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function yT(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}bT.attention=xT,bT.peek=ST;function bT(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function xT(e,t){return{construct:`emphasis`,markers:yT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function ST(e,t,n){return n.options.emphasis||`*`}function CT(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function wT(e,t){let n=!1;return lC(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&ny(e)&&(t.options.setext||n))}function TT(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(wT(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
74
|
+
`,after:`
|
|
75
|
+
`});return r(),t(),o+`
|
|
76
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
77
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
78
|
+
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=CT(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}ET.peek=DT;function ET(e){return e.value||``}function DT(){return`<`}OT.peek=kT;function OT(e,t,n,r){let i=_T(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function kT(){return`!`}AT.peek=jT;function AT(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function jT(){return`!`}MT.peek=NT;function MT(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function NT(){return"`"}function PT(e,t){let n=ny(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}FT.peek=IT;function FT(e,t,n,r){let i=_T(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(PT(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function IT(e,t,n){return PT(e,n)?`<`:`[`}LT.peek=RT;function LT(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function RT(){return`[`}function zT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function BT(e){let t=zT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function VT(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function HT(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function UT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?VT(n):zT(n),s=e.ordered?o===`.`?`)`:`.`:BT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),HT(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function WT(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function GT(e,t,n,r){let i=WT(n),a=n.bulletCurrent||zT(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function KT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function qT(e,t,n,r){if(!e.children.some(function(e){return oT(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function JT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YT.attention=XT,YT.peek=ZT;function YT(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function XT(e,t){return{construct:`strong`,markers:JT(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function ZT(e,t,n){return n.options.strong||`*`}function QT(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function $T(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function eE(e,t,n){let r=(HT(n)+(n.options.ruleSpaces?` `:``)).repeat($T(n));return n.options.ruleSpaces?r.slice(0,-1):r}var tE={blockquote:sT,break:dT,code:hT,definition:vT,emphasis:bT,hardBreak:dT,heading:TT,html:ET,image:OT,imageReference:AT,inlineCode:MT,link:FT,linkReference:LT,list:UT,listItem:GT,paragraph:KT,root:qT,strong:YT,text:QT,thematicBreak:eE};function nE(){return{enter:{table:rE,tableData:sE,tableHeader:sE,tableRow:aE},exit:{codeText:cE,table:iE,tableData:oE,tableHeader:oE,tableRow:oE}}}function rE(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function iE(e){this.exit(e),this.data.inTable=void 0}function aE(e){this.enter({type:`tableRow`,children:[]},e)}function oE(e){this.exit(e)}function sE(e){this.enter({type:`tableCell`,children:[]},e)}function cE(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lE));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lE(e,t){return t===`|`?t:e}function uE(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
79
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
80
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return rT(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=tE.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function dE(){return{exit:{taskListCheckValueChecked:pE,taskListCheckValueUnchecked:pE,paragraph:mE}}}function fE(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:hE}}}function pE(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function mE(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function hE(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=tE.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function gE(){return[bw(),Ww(),Yw(),nE(),dE()]}function _E(e){return{extensions:[xw(),Gw(e),Xw(),uE(e),fE()]}}var vE={tokenize:ME,partial:!0},yE={tokenize:NE,partial:!0},bE={tokenize:PE,partial:!0},xE={tokenize:FE,partial:!0},SE={tokenize:IE,partial:!0},CE={name:`wwwAutolink`,tokenize:AE,previous:LE},wE={name:`protocolAutolink`,tokenize:jE,previous:RE},TE={name:`emailAutolink`,tokenize:kE,previous:zE},EE={};function DE(){return{text:EE}}for(var OE=48;OE<123;)EE[OE]=TE,OE++,OE===58?OE=65:OE===91&&(OE=97);EE[43]=TE,EE[45]=TE,EE[46]=TE,EE[95]=TE,EE[72]=[TE,wE],EE[104]=[TE,wE],EE[87]=[TE,CE],EE[119]=[TE,CE];function kE(e,t,n){let r=this,i,a;return o;function o(t){return!BE(t)||!zE.call(r,r.previous)||VE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return BE(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(SE,u,l)(t):t===45||t===95||_y(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&gy(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function AE(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!LE.call(r,r.previous)||VE(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(vE,e.attempt(yE,e.attempt(bE,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function jE(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&RE.call(r,r.previous)&&!VE(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(gy(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||yy(t)||Cy(t)||Ey(t)||Ty(t)?n(t):e.attempt(yE,e.attempt(bE,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ME(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function NE(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(xE,c,s)(t):t===null||Cy(t)||Ey(t)||t!==45&&Ty(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function PE(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xE,t,a)(o):o===null||Cy(o)||Ey(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function FE(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Cy(o)||Ey(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Cy(e)||Ey(e)?t(e):r(e)}function a(e){return gy(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):gy(t)?(e.consume(t),o):n(t)}}function IE(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return _y(e)?n(e):t(e)}}function LE(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Cy(e)}function RE(e){return!gy(e)}function zE(e){return!(e===47||BE(e))}function BE(e){return e===43||e===45||e===46||e===95||_y(e)}function VE(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var HE={tokenize:XE,partial:!0};function UE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:qE,continuation:{tokenize:JE},exit:YE}},text:{91:{name:`gfmFootnoteCall`,tokenize:KE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:WE,resolveTo:GE}}}}function WE(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=hy(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function GE(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function KE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Cy(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(hy(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Cy(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function qE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Cy(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=hy(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Cy(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),ky(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function JE(e,t,n){return e.check(qy,t,e.attempt(HE,t,n))}function YE(e){e.exit(`gfmFootnoteDefinition`)}function XE(e,t,n){let r=this;return ky(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ZE(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&cy(o,o.length,0,By(s,e.slice(r+1,n),t)),cy(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),cy(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=zy(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=zy(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var QE=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){$E(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function $E(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function eD(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function tD(){return{flow:{null:{name:`table`,tokenize:nD,resolveAll:rD}}}}function nD(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):$(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):wy(t)?ky(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Cy(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,wy(t)?ky(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return wy(t)?ky(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||$(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return wy(t)?ky(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||$(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||$(n)?(e.exit(`tableRow`),t(n)):wy(n)?ky(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Cy(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function rD(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new QE;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(aD(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=iD(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=iD(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=iD(f,t,o,i,n,d)):(o[0]=o[1],d=iD(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&aD(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=eD(t.events,n))}return e}function iD(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},oD(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=oD(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=oD(t.events,n[2]),a=oD(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},oD(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function aD(e,t,n,r,i){let a=[],o=oD(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function oD(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var sD={name:`tasklistCheck`,tokenize:lD};function cD(){return{text:{91:sD}}}function lD(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Cy(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return $(r)?t(r):wy(r)?e.check({tokenize:uD},t,n)(r):n(r)}}function uD(e,t,n){return ky(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function dD(e){return dy([DE(),UE(),ZE(e),tD(),cD()])}var fD={};function pD(e){let t=this,n=e||fD,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(dD(n)),a.push(gE()),o.push(_E(n))}function mD({text:e}){return(0,U.jsx)(`div`,{className:`break-words text-xs leading-relaxed
|
|
81
|
+
[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2
|
|
82
|
+
[&_strong]:font-semibold
|
|
83
|
+
[&_h1]:mb-1 [&_h1]:mt-2 [&_h1]:text-sm [&_h1]:font-bold
|
|
84
|
+
[&_h2]:mb-1 [&_h2]:mt-2 [&_h2]:text-xs [&_h2]:font-bold
|
|
85
|
+
[&_h3]:mb-0.5 [&_h3]:mt-1.5 [&_h3]:font-semibold
|
|
86
|
+
[&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4
|
|
87
|
+
[&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4
|
|
88
|
+
[&_li]:my-0.5
|
|
89
|
+
[&_blockquote]:my-1 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-2 [&_blockquote]:text-muted-foreground
|
|
90
|
+
[&_hr]:my-2 [&_hr]:border-border
|
|
91
|
+
[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em] [&_code]:break-all
|
|
92
|
+
[&_pre]:my-1 [&_pre]:max-w-full [&_pre]:overflow-x-auto [&_pre]:rounded [&_pre]:bg-muted [&_pre]:p-2 [&_pre]:text-[10px]
|
|
93
|
+
[&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:break-normal
|
|
94
|
+
[&_table]:my-1.5 [&_table]:block [&_table]:w-full [&_table]:max-w-full [&_table]:overflow-x-auto [&_table]:border-collapse [&_table]:text-[11px]
|
|
95
|
+
[&_th]:border [&_th]:border-border [&_th]:bg-muted/50 [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:font-semibold
|
|
96
|
+
[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1 [&_td]:break-words`,children:(0,U.jsx)(sw,{remarkPlugins:[pD],children:e})})}function hD({raw:e,onSend:t}){let n;try{n=JSON.parse(e)}catch{return(0,U.jsx)(`pre`,{className:`rounded bg-muted p-2 text-[10px] whitespace-pre-wrap break-all`,children:e})}let r=String(n.type||``);if(r===`choice`)return(0,U.jsx)(gD,{block:n,onSend:t});if(r===`form`)return(0,U.jsx)(_D,{block:n,onSend:t});if(r===`steps`){let e=n.steps||[];return(0,U.jsxs)(`div`,{className:`rounded-lg border bg-card p-3`,children:[n.title&&(0,U.jsx)(`div`,{className:`mb-2 text-xs font-semibold`,children:String(n.title)}),(0,U.jsx)(`ol`,{className:`space-y-1.5`,children:e.map((e,t)=>(0,U.jsxs)(`li`,{className:`text-xs leading-relaxed`,children:[(0,U.jsx)(`span`,{className:`mr-1.5 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary/20 font-mono text-[10px] text-primary`,children:t+1}),e.warning&&(0,U.jsxs)(`span`,{className:`mb-0.5 flex items-center gap-1 rounded bg-warning/10 px-1.5 py-0.5 text-[10px] text-warning`,children:[(0,U.jsx)(og,{className:`h-3 w-3`}),e.warning]}),e.caution&&(0,U.jsxs)(`span`,{className:`mb-0.5 flex items-center gap-1 rounded bg-destructive/10 px-1.5 py-0.5 text-[10px] text-destructive`,children:[(0,U.jsx)(ih,{className:`h-3 w-3`}),e.caution]}),(0,U.jsx)(`span`,{className:`ml-1`,children:e.text})]},t))})]})}if(r===`callout`){let e=String(n.tone||`note`);return(0,U.jsxs)(b_,{className:`py-2 text-xs ${e===`warning`?`border-destructive/50 text-destructive`:e===`caution`?`border-warning/50 text-warning`:e===`tip`?`border-success/40 text-success`:``}`,children:[e===`warning`?(0,U.jsx)(ih,{className:`h-4 w-4`}):e===`caution`?(0,U.jsx)(og,{className:`h-4 w-4`}):(0,U.jsx)(Rm,{className:`h-4 w-4`}),(0,U.jsx)(x_,{className:`text-xs`,children:String(n.title||{warning:`警告`,caution:`注意`,tip:`提示`,note:`说明`}[e]||`说明`)}),(0,U.jsx)(S_,{className:`text-xs leading-relaxed`,children:String(n.text||``)})]})}if(r===`metrics`){let e=n.items||[],t=e=>typeof e==`number`?e:parseFloat(String(e))||0;return(0,U.jsxs)(`div`,{className:`rounded-lg border bg-card p-2.5`,children:[(0,U.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between text-[10px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:String(n.title||`指标`)}),n.asOf&&(0,U.jsxs)(`span`,{children:[`截至 `,Le(String(n.asOf),`tm`)]})]}),(0,U.jsx)(`div`,{className:`grid grid-cols-2 gap-1.5`,children:e.map((e,n)=>{let r=t(e.value),i=e.danger!=null&&(e.worse===`low`?r<=e.danger:r>=e.danger),a=e.warn!=null&&(e.worse===`low`?r<=e.warn:r>=e.warn);return(0,U.jsxs)(`div`,{className:`rounded-md border px-2 py-1.5 ${i?`border-destructive/50 bg-destructive/10`:a?`border-warning/50 bg-warning/10`:`bg-muted/40`}`,children:[(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.label}),(0,U.jsxs)(`div`,{className:`font-mono text-sm font-semibold ${i?`text-destructive`:a?`text-warning`:``}`,children:[e.value,e.unit&&(0,U.jsx)(`span`,{className:`ml-0.5 text-[10px] font-normal`,children:e.unit})]}),e.detail&&(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.detail})]},n)})})]})}return(0,U.jsxs)(`div`,{className:`rounded-md border border-dashed p-2`,children:[(0,U.jsxs)(J,{variant:`secondary`,className:`mb-1 text-[9px]`,children:[`a2ui:`,r||`未知`]}),(0,U.jsx)(`pre`,{className:`overflow-auto text-[10px] text-muted-foreground`,children:e.slice(0,400)})]})}function gD({block:e,onSend:t}){let n=e.options||[];return(0,U.jsxs)(`div`,{className:`rounded-lg border border-primary/30 bg-primary/5 p-3`,children:[(0,U.jsx)(`div`,{className:`mb-2 text-xs font-semibold`,children:String(e.question||`请选择`)}),(0,U.jsx)(`div`,{className:`space-y-1.5`,children:n.map((e,n)=>(0,U.jsxs)(`button`,{onClick:()=>t(e.value||e.label),className:`flex w-full items-center gap-2 rounded-md border bg-card px-2.5 py-1.5 text-left text-xs transition-colors hover:border-primary/60 hover:bg-primary/10`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:String.fromCharCode(65+n)}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e.label}),e.description&&(0,U.jsx)(`span`,{className:`block text-[10px] text-muted-foreground`,children:e.description})]}),e.recommended&&(0,U.jsx)(J,{className:`bg-success/15 text-[9px] text-success hover:bg-success/25`,children:`推荐`})]},n))})]})}function _D({block:e,onSend:t}){let n=e.fields||[],[r,i]=(0,v.useState)({});return(0,U.jsx)(Gf,{className:`border-primary/30 py-0`,children:(0,U.jsxs)(Jf,{className:`space-y-2 p-3`,children:[(0,U.jsx)(`div`,{className:`text-xs font-semibold`,children:String(e.title||`请填写`)}),n.map(e=>(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`text-[11px]`,children:[e.label,e.required&&(0,U.jsx)(`span`,{className:`ml-0.5 text-destructive`,children:`*`})]}),(0,U.jsx)(wg,{value:r[e.id]||``,placeholder:e.placeholder,className:`h-7 text-xs`,onChange:t=>i(n=>({...n,[e.id]:t.target.value}))})]},e.id)),(0,U.jsx)(Y,{size:`sm`,className:`w-full text-xs`,onClick:()=>{let e=n.filter(e=>r[e.id]?.trim()).map(e=>`${e.label}: ${r[e.id].trim()}`);e.length&&t(e.join(`
|
|
97
|
+
`))},children:String(e.submitLabel||`提交`)})]})})}function vD({blocks:e,onSend:t}){let n=e.map(e=>({question:String(e?.question||`请选择`),options:e?.options||[]})),r=n.length,[i,a]=(0,v.useState)(0),[o,s]=(0,v.useState)(()=>n.map(()=>null)),c=o.every(Boolean),l=e=>{s(t=>{let n=[...t];return n[i]=e,n}),a(e=>Math.min(e+1,r))},u=()=>t(n.map((e,t)=>`${e.question}: ${o[t]}`).join(`
|
|
98
|
+
`)),d=Math.min(i,r);return(0,U.jsxs)(`div`,{className:`rounded-lg border border-primary/30 bg-primary/5 p-3`,children:[(0,U.jsxs)(`div`,{className:`mb-2 flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`text-xs font-semibold`,children:i<r?`第 ${i+1}/${r} 步 · ${n[i].question}`:`全部选择完毕,请确认`}),(0,U.jsx)(`span`,{className:`ml-auto flex items-center gap-1`,children:n.map((e,t)=>(0,U.jsx)(`span`,{className:`h-1.5 w-4 rounded-full transition-colors ${t<d||c?`bg-primary`:t===i?`bg-primary/40`:`bg-muted`}`},t))})]}),o.some(Boolean)&&(0,U.jsx)(`div`,{className:`mb-2 flex flex-wrap gap-1`,children:n.map((e,t)=>o[t]&&(0,U.jsxs)(`button`,{onClick:()=>a(t),className:`inline-flex max-w-full items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition-colors ${i===t?`border-primary/60 bg-primary/10`:`bg-card hover:border-primary/40`}`,children:[(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.question}),(0,U.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:o[t]}),i!==t&&(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`✎`})]},t))}),i<r?(0,U.jsx)(`div`,{className:`space-y-1.5`,children:n[i].options.map((e,t)=>(0,U.jsxs)(`button`,{onClick:()=>l(e.value||e.label),className:`flex w-full items-center gap-2 rounded-md border bg-card px-2.5 py-1.5 text-left text-xs transition-colors hover:border-primary/60 hover:bg-primary/10`,children:[(0,U.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:String.fromCharCode(65+t)}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e.label}),e.description&&(0,U.jsx)(`span`,{className:`block text-[10px] text-muted-foreground`,children:e.description})]}),e.recommended&&(0,U.jsx)(J,{className:`bg-success/15 text-[9px] text-success hover:bg-success/25`,children:`推荐`})]},t))}):(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`rounded-md border bg-card px-2.5 py-2 text-xs leading-relaxed`,children:n.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,U.jsx)(Ap,{className:`h-3 w-3 shrink-0 translate-y-0.5 text-success`}),(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.question,`:`]}),(0,U.jsx)(`span`,{className:`min-w-0 font-medium break-words`,children:o[t]})]},t))}),(0,U.jsxs)(Y,{size:`sm`,className:`w-full text-xs`,disabled:!c,onClick:u,children:[(0,U.jsx)(Ah,{className:`h-3 w-3`}),`确认发送(`,r,` 项选择)`]})]}),(0,U.jsxs)(`div`,{className:`mt-2 flex items-center gap-2 text-[10px] text-muted-foreground`,children:[i>0&&(0,U.jsxs)(Y,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-[10px]`,onClick:()=>a(e=>Math.max(0,e-1)),children:[(0,U.jsx)(gp,{className:`h-3 w-3`}),`上一步`]}),i<r&&o[i]&&(0,U.jsxs)(Y,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-[10px]`,onClick:()=>a(e=>Math.min(r,e+1)),children:[`下一步`,(0,U.jsx)(vp,{className:`h-3 w-3`})]}),i<r&&(0,U.jsxs)(`span`,{className:`ml-auto`,children:[`选完 `,r,` 项后统一发送,不会逐项触发对话`]})]})]})}function yD({text:e,onSend:t}){let n=(e||``).split(/```a2ui\s*\n?([\s\S]*?)```/g),r=e=>{try{return JSON.parse(e)?.type===`choice`}catch{return!1}},i=[],a=0;for(;a<n.length;){if(a%2==0){n[a].trim()&&i.push((0,U.jsx)(mD,{text:n[a]},a)),a++;continue}let e=[],o=a;for(;o<n.length&&r(n[o])&&(e.length===0||!n[o-1].trim());)e.push(n[o]),o+=2;e.length>=2?i.push((0,U.jsx)(vD,{blocks:e.map(e=>JSON.parse(e)),onSend:t},a)):i.push((0,U.jsx)(hD,{raw:n[a],onSend:t},a)),a+=e.length>=2?e.length*2-1:1}return(0,U.jsx)(v.Fragment,{children:i})}function bD({className:e,children:t,...n}){return(0,U.jsxs)(du,{"data-slot":`scroll-area`,className:B(`relative`,e),...n,children:[(0,U.jsx)(mu,{"data-slot":`scroll-area-viewport`,className:`size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1`,children:t}),(0,U.jsx)(xD,{}),(0,U.jsx)(Nu,{})]})}function xD({className:e,orientation:t=`vertical`,...n}){return(0,U.jsx)(yu,{"data-slot":`scroll-area-scrollbar`,orientation:t,className:B(`flex touch-none p-px transition-colors select-none`,t===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,t===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,e),...n,children:(0,U.jsx)(Au,{"data-slot":`scroll-area-thumb`,className:`relative flex-1 rounded-full bg-border`})})}function SD({className:e,...t}){return(0,U.jsx)(`textarea`,{"data-slot":`textarea`,className:B(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var CD=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`,wD=2048,TD=2097152,ED=10;async function DD(e){let t={blob:e,name:e.name};if(/gif|svg/.test(e.type))return t;let n;try{n=await createImageBitmap(e)}catch{return t}let r=Math.min(1,wD/Math.max(n.width,n.height));if(r===1&&e.size<=TD)return n.close(),t;let i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(n.width*r)),i.height=Math.max(1,Math.round(n.height*r)),i.getContext(`2d`)?.drawImage(n,0,0,i.width,i.height),n.close();let a=await new Promise(e=>i.toBlob(e,`image/jpeg`,.9));return a&&a.size<e.size?{blob:a,name:e.name.replace(/\.\w+$/,``)+`.jpg`}:t}function OD({agentId:e,agentName:t,sessionId:n,wsId:r,injectedDevice:i,autonomy:a}){let[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(``),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(!1),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),T=(0,v.useRef)(null),E=(0,v.useRef)(null),D=(0,v.useRef)(!1);(0,v.useEffect)(()=>{D.current=u},[u]);let O=(0,v.useRef)(!1),k=(0,v.useRef)(!1);(0,v.useEffect)(()=>{let e=!0,t=async()=>{if(D.current||!e)return;let t;try{t=await V(`/api/chat/history?sessionId=${encodeURIComponent(n)}`)}catch{return}if(!e||!t.exists)return;let r=!!(t.running||t.pending);(!O.current||r||k.current)&&(O.current=!0,k.current=r,s([...t.msgs||[],...t.pending?[{kind:`pending`,intro:`(恢复现场)待确认操作:${t.pending.tool}`}]:[]]),p(t.pending||null),h(r?`后台进行中:${t.statusText||(t.pending?`等待人工确认`:``)}`:``))};t();let r=setInterval(t,2500);return()=>{e=!1,clearInterval(r)}},[n]);let A=(0,v.useRef)(!0),j=(0,v.useCallback)(()=>{let e=T.current?.closest(`[data-slot="scroll-area-viewport"]`);e&&(e.scrollTop=e.scrollHeight)},[]);(0,v.useEffect)(()=>{let e=T.current?.closest(`[data-slot="scroll-area-viewport"]`);if(!e)return;let t=()=>{A.current=e.scrollHeight-e.scrollTop-e.clientHeight<80};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},[]),(0,v.useEffect)(()=>{A.current&&j()},[o,m,j]),(0,v.useEffect)(()=>{A.current=!0},[n]);let ee=e=>s(t=>[...t,e]),[M,N]=(0,v.useState)([]),[P,F]=(0,v.useState)(null),[I,L]=(0,v.useState)(!1),te=(0,v.useRef)(0),ne=(0,v.useRef)(null),re=`agentId=${encodeURIComponent(e)}${r?`&ws_id=${encodeURIComponent(r)}`:``}`,ie=e=>`/api/attachments/file?${re}&rel=${encodeURIComponent(e)}`;(0,v.useEffect)(()=>{N(e=>(e.forEach(e=>e.preview&&URL.revokeObjectURL(e.preview)),[]))},[n]);let ae=async e=>{let t=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,n=e.type.startsWith(`image/`),r=e.name&&!/^image\.\w+$/i.test(e.name)?e.name:`粘贴图片-${Le(new Date().toISOString(),`t`).replace(/:/g,``)}.${(e.type.split(`/`)[1]||`png`).replace(`jpeg`,`jpg`)}`,i=n?URL.createObjectURL(e):void 0;N(a=>[...a,{id:t,rel:``,name:r,size:e.size,mime:e.type||`application/octet-stream`,kind:n?`image`:`binary`,status:`uploading`,preview:i}]);try{let i=n?await DD(new File([e],r,{type:e.type})):{blob:e,name:r},a=await fetch(`/api/attachments?${re}`,{method:`POST`,headers:{"Content-Type":i.blob.type||`application/octet-stream`,"X-File-Name":encodeURIComponent(i.name)},body:i.blob}),o=await a.json().catch(()=>({}));if(!a.ok||!o.attachment)throw Error(o.error||`HTTP ${a.status}`);typeof o.vision==`boolean`&&F(o.vision);let s=o.attachment;N(e=>e.map(e=>e.id===t?{...e,...s,status:`ok`}:e))}catch(e){N(e=>e.filter(e=>e.id!==t)),i&&URL.revokeObjectURL(i),Z.error(`附件上传失败:${r}`,{description:String(e.message)})}},oe=e=>{let t=Array.from(e);M.length+t.length>ED?Z.info(`单条消息最多 ${ED} 个附件`):t.forEach(e=>void ae(e))},se=e=>{N(t=>t.filter(t=>t.id!==e.id)),e.preview&&URL.revokeObjectURL(e.preview),e.rel&&fetch(`/api/attachments?${re}&rel=${encodeURIComponent(e.rel)}`,{method:`DELETE`}).catch(()=>{})},ce=e=>{let t=Array.from(e.clipboardData?.files||[]);t.length&&(e.preventDefault(),oe(t))},le=e=>Array.from(e.dataTransfer.types).includes(`Files`),ue=e=>{le(e)&&(e.preventDefault(),te.current++,L(!0))},de=e=>{le(e)&&e.preventDefault()},fe=()=>{--te.current<=0&&(te.current=0,L(!1))},R=e=>{e.preventDefault(),te.current=0,L(!1),e.dataTransfer.files.length&&oe(e.dataTransfer.files)},z=(0,v.useRef)(null),pe=()=>{z.current?.abort(),Oe(`/api/chat/interrupt`,{sessionId:n}).catch(()=>{})},me=async()=>{if(u)Z.info(`对话进行中,请先中断再清空`);else if(window.confirm(`清空当前会话?服务端上下文与待确认操作将被丢弃,从零开始对话。`))try{await Oe(`/api/session/reset`,{scope:`chat`,sessionId:n}),s([]),p(null),h(``),O.current=!1,Z.success(`会话已清空`)}catch(e){Z.error(String(e.message))}},he=e=>{let t=e.type;if(t===`status`)h(String(e.text||``));else if(t===`text_delta`){let t=e.delta;h(``),s(e=>{let n=e[e.length-1];return n?.kind===`bot`?[...e.slice(0,-1),{...n,text:(n.text||``)+t}]:[...e,{kind:`bot`,text:t}]})}else t===`tool_start`?ee({kind:`evt`,evt:{tool:e.tool,args:e.args,result:`…`,status:`start`}}):t===`tool_end`?s(t=>{let n=[...t].reverse().findIndex(t=>t.kind===`evt`&&t.evt?.tool===e.tool&&t.evt?.status===`start`);if(n<0)return[...t,{kind:`evt`,evt:e}];let r=t.length-1-n;return t.map((t,n)=>n===r?{kind:`evt`,evt:e}:t)}):t===`pending`?(p(e.pending),ee({kind:`pending`,intro:e.intro}),h(``)):t===`done`?(h(``),e.reply&&s(t=>{let n=t[t.length-1];return n?.kind===`bot`&&n.text&&e.reply&&n.text.trim()===String(e.reply).trim()?t:[...t,{kind:`bot`,text:String(e.reply)}]})):t===`interrupted`?(h(``),s(e=>{let t=e[e.length-1];return t?.kind===`bot`?[...e.slice(0,-1),{...t,text:(t.text||``)+`
|
|
99
|
+
|
|
100
|
+
(已中断)`}]:[...e,{kind:`bot`,text:`(已中断)`}]})):t===`error`&&(Z.error(String(e.message)),h(``))},ge=async()=>{let e=c.trim(),t=M.filter(e=>e.status===`ok`);!e&&!t.length||u||(M.some(e=>e.status===`uploading`)?Z.info(`附件还在上传,请稍候`):(l(``),N([]),t.forEach(e=>e.preview&&URL.revokeObjectURL(e.preview)),await _e(e,t.map(({rel:e,name:t,size:n,mime:r,kind:i})=>({rel:e,name:t,size:n,mime:r,kind:i})))))},_e=async(t,o=[])=>{if(u)return;d(!0),A.current=!0,ee({kind:`user`,text:t,...o.length?{attachments:o}:{}});let s=new AbortController;z.current=s;try{await je(`/api/chat`,{sessionId:n,agentId:e,message:t,autonomyLevel:a,ws_id:r,context:i?{device:i}:null,attachments:o.map(e=>({rel:e.rel}))},he,s.signal)}catch(e){s.signal.aborted||Z.error(String(e.message))}finally{d(!1),z.current===s&&(z.current=null)}},ve=async e=>{if(!f)return;p(null),d(!0),A.current=!0,s(e=>e.filter(e=>e.kind!==`pending`));let t=new AbortController;z.current=t;try{await je(`/api/chat/confirm`,{sessionId:n,approved:e},he,t.signal)}catch(e){t.signal.aborted||Z.error(String(e.message))}finally{d(!1),z.current===t&&(z.current=null)}};return(0,U.jsxs)(`div`,{className:`relative flex h-full flex-col`,onDragEnter:ue,onDragOver:de,onDragLeave:fe,onDrop:R,children:[I&&(0,U.jsxs)(`div`,{className:`pointer-events-none absolute inset-0 z-10 flex items-center justify-center rounded-lg border-2 border-dashed border-primary/60 bg-primary/5 text-xs text-primary`,children:[(0,U.jsx)(ch,{className:`mr-1.5 h-4 w-4`}),`释放以添加附件(保存到当前工作区)`]}),(0,U.jsx)(bD,{className:`min-h-0 flex-1 [&>div>div]:block!`,children:(0,U.jsxs)(`div`,{className:`space-y-2.5 p-3`,ref:T,children:[o.length===0&&(0,U.jsxs)(`div`,{className:`flex h-40 flex-col items-center justify-center gap-1 text-xs text-muted-foreground`,children:[(0,U.jsx)(Om,{className:`h-5 w-5 opacity-50`}),`试试:「STK-R3 什么情况?帮我处理」 / 粘贴报错截图、拖入日志文件让助手分析`]}),o.map((n,r)=>{if(n.kind===`user`)return(0,U.jsxs)(`div`,{className:`ml-auto max-w-[85%] space-y-1.5 rounded-lg bg-primary/20 px-3 py-1.5 text-xs leading-relaxed break-words`,children:[n.text&&(0,U.jsx)(`div`,{children:n.text}),!!n.attachments?.length&&(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.attachments.map(e=>e.kind===`image`?(0,U.jsx)(`a`,{href:ie(e.rel),target:`_blank`,rel:`noreferrer`,title:`${e.name} · ${CD(e.size)}`,children:(0,U.jsx)(`img`,{src:ie(e.rel),alt:e.name,className:`max-h-28 max-w-[220px] rounded border object-cover`})},e.rel):(0,U.jsxs)(`a`,{href:ie(e.rel),target:`_blank`,rel:`noreferrer`,download:e.name,title:e.rel,className:`flex items-center gap-1 rounded border bg-background/60 px-1.5 py-0.5 text-[11px] hover:bg-background`,children:[(0,U.jsx)(mm,{className:`h-3 w-3 shrink-0`}),(0,U.jsx)(`span`,{className:`max-w-[160px] truncate`,children:e.name}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:CD(e.size)})]},e.rel))})]},r);if(n.kind===`bot`)return(0,U.jsxs)(`div`,{className:`max-w-[92%] rounded-lg bg-card px-3 py-2 text-xs leading-relaxed break-words`,children:[(0,U.jsxs)(`div`,{className:`agent-h mb-1 flex items-center gap-1 text-[9px]`,style:d_(e),children:[(0,U.jsx)(`span`,{className:`agent-h-bg h-1 w-1 rounded-full`,style:d_(e)}),t||`助手`]}),(0,U.jsx)(yD,{text:n.text||``,onSend:_e}),u&&r===o.length-1&&(0,U.jsx)(`span`,{className:`ml-0.5 inline-block h-3 w-1.5 animate-pulse rounded-sm bg-primary align-middle`})]},r);if(n.kind===`evt`&&n.evt){let e=n.evt.status,t={ok:`✅`,executed:`▶`,blocked:`⛔`,cancelled:`🚫`,rejected:`❌`,start:`⏳`}[e]||`•`;return(0,U.jsxs)(`div`,{className:B(`max-w-[92%] rounded-md border border-dashed px-2.5 py-1.5 text-[11px]`,e===`blocked`?`border-destructive/50 text-destructive`:e===`start`?`border-border text-muted-foreground`:`border-border`),children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`shrink-0`,children:t}),(0,U.jsx)(fg,{className:`h-3 w-3 shrink-0`}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono font-semibold`,children:n.evt.tool}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground`,children:JSON.stringify(n.evt.args)})]}),e!==`start`&&(0,U.jsx)(`pre`,{className:`mt-1 max-h-40 overflow-auto whitespace-pre-wrap break-all text-[10px] leading-relaxed text-muted-foreground`,children:String(n.evt.result).slice(0,700)})]},r)}return n.kind===`pending`?(0,U.jsx)(Gf,{className:`max-w-[92%] border-ai/50 bg-ai/5`,children:(0,U.jsxs)(Jf,{className:`space-y-2 p-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-semibold text-ai`,children:[(0,U.jsx)(Rh,{className:`h-3.5 w-3.5`}),`人工确认(L2)· 助手请求执行写操作`]}),n.intro&&(0,U.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:(0,U.jsx)(mD,{text:n.intro})}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(Y,{size:`sm`,variant:`destructive`,onClick:()=>ve(!1),children:`取消`}),(0,U.jsx)(Y,{size:`sm`,onClick:()=>ve(!0),children:`确认执行`})]})]})},r):null}),m&&(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 px-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary`}),m,m.startsWith(`后台进行中`)&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-5 gap-1 px-1.5 text-[10px] text-destructive hover:text-destructive`,onClick:()=>{h(``),pe()},children:`⏹ 中断`}),(0,U.jsx)(`span`,{ref:E})]})]})}),(0,U.jsxs)(`div`,{className:`border-t`,children:[M.length>0&&(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start gap-1.5 px-2 pt-2`,children:[M.map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 rounded-md border bg-card px-1.5 py-1 text-[11px]`,children:[e.kind===`image`&&e.preview?(0,U.jsx)(`img`,{src:e.preview,alt:e.name,className:`h-9 w-9 rounded object-cover`}):(0,U.jsx)(mm,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`max-w-[140px] truncate`,title:e.name,children:e.name}),(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.status===`uploading`?`上传中…`:CD(e.size)})]}),e.status===`uploading`?(0,U.jsx)(Hm,{className:`h-3 w-3 animate-spin text-muted-foreground`}):(0,U.jsx)(`button`,{type:`button`,className:`rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground`,title:`移除(同时删除工作区中的文件)`,onClick:()=>se(e),children:(0,U.jsx)(mg,{className:`h-3 w-3`})})]},e.id)),P===!1&&M.some(e=>e.kind===`image`)&&(0,U.jsx)(`div`,{className:`w-full text-[10px] text-warning`,children:`当前模型不支持看图:图片仅保存为工作区文件供助手按路径处理(可在 系统设置 · LLM · 视觉能力 调整)`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,U.jsx)(`input`,{ref:ne,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{e.target.files?.length&&oe(e.target.files),e.target.value=``}}),(0,U.jsx)(Y,{size:`icon`,variant:`outline`,title:`添加附件(保存到当前工作区;也可直接粘贴截图 / 拖入文件)`,disabled:u,onClick:()=>ne.current?.click(),children:(0,U.jsx)(ch,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(SD,{value:c,onChange:e=>l(e.target.value),rows:1,placeholder:`描述问题…(Enter 发送,Shift+Enter 换行;可粘贴截图 / 拖入文件)`,className:`min-h-[38px] resize-none text-xs`,onPaste:ce,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),ge())}}),u?(0,U.jsx)(Y,{size:`icon`,variant:`destructive`,title:`中断当前对话`,onClick:pe,children:(0,U.jsx)(Jh,{className:`h-3.5 w-3.5`})}):(0,U.jsx)(Y,{size:`icon`,disabled:!c.trim()&&!M.some(e=>e.status===`ok`),onClick:ge,children:(0,U.jsx)(Ah,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`icon`,variant:`outline`,title:`清空会话(丢弃服务端上下文,从零开始)`,disabled:u,onClick:me,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`shrink-0 text-[11px]`,onClick:()=>{w(``),S(``),b(!0),_(!0),Oe(`/api/experience/draft`,{sessionId:n}).then(e=>{w(e.markdown)}).catch(e=>{Z.error(String(e.message)),_(!1)}).finally(()=>b(!1))},children:`📥 沉淀经验`})]})]}),(0,U.jsx)(gg,{open:g,onOpenChange:_,children:(0,U.jsxs)(yg,{className:`flex max-h-[85vh] max-w-xl flex-col`,children:[(0,U.jsx)(bg,{className:`shrink-0`,children:(0,U.jsx)(Sg,{children:`经验回流 · AI 起草 → 人工审阅 → 写入 ARM`})}),(0,U.jsx)(wg,{value:x,onChange:e=>S(e.target.value),placeholder:`经验标题(留空自动生成)`,className:`shrink-0 text-xs`}),y?(0,U.jsxs)(`div`,{className:`flex min-h-[120px] flex-1 flex-col items-center justify-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(Hm,{className:`h-4 w-4 animate-spin`}),`AI 正在提炼本次会话经验,请稍候…`]}):(0,U.jsx)(SD,{value:C,onChange:e=>w(e.target.value),className:`min-h-[120px] flex-1 font-mono text-[11px]`}),(0,U.jsxs)(xg,{className:`shrink-0`,children:[(0,U.jsx)(Y,{variant:`outline`,onClick:()=>_(!1),children:`取消`}),(0,U.jsx)(Y,{disabled:y,onClick:async()=>{try{let t=await Oe(`/api/experience/commit`,{agentId:e,name:x.trim()||`MVP经验-${Le(new Date().toISOString())}`,description:`工作台人工审阅沉淀`,content:C});_(!1),Z.success(`已回流 ARM 知识库`,{description:t.result.slice(0,90)})}catch(e){Z.error(String(e.message))}},children:`确认沉淀到 ARM 知识库`})]})]})})]})}var kD=function(e,t,n,r){var i;t[0]=0;for(var a=1;a<t.length;a++){var o=t[a++],s=t[a]?(t[0]|=o?1:2,n[t[a++]]):t[++a];o===3?r[0]=s:o===4?r[1]=Object.assign(r[1]||{},s):o===5?(r[1]=r[1]||{})[t[++a]]=s:o===6?r[1][t[++a]]+=s+``:o?(i=e.apply(s,kD(e,s,n,[``,null])),r.push(i),s[0]?t[0]|=2:(t[a-2]=0,t[a]=i)):r.push(s)}return r},AD=new Map;function jD(e){var t=AD.get(this);return t||(t=new Map,AD.set(this,t)),(t=kD(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,r=1,i=``,a=``,o=[0],s=function(e){r===1&&(e||(i=i.replace(/^\s*\n\s*|\s*\n\s*$/g,``)))?o.push(0,e,i):r===3&&(e||i)?(o.push(3,e,i),r=2):r===2&&i===`...`&&e?o.push(4,e,0):r===2&&i&&!e?o.push(5,0,!0,i):r>=5&&((i||!e&&r===5)&&(o.push(r,0,i,n),r=6),e&&(o.push(r,e,0,n),r=6)),i=``},c=0;c<e.length;c++){c&&(r===1&&s(),s(c));for(var l=0;l<e[c].length;l++)t=e[c][l],r===1?t===`<`?(s(),o=[o],r=3):i+=t:r===4?i===`--`&&t===`>`?(r=1,i=``):i=t+i[0]:a?t===a?a=``:i+=t:t===`"`||t===`'`?a=t:t===`>`?(s(),r=1):r&&(t===`=`?(r=5,n=i,i=``):t===`/`&&(r<5||e[c][l+1]===`>`)?(s(),r===3&&(o=o[0]),r=o,(o=o[0]).push(2,0,r),r=0):t===` `||t===` `||t===`
|
|
101
|
+
`||t===`\r`?(s(),r=2):i+=t),r===3&&i===`!--`&&(r=4,o=o[0])}return s(),o}(e)),t),arguments,[])).length>1?t:t[0]}var MD={primary:`text-primary`,success:`text-success`,warning:`text-warning`,destructive:`text-destructive`,muted:`text-muted-foreground`},ND={primary:`border-primary/40 bg-primary/15 text-primary`,success:`border-success/40 bg-success/15 text-success`,warning:`border-warning/40 bg-warning/15 text-warning`,destructive:`border-destructive/40 bg-destructive/15 text-destructive`,muted:`border-border bg-muted text-muted-foreground`},PD={primary:`bg-primary`,success:`bg-success`,warning:`bg-warning`,destructive:`bg-destructive`,muted:`bg-muted-foreground`},FD={primary:`border-l-primary/85 bg-primary/10`,success:`border-l-success/85 bg-success/10`,warning:`border-l-warning/85 bg-warning/10`,destructive:`border-l-destructive/85 bg-destructive/10`,muted:`border-l-border bg-muted/50`};function ID({title:e,actions:t,flush:n,className:r,children:i}){return(0,U.jsxs)(`div`,{className:B(`rounded-lg border bg-card text-xs text-card-foreground`,n?`p-0`:`p-3`,r),children:[(e||t)&&(0,U.jsxs)(`div`,{className:B(`flex items-center justify-between gap-2`,!n&&`mb-2`,n&&`border-b px-3 py-2`),children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:e}),(0,U.jsx)(`div`,{className:`flex items-center gap-1.5`,children:t})]}),i]})}function LD({tone:e=`muted`,className:t,children:n}){return(0,U.jsx)(`span`,{className:B(`inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-[10px] font-medium whitespace-nowrap`,ND[e],t),children:n})}function RD({variant:e=`secondary`,className:t,...n}){return(0,U.jsx)(`button`,{type:`button`,className:B(`inline-flex cursor-pointer items-center gap-1 rounded-md px-2 py-1 text-xs font-medium transition-colors focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{primary:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`border bg-secondary text-secondary-foreground hover:bg-accent`,danger:`bg-destructive text-white hover:bg-destructive/90`,ghost:`text-foreground hover:bg-accent`}[e],t),...n})}function zD({label:e,value:t,hint:n,tone:r=`primary`,trend:i,className:a}){let o=(0,v.useRef)(t),[s,c]=(0,v.useState)(!1);return(0,v.useEffect)(()=>{let e=o.current;if(o.current=t,e===t||e===void 0)return;c(!0);let n=setTimeout(()=>c(!1),800);return()=>clearTimeout(n)},[t]),(0,U.jsxs)(`div`,{className:B(`rounded-lg border bg-card p-2.5`,a),children:[(0,U.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e}),(0,U.jsx)(`div`,{className:B(`mt-0.5 truncate text-base font-semibold tabular-nums transition-colors duration-500`,s?`text-foreground`:MD[r]),children:t}),i&&i.length>=2&&(0,U.jsx)(`div`,{className:`mt-1`,children:(0,U.jsx)(BD,{data:i,tone:r,height:20})}),n!=null&&n!==``&&(0,U.jsx)(`div`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:n})]})}function BD({data:e,tone:t=`chart`,height:n=28,className:r}){let i=e.length;if(!i||i<2)return null;let a=Math.min(...e),o=Math.max(...e)-a||1,s=e.map((e,t)=>`${(t/(i-1)*100).toFixed(2)},${(n-2-(e-a)/o*(n-4)).toFixed(2)}`),c=s[i-1].split(`,`),l=t===`chart`?`text-chart-2`:MD[t];return(0,U.jsxs)(`svg`,{viewBox:`0 0 100 ${n}`,height:n,preserveAspectRatio:`none`,className:B(`w-full overflow-visible`,l,r),"aria-hidden":!0,children:[(0,U.jsx)(`polygon`,{points:`0,${n} ${s.join(` `)} 100,${n}`,fill:`currentColor`,opacity:`0.12`}),(0,U.jsx)(`polyline`,{points:s.join(` `),fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,vectorEffect:`non-scaling-stroke`,strokeLinejoin:`round`,strokeLinecap:`round`}),(0,U.jsx)(`circle`,{cx:c[0],cy:c[1],r:`2`,fill:`currentColor`})]})}function VD({items:e,className:t}){let n=Math.max(...e.map(e=>e.value),1);return(0,U.jsx)(`div`,{className:B(`space-y-1.5`,t),children:e.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`w-20 shrink-0 truncate text-[10px] text-muted-foreground`,children:e.label}),(0,U.jsx)(`div`,{className:`h-1.5 min-w-0 flex-1 overflow-hidden rounded bg-muted`,children:(0,U.jsx)(`div`,{className:B(`h-full rounded transition-[width]`,PD[e.tone||`primary`]),style:{width:`${Math.max(e.value/n*100,e.value>0?3:0)}%`}})}),(0,U.jsx)(`span`,{className:`w-10 shrink-0 text-right font-mono text-[10px] tabular-nums text-muted-foreground`,children:e.value})]},t))})}function HD({items:e,cell:t=12,gap:n=4,className:r}){return(0,U.jsx)(`div`,{className:B(`grid`,r),style:{gridTemplateColumns:`repeat(auto-fill, minmax(${t}px, 1fr))`,gap:n},children:e.map((e,t)=>(0,U.jsx)(`div`,{title:e.title,className:B(`aspect-square rounded-[3px] transition-colors`,PD[e.tone||`muted`])},t))})}function UD({tone:e=`muted`,pulse:t,className:n}){return(0,U.jsx)(`span`,{className:B(`inline-block h-1.5 w-1.5 shrink-0 rounded-full`,PD[e],t&&`animate-pulse`,n)})}function WD({tone:e=`muted`,title:t,detail:n,meta:r,active:i,onClick:a,className:o,children:s}){let c=(0,v.useRef)(!1),[l,u]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=c.current;if(c.current=!!i,e||!i)return;u(!0);let t=setTimeout(()=>u(!1),900);return()=>clearTimeout(t)},[i]);let d=!!a;return(0,U.jsxs)(`div`,{onClick:a,role:d?`button`:void 0,tabIndex:d?0:void 0,onKeyDown:d?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a?.())}:void 0,className:B(`rounded-md border border-l-2 p-2 text-xs transition-colors`,FD[e],i&&`ring-2 ring-ring/50`,l&&`animate-pulse ring-ring`,d&&`cursor-pointer hover:border-ring/50 focus-visible:outline-none`,o),children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(UD,{tone:e,pulse:e===`destructive`}),(0,U.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:t}),r!=null&&r!==``&&(0,U.jsx)(`span`,{className:`ml-auto shrink-0 font-mono text-[10px] tabular-nums text-muted-foreground`,children:r})]}),n!=null&&n!==``&&(0,U.jsx)(`div`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:n}),s]})}function GD({text:e=`暂无数据`,className:t}){return(0,U.jsxs)(`div`,{className:B(`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed p-5 text-center`,t),children:[(0,U.jsxs)(`svg`,{viewBox:`0 0 48 48`,className:`h-10 w-10 text-muted-foreground/50`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,"aria-hidden":!0,children:[(0,U.jsx)(`circle`,{cx:`24`,cy:`24`,r:`16`,opacity:`0.5`}),(0,U.jsx)(`circle`,{cx:`24`,cy:`24`,r:`9`,opacity:`0.7`}),(0,U.jsx)(`path`,{d:`M24 24 L37 13`}),(0,U.jsx)(`circle`,{cx:`30.5`,cy:`19`,r:`1.6`,fill:`currentColor`,stroke:`none`})]}),(0,U.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e})]})}function KD({rows:e=3,text:t,className:n}){return(0,U.jsxs)(`div`,{className:B(`space-y-2 p-3`,n),role:`status`,"aria-label":typeof t==`string`?t:`加载中`,children:[Array.from({length:e}).map((e,t)=>(0,U.jsx)(`div`,{className:B(`h-3.5 animate-pulse rounded bg-muted`,t%3==2?`w-2/3`:`w-full`)},t)),t!=null&&t!==``&&(0,U.jsx)(`div`,{className:`pt-1 text-center text-[10px] text-muted-foreground`,children:t})]})}function qD({text:e,className:t}){return(0,U.jsx)(`div`,{className:B(`rounded-lg border border-destructive/40 bg-destructive/10 p-3 text-[11px] text-destructive`,t),children:e?(0,U.jsxs)(U.Fragment,{children:[`加载失败:`,e]}):`加载失败`})}var JD={Card:ID,Badge:LD,Button:RD,Stat:zD,Spark:BD,Bars:VD,Matrix:HD,StatusDot:UD,StatusItem:WD,Empty:GD,Loading:KD,Error:qD},YD=jD.bind(v.createElement),XD=class extends v.Component{state={err:null};static getDerivedStateFromError(e){return{err:String(e?.message||e)}}componentDidCatch(e){try{this.props.onError?.(String(e?.message||e))}catch{}}render(){return this.state.err?(0,U.jsxs)(`div`,{className:`p-3 text-[11px] leading-relaxed text-destructive`,children:[`面板运行错误:`,this.state.err,(0,U.jsx)(`br`,{}),`可在「定制工作台」中修正代码后重新发布。`]}):this.props.children}};function ZD(e){return Function(`React`,`html`,`ui`,`useState`,`useEffect`,`useRef`,`useMemo`,`"use strict";\n${e}\n;if (typeof Panel !== "function") throw new Error("插件代码必须定义 function Panel(props)");\nreturn Panel;`)(v,YD,JD,v.useState,v.useEffect,v.useRef,v.useMemo)}function QD(e,t,n){if(e)try{fetch(`/api/panel-error`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,kind:t,message:n})}).catch(()=>{})}catch{}}function $D({code:e,data:t,meta:n}){let r=n?.agentId,i=n?.panelId,a=n?.pluginId,o=(0,v.useMemo)(()=>{let t={agentId:r,panelId:i,pluginId:a};try{return ZD(e)}catch(e){return QD(t,`compile`,String(e.message)),()=>(0,U.jsxs)(`div`,{className:`p-3 text-[11px] text-destructive`,children:[`编译失败:`,String(e.message)]})}},[e,r,i,a]);return(0,U.jsx)(XD,{onError:e=>QD(n,`runtime`,e),children:(0,U.jsx)(o,{...t})})}var eO={activity:up,alert:og,gauge:Sm,list:Bm,chart:Op,box:Ep,cpu:Qp,radar:vh,clipboard:Hp,wrench:fg,message:Xm,puzzle:gh,grid:Im},tO={agent_dialog:Xm,custom:gh,custom_panel:gh,placeholder:Ep,kpi_strip:Sm,realtime_list:Bm,status_grid:Im,action_group:fg,inspection_report:Hp};function nO(e){return eO[String(e.icon||``)]||tO[e.type]||up}var rO=12;function iO({dsl:e,renderPanel:t,renderDialog:n,renderPlaceholder:r,edit:i,className:a,onMaximize:o,renderHeaderActions:s}){let c=(0,v.useRef)(null),l=(0,v.useRef)(null),[u,d]=(0,v.useState)(!1),f=(0,v.useRef)(null),p=(0,v.useRef)(null),m=()=>{if(p.current!==null)return;let e=()=>{let t=c.current,n=f.current;if(t&&n){let e=t.getBoundingClientRect();n.x>e.right-48?t.scrollLeft+=16:n.x<e.left+48&&(t.scrollLeft-=16),n.y>e.bottom-48?t.scrollTop+=16:n.y<e.top+48&&(t.scrollTop-=16)}p.current=requestAnimationFrame(e)};p.current=requestAnimationFrame(e)},h=()=>{p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),f.current=null};(0,v.useEffect)(()=>h,[]);let g=e.panels.reduce((e,t)=>Math.max(e,(t.grid?.y||1)+(t.grid?.h||1)-1),1),_=()=>{let e=c.current?.getBoundingClientRect();return{col:e?(e.width+rO)/12:100,row:e?(e.height+rO)/g:178}},y=(t,n,r)=>{if(!i||t.button!==0)return;t.stopPropagation();let a=e.panels[n].grid||{x:1,y:1,w:6,h:1};l.current={i:n,mode:r,sx:t.clientX,sy:t.clientY,g:{...a},moved:!1},m();try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}},b=e=>{let t=l.current;if(!i||!t)return;f.current={x:e.clientX,y:e.clientY};let n=e.clientX-t.sx,r=e.clientY-t.sy;if(!t.moved&&Math.abs(n)<4&&Math.abs(r)<4)return;t.moved||(t.moved=!0,d(!0));let{col:a,row:o}=_(),s=Math.round(n/a),c=Math.round(r/o);t.mode===`move`?i.onGrid(t.i,{x:Math.min(Math.max(1,t.g.x+s),12-t.g.w+1),y:Math.max(1,t.g.y+c)}):i.onGrid(t.i,{w:Math.min(Math.max(1,t.g.w+s),12-t.g.x+1),h:Math.min(Math.max(1,t.g.h+c),12)})},x=()=>{setTimeout(()=>{l.current=null},0),d(!1),h()},S=t=>{let n=e.panels[t].grid;return n?e.panels.some((e,r)=>{if(r===t)return!1;let i=e.grid;return i?n.x<i.x+i.w&&i.x<n.x+n.w&&n.y<i.y+i.h&&i.y<n.y+n.h:!1}):!1};return(0,U.jsxs)(`div`,{ref:c,className:B(`grid gap-3`,i&&`touch-none select-none`,a),style:{gridTemplateColumns:`repeat(12, minmax(0, 1fr))`,gridTemplateRows:`repeat(${g}, minmax(120px, 1fr))`},onPointerDown:()=>{i&&i.onSelect(null)},children:[i&&u&&(0,U.jsx)(`div`,{className:`pointer-events-none absolute inset-0 z-20 opacity-30`,style:{backgroundImage:`linear-gradient(to right, var(--border) 1px, transparent 1px), linear-gradient(to bottom, var(--border) 1px, transparent 1px)`,backgroundSize:`calc((100% + ${rO}px) / 12) 100%, 100% calc((100% + ${rO}px) / ${g})`}}),e.panels.map((e,a)=>{let c=e.grid||{x:1,y:1,w:6,h:1},u=Math.round(c.w/12*100),d=nO(e),f=i&&S(a),p=e.title||(e.type===`agent_dialog`?`诊断对话`:``),m=!i&&p&&!e.bare&&e.type!==`placeholder`,h=e.type===`agent_dialog`?n?n(e):null:e.type===`placeholder`?r?r(e):null:t(e);return(0,U.jsxs)(`div`,{style:{gridColumn:`${c.x} / span ${c.w}`,gridRow:`${c.y} / span ${c.h}`,animationDelay:`${Math.min(a*45,360)}ms`},title:f?`与其他面板重叠——拖动错开或调整大小`:void 0,className:B(`group relative flex min-h-0 flex-col overflow-hidden rounded-lg motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:slide-in-from-bottom-1 motion-safe:fill-mode-both motion-safe:duration-300`,i?i.sel===a?`border border-primary bg-card ring-2 ring-primary/50`:e.bare?`border border-dashed border-border/60 bg-card hover:border-primary/50`:`border border-border bg-card hover:border-primary/50`:e.bare?`border-transparent bg-transparent`:`border border-border bg-card`,f&&`outline-2 outline-dashed outline-warning/80`,i&&`cursor-grab active:cursor-grabbing`),onPointerDown:e=>{i&&(e.stopPropagation(),i.onSelect(a),y(e,a,`move`))},onDoubleClick:()=>{i?.onAICustomize&&!l.current?.moved&&i.onAICustomize(a)},onPointerMove:b,onPointerUp:x,onPointerCancel:x,children:[m&&(0,U.jsxs)(`div`,{className:`flex h-8 shrink-0 items-center gap-2 border-b border-border/60 px-3`,children:[(0,U.jsx)(d,{className:`h-3.5 w-3.5 shrink-0 text-primary/80`}),(0,U.jsx)(`span`,{className:`truncate text-xs font-medium`,children:p}),e.subtitle?(0,U.jsx)(`span`,{className:`min-w-0 truncate text-[10px] text-muted-foreground`,children:String(e.subtitle)}):null,(0,U.jsxs)(`div`,{className:`ml-auto flex min-w-0 items-center gap-1.5`,children:[o&&(0,U.jsx)(`button`,{onClick:e=>{e.stopPropagation(),o(a)},className:`flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground/60 opacity-0 transition-all hover:bg-accent hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100`,title:`全屏查看(ESC 退出)`,children:(0,U.jsx)(Km,{className:`h-3 w-3`})}),s?.(e)]})]}),i&&(0,U.jsxs)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 z-10 flex items-center gap-1.5 border-b bg-background/85 px-2 py-1 text-[10px] backdrop-blur-sm`,children:[(0,U.jsx)(d,{className:`h-3 w-3 shrink-0 text-primary/80`}),(0,U.jsx)(`span`,{className:`font-medium`,children:e.title}),f&&(0,U.jsx)(`span`,{className:`shrink-0 text-warning`,title:`与其他面板重叠`,children:`⚠ 重叠`}),(0,U.jsx)(J,{variant:`secondary`,className:`h-4 px-1 text-[9px]`,children:e.panel||e.type}),i.sel===a&&i.onAICustomize&&(0,U.jsxs)(`button`,{onClick:e=>{e.stopPropagation(),i.onAICustomize(a)},className:`pointer-events-auto ml-auto flex h-5 shrink-0 items-center gap-1 rounded bg-ai px-1.5 text-[10px] font-medium text-white transition-colors hover:bg-ai/85`,title:`把这个区块锁定为 AI 定制目标(双击面板同效)`,children:[(0,U.jsx)(Wh,{className:`h-2.5 w-2.5`}),`AI 定制`]}),(0,U.jsxs)(`span`,{className:B(`font-mono text-muted-foreground tabular-nums`,i.sel===a&&i.onAICustomize&&`ml-1.5`),children:[u,`%宽·`,c.h,`行`]})]}),(0,U.jsx)(`div`,{className:B(`min-h-0 flex-1 overflow-auto`,i&&`pointer-events-none pt-4`),children:h}),i&&(0,U.jsx)(`span`,{onPointerDown:e=>y(e,a,`resize`),onPointerMove:b,onPointerUp:x,onPointerCancel:x,className:`absolute -bottom-1 -right-1 z-10 flex h-7 w-7 cursor-nwse-resize items-center justify-center rounded-tl-md border-b border-r border-primary/60 bg-primary/25 hover:bg-primary/50`,title:`拖拽调大小(当前 ${u}% 宽 · ${c.h} 行)`,children:(0,U.jsx)(Km,{className:`h-3 w-3 translate-x-[5px] translate-y-[5px] text-primary`})})]},e.id)})]})}function aO(){return(0,U.jsxs)(`div`,{className:`relative mb-0.5 h-3.5 select-none text-[8px] text-muted-foreground`,children:[(0,U.jsx)(`div`,{className:`grid h-full grid-cols-12`,children:[...Array(12)].map((e,t)=>(0,U.jsx)(`div`,{className:`border-l border-border/60 pl-0.5 pt-0.5 font-mono`,children:t+1},t))}),[25,50,75].map(e=>(0,U.jsxs)(`span`,{className:`absolute -top-0 font-mono`,style:{left:`${e}%`},children:[e,`%`]},e))]})}function oO({open:e,onOpenChange:t,onPick:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),l=e=>{o(!0),c(``),V(`/api/fs/dirs${e?`?path=${encodeURIComponent(e)}`:``}`).then(e=>i(e)).catch(e=>c(String(e.message))).finally(()=>o(!1))};return(0,v.useEffect)(()=>{e&&!r&&l()},[e]),(0,U.jsx)(gg,{open:e,onOpenChange:t,children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsx)(bg,{children:(0,U.jsx)(Sg,{children:`选择工作区目录`})}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-7 gap-1 px-2 text-[11px]`,disabled:!r?.parent,onClick:()=>r?.parent&&l(r.parent),title:`上级目录`,children:[(0,U.jsx)(bp,{className:`h-3 w-3`}),`上级`]}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-7 gap-1 px-2 text-[11px]`,onClick:()=>l(),children:[(0,U.jsx)(Em,{className:`h-3 w-3`}),`主目录`]}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate rounded-md border bg-muted/40 px-2 py-1.5 font-mono text-[11px] text-muted-foreground`,title:r?.path,children:r?.path||`…`})]}),(0,U.jsxs)(bD,{className:`h-64 rounded-md border`,children:[a&&(0,U.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(Hm,{className:`h-4 w-4 animate-spin`}),`读取中…`]}),!a&&s&&(0,U.jsx)(`div`,{className:`p-3 text-xs text-destructive`,children:s}),!a&&!s&&r&&r.dirs.length===0&&(0,U.jsx)(`div`,{className:`p-3 text-xs text-muted-foreground`,children:`此目录下没有子目录——可直接点「选择当前目录」。`}),!a&&!s&&r&&r.dirs.map(e=>(0,U.jsxs)(`button`,{onClick:()=>l(`${r.path}/${e}`),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-xs hover:bg-accent`,children:[(0,U.jsx)(bm,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`truncate`,children:e})]},e))]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,onClick:()=>t(!1),children:`取消`}),(0,U.jsxs)(Y,{className:`gap-1`,disabled:!r||a,onClick:()=>{r&&(n(r.path),t(!1))},children:[(0,U.jsx)(Ap,{className:`h-3.5 w-3.5`}),`选择当前目录`]})]})]})})}var sO={read_panel_plugin:`读取插件代码`,write_panel_plugin:`编写面板插件`,update_workbench:`点亮画布布局`,create_collection:`创建数据集`,exec:`探索与验证`,data_query:`查询数据`,data_write:`写入数据`,search_knowledge:`检索知识经验`,save_experience:`沉淀经验`},cO=e=>sO[e]||e;function lO({steps:e,status:t,lit:n,inline:r,onClose:i}){return!e.length&&!n?null:(0,U.jsxs)(`div`,{className:B(`rounded-xl border bg-background/92 p-3 shadow-xl backdrop-blur-md`,r?`relative w-full`:`pointer-events-auto absolute bottom-3 left-1/2 z-30 w-72 -translate-x-1/2`,`motion-safe:animate-in motion-safe:fade-in-0 motion-safe:slide-in-from-bottom-2 motion-safe:duration-300`,n?`border-success/50 shadow-success/10`:`border-border shadow-ai/10`),children:[(0,U.jsxs)(`div`,{className:B(`mb-1.5 flex items-center gap-1.5 text-xs font-semibold`,n?`text-success`:`text-ai`),children:[n?(0,U.jsx)(Wh,{className:`h-3.5 w-3.5 shrink-0`}):(0,U.jsx)(Hm,{className:`h-3.5 w-3.5 shrink-0 animate-spin`}),(0,U.jsx)(`span`,{className:`truncate`,children:n?`画布已点亮——审阅后发布生效`:`定制进行中…`}),i&&(0,U.jsx)(`button`,{onClick:i,className:`ml-auto shrink-0 rounded p-0.5 text-muted-foreground transition-colors hover:text-foreground`,title:`收起`,children:`×`})]}),(0,U.jsx)(`div`,{className:`space-y-1`,children:e.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[e.state===`done`?(0,U.jsx)(Ap,{className:`h-3 w-3 shrink-0 text-success`}):(0,U.jsx)(Hm,{className:`h-3 w-3 shrink-0 animate-spin text-ai`}),(0,U.jsx)(`span`,{className:B(`truncate`,e.state===`done`?`text-muted-foreground`:`text-foreground`),children:e.label})]},t))}),t&&!n&&(0,U.jsx)(`div`,{className:`mt-1.5 truncate border-t pt-1.5 text-[10px] text-muted-foreground`,children:t})]})}function uO({agentId:e,open:t,onClose:n,onPreview:r,onPublished:i}){let a=(0,v.useRef)(`dev-${e.slice(0,8)}`),o=(0,v.useRef)(null),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(``),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(``),[h,g]=(0,v.useState)({steps:[]}),[_,y]=(0,v.useState)(!1),[b,x]=(0,v.useState)(null),[S,C]=(0,v.useState)(null),w=(0,v.useRef)(null),T=(0,v.useRef)(!0);(0,v.useEffect)(()=>{T.current&&w.current&&(w.current.scrollTop=w.current.scrollHeight)}),(0,v.useEffect)(()=>{if(d||_||!h.steps.length)return;let e=setTimeout(()=>g({steps:[]}),2500);return()=>clearTimeout(e)},[d,_,h]),(0,v.useEffect)(()=>{if(!t)return;let e=e=>{e.key===`Escape`&&!d&&n()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t,d,n]);let E=(0,v.useCallback)(async()=>{let t=l.trim();if(!t||d)return;u(``),f(!0),y(!1),x(null),g({steps:[]}),T.current=!0,c(e=>[...e,{role:`user`,text:t}]);let n=!1,r=!1,i=new AbortController;o.current=i;try{await je(`/api/dev/chat`,{sessionId:a.current,agentId:e,message:t},t=>{let i=t.type;i===`status`?m(String(t.text||``)):i===`text_delta`?(r=!0,m(``),c(e=>{let n=e[e.length-1];return n?.role===`agent`?[...e.slice(0,-1),{role:`agent`,text:n.text+String(t.delta)}]:[...e,{role:`agent`,text:String(t.delta)}]})):i===`tool_start`?(n=!0,g(e=>({steps:[...e.steps,{label:cO(String(t.tool)),state:`active`}]}))):i===`tool_end`?g(e=>{let n=[...e.steps],r=cO(String(t.tool));for(let e=n.length-1;e>=0;e--)if(n[e].label===r&&n[e].state===`active`){n[e]={...n[e],state:`done`};break}return{steps:n}}):i===`done`?!r&&!n&&c(e=>[...e,{role:`agent`,text:`(模型返回了空回复——请重试)`}]):i===`interrupted`?c(e=>[...e,{role:`agent`,text:`(已中断)`}]):i===`meta`?t.hasDraft&&(y(!0),V(`/api/workbench?agent_id=${e}&draft=1`).then(e=>x(e.dsl)).catch(()=>{})):i===`error`&&Z.error(String(t.message))},i.signal)}catch(e){i.signal.aborted?c(e=>[...e,{role:`agent`,text:`(已中断)`}]):c(t=>[...t,{role:`agent`,text:`❌ ${String(e.message)}`}])}finally{m(``),f(!1),o.current===i&&(o.current=null)}},[l,d,e]),D=async t=>{if(t===`preview`&&b)r(b),n();else{C(t);try{if(t===`publish`){let t=await ke(`/api/workbench`,{agent_id:e,dsl:b||(await V(`/api/workbench?agent_id=${e}&draft=1`)).dsl});Z.success(`已发布 ${t.dsl.version},工位即时生效 ✨`),i(t.dsl),x(null),y(!1),g({steps:[]}),n()}else t===`discard`&&(await Ae(`/api/workbench/draft`,{agent_id:e}),Z.info(`已放弃草稿`),x(null),y(!1))}catch(e){Z.error(String(e.message))}finally{C(null)}}};return t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`fixed inset-0 z-40 bg-black/30 backdrop-blur-[1px]`,onClick:()=>{d||n()}}),(0,U.jsxs)(`div`,{className:`fixed inset-y-0 right-0 z-50 flex w-[400px] max-w-[92vw] flex-col border-l bg-background shadow-2xl motion-safe:animate-in motion-safe:slide-in-from-right-4 motion-safe:duration-300`,children:[(0,U.jsxs)(`div`,{className:`flex h-12 shrink-0 items-center gap-2 border-b px-4`,children:[(0,U.jsx)(Wh,{className:`h-4 w-4 text-ai`}),(0,U.jsx)(`span`,{className:`text-sm font-semibold`,children:`AI 定制工位`}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`说需求 → 看着界面长出来`}),(0,U.jsx)(`button`,{onClick:n,disabled:d,className:`ml-auto rounded p-1 text-muted-foreground transition-colors hover:text-foreground disabled:opacity-40`,title:d?`定制进行中,先停止再关闭`:`关闭(ESC)`,children:`✕`})]}),(0,U.jsxs)(`div`,{ref:w,className:`min-h-0 flex-1 space-y-2.5 overflow-y-auto p-3`,children:[s.length===0&&(0,U.jsxs)(`div`,{className:`rounded-lg border border-dashed border-ai/30 bg-ai/5 p-3 text-[11px] leading-relaxed text-muted-foreground`,children:[`直接说,比如:`,(0,U.jsx)(`b`,{className:`text-foreground`,children:`「右上加一个最近记录」`}),`「把列表换成状态点阵」「加一个统计图」。改动先进草稿,你确认才发布。`]}),s.map((e,t)=>(0,U.jsx)(`div`,{className:e.role===`user`?`ml-auto max-w-[88%] rounded-lg bg-primary/20 px-2.5 py-1.5 text-xs whitespace-pre-wrap break-words`:`max-w-full rounded-lg bg-card px-2.5 py-1.5 text-xs leading-relaxed whitespace-pre-wrap break-words`,children:e.text},t)),(d||p)&&(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 px-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary`}),p||`开发中…`]}),(0,U.jsx)(lO,{inline:!0,steps:h.steps,status:p,lit:_,onClose:()=>{g({steps:[]}),y(!1)}}),_&&b&&(0,U.jsxs)(`div`,{className:`rounded-lg border border-success/40 bg-success/10 p-2.5`,children:[(0,U.jsxs)(`div`,{className:`text-[11px] font-semibold text-success`,children:[`✨ 草稿已生成(`,b.panels.length,` 个面板)`]}),(0,U.jsxs)(`div`,{className:`mt-1.5 flex gap-1.5`,children:[(0,U.jsx)(Y,{size:`sm`,className:`h-7 gap-1 text-[11px]`,disabled:S!==null,onClick:()=>D(`preview`),children:S===`preview`?`打开中…`:`在工位上预览`}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-7 text-[11px]`,disabled:S!==null,onClick:()=>D(`publish`),children:S===`publish`?`发布中…`:`直接发布`}),(0,U.jsxs)(Y,{size:`sm`,variant:`ghost`,className:`h-7 gap-1 text-[11px] text-muted-foreground`,disabled:S!==null,onClick:()=>D(`discard`),children:[(0,U.jsx)(ng,{className:`h-3 w-3`}),`放弃`]})]})]})]}),(0,U.jsxs)(`div`,{className:`shrink-0 border-t p-2`,children:[(0,U.jsx)(`textarea`,{value:l,onChange:e=>u(e.target.value),rows:2,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),E())},placeholder:`描述想要的界面…(Enter 发送,Shift+Enter 换行)`,className:`min-h-[52px] w-full resize-none rounded-md border bg-background px-2 py-1.5 text-xs`}),(0,U.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`与「定制工作台」共享会话上下文`}),d?(0,U.jsxs)(Y,{size:`sm`,variant:`destructive`,className:`h-7 gap-1 text-xs`,onClick:()=>o.current?.abort(),children:[(0,U.jsx)(Jh,{className:`h-3 w-3`}),`停止`]}):(0,U.jsxs)(Y,{size:`sm`,className:`h-7 gap-1 text-xs`,disabled:!l.trim(),onClick:E,children:[(0,U.jsx)(Ah,{className:`h-3 w-3`}),`发送`]})]})]})]})]}):null}function dO(e=1023){let[t,n]=(0,v.useState)(()=>{try{return window.matchMedia(`(max-width: ${e}px)`).matches}catch{return!1}});return(0,v.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${e}px)`),r=()=>n(t.matches);return t.addEventListener?.(`change`,r),window.addEventListener(`resize`,r),()=>{t.removeEventListener?.(`change`,r),window.removeEventListener(`resize`,r)}},[e]),t}function fO({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,U.jsx)(of,{"data-slot":`separator`,decorative:n,orientation:t,className:B(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}function pO({className:e,orientation:t=`horizontal`,...n}){return(0,U.jsx)(Pf,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:B(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var mO=He(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function hO({className:e,variant:t=`default`,...n}){return(0,U.jsx)(If,{"data-slot":`tabs-list`,"data-variant":t,className:B(mO({variant:t}),e),...n})}function gO({className:e,...t}){return(0,U.jsx)(Rf,{"data-slot":`tabs-trigger`,className:B(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function _O({className:e,...t}){return(0,U.jsx)(Bf,{"data-slot":`tabs-content`,className:B(`flex-1 outline-none`,e),...t})}async function vO(e,t){let n=e.usage.length?`插件「${e.name}」被 ${e.usage.length} 处引用,删除将从这些工作台摘除该面板。确认删除?`:`删除插件「${e.name}」?`;if(window.confirm(n))try{await Ae(`/api/panels`,{id:e.id,force:!0}),Z.success(`已删除`),t()}catch(e){Z.error(String(e.message))}}function yO({target:e,onClose:t,agents:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),[s,c]=(0,v.useState)(!0),[l,u]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e){i(null);return}let n=e.type===`panel`?`id=${encodeURIComponent(e.id||``)}`:`agentId=${encodeURIComponent(e.agentId||``)}`;V(`/api/assets/preview?type=${e.type}&${n}`).then(e=>{i(e),o(e.name)}).catch(e=>{Z.error(String(e.message)),t()})},[e]);let d=async()=>{if(e){u(!0);try{let n=await Oe(`/api/assets/share`,{type:e.type,id:e.id,agentId:e.agentId,name:a,bind_agent:s&&e.agentId?e.agentId:void 0}),i=r?.manifest.requires.apis.length||0,o=r?.manifest.requires.actions.length||0;n.bind_error?Z.warning(`已发布 ${n.name}@${n.version},但绑定助手失败`,{description:`${n.bind_error}——仅助手创建者或管理员可绑定 UI 资产,可在 ARM 助手详情页手动绑定`}):Z.success(`已发布 ${n.name}@${n.version}${n.bound?`,已绑定到助手`:``}`,{description:`外部 API ×${i} · 交互脚本 ×${o}${o?`(命令全文已在 ARM 资产包 SKILL.md 留档)`:``}`}),t()}catch(e){Z.error(String(e.message))}finally{u(!1)}}};if(!e)return null;let f=r?.manifest.requires;return(0,U.jsx)(gg,{open:!!e,onOpenChange:e=>{!e&&!l&&t()},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Jp,{className:`h-4 w-4 text-primary`}),`发布为 UI 资产 · `,e.title]})}),(0,U.jsx)(bD,{className:`max-h-96`,children:(0,U.jsxs)(`div`,{className:`space-y-3 pr-2 text-xs`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`资产名(全局唯一锚,同名发布追加新版本)`}),(0,U.jsx)(wg,{value:a,onChange:e=>o(e.target.value),className:`font-mono text-xs`})]}),r&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`rounded-md border bg-muted/30 p-2.5`,children:[(0,U.jsx)(`div`,{className:`font-medium`,children:`包含内容`}),(0,U.jsxs)(`div`,{className:`mt-1 text-muted-foreground`,children:[`面板插件:`,r.manifest.provides.panels.join(`、`)||`无`,(0,U.jsx)(`br`,{}),`数据集 schema:`,r.manifest.provides.collections.join(`、`)||`无`,`(仅建表定义,不含数据)`,r.manifest.provides.workbench&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`br`,{}),`工作台 DSL:workbench.json`]})]}),(0,U.jsx)(`div`,{className:`mt-1 font-mono text-[10px] text-muted-foreground`,children:r.files.join(` · `)})]}),!!f?.apis.length&&(0,U.jsxs)(`div`,{className:`rounded-md border border-blue-500/30 bg-blue-500/5 p-2.5`,children:[(0,U.jsx)(`div`,{className:`font-medium text-blue-300`,children:`外部 API 依赖(安装后环境需可达)`}),(0,U.jsx)(`ul`,{className:`mt-1 list-disc pl-4 text-muted-foreground`,children:f.apis.map(e=>(0,U.jsxs)(`li`,{children:[(0,U.jsx)(`span`,{className:`font-mono`,children:e.host}),`:`,e.usage]},e.host))})]}),!!f?.actions.length&&(0,U.jsxs)(`div`,{className:`rounded-md border border-warning/30 bg-warning/5 p-2.5`,children:[(0,U.jsx)(`div`,{className:`font-medium text-warning`,children:`交互脚本(真实 shell 命令,随包公开)`}),(0,U.jsx)(`ul`,{className:`mt-1 space-y-1`,children:f.actions.map(e=>(0,U.jsxs)(`li`,{className:`text-muted-foreground`,children:[`[`,e.panel,`/`,e.id,`] `,e.label,e.has_credentials&&(0,U.jsx)(J,{className:`ml-1 h-4 bg-warning/15 px-1 text-[9px] text-warning`,children:`⚠️ 疑似含凭据`}),(0,U.jsx)(`div`,{className:`mt-0.5 break-all rounded bg-muted/50 p-1 font-mono text-[10px]`,children:e.exec})]},`${e.panel}/${e.id}`))}),(0,U.jsx)(`p`,{className:`mt-1.5 text-[10px] text-warning`,children:`命令明文将进入资产包——含密码/令牌的命令请先改用环境变量或凭据占位,再发布。`})]}),e.agentId&&n&&n.length>0&&(0,U.jsxs)(`label`,{className:`flex items-center gap-2 rounded-md border p-2.5`,children:[(0,U.jsx)(hg,{checked:s,onCheckedChange:e=>c(!!e)}),(0,U.jsx)(`span`,{children:`发布后同时绑定到当前助手(下载该助手的其他现场将自动物化此工作台)`})]})]})]})}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:l,onClick:t,children:`取消`}),(0,U.jsx)(Y,{disabled:l||!a,onClick:d,children:l?`发布中…`:`发布到 ARM`})]})]})})}function bO({open:e,onClose:t,onInstalled:n,agents:r}){let[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),m=(0,v.useRef)(0);(0,v.useEffect)(()=>{if(!e)return;let t=setTimeout(()=>{let e=++m.current;l(!0),V(`/api/assets/arm-library${i?`?keyword=${encodeURIComponent(i)}`:``}`).then(t=>{e===m.current&&s(t.items||[])}).catch(e=>Z.error(String(e.message))).finally(()=>{e===m.current&&l(!1)})},400);return()=>clearTimeout(t)},[i,e]),(0,v.useEffect)(()=>{e&&!f&&r.length&&p(r[0].agent_id)},[e,r]);let h=async e=>{if(e.asset_type===`workbench`&&!f)Z.warning(`请先选择目标助手`);else{d(e.name);try{let r=await Oe(`/api/assets/install`,{name:e.name,agentId:e.asset_type===`workbench`?f:void 0}),i=r.workbench?`,工作台已导入为草稿(审阅后在「定制工作台」发布)`:``,a=r.skipped_collections.length?`;同名数据集保留本地:${r.skipped_collections.join(`、`)}`:``;Z.success(`已安装 ${e.name}:面板 ×${r.panels.length}${i}${a}`),n(),t()}catch(e){Z.error(String(e.message))}finally{d(null)}}};return(0,U.jsx)(gg,{open:e,onOpenChange:e=>{!e&&!u&&t()},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Im,{className:`h-4 w-4 text-primary`}),`从 ARM 安装 UI 资产`]})}),(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(Oh,{className:`absolute left-3 top-2.5 h-3.5 w-3.5 text-muted-foreground`}),(0,U.jsx)(wg,{placeholder:`搜索资产名 / 描述…`,value:i,onChange:e=>a(e.target.value),className:`pl-9`,autoFocus:!0})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`shrink-0`,children:`工作台资产安装到:`}),(0,U.jsx)(`select`,{value:f,onChange:e=>p(e.target.value),className:`h-8 flex-1 rounded-md border bg-background px-2 text-xs`,children:r.map(e=>(0,U.jsx)(`option`,{value:e.agent_id,children:e.name},e.agent_id))})]}),(0,U.jsx)(bD,{className:`max-h-80`,children:(0,U.jsxs)(`div`,{className:`space-y-1.5 pr-2`,children:[c&&!o.length&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`加载中…`}),!c&&!o.length&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:i?`没有匹配资产`:`ARM 上暂无 UI 资产`}),o.map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md border p-2.5`,children:[e.asset_type===`workbench`?(0,U.jsx)(Im,{className:`h-4 w-4 shrink-0 text-violet-400`}):(0,U.jsx)(gh,{className:`h-4 w-4 shrink-0 text-primary`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-medium`,children:[(0,U.jsx)(`span`,{className:`truncate font-mono`,children:e.name}),e.latest_version&&(0,U.jsx)(J,{variant:`secondary`,className:`h-4 px-1 text-[9px]`,children:e.latest_version}),e.installed&&(0,U.jsx)(J,{className:`h-4 bg-success/15 px-1 text-[9px] text-success`,children:`本地已有`}),e.upgrade_available&&(0,U.jsx)(J,{className:`h-4 bg-warning/15 px-1 text-[9px] text-warning`,children:`⤴ 可升级`})]}),(0,U.jsxs)(`div`,{className:`truncate text-[10px] text-muted-foreground`,children:[e.description||`—`,` · 下载 `,e.download_count,` 次 · `,e.publisher]})]}),(0,U.jsx)(Y,{size:`sm`,variant:`secondary`,className:`h-7 text-[11px]`,disabled:u!==null,onClick:()=>h(e),children:u===e.name?`安装中…`:`安装`})]},e.name))]})}),(0,U.jsx)(xg,{children:(0,U.jsx)(Y,{variant:`outline`,onClick:t,children:`关闭`})})]})})}function xO(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(`library`),[c,l]=(0,v.useState)([]),u=()=>V(`/api/plugins/center`).then(t);if((0,v.useEffect)(()=>{u(),V(`/api/agents`).then(e=>l((e.agents||[]).filter(e=>e.installed).map(({agent_id:e,name:t})=>({agent_id:e,name:t})))).catch(()=>{})},[]),!e)return(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`插件中心加载中…`});let d=async(e,t,n)=>{let r=n===`deprecated`?`active`:`deprecated`;try{await Oe(`/api/plugins/lifecycle`,{kind:e,id:t,status:r}),Z.success(r===`deprecated`?`已停用(存量引用仍可渲染,新增被阻止)`:`已恢复`),u()}catch(e){Z.error(String(e.message))}},f=({icon:e,name:t,sub:n,status:r,usage:i,onToggle:a,tag:o,onDelete:s,onShare:c,armRef:l})=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-md border p-2.5`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-medium`,children:[e,t,(0,U.jsx)(J,{variant:`secondary`,className:`h-4 px-1 text-[9px]`,children:o}),(0,U.jsx)(J,{className:`h-4 px-1 text-[9px] ${r===`deprecated`?`bg-destructive/15 text-destructive hover:bg-destructive/25`:`bg-success/15 text-success hover:bg-success/25`}`,children:r===`deprecated`?`已停用`:`在用`}),l&&(0,U.jsxs)(J,{className:`h-4 bg-violet-500/15 px-1 text-[9px] text-violet-300`,title:`ARM ${l.skill_name}@${l.version||``}`,children:[`已发布`,l.version?` ${l.version}`:``]})]}),(0,U.jsx)(`div`,{className:`truncate text-[10px] text-muted-foreground`,children:n}),(0,U.jsxs)(`div`,{className:`mt-0.5 text-[10px] text-muted-foreground`,children:[`引用:`,i.length?i.map(e=>`${e.agent}${e.draft?`*`:``}`).join(`、`):`无`]})]}),c&&(0,U.jsxs)(Y,{size:`sm`,variant:`ghost`,className:`h-7 text-[11px] text-violet-400`,onClick:c,title:`发布到 ARM UI 资产市场`,children:[(0,U.jsx)(Jp,{className:`h-3 w-3`}),l?`更新`:`发布`]}),s&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 text-[11px] text-destructive`,onClick:s,children:`删除`}),(0,U.jsx)(Y,{size:`sm`,variant:r===`deprecated`?`secondary`:`ghost`,className:`h-7 text-[11px] ${r===`deprecated`?``:`text-destructive`}`,onClick:a,children:r===`deprecated`?`恢复`:`停用`})]});return(0,U.jsxs)(`div`,{className:`h-full overflow-auto p-5`,children:[(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-bold`,children:[(0,U.jsx)(gh,{className:`h-5 w-5 text-primary`}),`插件中心`]}),(0,U.jsxs)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:[`统一注册表:系统面板与契约插件同源治理 · 生命周期(在用/停用)· 引用追踪(* 为草稿引用)· `,(0,U.jsx)(`span`,{className:`text-violet-400`,children:`发布/安装 ARM UI 资产(三资产模型)`})]})]}),(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(pO,{value:o,onValueChange:e=>s(e),children:(0,U.jsxs)(hO,{className:`h-7 p-0.5`,children:[(0,U.jsxs)(gO,{value:`library`,className:`h-6 gap-1 px-3 text-[11px]`,title:`AI 开发 / ARM 安装 / 人工沉淀`,children:[(0,U.jsx)(wp,{className:`h-3 w-3`}),`插件库`,(0,U.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:e.library.length})]}),(0,U.jsxs)(gO,{value:`system`,className:`h-6 gap-1 px-3 text-[11px]`,title:`平台预装`,children:[(0,U.jsx)(um,{className:`h-3 w-3`}),`系统插件`,(0,U.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:e.system.length})]})]})}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-7 gap-1 text-[11px]`,onClick:()=>a(!0),children:[(0,U.jsx)(Im,{className:`h-3 w-3`}),`从 ARM 安装`]})]})}),(0,U.jsx)(Jf,{className:`p-3`,children:(0,U.jsx)(`div`,{className:`space-y-1.5`,children:o===`library`?(0,U.jsxs)(U.Fragment,{children:[e.library.map(e=>(0,U.jsx)(f,{icon:(0,U.jsx)(gh,{className:`h-3 w-3 text-primary`}),name:`${e.name} ${e.version}`,sub:`${e.author===`ai`?`AI 开发`:e.author===`arm`?`ARM 安装`:`人工`} · ${e.description||e.id}`,status:e.status,usage:e.usage,tag:e.author===`ai`?`ai`:e.author===`arm`?`arm`:`human`,onToggle:()=>d(`plugin`,e.id,e.status),onDelete:()=>vO(e,u),onShare:()=>r({type:`panel`,id:e.id,title:e.name}),armRef:e.arm_ref},e.id)),e.library.length===0&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`插件库为空`})]}):(0,U.jsxs)(U.Fragment,{children:[e.system.map(e=>(0,U.jsx)(f,{icon:(0,U.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:e.id}),name:e.name,sub:e.note,status:e.status,usage:e.usage,tag:`system`,onToggle:()=>d(`system`,e.id,e.status)},e.id)),e.system.length===0&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`暂无系统插件`})]})})})]}),(0,U.jsx)(fO,{className:`my-4`}),(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsxs)(qf,{className:`flex items-center gap-1.5 text-xs`,children:[(0,U.jsx)(Bh,{className:`h-3.5 w-3.5`}),`治理策略`]})}),(0,U.jsx)(Jf,{className:`p-3 text-[11px] leading-relaxed text-muted-foreground`,children:(0,U.jsx)(bD,{className:`max-h-40`,children:(0,U.jsxs)(`ul`,{className:`list-disc space-y-1 pl-4`,children:[(0,U.jsx)(`li`,{children:`一切面板进同一注册表:系统插件也有 manifest 与生命周期,不再是编译进前端的二等公民`}),(0,U.jsx)(`li`,{children:`停用(deprecate)不破坏存量:已引用的工作台继续渲染,但编辑器「添加面板」不再出现——安全下线`}),(0,U.jsx)(`li`,{children:`入库强制过校验器(check-panel.mjs):编译/契约/沙箱/模板四关 + 质量警告入审计——ARM 安装的插件同样过检`}),(0,U.jsx)(`li`,{children:`出网最小化:/api/proxy 仅放行插件代码中声明过的主机(防止面板成为任意内网跳板)`}),(0,U.jsx)(`li`,{children:`版本化与回滚:插件独立版本(同 id 覆盖自增),工作台按 id 引用,升级即时生效可回滚`}),(0,U.jsx)(`li`,{children:`数据隔离:插件数据集按助手分库(store-助手ID.db),共享需显式 scope=shared;资产包只带 schema 不带数据`}),(0,U.jsx)(`li`,{children:`UI 资产四红线(docs/08):包非运行时 · 数据必走 collection · 外部依赖必声明 · 单向 DAG`})]})})})]}),(0,U.jsx)(yO,{target:n,onClose:()=>{r(null),u()},agents:c}),(0,U.jsx)(bO,{open:i,onClose:()=>a(!1),onInstalled:u,agents:c})]})}function SO({agentId:e,onName:t,onEdit:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(2),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(``),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(null),[ee,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(!1),[F,I]=(0,v.useState)(null),[L,te]=(0,v.useState)(()=>{try{return+(localStorage.getItem(`aims.view.${e}`)||0)||0}catch{return 0}}),[ne,re]=(0,v.useState)(0),[ie,ae]=(0,v.useState)(null),oe=dO();(0,v.useEffect)(()=>{if(A===null)return;let e=e=>{e.key===`Escape`&&j(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[A]);let se=(0,v.useMemo)(()=>p?.workspaces.find(e=>e.id===p.current)||null,[p]),ce=se?.id||`default`,le=(0,v.useMemo)(()=>`chat-${e}-${ce}`,[e,ce]),ue=()=>V(`/api/state`).then(o).catch(()=>{}),de=()=>V(`/api/workspaces?agent_id=${e}`).then(m).catch(()=>{});(0,v.useEffect)(()=>{V(`/api/workbench?agent_id=${e}`).then(e=>{i(e.dsl),e.dsl&&t(e.dsl.workbench)}),V(`/api/deployment?agent_id=${e}`).then(e=>{f({L0:0,L1:1,L2:2,L3:3}[e.deployment?.default_autonomy||`L2`]??2)}),V(`/api/panels?with_code=1`).then(e=>c(e.plugins||[])),V(`/api/dev/inspirations?agent_id=${e}`).catch(()=>{}),de(),ue();let n=setInterval(ue,5e3);return()=>clearInterval(n)},[e]);let fe=async()=>{try{let t=await ke(`/api/workbench`,{agent_id:e,dsl:F});Z.success(`已发布 ${t.dsl.version},工位即时生效 ✨`),I(null),i(t.dsl)}catch(e){Z.error(String(e.message))}},R=async()=>{try{await Ae(`/api/workbench/draft`,{agent_id:e}),Z.info(`已放弃草稿`),I(null)}catch(e){Z.error(String(e.message))}};(0,v.useEffect)(()=>{ae(document.querySelector(`[data-slot="app-header-right"]`))},[]),(0,v.useEffect)(()=>{F&&V(`/api/panels?with_code=1`).then(e=>c(e.plugins||[])).catch(()=>{})},[F]);let z=async t=>{try{m(await Oe(`/api/workspaces/select`,{agent_id:e,ws_id:t}))}catch(e){Z.error(String(e.message))}},pe=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Pm,{className:`h-3.5 w-3.5 shrink-0 text-muted-foreground`}),(0,U.jsxs)(Eg,{value:ce,onValueChange:z,children:[(0,U.jsx)(Og,{className:`h-7 w-32 text-xs data-[size=default]:h-7 md:w-40`,title:se?.path,children:(0,U.jsx)(Dg,{children:(0,U.jsx)(`span`,{className:`truncate`,children:se?`${se.name}${se.external?`(外部)`:``}`:`默认工作区`})})}),(0,U.jsx)(kg,{children:(p?.workspaces||[]).map(e=>(0,U.jsx)(Ag,{value:e.id,className:`text-xs`,children:(0,U.jsxs)(`span`,{className:`max-w-64 truncate`,title:e.path,children:[e.name,e.external?` · 外部目录`:``,e.id===p?.current?` ✓`:``]})},e.id))})]}),se&&se.id!=="default"&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 shrink-0 p-0 text-muted-foreground`,onClick:()=>D(se),title:`删除当前工作区`,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 shrink-0 p-0 text-muted-foreground`,onClick:()=>g(!0),title:`新建工作区(默认目录或自定义路径)`,children:(0,U.jsx)(vm,{className:`h-3.5 w-3.5`})}),(0,U.jsxs)(Y,{size:`sm`,className:`h-7 gap-1 bg-ai text-white hover:bg-ai/90`,title:`说一句话,看着界面长出来(先进草稿,确认才发布)`,onClick:()=>P(!0),children:[(0,U.jsx)(Wh,{className:`h-3.5 w-3.5`}),`AI 定制`]}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`hidden h-7 gap-1 text-xs md:inline-flex`,title:`把当前工作台打包为 ARM UI 资产,别人下载即得同款工位`,onClick:()=>M({type:`workbench`,agentId:e,title:r?.workbench||`当前工作台`}),children:[(0,U.jsx)(Jp,{className:`h-3.5 w-3.5 text-violet-400`}),`分享`]}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`hidden h-7 gap-1 text-xs md:inline-flex`,onClick:n,children:[(0,U.jsx)(Ph,{className:`h-3.5 w-3.5`}),`编辑布局`]})]}),me=async()=>{T(!0);try{let t=await Oe(`/api/workspaces`,{agent_id:e,name:_||void 0,...b?{path:b}:{}});m(t),g(!1),y(``),x(``),Z.success(`工作区已创建${b?`(登记外部目录)`:``}`),await z(t.workspaces[t.workspaces.length-1].id)}catch(e){Z.error(String(e.message))}finally{T(!1)}},he=async()=>{if(E)try{m(await Ae(`/api/workspaces/${E.id}?agent_id=${e}`,{purge:O})),Z.success(`工作区已删除${O?`(目录已清除)`:`(仅移除登记)`}`),D(null),k(!1)}catch(e){Z.error(String(e.message))}},ge=(0,v.useMemo)(()=>__(r),[r]),_e=Math.min(L,Math.max(ge.length-1,0)),ve=ge[_e]||ge[0],ye=(0,v.useMemo)(()=>ve?.panels||[],[ve]);(0,v.useEffect)(()=>{try{localStorage.setItem(`aims.view.${e}`,String(_e))}catch{}},[e,_e]);let be=(0,v.useMemo)(()=>__(F),[F]),xe=ve?.panels.find(e=>e.type===`agent_dialog`)||ge.flatMap(e=>e.panels).find(e=>e.type===`agent_dialog`),Se=be[Math.min(ne,be.length-1)]||be[0],Ce=t=>n=>{let r=t.panels.find(e=>e.id===n.id)||n,i=r.type===`custom`?r.code||``:s.find(e=>e.id===r.panel)?.code||``;return i?(0,U.jsx)($D,{code:i,data:Te(n),meta:{agentId:e,panelId:n.id,pluginId:r.panel}},`${n.id}:${ce}`):(0,U.jsx)(`div`,{className:`p-3 text-[11px] text-muted-foreground`,children:`(插件代码加载中…)`})},we=ye.filter(e=>e.type===`custom`||e.type===`custom_panel`).map(e=>({panel:e,code:e.type===`custom`?e.code||``:s.find(t=>t.id===e.panel)?.code||``})).filter(e=>e.code),Te=t=>({devices:a?.devices||[],alarms:a?.alarms||[],kpi:a?.kpi||{},work_orders:a?.work_orders||[],inspections:a?.inspections||{},selected:l,onSelect:u,agentId:e,store:Fe(e,ce),runAction:(n,r)=>Ie(e,String(t?.id||``),n,r),params:{...t?.params||{},agentId:e,wsId:ce}});return!r||!a?(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`工作台加载中…`}):(0,U.jsxs)(`div`,{className:`flex h-full flex-col gap-2 overflow-hidden px-2 py-2 lg:px-4 lg:py-2.5`,children:[ie&&(0,pt.createPortal)((0,U.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:pe}),ie),(0,U.jsx)(`h1`,{className:`sr-only`,children:r.workbench}),!ie&&(0,U.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-1.5 text-[11px]`,children:pe}),oe?(0,U.jsx)(`div`,{className:`relative min-h-0 flex-1`,children:xe?(0,U.jsx)(OD,{agentId:e,agentName:r.workbench,sessionId:le,wsId:ce,injectedDevice:l,autonomy:d},`m:${e}:${ce}`):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-xs text-muted-foreground`,children:`此工作台暂无对话面板——可在桌面端添加「诊断对话」区块`})}):(0,U.jsxs)(U.Fragment,{children:[ge.length>1&&(0,U.jsx)(`div`,{className:`flex shrink-0 items-center gap-1 rounded-lg border bg-card p-1`,children:ge.map((e,t)=>(0,U.jsxs)(`button`,{onClick:()=>te(t),className:B(`flex h-7 items-center gap-1.5 rounded-md px-2.5 text-xs transition-colors`,t===_e?`bg-primary/15 font-medium text-primary`:`text-muted-foreground hover:bg-accent hover:text-foreground`),title:e.name,children:[(0,U.jsx)(Pm,{className:`h-3.5 w-3.5 shrink-0`}),e.name]},e.id))}),(0,U.jsxs)(`div`,{className:`relative min-h-0 flex-1`,children:[F&&(0,U.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col gap-2 rounded-lg border-2 border-dashed border-ai/60 bg-background/80 p-2 backdrop-blur-[2px] motion-safe:animate-in motion-safe:fade-in-0 motion-safe:duration-200`,children:[(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 rounded-md border border-primary/40 bg-primary/10 px-3 py-1.5 text-xs`,children:[(0,U.jsx)(cm,{className:`h-3.5 w-3.5 shrink-0 text-ai`}),(0,U.jsx)(`span`,{className:`font-semibold text-ai`,children:`草稿预览(AI 生成)`}),(0,U.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[F.panels.length,` 个面板 · `,be.length>1?`${be.length} 个视图`:`以下为发布后的样子`]}),be.length>1&&(0,U.jsx)(`span`,{className:`flex items-center gap-1`,children:be.map((e,t)=>(0,U.jsx)(`button`,{onClick:()=>re(t),className:B(`rounded px-1.5 py-0.5 text-[10px] transition-colors`,t===Math.min(ne,be.length-1)?`bg-primary/20 text-primary`:`text-muted-foreground hover:text-foreground`),children:e.name},e.id))}),(0,U.jsxs)(`div`,{className:`ml-auto flex gap-1.5`,children:[(0,U.jsxs)(Y,{size:`sm`,className:`h-7 gap-1 text-[11px]`,onClick:fe,children:[(0,U.jsx)(Sh,{className:`h-3 w-3`}),`发布生效`]}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 text-[11px]`,onClick:R,children:`放弃`}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`h-7 text-[11px]`,onClick:()=>I(null),children:`收起`})]})]}),(0,U.jsx)(iO,{className:`min-h-0 flex-1 overflow-auto p-0.5`,dsl:{...F,panels:Se?.panels||[]},renderPanel:Ce(F),renderDialog:()=>(0,U.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-1.5 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(Wh,{className:`h-4 w-4 text-primary`}),`诊断对话(发布后可交互)`]}),renderPlaceholder:()=>(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-[11px] text-muted-foreground`,children:`空区块`})})]}),(0,U.jsx)(iO,{className:`absolute inset-0 overflow-auto p-0.5`,dsl:{...r,panels:ve?.panels||[]},onMaximize:j,renderHeaderActions:e=>e.type===`agent_dialog`?(0,U.jsxs)(U.Fragment,{children:[l&&(0,U.jsxs)(`span`,{className:`hidden min-w-0 truncate text-[10px] text-muted-foreground lg:inline`,title:`上下文:${l}(点选设备自动注入,点其他设备切换)`,children:[`上下文 `,l]}),(0,U.jsxs)(Eg,{value:String(d),onValueChange:e=>{let t=+e;f(t),Oe(`/api/chat/autonomy`,{sessionId:le,level:t}).then(e=>Z.success(`自主级别已切换:${[`L0 只读`,`L1 给建议不动手`,`L2 做了等我确认`,`L3 全自动免确认`][t]}`,{description:e?.note||`即时生效:进行中的一轮其后续工具调用按新级别执行,下条消息起系统提示词同步更新`})).catch(e=>Z.error(String(e.message)))},children:[(0,U.jsx)(Og,{className:`h-5 w-fit shrink-0 gap-1 rounded-full border-0 px-2 text-[10px] font-semibold shadow-none data-[size=default]:h-5 [&_svg]:size-3! ${d===3?`bg-destructive/10 text-destructive hover:bg-destructive/20`:d===2?`bg-primary/10 text-primary hover:bg-primary/20`:`bg-accent text-muted-foreground hover:bg-accent/70`}`,title:`自主级别:L0 只读 → L3 免确认(当前对话即时生效,点击切换)`,children:(0,U.jsx)(Dg,{children:(0,U.jsx)(`span`,{children:[`L0`,`L1`,`L2`,`L3`][d]})})}),(0,U.jsxs)(kg,{children:[(0,U.jsx)(Ag,{value:`0`,className:`text-xs`,children:`只回答不动手(L0)`}),(0,U.jsx)(Ag,{value:`1`,className:`text-xs`,children:`给建议不动手(L1)`}),(0,U.jsx)(Ag,{value:`2`,className:`text-xs`,children:`做了等我确认(L2)`}),(0,U.jsx)(Ag,{value:`3`,className:`text-xs text-destructive`,children:`全自动免确认(L3)`})]})]})]}):null,renderPanel:Ce(r),renderDialog:()=>(0,U.jsx)(OD,{agentId:e,agentName:r.workbench,sessionId:le,wsId:ce,injectedDevice:l,autonomy:d},`${e}:${ce}`),renderPlaceholder:()=>(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center p-4 text-center text-[11px] text-muted-foreground`,children:`空区块——到「编辑布局」添加插件或让 AI 定制`})})]}),A!==null&&ye[A]&&(()=>{let t=ye[A],n=we.find(e=>e.panel.id===t.id),i=t.type===`agent_dialog`?(0,U.jsx)(OD,{agentId:e,agentName:r.workbench,sessionId:le,wsId:ce,injectedDevice:l,autonomy:d},`max:${e}:${ce}`):n?(0,U.jsx)($D,{code:n.code,data:Te(t),meta:{agentId:e,panelId:t.id,pluginId:t.panel}}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-muted-foreground`,children:`该面板无内容`});return(0,U.jsxs)(`div`,{className:`fixed inset-0 z-50 flex flex-col bg-background/90 p-4 backdrop-blur-sm motion-safe:animate-in motion-safe:fade-in-0 motion-safe:zoom-in-95 motion-safe:duration-200`,children:[(0,U.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 px-1`,children:[(0,U.jsx)(Km,{className:`h-4 w-4 shrink-0 text-primary/80`}),(0,U.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:t.title}),(0,U.jsx)(J,{variant:`secondary`,className:`h-5 shrink-0 text-[10px]`,children:r.version}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`ml-auto h-7 shrink-0 gap-1 text-xs`,onClick:()=>j(null),children:[(0,U.jsx)(mg,{className:`h-3.5 w-3.5`}),`还原(ESC)`]})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-lg border bg-card`,children:i})]})})(),(0,U.jsx)(gg,{open:h,onOpenChange:g,children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsx)(Sg,{children:`新建工作区`})}),(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`名称`}),(0,U.jsx)(wg,{value:_,onChange:e=>y(e.target.value),placeholder:`如:产线B改造`,className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`自定义目录(可选,留空则在平台 workspace 目录下动态新增)`}),(0,U.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,U.jsx)(wg,{value:b,onChange:e=>x(e.target.value),placeholder:`/Users/you/projects/line-b 或点浏览选择`,className:`font-mono text-xs`}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-8 shrink-0 gap-1 text-xs`,onClick:()=>C(!0),children:[(0,U.jsx)(gm,{className:`h-3.5 w-3.5`}),`浏览…`]})]}),(0,U.jsx)(`p`,{className:`text-[10px] text-warning`,children:`⚠ 助手将能读写该目录(exec 工作目录即此处);目录须已存在,平台不会在其中写入数据库文件。`})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:w,onClick:()=>g(!1),children:`取消`}),(0,U.jsx)(Y,{disabled:w,onClick:me,children:w?`创建中…`:`创建并切换`})]}),(0,U.jsx)(oO,{open:S,onOpenChange:C,onPick:e=>x(e)})]})}),(0,U.jsx)(gg,{open:!!E,onOpenChange:e=>{e||(D(null),k(!1))},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[`删除工作区 · `,E?.name]})}),(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,U.jsx)(`p`,{className:`font-mono text-[11px] text-muted-foreground`,children:E?.path}),E?.external?(0,U.jsxs)(`p`,{children:[`外部目录工作区:仅移除登记,`,(0,U.jsx)(`b`,{children:`不删除`}),`你的文件;该工作区的数据集库将一并删除。`]}):(0,U.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 p-2.5`,children:[(0,U.jsx)(hg,{checked:O,onCheckedChange:e=>k(!!e)}),(0,U.jsx)(`span`,{children:`同时删除平台目录下的工作区文件夹(数据集库始终删除)`})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,onClick:()=>D(null),children:`取消`}),(0,U.jsx)(Y,{variant:`destructive`,onClick:he,children:`确认删除`})]})]})})]}),(0,U.jsx)(yO,{target:ee,onClose:()=>M(null),agents:[{agent_id:e,name:r.workbench||`当前助手`}]}),(0,U.jsx)(uO,{agentId:e,open:N,onClose:()=>P(!1),onPreview:e=>I(e),onPublished:e=>{I(null),i(e)}})]})}function CO({...e}){return(0,U.jsx)(Hl,{"data-slot":`dropdown-menu`,...e})}function wO({...e}){return(0,U.jsx)(Wl,{"data-slot":`dropdown-menu-trigger`,...e})}function TO({className:e,sideOffset:t=4,...n}){return(0,U.jsx)(Gl,{children:(0,U.jsx)(ql,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:B(`z-50 min-w-36 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...n})})}function EO({className:e,...t}){return(0,U.jsx)(Jl,{"data-slot":`dropdown-menu-item`,className:B(`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-xs outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:h-3.5 [&_svg]:w-3.5 [&_svg]:shrink-0`,e),...t})}function DO({className:e,...t}){return(0,U.jsx)(Yl,{"data-slot":`dropdown-menu-separator`,className:B(`-mx-1 my-1 h-px bg-border`,e),...t})}function OO({pluginId:e,onRollback:t}){let[n,r]=(0,v.useState)(null);return(0,v.useEffect)(()=>{e&&V(`/api/panels?id=${e}`).then(e=>r(e.plugin)).catch(()=>r(null))},[e]),n?(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px]`,children:[(0,U.jsx)(`span`,{className:`font-mono`,children:n.version}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`(当前)`})]}),(n.history||[]).slice().reverse().map(n=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-[11px]`,children:[(0,U.jsx)(`span`,{className:`font-mono`,children:n.version}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:Le(n.at,`dts`)}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`ml-auto h-6 text-[10px]`,onClick:()=>t(e,n.version),children:`回退`})]},n.version)),!(n.history||[]).length&&(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:`无历史版本`})]}):(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:`(插件信息加载中…)`})}var kO=[{emoji:`📋`,title:`最近记录`,desc:`数据/操作时间线`,prompt:`新建一个区块:展示我数据集里最近 20 条记录的倒序时间线(ui.StatusItem,按重要程度着色),数据不足时先建合适的数据集`},{emoji:`⭐`,title:`关键指标`,desc:`大数字状态卡`,prompt:`新建一个区块:用 ui.Stat 大数字卡展示当前最关键的状态指标(数据从 /api/state 或数据集取),异常着色`},{emoji:`✅`,title:`待办清单`,desc:`可勾选任务`,prompt:`先建 todos 数据集(title/done/due),再做一个面板:ui.StatusItem 待办列表 + 完成态切换(store.update),顶部 ui.Button 清除已完成`},{emoji:`📊`,title:`分类统计`,desc:`计数条形图`,prompt:`新建一个区块:对相关数据按类型或状态聚合计数,用 ui.Bars 横向条形展示`},{emoji:`🔍`,title:`快速检索`,desc:`关键词搜索`,prompt:`新建一个区块:输入关键词检索我的数据集(store.list filter 或接口查询),结果用 ui.StatusItem 列表展示,带加载/空/错误三态`},{emoji:`🕒`,title:`活动流水`,desc:`今日事件流`,prompt:`新建一个区块:今天发生的事件/变更流水(按时间倒序),新条目突出显示,支持点击查看详情`}],AO=e=>({x:1,y:e.reduce((e,t)=>Math.max(e,t.grid?t.grid.y+t.grid.h-1:0),0)+1,w:6,h:1});function jO({agentId:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(``),[l,u]=(0,v.useState)(!1),[d,f]=(0,v.useState)([]),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(null),[b,x]=(0,v.useState)(!1),[S,C]=(0,v.useState)(0),[w,T]=(0,v.useState)(null),[E,D]=(0,v.useState)([]),[O,k]=(0,v.useState)(null),A=(0,v.useRef)(`dev-${e.slice(0,8)}`).current,j=(0,v.useRef)(null),[ee,M]=(0,v.useState)([]),[N,P]=(0,v.useState)(``),[F,I]=(0,v.useState)(!1),[L,te]=(0,v.useState)(``),[ne,re]=(0,v.useState)(null),[ie,ae]=(0,v.useState)(!1),[oe,se]=(0,v.useState)({steps:[]}),[ce,le]=(0,v.useState)(!1),[ue,de]=(0,v.useState)([]),[fe,R]=(0,v.useState)(!0),[z,pe]=(0,v.useState)(!1),[me,he]=(0,v.useState)(`main`),[ge,_e]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(F||ce||!oe.steps.length)return;let e=setTimeout(()=>se({steps:[]}),2500);return()=>clearTimeout(e)},[F,ce,oe]);let[ve,ye]=(0,v.useState)(null),be=(0,v.useRef)(null),xe=(0,v.useRef)(null),Se=(0,v.useRef)(!0),Ce=(0,v.useCallback)(()=>{let e=be.current?.closest(`[data-slot="scroll-area-viewport"]`);e&&(e.scrollTop=e.scrollHeight)},[]);(0,v.useEffect)(()=>{let e=be.current?.closest(`[data-slot="scroll-area-viewport"]`);if(!e)return;let t=()=>{Se.current=e.scrollHeight-e.scrollTop-e.clientHeight<80};return e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)},[]),(0,v.useEffect)(()=>{Se.current&&Ce()},[ee,F,L,Ce]);let we=()=>{V(`/api/workbench?agent_id=${e}&draft=1`).then(e=>{let t=v_(e.dsl);n(t),he(__(t)[0].id),i(e.isDraft),o(e.versions||[]),c(JSON.stringify(t,null,2))}),V(`/api/panels`).then(e=>f(e.plugins||[]))};(0,v.useEffect)(()=>{we()},[e]);let[Te,Ee]=(0,v.useState)(null);(0,v.useEffect)(()=>{Ee(document.querySelector(`[data-slot="app-header-right"]`))},[]),(0,v.useEffect)(()=>{let t=!0;return R(!0),de([]),V(`/api/dev/inspirations?agent_id=${e}`).then(e=>{t&&de(e.items?.length?e.items:kO)}).catch(()=>{t&&de(kO)}).finally(()=>{t&&R(!1)}),()=>{t=!1}},[e]);let De=()=>{z||(pe(!0),V(`/api/dev/inspirations?agent_id=${e}&refresh=1`).then(e=>{e.items?.length&&de(e.items)}).catch(()=>Z.error(`重新生成失败,稍后再试`)).finally(()=>pe(!1)))};if((0,v.useEffect)(()=>{let e=()=>V(`/api/state`).then(T).catch(()=>{});e();let t=setInterval(e,5e3);return V(`/api/panels?with_code=1`).then(e=>D(e.plugins||[])),()=>clearInterval(t)},[]),!t)return(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`加载工作台 DSL…`});let Me=__(t),Ne=Me[Math.max(Me.findIndex(e=>e.id===me),0)],Pe=Ne.panels,Re=_===null?null:Pe[_],ze=e=>{let t=__(e);return t.find(e=>e.id===Ne.id)||t[0]},Be=e=>{let r=JSON.parse(JSON.stringify(t));e(r);let a=__(r);r.views=a,r.panels=a.flatMap(e=>e.panels),n(r),c(JSON.stringify(r,null,2)),i(!0)},Ve=(e,t)=>Be(n=>{let r=ze(n).panels,i=r[e].grid||{x:1,y:1,w:6,h:1};r[e].grid={...i,...t}}),He=t=>({devices:w?.devices||[],alarms:w?.alarms||[],kpi:w?.kpi||{},work_orders:w?.work_orders||[],inspections:w?.inspections||{},selected:O,onSelect:k,agentId:e,store:Fe(e),runAction:(n,r)=>Ie(e,String(t.id),n,r),params:{...t.params||{},agentId:e,wsId:`default`}}),Ue=e=>e.type===`custom`?e.code:E.find(t=>t.id===e.panel)?.code||``,We=()=>Be(e=>{let t=ze(e).panels;t.push({id:`block_${Math.random().toString(36).slice(2,6)}`,type:`placeholder`,title:`空区块`,grid:AO(t)})}),Ge=(e,t)=>{Be(n=>{let r=ze(n).panels;if(e!==null&&e<r.length){let n=r[e];Object.assign(n,{type:`custom_panel`,panel:t.id,title:n.title===`空区块`?t.name:n.title})}else r.push({id:`plug_${t.id}_${Math.random().toString(36).slice(2,5)}`,type:`custom_panel`,title:t.name,panel:t.id,grid:AO(r)})}),m(!1),g(null),Z.success(`已插入「${t.name}」(草稿,待发布)`)},Ke=async e=>{let t=Pe[e];re(e);let n=``;try{let e=t.panel||t.id,r=await V(`/api/panel-errors?key=${encodeURIComponent(e)}`);n=r.errors?.length?r.errors.map(e=>`[${e.kind}] ${e.message}`).join(` | `):``}catch{}P(`请调试该插件:${n?`最近运行错误:${n}。`:`暂无上报错误,请先 read_panel_plugin 审代码,重点检查结果处理与错误路径。`}请定位根因、修复并说明验证方式。`),Z.info(`已锁定调试目标并带上错误上下文,发送即开始`)},H=async(e,t)=>{try{let n=await Oe(`/api/panels/rollback`,{id:e,version:t});Z.success(`已回退到 ${t}(新版本号 ${n.plugin.version},引用即时生效)`),we()}catch(e){Z.error(String(e.message))}},qe=()=>{if(ne===null||!Pe[ne])return``;let e=Pe[ne],t=e.grid||{x:1,y:1,w:6,h:1},n=Math.round(t.w/12*100),r=t.w<=3?`窄条(紧凑单列列表/迷你卡)`:t.w>=9?`宽区块(表格/多列仪表)`:`中等宽度(两列卡/紧凑表)`;return`【定制目标】区块「${e.title}」(id=${e.id}):第${t.x}列起、跨${t.w}列(约${n}%宽)、跨${t.h}行(${r})。${e.panel?`当前引用插件 ${e.panel}——先 read_panel_plugin 再决定改造还是重写。`:`空区块,可新建插件。`}${e.bare?`本区块为通栏视觉面板(bare:无面板头无边框,内容顶格,适合 KPI 条/图表/矩阵墙)。`:`面板头由平台渲染(标题「${e.title}」)——插件首屏直接进入内容,勿写标题行。`}`},Je=e=>{re(e),P(``),setTimeout(()=>xe.current?.focus(),50),Z.info(`已锁定定制目标「${Pe[e].title}」——在右侧描述需求即可`)},Ye=async()=>{u(!0);try{let r=await ke(`/api/workbench`,{agent_id:e,dsl:t});n(r.dsl),o(r.versions),c(JSON.stringify(r.dsl,null,2)),i(!1),ae(!1),Z.success(`已发布 ${r.dsl.version},工作台即时生效`)}catch(e){Z.error(String(e.message))}finally{u(!1)}},Xe=async()=>{await Ae(`/api/workbench/draft`,{agent_id:e}),Z.success(`已放弃草稿`),we()},Ze=async t=>{try{let r=await Oe(`/api/workbench/rollback`,{agent_id:e,version:t});n(r.dsl),o(r.versions),c(JSON.stringify(r.dsl,null,2)),i(!1),Z.success(`已回滚到 ${t}`)}catch(e){Z.error(String(e.message))}},Qe=()=>Be(e=>{let t=__(e);t.push({id:`view_${Math.random().toString(36).slice(2,6)}`,name:`视图${t.length+1}`,panels:[{id:`block_${Math.random().toString(36).slice(2,6)}`,type:`placeholder`,title:`空区块`,grid:{x:1,y:1,w:6,h:1}}]})}),$e=()=>Be(e=>{let t=__(e),n=t.find(e=>e.id===Ne.id)||t[0];t.push({id:`view_${Math.random().toString(36).slice(2,6)}`,name:`${n.name} 副本`,panels:n.panels.map(e=>({...e,id:`${e.id}_${Math.random().toString(36).slice(2,5)}`}))})}),et=e=>Be(t=>{let n=ze(t);e.trim()&&(n.name=e.trim())}),tt=()=>{Me.length<=1?Z.info(`至少保留一个视图`):(Be(e=>{let t=__(e),n=Math.max(t.findIndex(e=>e.id===Ne.id),0);t.splice(n,1)}),he(``),y(null),re(null))},nt=()=>{j.current?.abort()},rt=async()=>{if(F)Z.info(`对话进行中,请先停止再清空`);else if(window.confirm(`清空二开助手的会话历史?服务端上下文将被丢弃并从零开始;已生成的草稿与插件不受影响。`))try{await Oe(`/api/session/reset`,{scope:`dev`,sessionId:A}),M([]),te(``),Z.success(`会话已清空`)}catch(e){Z.error(String(e.message))}},it=async()=>{let t=N.trim();if(!t||F)return;let n=qe()?`${qe()}\n需求:${t}`:t;P(``),I(!0),ae(!1),se({steps:[]}),le(!1),Se.current=!0,M(e=>[...e,{role:`user`,text:t}]);let r=!1,i=!1,a=new AbortController;j.current=a;try{await je(`/api/dev/chat`,{sessionId:A,agentId:e,message:n},e=>{let t=e.type;t===`status`?te(String(e.text||``)):t===`text_delta`?(i=!0,te(``),M(t=>{let n=t[t.length-1];return n?.role===`agent`&&n.streaming?[...t.slice(0,-1),{...n,text:n.text+String(e.delta)}]:[...t,{role:`agent`,text:String(e.delta),streaming:!0}]})):t===`done`?!i&&!r&&M(e=>[...e,{role:`agent`,text:`(模型返回了空回复——请重试;若持续出现请到「系统设置」检查模型配置)`}]):t===`tool_start`?(r=!0,se(t=>({steps:[...t.steps,{label:cO(String(e.tool)),state:`active`}]})),M(t=>[...t,{role:`agent`,text:``,streaming:!1,events:[{tool:String(e.tool),args:e.args||{}}]}])):t===`tool_end`?(se(t=>{let n=[...t.steps],r=cO(String(e.tool));for(let e=n.length-1;e>=0;e--)if(n[e].label===r&&n[e].state===`active`){n[e]={...n[e],state:`done`};break}return{steps:n}}),M(t=>{for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.role===`agent`&&r.events){for(let n=r.events.length-1;n>=0;n--)if(r.events[n].tool===e.tool&&r.events[n].result===void 0)return r.events[n].result=String(e.result||``),r.events[n].ok=e.ok!==!1,[...t]}}return t})):t===`interrupted`?(te(``),M(e=>[...e,{role:`agent`,text:`(已中断)`}])):t===`meta`?e.hasDraft?(ae(!0),le(!0),we()):r&&we():t===`error`&&Z.error(String(e.message))},a.signal)}catch(e){a.signal.aborted?M(e=>[...e,{role:`agent`,text:`(已中断)`}]):M(t=>[...t,{role:`agent`,text:`❌ ${String(e.message)}`}])}finally{te(``),I(!1),j.current===a&&(j.current=null)}},at=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{variant:r?`outline`:`secondary`,className:B(`h-6 shrink-0 px-1.5 text-[10px]`,r&&`border-warning/50 text-warning`),children:r?`草稿未发布`:`线上 ${t.version}`}),r&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 shrink-0 px-1.5 text-[10px] text-warning hover:text-warning`,title:`放弃当前草稿,回到线上版本`,onClick:Xe,children:`放弃`}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-6 shrink-0 px-2 text-[11px]`,onClick:()=>{g(null),m(!0)},children:[(0,U.jsx)(gh,{className:`mr-1 h-3 w-3`}),`插件库`]}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-6 shrink-0 px-2 text-[11px]`,title:`把当前工作台(含依赖插件/数据集 schema/交互脚本)发布为 ARM UI 资产`,onClick:()=>ye({type:`workbench`,agentId:e,title:t.workbench}),children:[(0,U.jsx)(Jp,{className:`mr-1 h-3 w-3 text-violet-400`}),`导出资产`]}),(0,U.jsxs)(Y,{size:`sm`,className:`h-6 shrink-0 px-2 text-[11px]`,disabled:l||!r,onClick:Ye,children:[(0,U.jsx)(Eh,{className:`mr-1 h-3 w-3`}),l?`发布中…`:`审阅后发布`]})]});return(0,U.jsxs)(`div`,{className:`flex h-full flex-col gap-2 overflow-hidden px-4 py-2.5`,children:[!Te&&(0,U.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-1.5`,children:at}),Te&&(0,pt.createPortal)((0,U.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:at}),Te),(0,U.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[1fr_380px] gap-4`,children:[(0,U.jsx)(`div`,{className:`flex min-h-0 flex-col`,children:(0,U.jsxs)(pO,{defaultValue:`canvas`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,U.jsxs)(`div`,{className:`flex shrink-0 flex-nowrap items-center gap-1.5 overflow-x-auto rounded-md border bg-card p-1.5`,children:[(0,U.jsxs)(hO,{className:`h-8 shrink-0`,children:[(0,U.jsxs)(gO,{value:`canvas`,className:`px-2 text-xs`,children:[(0,U.jsx)(Im,{className:`mr-1 h-3.5 w-3.5`}),`画布`]}),(0,U.jsx)(gO,{value:`json`,className:`px-2 text-xs`,children:`JSON`})]}),(0,U.jsx)(fO,{orientation:`vertical`,className:`mx-1 h-5 shrink-0`}),(0,U.jsxs)(Y,{size:`sm`,variant:`secondary`,className:`h-7 shrink-0 text-xs`,onClick:We,children:[(0,U.jsx)(mh,{className:`mr-1 h-3 w-3`}),`添加区块`]}),(0,U.jsx)(fO,{orientation:`vertical`,className:`mx-1 h-5 shrink-0`}),Re?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{className:`max-w-28 shrink-0 truncate text-[11px] text-muted-foreground`,title:Re.title,children:[`「`,Re.title,`」`]}),(0,U.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,children:`按住拖动调整位置 · 右下角手柄调大小`}),(0,U.jsxs)(Y,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 text-xs text-primary`,onClick:()=>Je(_),children:[(0,U.jsx)(wp,{className:`mr-1 h-3 w-3`}),`AI 定制`]}),(0,U.jsxs)(CO,{children:[(0,U.jsx)(wO,{asChild:!0,children:(0,U.jsxs)(Y,{size:`sm`,variant:`ghost`,className:`h-7 shrink-0 text-xs`,children:[(0,U.jsx)(om,{className:`h-3 w-3`}),`更多`]})}),(0,U.jsxs)(TO,{align:`end`,children:[(Re.type===`custom`||Re.type===`custom_panel`)&&(0,U.jsxs)(EO,{className:`text-warning focus:text-warning`,onClick:()=>Ke(_),children:[(0,U.jsx)(fg,{}),`AI 调试`]}),(0,U.jsxs)(EO,{onClick:()=>Ve(_,{x:1,w:12}),children:[(0,U.jsx)(Xh,{className:`text-muted-foreground`}),`占满宽度`]}),(0,U.jsxs)(EO,{onClick:()=>{let e=Pe.reduce((e,t)=>Math.max(e,(t.grid?.y||1)+(t.grid?.h||1)-1),1);Ve(_,{h:Math.max(1,e-(Re.grid?.y||1)+1)})},children:[(0,U.jsx)(Qh,{className:`text-muted-foreground`}),`延到底部`]}),(0,U.jsxs)(EO,{onClick:()=>Ve(_,{x:1}),children:[(0,U.jsx)(mp,{className:`text-muted-foreground`}),`贴左`]}),(0,U.jsxs)(EO,{onClick:()=>Ve(_,{x:12-(Re.grid?.w||6)+1}),children:[(0,U.jsx)(fp,{className:`text-muted-foreground`}),`贴右`]}),(0,U.jsx)(DO,{}),(0,U.jsxs)(EO,{onClick:()=>{g(_),m(!0)},children:[(0,U.jsx)(gh,{className:`text-muted-foreground`}),`换插件`]}),(0,U.jsxs)(EO,{onClick:()=>{C(_),x(!0)},children:[(0,U.jsx)(Ph,{className:`text-muted-foreground`}),`面板设置`]}),(0,U.jsxs)(EO,{className:`text-destructive focus:text-destructive`,onClick:()=>{Be(e=>ze(e).panels.splice(_,1)),y(null),re(null)},children:[(0,U.jsx)(ng,{}),`删除区块`]})]})]})]}):(0,U.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:`点击画布中的区块进行编辑`})]}),(0,U.jsxs)(_O,{value:`canvas`,className:`mt-1.5 flex min-h-0 flex-1 flex-col gap-1.5`,children:[(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 rounded-lg border bg-card p-1`,children:[Me.map(e=>(0,U.jsxs)(`button`,{onClick:()=>{he(e.id),y(null),re(null)},className:B(`flex h-7 min-w-0 items-center gap-1.5 rounded-md px-2.5 text-xs transition-colors`,e.id===Ne.id?`bg-primary/15 font-medium text-primary`:`text-muted-foreground hover:bg-accent hover:text-foreground`),children:[(0,U.jsx)(`span`,{className:`truncate`,children:e.name}),(0,U.jsx)(`span`,{className:`shrink-0 text-[9px] opacity-60`,children:e.panels.length})]},e.id)),(0,U.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,U.jsx)(`button`,{onClick:Qe,title:`新建视图(新场景一块新屏)`,className:`rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,U.jsx)(mh,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(`button`,{onClick:$e,title:`复制当前视图`,className:`rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,U.jsx)(Xp,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(`button`,{onClick:()=>_e(!0),title:`重命名当前视图`,className:`rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,children:(0,U.jsx)(uh,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(`button`,{onClick:tt,title:`删除当前视图(至少保留一个)`,className:`rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-destructive`,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})})]})]}),(0,U.jsx)(`div`,{className:`shrink-0`,children:(0,U.jsx)(aO,{})}),(0,U.jsxs)(`div`,{className:`relative min-h-0 flex-1 overflow-hidden rounded-lg border bg-muted/20 p-2`,children:[(0,U.jsx)(iO,{className:`absolute inset-0 overflow-auto`,dsl:{...t,panels:Ne.panels},edit:{sel:_,onSelect:y,onGrid:(e,t)=>Ve(e,t),onAICustomize:Je},renderPanel:t=>{let n=Ue(t);return n?(0,U.jsx)($D,{code:n,data:He(t),meta:{agentId:e,panelId:t.id,pluginId:t.panel}}):(0,U.jsx)(`div`,{className:`p-3 text-[11px] text-muted-foreground`,children:`(插件代码加载中…)`})},renderDialog:()=>(0,U.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(wp,{className:`h-5 w-5 text-primary`}),`诊断对话(内核)`,(0,U.jsx)(`span`,{className:`text-[10px]`,children:`发布后在工作台可交互`})]}),renderPlaceholder:()=>(0,U.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(mh,{className:`h-4 w-4`}),`空区块`,(0,U.jsx)(`span`,{className:`text-[10px]`,children:`选中后「换插件」或「AI 定制」`})]})}),(0,U.jsx)(lO,{steps:oe.steps,status:L,lit:ce,onClose:()=>{se({steps:[]}),le(!1)}})]}),(0,U.jsx)(`p`,{className:`shrink-0 text-center text-[10px] text-muted-foreground`,children:`拖拽吸附 12 列网格 · 右下角手柄调大小 · 画布比例 = 真实工作台(所见即所得)`})]}),(0,U.jsxs)(_O,{value:`json`,className:`mt-2 flex min-h-0 flex-1 flex-col gap-2`,children:[(0,U.jsx)(`textarea`,{value:s,onChange:e=>c(e.target.value),spellCheck:!1,className:`min-h-0 w-full flex-1 resize-none rounded-md border bg-muted p-3 font-mono text-[11px] leading-relaxed`}),(0,U.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[(0,U.jsx)(Y,{size:`sm`,onClick:()=>{try{let e=JSON.parse(s);if(!e.panels&&!e.views)throw Error(`缺少 panels/views`);let t=v_(e);n(t),he(__(t)[0].id),i(!0),Z.success(`JSON 已应用(未发布)`)}catch(e){Z.error(`JSON 解析失败: ${e.message}`)}},children:`应用 JSON`}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,onClick:()=>c(JSON.stringify(t,null,2)),children:`从画布刷新`})]})]})]})}),(0,U.jsxs)(`div`,{className:`flex min-h-0 flex-col gap-4`,children:[(0,U.jsx)(Gf,{className:`flex min-h-0 flex-1 flex-col py-0`,children:(0,U.jsxs)(Jf,{className:`flex min-h-0 flex-1 flex-col p-0`,children:[(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 border-b px-3 py-2 text-xs font-semibold`,children:[(0,U.jsx)(Wh,{className:`h-3.5 w-3.5 text-ai`}),`二开助手`,(0,U.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`· 描述需求,直接定制区块`}),(0,U.jsx)(`button`,{className:`ml-auto shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground disabled:opacity-40`,title:`清空会话(丢弃服务端上下文,从零开始)`,disabled:F,onClick:rt,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})})]}),ne!==null&&Pe[ne]&&(()=>{let e=Pe[ne],t=e.grid||{x:1,y:1,w:6,h:1},n=Math.round(t.w/12*100);return(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 border-b bg-primary/5 px-3 py-1.5 text-[11px]`,children:[(0,U.jsx)(em,{className:`h-3.5 w-3.5 shrink-0 text-primary`}),(0,U.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`定制目标:`,(0,U.jsx)(`b`,{children:e.title}),` · `,n,`% 宽 · `,t.h,` 行`,e.panel?(0,U.jsxs)(U.Fragment,{children:[` · `,(0,U.jsx)(`span`,{className:`font-mono`,children:e.panel})]}):` · 空区块`]}),(0,U.jsx)(`button`,{className:`ml-auto shrink-0 rounded p-0.5 text-muted-foreground hover:text-foreground`,title:`取消目标,改为自由描述`,onClick:()=>re(null),children:`×`})]})})(),ie&&r&&(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5 border-b bg-success/10 px-3 py-1.5 text-[11px] text-success`,children:[(0,U.jsx)(Bp,{className:`h-3.5 w-3.5 shrink-0`}),`草稿已生成——到顶部「审阅后发布」生效`]}),(0,U.jsx)(bD,{className:`min-h-0 flex-1`,children:(0,U.jsxs)(`div`,{className:`space-y-2.5 p-3`,ref:be,children:[ee.length===0&&(0,U.jsx)(`div`,{className:`space-y-2`,children:(0,U.jsxs)(`div`,{className:`rounded-md border border-dashed border-primary/30 bg-primary/5 p-3 text-[11px] leading-relaxed`,children:[(0,U.jsxs)(`div`,{className:`mb-1 flex items-center gap-1.5 text-xs font-semibold text-ai`,children:[`✨ 灵感库 · 为这个助手定制`,!fe&&ue.length>0&&(0,U.jsxs)(`button`,{onClick:De,disabled:z,title:`按自描述重新生成一批(不满意就换)`,className:`ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-normal text-muted-foreground transition-colors hover:text-primary disabled:opacity-50`,children:[(0,U.jsx)(bh,{className:B(`h-3 w-3`,z&&`animate-spin`)}),z?`构思中…`:`换一批`]})]}),(0,U.jsx)(`div`,{children:`由助手自描述(AGENT.md)生成——选中画布区块再描述 = 只改它;直接描述 = 自动建区块。`}),fe&&(0,U.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-1.5 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-ai`}),`正在阅读这个助手的自描述并构思灵感…(不影响你直接输入需求)`]}),(0,U.jsxs)(`div`,{className:`mt-1.5 grid grid-cols-2 gap-1.5`,children:[fe&&[...[,,,,,,]].map((e,t)=>(0,U.jsx)(`div`,{className:`h-[46px] animate-pulse rounded-md border bg-muted/50`},t)),!fe&&ue.map(e=>(0,U.jsxs)(`button`,{onClick:()=>P(e.prompt),title:e.prompt,className:`flex h-[46px] flex-col items-start gap-0.5 overflow-hidden rounded-md border bg-card/60 p-2 text-left transition-colors hover:border-primary/60`,children:[(0,U.jsxs)(`span`,{className:`text-[11px] font-medium`,children:[e.emoji,` `,e.title]}),(0,U.jsx)(`span`,{className:`line-clamp-1 w-full text-[10px] text-muted-foreground`,children:e.desc})]},e.title))]})]})}),ee.map((e,t)=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:e.role===`user`?`ml-auto max-w-[90%] rounded-lg bg-primary/20 px-2.5 py-1.5 text-xs break-words whitespace-pre-wrap`:`max-w-full rounded-lg bg-card px-2.5 py-1.5 text-xs leading-relaxed break-words whitespace-pre-wrap`,children:e.text}),(e.events||[]).map((e,t)=>(0,U.jsxs)(`div`,{className:`mt-1 min-w-0 rounded-md border border-dashed px-2 py-1 text-[10px]`,children:[(0,U.jsx)(`span`,{children:e.ok===!1?`❌`:`🛠`}),` `,(0,U.jsx)(`span`,{className:`font-mono font-semibold`,children:e.tool}),(0,U.jsx)(`pre`,{className:`mt-0.5 max-h-32 overflow-auto whitespace-pre-wrap break-all text-muted-foreground`,children:String(e.result||``).slice(0,260)})]},t))]},t)),(F||L)&&(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 px-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 animate-pulse rounded-full bg-primary`}),L||`开发中…`]})]})}),(0,U.jsxs)(`div`,{className:`shrink-0 space-y-1 border-t p-2`,children:[(0,U.jsx)(`textarea`,{ref:xe,value:N,onChange:e=>P(e.target.value),rows:2,onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),it())},placeholder:ne===null?`描述需求,如「左上窄条做一个最近工单列表」(Enter 发送)…`:`描述对「${Pe[ne]?.title}」的需求(Enter 发送,Shift+Enter 换行)…`,className:`min-h-[56px] w-full resize-none rounded-md border bg-background px-2 py-1.5 text-xs`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:ne===null?`未锁定目标——助手会自动规划区块位置`:`目标上下文(位置/几何/插件)发送时自动携带`}),F?(0,U.jsxs)(Y,{size:`sm`,variant:`destructive`,className:`h-7 gap-1 text-xs`,onClick:nt,children:[(0,U.jsx)(Jh,{className:`h-3 w-3`}),`停止`]}):(0,U.jsxs)(Y,{size:`sm`,className:`h-7 gap-1 text-xs`,disabled:!N.trim(),onClick:it,children:[(0,U.jsx)(Ah,{className:`h-3 w-3`}),`发送`]})]})]})]})}),(0,U.jsx)(Gf,{className:`shrink-0 py-0`,children:(0,U.jsxs)(Jf,{className:`p-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 border-b px-3 py-2 text-xs font-semibold`,children:[(0,U.jsx)(wh,{className:`h-3.5 w-3.5`}),`版本历史`]}),(0,U.jsx)(`div`,{className:`max-h-40 overflow-y-auto`,children:(0,U.jsxs)(`div`,{className:`divide-y`,children:[a.length===0&&(0,U.jsx)(`div`,{className:`p-3 text-center text-xs text-muted-foreground`,children:`暂无历史`}),[...a].reverse().map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 text-xs`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`font-mono font-semibold`,children:e.version}),t===0&&!r&&(0,U.jsx)(J,{className:`ml-1 h-4 px-1 text-[9px]`,children:`线上`}),(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:Le(e.at,`dts`)})]}),t!==0&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-6 text-[10px]`,onClick:()=>Ze(e.version),children:`回滚`})]},`${e.version}-${e.at}`))]})})]})})]})]}),(0,U.jsx)(gg,{open:b,onOpenChange:x,children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{children:[`区块设置 · `,Pe[S]?.title]})}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`标题`}),(0,U.jsx)(wg,{defaultValue:Pe[S]?.title||``,className:`text-xs`,onBlur:e=>Be(t=>{ze(t).panels[S].title=e.target.value})})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`副标题(面板头右侧灰字)`}),(0,U.jsx)(wg,{defaultValue:String(Pe[S]?.subtitle??``),className:`text-xs`,placeholder:`可选`,onBlur:e=>Be(t=>{ze(t).panels[S].subtitle=e.target.value})})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`图标`}),(0,U.jsx)(wg,{defaultValue:String(Pe[S]?.icon??``),className:`text-xs font-mono`,placeholder:`activity/alert/gauge…`,onBlur:e=>Be(t=>{ze(t).panels[S].icon=e.target.value.trim()})})]})]}),(0,U.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border p-2.5 text-xs leading-relaxed`,children:[(0,U.jsx)(hg,{checked:!!Pe[S]?.bare,onCheckedChange:e=>Be(t=>{ze(t).panels[S].bare=!!e})}),(0,U.jsx)(`span`,{children:`通栏视觉面板(bare)——无面板头与边框,内容顶格;适合 KPI 条 / 图表墙 / 状态矩阵等全画布表达。信息型列表面板请保持默认框架头。`})]}),Pe[S]?.type===`custom`&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`内联代码(契约:function Panel(props))`}),(0,U.jsx)(`textarea`,{defaultValue:Pe[S]?.code||``,spellCheck:!1,onBlur:e=>Be(t=>{ze(t).panels[S].code=e.target.value}),className:`h-40 w-full rounded-md border bg-muted p-2 font-mono text-[10px]`})]}),Pe[S]?.type===`custom_panel`&&(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`插件版本(可回退,回退即时生效)`}),(0,U.jsx)(OO,{pluginId:String(Pe[S]?.panel||``),onRollback:H})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`params(插件经 props.params 读取)`}),(0,U.jsx)(`textarea`,{defaultValue:JSON.stringify(Pe[S]?.params||{},null,1),spellCheck:!1,onBlur:e=>{try{Be(t=>{ze(t).panels[S].params=JSON.parse(e.target.value||`{}`)})}catch{Z.error(`params JSON 无效`)}},className:`h-20 w-full rounded-md border bg-muted p-2 font-mono text-[10px]`})]})]}),(0,U.jsx)(xg,{children:(0,U.jsx)(Y,{onClick:()=>x(!1),children:`完成`})})]})}),(0,U.jsx)(gg,{open:p,onOpenChange:e=>{m(e),e||g(null)},children:(0,U.jsxs)(yg,{children:[(0,U.jsx)(bg,{children:(0,U.jsxs)(Sg,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(gh,{className:`h-4 w-4`}),`插件库`,h===null?``:` · 插入到选中区块`]})}),(0,U.jsx)(`div`,{className:`max-h-72 overflow-y-auto`,children:(0,U.jsx)(`div`,{className:`space-y-1.5`,children:d.filter(e=>e.status!==`deprecated`).map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border p-2.5`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-xs font-medium`,children:[(0,U.jsx)(`span`,{className:`min-w-0 truncate`,title:e.name,children:e.name}),(0,U.jsx)(J,{variant:`secondary`,className:`h-4 shrink-0 px-1 text-[9px]`,children:e.version}),(0,U.jsx)(J,{variant:`outline`,className:`h-4 shrink-0 px-1 text-[9px]`,children:e.author===`system`?`范本`:e.author===`ai`?`AI`:`人工`})]}),(0,U.jsx)(`div`,{className:`truncate text-[10px] text-muted-foreground`,children:e.description||e.id})]}),(0,U.jsx)(Y,{size:`sm`,variant:`secondary`,className:`h-7 shrink-0 text-[11px]`,onClick:()=>Ge(h,e),children:`插入`})]},e.id))})}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,size:`sm`,onClick:We,children:`先加空区块`}),(0,U.jsx)(Y,{variant:`outline`,onClick:()=>m(!1),children:`关闭`})]})]})}),(0,U.jsx)(gg,{open:ge,onOpenChange:_e,children:(0,U.jsxs)(yg,{className:`max-w-xs`,children:[(0,U.jsx)(bg,{children:(0,U.jsx)(Sg,{children:`重命名视图`})}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`视图名称`}),(0,U.jsx)(wg,{defaultValue:Ne.name,className:`text-xs`,autoFocus:!0,onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&(et(e.target.value),_e(!1))},onBlur:e=>{et(e.target.value),_e(!1)}},Ne.id)]})]})}),(0,U.jsx)(yO,{target:ve,onClose:()=>ye(null),agents:[{agent_id:e,name:t.workbench||`当前助手`}]}),(0,U.jsx)(`p`,{className:`shrink-0 text-center text-[11px] text-muted-foreground`,children:`区块几何 = 插件设计输入:宽≤3 列紧凑列表、≥9 列表格/仪表 · AI 定制锁定目标、上下文自动携带 · 草稿审阅发布。`})]})}function MO({className:e,size:t=`default`,...n}){return(0,U.jsx)(vf,{"data-slot":`switch`,"data-size":t,className:B(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,U.jsx)(bf,{"data-slot":`switch-thumb`,className:B(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}function NO(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`],l=e=>{let t=e.trim().split(/\s+/);if(t.length!==5)return e;let n=e=>String(+e).padStart(2,`0`);return/^\d+ \d+ \* \* \*$/.test(e)?`每天 ${n(t[1])}:${n(t[0])}`:/^\d+ \* \* \* \*$/.test(e)?`每小时第 ${t[0]} 分`:/^\d+ \d+ \* \* \d+$/.test(e)&&+t[4]<=7?`每${c[t[4]%7]} ${n(t[1])}:${n(t[0])}`:`cron:${e}`},u=e=>{if(e.preset===`custom`)return e.cron.trim();if(e.preset===`hourly`)return`${+e.minute||0} * * * *`;let[t,n]=(e.time||`09:00`).split(`:`);return e.preset===`daily`?`${+n||0} ${+t||0} * * *`:`${+n||0} ${+t||0} * * ${e.weekday||`1`}`},d=e=>{let t=e.trim().split(/\s+/),n=e=>String(e).padStart(2,`0`);return t.length===5&&/^\d+ \d+ \* \* \*$/.test(e)?{preset:`daily`,time:`${n(+t[1])}:${n(+t[0])}`,minute:`0`,weekday:`1`}:t.length===5&&/^\d+ \* \* \* \*$/.test(e)?{preset:`hourly`,time:`09:00`,minute:t[0],weekday:`1`}:t.length===5&&/^\d+ \d+ \* \* \d+$/.test(e)&&+t[4]<=7?{preset:`weekly`,time:`${n(+t[1])}:${n(+t[0])}`,minute:`0`,weekday:String(t[4]%7)}:{preset:`custom`,time:`09:00`,minute:`0`,weekday:`1`}},f=e=>s(e?{mode:`edit`,id:e.id,name:e.name,agent_id:e.agent_id,...d(e.cron),cron:e.cron,autonomy:e.autonomy_level==null?``:String(e.autonomy_level),message:e.message}:{mode:`add`,name:``,agent_id:n[0]?.agent_id||``,preset:`daily`,time:`12:00`,minute:`0`,weekday:`1`,cron:`0 12 * * *`,autonomy:``,message:``}),p=()=>V(`/api/schedules`).then(e=>t(e.schedules||[])).catch(()=>{}),m=()=>{p(),V(`/api/quick-switch`).then(e=>r(e.agents||[])).catch(()=>{})};(0,v.useEffect)(()=>{m();let e=setInterval(m,3e4);return()=>clearInterval(e)},[]);let h=async()=>{let e=o;if(!e)return;let t=u(e);if(!e.name.trim()||!e.agent_id||!e.message.trim())Z.error(`名称、目标助手与消息内容必填`);else{a(e.id||`add`);try{let n={name:e.name.trim(),agent_id:e.agent_id,cron:t,message:e.message.trim(),...e.autonomy===``?{}:{autonomy_level:+e.autonomy}};e.mode===`add`?(await Oe(`/api/schedules`,n),Z.success(`定时任务「${e.name.trim()}」已创建`,{description:`${l(t)} · 到点自动发给该助手执行`})):(await ke(`/api/schedules/${e.id}`,n),Z.success(`定时任务已更新`)),s(null),await p()}catch(e){Z.error(String(e.message))}finally{a(null)}}},g=async(e,t)=>{a(e.id);try{await ke(`/api/schedules/${e.id}`,t),await p()}catch(e){Z.error(String(e.message))}finally{a(null)}},_=async e=>{a(e.id);try{let t=await Oe(`/api/schedules/${e.id}/run`),n={ok:`执行完成`,error:`执行出错`,skipped_busy:`会话忙,本次跳过`,skipped_pending:`有待确认操作,本次跳过`};t.run.status===`ok`?Z.success(`「${e.name}」${n[t.run.status]}`,{description:t.run.summary.slice(0,160)}):Z.warning(`「${e.name}」${n[t.run.status]||t.run.status}`,{description:t.run.summary.slice(0,160)}),await p()}catch(e){Z.error(String(e.message))}finally{a(null)}},y=async e=>{if(window.confirm(`删除定时任务「${e.name}」?(${l(e.cron)} → ${e.agent_name})`)){a(e.id);try{await Ae(`/api/schedules/${e.id}`,{}),Z.success(`已删除`),await p()}catch(e){Z.error(String(e.message))}finally{a(null)}}};return(0,U.jsxs)(`div`,{className:`h-full overflow-auto p-5`,children:[(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-bold`,children:[(0,U.jsx)(Wp,{className:`h-5 w-5 text-primary`}),`平台定时任务`]}),(0,U.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`到点自动向在岗助手发消息并让它执行——与人工发消息完全同构(同一守护栏 / 分级自主 / 审计;打开该助手的工作台能在对话里看到每次定时轮次)。 会话正在处理或有待确认操作时跳过该次;停机期间错过的触发不补跑。`})]}),(0,U.jsx)(Gf,{className:`mb-3 max-w-3xl`,children:(0,U.jsxs)(Jf,{className:`space-y-3 p-4`,children:[n.length===0&&(0,U.jsx)(`div`,{className:`rounded-md border border-warning/40 bg-warning/10 p-2.5 text-[11px] leading-relaxed text-warning`,children:`当前没有在岗助手——定时任务面向在岗助手,先到「助手大厅」完成一次上岗配置。`}),e.length===0&&n.length>0&&(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`还没有定时任务——例如「每天 12:00,让巡检助手检查活跃告警并汇总到对话」。`}),e.length>0&&(0,U.jsx)(`div`,{className:`divide-y rounded-md border`,children:e.map(e=>(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-3 py-2 text-xs ${e.enabled?``:`opacity-60`}`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e.name}),(0,U.jsx)(J,{variant:`outline`,className:`h-4 max-w-40 px-1 text-[9px]`,children:(0,U.jsx)(`span`,{className:`truncate`,children:e.agent_name})}),(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px] font-mono`,title:e.cron,children:l(e.cron)}),!e.deployed&&(0,U.jsx)(J,{className:`h-4 bg-destructive/15 px-1 text-[9px] text-destructive`,title:`目标助手已不在岗,任务将在下次触发时报错——请编辑或删除`,children:`已下岗`}),e.autonomy_level!=null&&(0,U.jsxs)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,title:`该任务覆盖会话的自主级别`,children:[`L`,e.autonomy_level]})]}),(0,U.jsx)(`div`,{className:`truncate text-[11px] text-muted-foreground`,title:e.message,children:e.message}),(0,U.jsxs)(`div`,{className:`text-[10px] text-muted-foreground`,children:[e.enabled?`下次 ${e.next_run?Le(e.next_run,`dts`):`待计算`}`:`已停用`,e.last&&` · 最近:${{ok:`✅`,error:`❌`,skipped_busy:`⏭`,skipped_pending:`⏭`}[e.last.status]||``}${e.last.trigger===`manual`?`手动`:`定时`} ${Le(e.last.at,`dt`)} ${e.last.summary?`「${e.last.summary.slice(0,60)}」`:e.last.status}`]})]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,U.jsx)(MO,{checked:e.enabled,disabled:i===e.id,onCheckedChange:t=>g(e,{enabled:t}),title:e.enabled?`停用`:`启用`}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,disabled:i===e.id,onClick:()=>_(e),title:`立即执行一次(不影响定时节奏)`,children:(0,U.jsx)(fh,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,disabled:i===e.id,onClick:()=>f(e),title:`编辑`,children:(0,U.jsx)(Kh,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0 text-destructive hover:text-destructive`,disabled:i===e.id,onClick:()=>y(e),title:`删除`,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})})]})]},e.id))}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsxs)(Y,{size:`sm`,className:`text-xs`,disabled:n.length===0,onClick:()=>f(),children:[(0,U.jsx)(mh,{className:`mr-1 h-3.5 w-3.5`}),`新建任务`]}),(0,U.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`周期支持常见预设与 cron(分 时 日 月 周,本地时区);精度约 ±30 秒。`})]})]})}),(0,U.jsx)(gg,{open:!!o,onOpenChange:e=>{!e&&i===null&&s(null)},children:(0,U.jsxs)(yg,{className:`max-w-lg`,children:[(0,U.jsxs)(bg,{children:[(0,U.jsxs)(Sg,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Wp,{className:`h-4 w-4 text-primary`}),o?.mode===`add`?`新建定时任务`:`编辑 · ${o?.name}`]}),(0,U.jsx)(Cg,{className:`text-[11px]`,children:`到点后消息会以「【定时任务 · 名称】」开头发给目标助手,助手按其能力与守护栏执行。`})]}),o&&(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`任务名称`}),(0,U.jsx)(wg,{value:o.name,onChange:e=>s({...o,name:e.target.value}),placeholder:`如:每日告警巡检`,className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`目标助手(在岗)`}),(0,U.jsxs)(Eg,{value:o.agent_id,onValueChange:e=>s({...o,agent_id:e}),children:[(0,U.jsx)(Og,{className:`h-8 text-xs data-[size=default]:h-8`,children:(0,U.jsx)(Dg,{placeholder:`选择助手`})}),(0,U.jsx)(kg,{children:n.map(e=>(0,U.jsx)(Ag,{value:e.agent_id,className:`text-xs`,children:e.name},e.agent_id))})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`自主级别`}),(0,U.jsxs)(Eg,{value:o.autonomy,onValueChange:e=>s({...o,autonomy:e}),children:[(0,U.jsx)(Og,{className:`h-8 text-xs data-[size=default]:h-8`,title:`缺省跟随该助手的上岗配置;写命令仍按守护栏管控`,children:(0,U.jsx)(Dg,{})}),(0,U.jsxs)(kg,{children:[(0,U.jsx)(Ag,{value:``,className:`text-xs`,children:`跟随上岗配置`}),[`0`,`1`,`2`,`3`].map(e=>(0,U.jsxs)(Ag,{value:e,className:`text-xs`,children:[`L`,e,`:`,[`只读`,`建议`,`写需确认`,`免确认`][+e]]},e))]})]})]})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`周期`}),(0,U.jsxs)(Eg,{value:o.preset,onValueChange:e=>s({...o,preset:e}),children:[(0,U.jsx)(Og,{className:`h-8 text-xs data-[size=default]:h-8`,children:(0,U.jsx)(Dg,{})}),(0,U.jsxs)(kg,{children:[(0,U.jsx)(Ag,{value:`daily`,className:`text-xs`,children:`每天`}),(0,U.jsx)(Ag,{value:`hourly`,className:`text-xs`,children:`每小时`}),(0,U.jsx)(Ag,{value:`weekly`,className:`text-xs`,children:`每周`}),(0,U.jsx)(Ag,{value:`custom`,className:`text-xs`,children:`自定义 cron`})]})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[o.preset===`daily`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`时间`}),(0,U.jsx)(wg,{type:`time`,value:o.time,onChange:e=>s({...o,time:e.target.value}),className:`h-8 font-mono text-xs`})]}),o.preset===`hourly`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`第几分(0-59)`}),(0,U.jsx)(wg,{type:`number`,min:0,max:59,value:o.minute,onChange:e=>s({...o,minute:e.target.value}),className:`h-8 font-mono text-xs`})]}),o.preset===`weekly`&&(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`星期`}),(0,U.jsxs)(Eg,{value:o.weekday,onValueChange:e=>s({...o,weekday:e}),children:[(0,U.jsx)(Og,{className:`h-8 text-xs data-[size=default]:h-8`,children:(0,U.jsx)(Dg,{})}),(0,U.jsx)(kg,{children:[`1`,`2`,`3`,`4`,`5`,`6`,`0`].map(e=>(0,U.jsx)(Ag,{value:e,className:`text-xs`,children:c[e%7]},e))})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`时间`}),(0,U.jsx)(wg,{type:`time`,value:o.time,onChange:e=>s({...o,time:e.target.value}),className:`h-8 font-mono text-xs`})]})]}),o.preset===`custom`&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`cron(分 时 日 月 周)`}),(0,U.jsx)(wg,{value:o.cron,onChange:e=>s({...o,cron:e.target.value}),placeholder:`*/30 9-18 * * 1-5`,className:`h-8 font-mono text-xs`})]})]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`到点发送的消息`}),(0,U.jsx)(SD,{value:o.message,onChange:e=>s({...o,message:e.target.value}),placeholder:`如:检查当前活跃告警,把高优先级的汇总成一段简报发在这里;有异常升级的单独说明。`,className:`min-h-[88px] text-xs`})]}),(0,U.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[`将按 `,(0,U.jsx)(`span`,{className:`font-mono`,children:l(u(o))}),` 触发(本地时区)。`]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:i!==null,onClick:()=>s(null),children:`取消`}),(0,U.jsx)(Y,{disabled:i!==null,onClick:h,children:i?`保存中…`:o?.mode===`add`?`创建任务`:`保存`})]})]})})]})}var PO=[{key:`tool_calls`,label:`工具调用`,icon:(0,U.jsx)(fg,{className:`h-3.5 w-3.5`}),tone:`text-chart-2`},{key:`guardrail_blocks`,label:`守护栏拦截`,icon:(0,U.jsx)(Rh,{className:`h-3.5 w-3.5`}),tone:`text-destructive`},{key:`human_confirms`,label:`人工确认执行`,icon:(0,U.jsx)(up,{className:`h-3.5 w-3.5`}),tone:`text-warning`},{key:`orchestrations`,label:`编排执行`,icon:(0,U.jsx)(Wh,{className:`h-3.5 w-3.5`}),tone:`text-violet-400`},{key:`experiences`,label:`经验回流`,icon:(0,U.jsx)(Sp,{className:`h-3.5 w-3.5`}),tone:`text-success`},{key:`kb_searches`,label:`知识检索`,icon:(0,U.jsx)(Oh,{className:`h-3.5 w-3.5`}),tone:`text-cyan-400`},{key:`ai_drafts`,label:`AI 起草`,icon:(0,U.jsx)(ig,{className:`h-3.5 w-3.5`}),tone:`text-pink-400`}];function FO(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=()=>V(`/api/evolution`).then(t);(0,v.useEffect)(()=>{c();let e=setInterval(c,1e4);return()=>clearInterval(e)},[]);let l=async()=>{if(n.trim()){s(!0);try{let e=await V(`/api/kb/search?q=${encodeURIComponent(n)}`);a(e.items),c()}finally{s(!1)}}};return e?(0,U.jsxs)(`div`,{className:`h-full overflow-auto p-5`,children:[(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-bold`,children:[(0,U.jsx)(ig,{className:`h-5 w-5 text-primary`}),`自进化看板`]}),(0,U.jsxs)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:[e.flywheel_note,` · 数据来自审计日志与指标流的实时聚合`]})]}),(0,U.jsx)(`div`,{className:`grid grid-cols-4 gap-3 xl:grid-cols-7`,children:PO.map(t=>(0,U.jsx)(Gf,{className:`py-3`,children:(0,U.jsxs)(Jf,{className:`px-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[11px] text-muted-foreground`,children:[t.icon,t.label]}),(0,U.jsx)(`div`,{className:`mt-1 text-xl font-bold ${t.tone}`,children:e.totals[t.key]??0})]})},t.key))}),(0,U.jsxs)(`div`,{className:`mt-4 grid grid-cols-2 gap-4`,children:[(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsx)(qf,{className:`text-xs text-muted-foreground`,children:`飞轮证据 · 检索相似度趋势(回流前后对比)`})}),(0,U.jsx)(Jf,{className:`p-0`,children:(0,U.jsx)(bD,{className:`h-64`,children:(0,U.jsxs)(`div`,{className:`space-y-1.5 p-3`,children:[e.similarity_trend.length===0&&(0,U.jsx)(`div`,{className:`py-8 text-center text-xs text-muted-foreground`,children:`尚无检索记录`}),e.similarity_trend.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`w-40 shrink-0 truncate text-muted-foreground`,title:e.query,children:e.query}),(0,U.jsx)(`div`,{className:`h-2 flex-1 overflow-hidden rounded bg-muted`,children:(0,U.jsx)(`div`,{className:`h-full rounded ${e.similarity>=75?`bg-success`:e.similarity>=55?`bg-warning`:`bg-muted-foreground`}`,style:{width:`${e.similarity}%`}})}),(0,U.jsxs)(`span`,{className:`w-9 text-right font-mono ${e.similarity>=75?`text-success`:`text-muted-foreground`}`,children:[e.similarity,`%`]})]},t))]})})})]}),(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsxs)(qf,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(Sp,{className:`h-3.5 w-3.5`}),`经验沉淀(写入 ARM 知识库)`]})}),(0,U.jsx)(Jf,{className:`p-0`,children:(0,U.jsx)(bD,{className:`h-64`,children:(0,U.jsxs)(`div`,{className:`divide-y`,children:[e.experiences.length===0&&(0,U.jsx)(`div`,{className:`p-8 text-center text-xs text-muted-foreground`,children:`尚无回流记录`}),e.experiences.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-xs`,children:[(0,U.jsx)(fm,{className:`h-3 w-3 shrink-0 text-success`}),(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,title:e.title,children:e.title}),(0,U.jsx)(`span`,{className:`shrink-0 font-mono text-[10px] text-muted-foreground`,children:e.knowledge_id?e.knowledge_id.slice(0,8):`—`}),(0,U.jsx)(`span`,{className:`shrink-0 text-[10px] text-muted-foreground`,children:Le(e.ts)})]},t))]})})})]})]}),(0,U.jsxs)(`div`,{className:`mt-4 grid grid-cols-3 gap-4`,children:[(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsx)(qf,{className:`text-xs text-muted-foreground`,children:`工具调用分布`})}),(0,U.jsxs)(Jf,{className:`p-3`,children:[Object.keys(e.by_tool).length===0&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`暂无数据`}),Object.entries(e.by_tool).sort((e,t)=>t[1]-e[1]).map(([t,n])=>{let r=Math.max(...Object.values(e.by_tool));return(0,U.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`w-36 shrink-0 truncate font-mono`,children:t}),(0,U.jsx)(`div`,{className:`h-2 flex-1 overflow-hidden rounded bg-muted`,children:(0,U.jsx)(`div`,{className:`h-full rounded bg-chart-2`,style:{width:`${n/r*100}%`}})}),(0,U.jsx)(`span`,{className:`w-6 text-right font-mono`,children:n})]},t)})]})]}),(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsxs)(qf,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,U.jsx)(nm,{className:`h-3.5 w-3.5`}),`ARM 知识库实检(真实 RAG)`]})}),(0,U.jsxs)(Jf,{className:`p-3`,children:[(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(wg,{value:n,onChange:e=>r(e.target.value),onKeyDown:e=>e.key===`Enter`&&l(),placeholder:`如:堆垛机 货叉定位偏移`,className:`text-xs`}),(0,U.jsx)(Y,{size:`sm`,disabled:o,onClick:l,children:o?`检索中`:`检索`})]}),(0,U.jsx)(bD,{className:`mt-2 h-44`,children:(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[!i&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`输入问题检索企业经验库(与助手使用同一数据源)`}),i?.length===0&&(0,U.jsx)(`div`,{className:`py-6 text-center text-xs text-muted-foreground`,children:`无命中`}),i?.map((e,t)=>(0,U.jsxs)(`div`,{className:`rounded-md bg-card px-2.5 py-1.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs`,children:[e.similarity!=null&&(0,U.jsxs)(J,{variant:`secondary`,className:`h-4 text-[9px] ${e.similarity>=75?`text-success`:``}`,children:[e.similarity,`%`]}),(0,U.jsx)(`span`,{className:`truncate font-medium`,children:e.title})]}),(0,U.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-[10px] leading-relaxed text-muted-foreground`,children:e.snippet})]},t))]})})]})]}),(0,U.jsxs)(Gf,{className:`py-0`,children:[(0,U.jsx)(Kf,{className:`border-b py-2.5`,children:(0,U.jsx)(qf,{className:`text-xs text-muted-foreground`,children:`审计流(实时)`})}),(0,U.jsx)(Jf,{className:`p-0`,children:(0,U.jsx)(bD,{className:`h-52`,children:(0,U.jsx)(`div`,{className:`divide-y font-mono text-[10px]`,children:e.recent_audit.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5`,children:[(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:Le(e.ts,`t`)}),(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:e.actor}),(0,U.jsx)(`span`,{className:`truncate`,children:e.tool||e.logic||e.action||e.name||e.verdict||``})]},t))})})})]})]})]}):(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`进化数据加载中…`})}function IO(){let[e,t]=(0,v.useState)(`arm`),n=e===`evolution`||e===`plugins`,[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(null),[s,c]=(0,v.useState)([]),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)({}),[h,g]=(0,v.useState)(``),[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(``),[S,C]=(0,v.useState)(``),[w,T]=(0,v.useState)(`auto`),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(``),[ee,M]=(0,v.useState)(!1),[N,P]=(0,v.useState)(``),[F,I]=(0,v.useState)(!1),[L,te]=(0,v.useState)([]),[ne,re]=(0,v.useState)([]),[ie,ae]=(0,v.useState)(!1),[oe,se]=(0,v.useState)(``),[ce,le]=(0,v.useState)(``),[ue,de]=(0,v.useState)(!1),[fe,R]=(0,v.useState)(null),z=()=>{V(`/api/settings`).then(e=>{i(e),c(e.arm.sources||[]),g(e.llm.model),y(e.llm.base_url_runtime?e.llm.base_url:``),C(e.llm.context_tokens_runtime?String(e.llm.context_tokens):``),T(e.llm.vision_mode||`auto`),j(e.scene.profile),te(e.guard.deny),re(e.guard.ro),ae(e.guard.sudo_u_l2)}),V(`/api/arm/status`).then(o).catch(()=>o(null))};(0,v.useEffect)(()=>{z()},[]);let pe=e=>e.online?`连通 ${e.latency_ms}ms`:`不可达:${e.error||``}`,me=async e=>{f(e.id);try{let t=await Oe(`/api/arm/sources/${encodeURIComponent(e.id)}/select`);m(n=>({...n,[e.id]:t.probe})),t.probe.online?Z.success(`当前源已切换为「${e.name}」(${pe(t.probe)})`,{description:`大厅目录、下载、新建、发布、经验回流即时跟随`}):Z.warning(`当前源已切换为「${e.name}」,但${pe(t.probe)}`,{description:`大厅显示本地库;可随时切回其他源`}),z()}catch(e){Z.error(String(e.message))}finally{f(null)}},he=async e=>{f(e.id);try{let t=await Oe(`/api/arm/sources/${encodeURIComponent(e.id)}/probe`);m(n=>({...n,[e.id]:t}))}catch(e){Z.error(String(e.message))}finally{f(null)}},ge=async e=>{if(window.confirm(`删除 ARM 源「${e.name}」?\n不影响已下载的本地助手(它们会显示为「来自 ${e.name}」);若它是当前源,将切回默认源。`)){f(e.id);try{await Ae(`/api/arm/sources/${encodeURIComponent(e.id)}`,{}),Z.success(`已删除源「${e.name}」`),z()}catch(e){Z.error(String(e.message))}finally{f(null)}}},_e=async()=>{let e=l;if(e){f(e.id||`add`);try{if(e.mode===`add`){let t=await Oe(`/api/arm/sources`,{name:e.name.trim(),base:e.base.trim(),token:e.token.trim()});m(e=>({...e,[t.source.id]:t.probe})),t.probe.online?Z.success(`已添加源「${t.source.name}」(${pe(t.probe)})`,{description:`在列表上点「设为当前」或到大厅切换即可使用`}):Z.warning(`已添加源「${t.source.name}」,但${pe(t.probe)}`,{description:`检查地址/令牌,或稍后点「测试连接」`})}else await ke(`/api/arm/sources/${encodeURIComponent(e.id)}`,{name:e.name.trim(),base:e.base.trim(),...e.clearToken?{token:``}:e.token.trim()?{token:e.token.trim()}:{}}),Z.success(`源「${e.name.trim()}」已更新`);u(null),z()}catch(e){Z.error(String(e.message))}finally{f(null)}}},ve=async()=>{D(!0),k(null);try{let e=await ke(`/api/settings`,{llm_model:h.trim(),llm_base_url:_.trim(),llm_context_tokens:S.trim(),llm_vision:w,...b.trim()?{llm_api_key:b.trim()}:{}});x(``),k(e.llm_probe||null),e.llm_probe?.online?Z.success(`模型已切换(探针 ${e.llm_probe.latency_ms}ms:${e.llm_probe.reply||`ok`})`):e.note&&Z.warning(`已保存,但探针未通过`,{description:e.note}),z()}catch(e){Z.error(String(e.message))}finally{D(!1)}},ye=async()=>{I(!0);try{if(await ke(`/api/settings`,{access_token:N}),N.trim()){if(!(await fetch(`/api/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:N.trim()})})).ok)throw Error(`已保存但自动登录失败,刷新后输入令牌进入`);Z.success(`访问令牌已启用(当前浏览器已自动登录)`)}else Z.success(`访问令牌已关闭(恢复开放访问)`);P(``),z()}catch(e){Z.error(String(e.message))}finally{I(!1)}},be=async()=>{M(!0);try{await ke(`/api/settings`,{scene_profile:A}),Z.success(A.trim()?`场景画像已保存,对全部助手即时生效(新对话起)`:`场景画像已清空(不再注入)`),z()}catch(e){Z.error(String(e.message))}finally{M(!1)}},xe=async()=>{de(!0);try{await ke(`/api/settings`,{guard:{deny:L,ro:ne,sudo_u_l2:ie}}),Z.success(`守护栏已更新(危险规则 ${L.length} 条 · 白名单 ${ne.length} 命令),即时生效`),R(null),z()}catch(e){Z.error(String(e.message))}finally{de(!1)}};return(0,U.jsxs)(`div`,{className:`h-full overflow-auto p-5`,children:[(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-bold`,children:[(0,U.jsx)(Ih,{className:`h-5 w-5 text-primary`}),`系统设置`]}),(0,U.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground`,children:`平台全局配置 · 修改保存后即时生效(无需重启)· 运行时配置优先于 .env`})]}),(0,U.jsxs)(pO,{value:e,onValueChange:t,className:n?``:`max-w-2xl`,children:[(0,U.jsxs)(hO,{children:[(0,U.jsxs)(gO,{value:`arm`,className:`text-xs`,children:[(0,U.jsx)(Mh,{className:`mr-1 h-3.5 w-3.5`}),`ARM 源`,a&&(0,U.jsx)(`span`,{className:`ml-1 h-1.5 w-1.5 rounded-full ${a.online?`bg-success`:`bg-warning`}`})]}),(0,U.jsxs)(gO,{value:`llm`,className:`text-xs`,children:[(0,U.jsx)(wp,{className:`mr-1 h-3.5 w-3.5`}),`LLM 模型服务`]}),(0,U.jsxs)(gO,{value:`scene`,className:`text-xs`,children:[(0,U.jsx)(wm,{className:`mr-1 h-3.5 w-3.5`}),`场景画像`,r&&r.scene.length>0&&(0,U.jsx)(`span`,{className:`ml-1 h-1.5 w-1.5 rounded-full bg-success`})]}),(0,U.jsxs)(gO,{value:`auth`,className:`text-xs`,children:[(0,U.jsx)(Wm,{className:`mr-1 h-3.5 w-3.5`}),`访问安全`,r?.auth.enabled&&(0,U.jsx)(`span`,{className:`ml-1 h-1.5 w-1.5 rounded-full bg-success`})]}),(0,U.jsxs)(gO,{value:`guard`,className:`text-xs`,children:[(0,U.jsx)(Hh,{className:`mr-1 h-3.5 w-3.5`}),`守护栏`,(0,U.jsxs)(`span`,{className:`ml-1 text-[9px] text-muted-foreground`,children:[L.length,`规`]})]}),(0,U.jsxs)(gO,{value:`evolution`,className:`text-xs`,children:[(0,U.jsx)(ig,{className:`mr-1 h-3.5 w-3.5`}),`自进化`]}),(0,U.jsxs)(gO,{value:`plugins`,className:`text-xs`,children:[(0,U.jsx)(gh,{className:`mr-1 h-3.5 w-3.5`}),`插件中心`]})]}),(0,U.jsxs)(_O,{value:`arm`,className:`mt-3`,children:[(0,U.jsxs)(Gf,{className:`mb-3 max-w-2xl`,children:[(0,U.jsxs)(Kf,{className:`pb-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Mh,{className:`h-4 w-4 text-primary`}),`ARM 源`,a&&(0,U.jsx)(J,{variant:`outline`,className:`text-[10px] ${a.online?`text-success`:`text-warning`}`,children:a.online?`在线 · ${a.latency_ms}ms`:`不可达(回落本地库)`})]}),(0,U.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:`ARM 是可私有化部署的资源管理系统(助手档案 + 知识库)。可配置多个源——公司公库、客户私库、本地开发版——并随时切换当前源: 检索 / 下载 / 新建 / 发布 / 经验回流全部即时跟随;已下载的本地助手不受影响,并记住自己来自哪个源。`})]}),(0,U.jsxs)(Jf,{className:`space-y-3`,children:[r&&!r.arm.token_set&&r.arm.token_source===`none`&&(0,U.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-warning/40 bg-warning/10 p-2.5 text-[11px] leading-relaxed text-warning`,children:[(0,U.jsx)(`span`,{className:`shrink-0`,children:`🔑`}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[`当前源「`,r.arm.current_name,`」尚未配置访问令牌——匿名仅能浏览目录,`,(0,U.jsx)(`b`,{children:`下载 / 上岗 / 新建 / 发布 / 经验回流`}),`等操作会被 ARM 拒绝(401/403)。 请登录该 ARM 站点生成访问令牌(arm_pat_… 开头),点该源的编辑按钮粘贴保存。`,(0,U.jsx)(`a`,{href:r.arm.api_base,target:`_blank`,rel:`noreferrer`,className:`ml-1 underline underline-offset-2 hover:text-warning`,children:`打开 ARM 生成令牌 →`})]})]}),(0,U.jsx)(`div`,{className:`divide-y rounded-md border`,children:s.map(e=>{let t=p[e.id],n={runtime:`运行时配置`,env:`env ARM_API_TOKEN`,pat:`~/.arm PAT`,none:``}[e.token_source];return(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 px-3 py-2 text-xs ${e.current?`bg-primary/5`:``}`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:e.name}),e.current&&(0,U.jsx)(J,{className:`h-4 px-1 text-[9px]`,children:`当前`}),e.builtin&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,title:`内置默认源:地址/令牌留空时回落 env(ARM_API_BASE / ARM_API_TOKEN)、~/.arm PAT 与内网默认地址;不可删除`,children:`默认`}),t&&(0,U.jsx)(`span`,{className:`text-[10px] ${t.online?`text-success`:`text-warning`}`,children:pe(t)})]}),(0,U.jsxs)(`div`,{className:`truncate font-mono text-[10px] text-muted-foreground`,title:e.base,children:[e.base||`(未配置地址)`,e.builtin&&!e.base_runtime?` · 默认地址`:``]}),(0,U.jsxs)(`div`,{className:`text-[10px] text-muted-foreground`,children:[`令牌:`,e.token_set?`${e.token_masked} · ${n}`:`未配置(匿名只读;下载/新建/发布会被拒)`]})]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[!e.current&&(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`h-7 text-[11px]`,disabled:d===e.id,onClick:()=>me(e),title:`设为当前源:大厅目录 / 下载 / 新建 / 发布 / 经验回流即时切换`,children:[(0,U.jsx)(Ap,{className:`mr-1 h-3 w-3`}),`设为当前`]}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,disabled:d===e.id,onClick:()=>he(e),title:`测试连接(不切换)`,children:(0,U.jsx)(ug,{className:`h-3.5 w-3.5`})}),(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0`,onClick:()=>u({mode:`edit`,id:e.id,name:e.name,base:e.base_runtime?e.base:``,token:``,builtin:e.builtin,clearToken:!1}),title:`编辑名称 / 地址 / 令牌`,children:(0,U.jsx)(Kh,{className:`h-3.5 w-3.5`})}),!e.builtin&&(0,U.jsx)(Y,{size:`sm`,variant:`ghost`,className:`h-7 w-7 p-0 text-destructive hover:text-destructive`,disabled:d===e.id,onClick:()=>ge(e),title:`删除源(不影响已下载的本地助手)`,children:(0,U.jsx)(ng,{className:`h-3.5 w-3.5`})})]})]},e.id)})}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(Y,{size:`sm`,className:`text-xs`,onClick:()=>u({mode:`add`,name:``,base:``,token:``,clearToken:!1}),children:[(0,U.jsx)(mh,{className:`mr-1 h-3.5 w-3.5`}),`添加 ARM 源`]}),(0,U.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`公库 / 私库并存:从一个源下载助手,在大厅切到另一个源后点卡片「发布」即可推送过去(同 id,身份不变)。`})]})]})]}),(0,U.jsx)(gg,{open:!!l,onOpenChange:e=>{!e&&d===null&&u(null)},children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsxs)(bg,{children:[(0,U.jsxs)(Sg,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Mh,{className:`h-4 w-4 text-primary`}),l?.mode===`add`?`添加 ARM 源`:`编辑 ARM 源 · ${l?.name}`]}),(0,U.jsx)(Cg,{className:`text-[11px]`,children:`每个源使用自己的访问令牌——不会把一个站点的令牌发给另一个站点。`})]}),l&&(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`名称`}),(0,U.jsx)(wg,{value:l.name,onChange:e=>u({...l,name:e.target.value}),placeholder:`如 公司公库 / 客户私库 / 本地开发版`,className:`text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`站点地址(REST API 根地址)`}),(0,U.jsx)(wg,{value:l.base,onChange:e=>u({...l,base:e.target.value}),placeholder:l.builtin?`留空 = 回落 env / 内置默认(${(r?.arm.default_base||``).replace(/^https?:\/\//,``)})`:`如 http://localhost:3001 或 https://arm.customer.com`,className:`font-mono text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`访问令牌(arm_pat_…)`}),(0,U.jsx)(wg,{type:`password`,value:l.token,disabled:l.clearToken,onChange:e=>u({...l,token:e.target.value}),placeholder:l.mode===`edit`?`留空保持不变`:l.builtin?`留空 = 回落 env / ~/.arm PAT`:`留空 = 匿名只读`,className:`font-mono text-xs`}),l.mode===`edit`&&(0,U.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(MO,{checked:l.clearToken,onCheckedChange:e=>u({...l,clearToken:e,token:e?``:l.token})}),`清除已配置的令牌`,l.builtin?`(回落 env / PAT)`:`(转匿名只读)`]})]})]}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,disabled:d!==null,onClick:()=>u(null),children:`取消`}),(0,U.jsx)(Y,{disabled:d!==null||!l?.name.trim()||!l?.builtin&&!l?.base.trim(),onClick:_e,children:d?`保存中…`:l?.mode===`add`?`添加并测试连接`:`保存`})]})]})})]}),(0,U.jsx)(_O,{value:`llm`,className:`mt-3`,children:(0,U.jsxs)(Gf,{className:`mb-3 max-w-2xl`,children:[(0,U.jsxs)(Kf,{className:`pb-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(wp,{className:`h-4 w-4 text-primary`}),`LLM 模型服务`,r&&(0,U.jsx)(J,{variant:`outline`,className:`text-[10px]`,children:r.llm.model})]}),(0,U.jsx)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:`OpenAI 兼容端点:缺省公司内网 bifrost 网关(内网开箱可用),可切换模型 / 自建网关 / 公有云端点。保存后新对话即时使用新模型,应用失败自动回滚。`})]}),(0,U.jsxs)(Jf,{className:`space-y-3`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`模型`,r&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:r.llm.model_runtime?`运行时配置`:`默认(.env)`})]}),(0,U.jsx)(wg,{value:h,onChange:e=>g(e.target.value),list:`llm-catalog`,placeholder:`如 def / glm-5.3 / 自定义名称`,className:`font-mono text-xs`}),(0,U.jsx)(`datalist`,{id:`llm-catalog`,children:(r?.llm.catalog||[]).map(e=>(0,U.jsx)(`option`,{value:e},e))})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`text-xs`,children:[`端点地址(留空 = `,r?.llm.default_base||`默认内网 bifrost`,`)`]}),(0,U.jsx)(wg,{value:_,onChange:e=>y(e.target.value),placeholder:`https://your-gateway/v1(OpenAI 兼容)`,className:`font-mono text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`API Key`,r&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:r.llm.key_set?`${r.llm.key_masked} · ${r.llm.key_source}`:`未配置`})]}),(0,U.jsx)(wg,{type:`password`,value:b,onChange:e=>x(e.target.value),placeholder:r?.llm.key_set?`已配置(留空保持不变)`:`sk-… / api key`,className:`font-mono text-xs`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`上下文窗口(token)`,r&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:r.llm.context_tokens_source===`runtime`?`运行时配置 ${r.llm.context_tokens}`:r.llm.context_tokens_source===`model`?`自动识别 ${r.llm.context_tokens}`:`默认 ${r.llm.default_context_tokens}`})]}),(0,U.jsx)(wg,{type:`number`,inputMode:`numeric`,min:4e3,max:2e6,step:1e3,value:S,onChange:e=>C(e.target.value),placeholder:`留空 = 按模型自动识别(未识别回落 ${r?.llm.default_context_tokens||128e3})`,className:`font-mono text-xs`}),(0,U.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`留空 = 按模型名自动识别(GLM-5.x / MiniMax-M3+ / GPT-4.1 / Gemini → 1M,GLM-4.6 / Claude → 200K,其余常见 128K 档)。会话历史超出窗口时自动丢弃最早轮次(保留当前轮);配大了也不怕——请求若仍报上下文超限,系统会自动收缩历史并重试一次,再失败会给出明确的调低指引。`})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsxs)(Tg,{className:`flex items-center gap-2 text-xs`,children:[`视觉能力(对话附图)`,r&&(0,U.jsx)(J,{variant:`outline`,className:`h-4 px-1 text-[9px]`,children:r.llm.vision?`当前:支持看图`:`当前:不支持看图`})]}),(0,U.jsxs)(Eg,{value:w,onValueChange:e=>T(e),children:[(0,U.jsx)(Og,{className:`h-8 w-full text-xs data-[size=default]:h-8`,children:(0,U.jsx)(Dg,{})}),(0,U.jsxs)(kg,{children:[(0,U.jsxs)(Ag,{value:`auto`,className:`text-xs`,children:[`自动(按模型条目判定:`,r?.llm.vision_auto?`支持`:`不支持`,`)`]}),(0,U.jsx)(Ag,{value:`on`,className:`text-xs`,children:`强制开 — 自定义模型确认支持视觉时`}),(0,U.jsx)(Ag,{value:`off`,className:`text-xs`,children:`强制关 — 图片只存工作区,不送模型`})]})]}),(0,U.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`开:对话里粘贴/上传的图片随消息送给模型识别;关:图片仅保存到工作区供助手按路径处理。自定义模型名(如 def)按纯文本模板克隆、无法自动识别能力,请按实际选择。`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Y,{size:`sm`,className:`text-xs`,disabled:E,onClick:ve,children:E?`切换中…`:`保存并测试模型`}),O&&(0,U.jsx)(`span`,{className:`flex items-center gap-1 text-[11px] ${O.online?`text-success`:`text-warning`}`,children:O.online?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Bp,{className:`h-3.5 w-3.5`}),`探针通过 `,O.latency_ms,`ms:`,O.reply]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Kp,{className:`h-3.5 w-3.5`}),`未通过:`,O.error]})})]})]})]})}),(0,U.jsx)(_O,{value:`scene`,className:`mt-3`,children:(0,U.jsxs)(Gf,{className:`mb-3 max-w-2xl`,children:[(0,U.jsxs)(Kf,{className:`pb-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(wm,{className:`h-4 w-4 text-primary`}),`场景画像`,r&&(0,U.jsx)(J,{variant:`outline`,className:`text-[10px] ${r.scene.length?`text-success`:``}`,children:r.scene.length?`已启用 · ${r.scene.length} 字`:`未配置(不注入)`})]}),(0,U.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:[`平台级、全局一份的使用方场景描述(团队环境 / 系统清单 / 规范 / 联系人),作为常驻事实注入`,(0,U.jsx)(`b`,{children:`所有助手`}),`的上下文—— 助手不必每次重新探索环境。与知识检索互补(常驻事实 vs 按需检索)。⚠ 不放凭据:写"凭据在哪、找谁要"即可。`]})]}),(0,U.jsxs)(Jf,{className:`space-y-2`,children:[(0,U.jsx)(`textarea`,{value:A,onChange:e=>j(e.target.value),spellCheck:!1,rows:8,placeholder:`例如:
|
|
102
|
+
· 团队负责公司内部系统的运维与研发提效
|
|
103
|
+
· 系统:ARM(助手管理)、Nexus(nexus.aimstek.cn)、Jenkins、玄武环境、WMS
|
|
104
|
+
· 服务器多为 root/统一密码策略,凭据找张三
|
|
105
|
+
· 告警需通知刘工;报告用中文`,className:`w-full resize-y rounded-md border bg-background p-2.5 font-mono text-xs leading-relaxed`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[A.length,`/4000 字 · 修改对新对话即时生效 · 清空则恢复"不注入"`]}),(0,U.jsx)(Y,{size:`sm`,className:`text-xs`,disabled:ee||A.length>4e3,onClick:be,children:ee?`保存中…`:`保存画像`})]})]})]})}),(0,U.jsx)(_O,{value:`auth`,className:`mt-3`,children:(0,U.jsxs)(Gf,{children:[(0,U.jsxs)(Kf,{className:`pb-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Wm,{className:`h-4 w-4 text-primary`}),`访问令牌`,r&&(0,U.jsx)(J,{variant:`outline`,className:`text-[10px] ${r.auth.enabled?`text-success`:`text-warning`}`,children:r.auth.enabled?`已启用 · ${r.auth.token_masked}`:`未启用(局域网内开放访问)`})]}),(0,U.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:[`工作站监听 0.0.0.0(局域网可达),启用令牌后所有 API 需要认证:浏览器登录换 Cookie(自动携带), 脚本用 `,(0,U.jsx)(`span`,{className:`font-mono`,children:`Authorization: Bearer <token>`}),`。留空保存即关闭。`]})]}),(0,U.jsxs)(Jf,{className:`space-y-2`,children:[(0,U.jsx)(wg,{type:`password`,value:N,onChange:e=>P(e.target.value),placeholder:r?.auth.enabled?`输入新令牌替换(留空保存=关闭认证)`:`设置访问令牌(留空=不启用)`,className:`font-mono text-xs`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Y,{size:`sm`,className:`text-xs`,disabled:F,onClick:ye,children:F?`保存中…`:`保存`}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`启用后其他设备首次访问将看到登录页 · 替换令牌会使所有已登录设备失效`})]})]})]})}),(0,U.jsx)(_O,{value:`guard`,className:`mt-3`,children:(0,U.jsxs)(Gf,{className:`mb-3 max-w-2xl`,children:[(0,U.jsxs)(Kf,{className:`pb-2`,children:[(0,U.jsxs)(qf,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Hh,{className:`h-4 w-4 text-primary`}),`守护栏 · 助手命令执行策略`,(0,U.jsxs)(J,{variant:`outline`,className:`text-[10px]`,children:[L.length,` 危险规则 · `,ne.length,` 白名单命令`]})]}),(0,U.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:[`危险清单(正则,命中即`,(0,U.jsx)(`b`,{children:`永久拒绝`}),`,任何自主级别不豁免)与只读白名单(免确认直行)保存后即时生效,全程写审计。 只读之外的命令按写命令分级:L0/L1 拒绝、L2 人工确认、L3 免确认。`]})]}),(0,U.jsxs)(Jf,{className:`space-y-4`,children:[(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`危险命令清单(正则,对整条命令做词面匹配)`}),(0,U.jsx)(`div`,{className:`space-y-1`,children:L.map(e=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-2 py-1`,children:[(0,U.jsx)(`code`,{className:`min-w-0 flex-1 break-all font-mono text-[11px] text-destructive`,children:e}),(0,U.jsx)(Y,{size:`icon`,variant:`ghost`,className:`h-5 w-5 shrink-0`,onClick:()=>te(t=>t.filter(t=>t!==e)),title:`删除该规则`,children:(0,U.jsx)(mg,{className:`h-3 w-3`})})]},e))}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(wg,{value:oe,onChange:e=>se(e.target.value),placeholder:`新增正则,如 \\b(fdisk|parted)\\b 或 \\bmv\\b\\s+--force`,className:`font-mono text-xs`,onKeyDown:e=>{e.key===`Enter`&&oe.trim()&&(te(e=>[...new Set([...e,oe.trim()])]),se(``))}}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`shrink-0 text-xs`,disabled:!oe.trim(),onClick:()=>{te(e=>[...new Set([...e,oe.trim()])]),se(``)},children:[(0,U.jsx)(mh,{className:`h-3 w-3`}),`添加`]})]}),L.length===0&&(0,U.jsx)(`p`,{className:`text-[10px] text-destructive`,children:`⚠ 清单为空 = 无任何命令会被永久拒绝(写命令仍走 L2/L3 分级)`})]}),(0,U.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,U.jsx)(Tg,{className:`text-xs`,children:`只读白名单(单个命令名,复合命令逐段判定)`}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:ne.map(e=>(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border bg-muted/50 px-1.5 py-0.5 font-mono text-[10px]`,children:[e,(0,U.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive`,onClick:()=>re(t=>t.filter(t=>t!==e)),title:`移除`,children:(0,U.jsx)(mg,{className:`h-2.5 w-2.5`})})]},e))}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(wg,{value:ce,onChange:e=>le(e.target.value),placeholder:`新增命令名,如 jq / awk / ss`,className:`font-mono text-xs`,onKeyDown:e=>{e.key===`Enter`&&ce.trim()&&(re(e=>[...new Set([...e,ce.trim()])]),le(``))}}),(0,U.jsxs)(Y,{size:`sm`,variant:`outline`,className:`shrink-0 text-xs`,disabled:!ce.trim(),onClick:()=>{re(e=>[...new Set([...e,ce.trim()])]),le(``)},children:[(0,U.jsx)(mh,{className:`h-3 w-3`}),`添加`]})]}),(0,U.jsx)(`p`,{className:`text-[10px] text-muted-foreground`,children:`⚠ 白名单命令带重定向(> / >> / tee)时不算只读;sqlite3 的 INSERT/UPDATE/DELETE 等写语句不算只读`})]}),(0,U.jsxs)(`div`,{className:`flex items-start gap-2.5 rounded-md border border-warning/30 bg-warning/5 p-2.5`,children:[(0,U.jsx)(MO,{checked:ie,onCheckedChange:ae,className:`mt-0.5`}),(0,U.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,U.jsx)(`div`,{className:`text-xs font-medium`,children:`允许 sudo 降权形式(sudo -u <用户>)经 L2 人工确认后执行`}),(0,U.jsx)(`p`,{className:`text-[10px] leading-relaxed text-muted-foreground`,children:"默认关闭:所有含 sudo 的命令永久拒绝(含远程 SSH 命令中的 sudo)。开启后 `sudo -u 用户` 片段不再触发永久拒绝、 按写命令走 L2 确认(L3 免确认);裸 sudo(如 sudo reboot)与嵌套危险命令仍永久拒绝。"})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(Y,{size:`sm`,className:`text-xs`,disabled:ue,onClick:()=>{let e=(r?.guard.deny||[]).filter(e=>!L.includes(e));e.length?R(e):xe()},children:ue?`保存中…`:`保存(即时生效)`}),(0,U.jsx)(Y,{size:`sm`,variant:`outline`,className:`text-xs`,onClick:()=>{r&&(te(r.guard.default_deny.slice()),re(r.guard.default_ro.slice()),ae(!1),Z.info(`已填入出厂默认(未保存,点击「保存」生效)`))},children:`恢复出厂默认`}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:`修改立即作用于全部助手对话 · 删减危险规则需二次确认并写审计`})]})]})]})}),(0,U.jsx)(_O,{value:`evolution`,className:`mt-3`,children:(0,U.jsx)(`div`,{className:`h-[calc(100vh-13rem)] min-h-[480px] overflow-hidden`,children:(0,U.jsx)(FO,{})})}),(0,U.jsx)(_O,{value:`plugins`,className:`mt-3`,children:(0,U.jsx)(`div`,{className:`h-[calc(100vh-13rem)] min-h-[480px] overflow-hidden`,children:(0,U.jsx)(xO,{})})})]}),(0,U.jsxs)(Gf,{className:`mt-1 max-w-2xl text-xs text-muted-foreground`,children:[(0,U.jsx)(Kf,{className:`pb-1`,children:(0,U.jsx)(qf,{className:`text-sm`,children:`只读信息`})}),(0,U.jsxs)(Jf,{className:`space-y-1`,children:[(0,U.jsxs)(`div`,{children:[`本地助手库:`,a?.local_count??`…`,` 名 · 离线经验待回流:`,a?.outbox_pending??0,` 条`]}),(0,U.jsx)(`div`,{children:`优先级:运行时配置(本页)> 环境变量 > .env 默认值 · 令牌仅存本机 config/platform.json,界面永远掩码展示`})]})]}),(0,U.jsx)(gg,{open:fe!==null,onOpenChange:e=>{e||R(null)},children:(0,U.jsxs)(yg,{className:`max-w-md`,children:[(0,U.jsxs)(bg,{children:[(0,U.jsxs)(Sg,{className:`flex items-center gap-2 text-sm`,children:[(0,U.jsx)(Hh,{className:`h-4 w-4 text-destructive`}),`确认放行危险命令规则?`]}),(0,U.jsxs)(Cg,{className:`text-xs leading-relaxed`,children:[`你正在移除 `,fe?.length,` 条永久拒绝规则,保存后助手将可以发起匹配这些规则的命令(仍按写命令分级:L2 需人工确认 / L3 免确认)。此操作将写入审计日志。`]})]}),(0,U.jsx)(`div`,{className:`max-h-40 space-y-1 overflow-auto`,children:fe?.map(e=>(0,U.jsx)(`div`,{className:`rounded-md border border-destructive/40 bg-destructive/10 px-2 py-1 font-mono text-[11px] break-all text-destructive`,children:e},e))}),(0,U.jsxs)(xg,{children:[(0,U.jsx)(Y,{variant:`outline`,size:`sm`,onClick:()=>R(null),children:`取消`}),(0,U.jsx)(Y,{variant:`destructive`,size:`sm`,disabled:ue,onClick:xe,children:ue?`保存中…`:`确认放行并保存`})]})]})})]})}function LO({className:e=``}){return(0,U.jsxs)(`svg`,{viewBox:`0 0 48 48`,className:e,"aria-hidden":`true`,children:[(0,U.jsx)(`defs`,{children:(0,U.jsxs)(`linearGradient`,{id:`aims-brand-grad`,x1:`10`,y1:`6`,x2:`40`,y2:`44`,gradientUnits:`userSpaceOnUse`,children:[(0,U.jsx)(`stop`,{offset:`0`,stopColor:`#5B8CFF`}),(0,U.jsx)(`stop`,{offset:`1`,stopColor:`#38C8EA`})]})}),(0,U.jsx)(`path`,{d:`M21.4 14.6 13.4 28.4M26.6 14.6 34.6 28.4`,stroke:`url(#aims-brand-grad)`,strokeWidth:`3.6`,strokeLinecap:`round`,fill:`none`}),(0,U.jsx)(`rect`,{x:`7.5`,y:`39.5`,width:`33`,height:`4.6`,rx:`2.3`,fill:`url(#aims-brand-grad)`}),(0,U.jsx)(`circle`,{cx:`24`,cy:`10`,r:`4.6`,fill:`#38C8EA`}),(0,U.jsx)(`circle`,{cx:`10.8`,cy:`33`,r:`4.6`,fill:`#5B8CFF`}),(0,U.jsx)(`circle`,{cx:`37.2`,cy:`33`,r:`4.6`,fill:`#5B8CFF`})]})}var RO=`/assets/hero-CLDdwZDr.png`,zO=`aims.theme`,BO=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches,VO=e=>{document.documentElement.classList.toggle(`dark`,e===`dark`||e===`system`&&BO())};function HO(){let[e,t]=(0,v.useState)(()=>{let e=localStorage.getItem(zO);return e===`light`||e===`dark`?e:`system`});return(0,v.useEffect)(()=>{VO(e)},[e]),(0,v.useEffect)(()=>{if(e!==`system`)return;let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=()=>VO(`system`);return t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)},[e]),{mode:e,setMode:e=>{localStorage.setItem(zO,e),t(e)}}}function UO({onOk:e}){let[t,n]=(0,v.useState)(``),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(``),s=async()=>{if(t.trim()&&!r){i(!0),o(``);try{let n=await fetch(`/api/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:t.trim()})});if(!n.ok)throw Error((await n.json().catch(()=>({}))).error||`令牌不正确`);e()}catch(e){o(String(e.message))}finally{i(!1)}}};return(0,U.jsxs)(`div`,{className:`flex h-screen flex-col items-center justify-center gap-4 bg-background text-foreground`,children:[(0,U.jsx)(`img`,{src:RO,alt:`AIMS`,className:`h-32 w-32 rounded-2xl border border-border/50 object-cover shadow-lg shadow-primary/10`}),(0,U.jsx)(`div`,{className:`text-base font-semibold`,children:`AIMS 工作站已启用访问令牌`}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(wg,{type:`password`,value:t,onChange:e=>n(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.nativeEvent.isComposing&&s()},placeholder:`输入访问令牌…`,className:`w-64`,autoFocus:!0}),(0,U.jsx)(Y,{onClick:s,disabled:r||!t.trim(),children:r?`验证中…`:`进入`})]}),a&&(0,U.jsx)(`div`,{className:`text-xs text-destructive`,children:a}),(0,U.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:`令牌在「系统设置 → 访问安全」配置 · 脚本访问可用 Authorization: Bearer 头`})]})}function WO(){let[e,t]=(0,v.useState)(`hub`),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)([]),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),{mode:g,setMode:_}=HO();(0,v.useEffect)(()=>{V(`/api/health`).then(e=>{s(e),l(!!e.auth_required)}).catch(()=>s(null));let e=()=>V(`/api/quick-switch`).then(e=>d(e.agents||[])).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]),(0,v.useEffect)(()=>{n&&p(n)},[n]);let y=(e,n,i)=>{r(e),a(n),t(i),h(!1)},b=e=>{t(e),h(!1)},x=u.filter(e=>e.running||e.pending).length;if(c)return(0,U.jsx)(UO,{onOk:()=>{l(!1),V(`/api/health`).then(e=>{s(e),l(!!e.auth_required)}).catch(()=>{})}});let S=e=>B(`flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors`,e?`bg-primary/15 font-medium text-primary`:`text-muted-foreground hover:bg-accent hover:text-foreground`);return(0,U.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-background text-foreground`,children:[m&&(0,U.jsx)(`div`,{className:`fixed inset-0 z-40 bg-black/40 lg:hidden`,onClick:()=>h(!1)}),(0,U.jsxs)(`aside`,{className:B(`flex w-52 shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground`,`max-lg:fixed max-lg:inset-y-0 max-lg:left-0 max-lg:z-50 max-lg:w-64 max-lg:transition-transform max-lg:duration-200`,m?`max-lg:translate-x-0 max-lg:shadow-2xl`:`max-lg:-translate-x-full`),children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-4`,children:[(0,U.jsx)(LO,{className:`h-7 w-7 shrink-0`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`text-sm font-bold leading-tight`,children:`AIMS 智能体平台`}),(0,U.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:`平台AI化 · 系统工具化`})]})]}),(0,U.jsxs)(`nav`,{className:`flex flex-col gap-1 px-2`,children:[(0,U.jsxs)(`button`,{onClick:()=>b(`hub`),className:S(e===`hub`),children:[(0,U.jsx)(Im,{className:`h-4 w-4`}),`助手大厅`]}),(0,U.jsxs)(`button`,{onClick:()=>b(`schedules`),className:S(e===`schedules`),children:[(0,U.jsx)(Wp,{className:`h-4 w-4`}),`定时任务`]}),(0,U.jsxs)(`button`,{onClick:()=>b(`settings`),className:S(e===`settings`),children:[(0,U.jsx)(Ih,{className:`h-4 w-4`}),`系统设置`]})]}),(0,U.jsxs)(`div`,{className:`mt-3 flex items-center justify-between border-t border-sidebar-border px-4 pb-1 pt-3`,children:[(0,U.jsxs)(`span`,{className:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:[`小助手 · 在岗 `,u.length]}),x>0&&(0,U.jsxs)(`span`,{className:`text-[10px] text-success`,title:`会话在后台运行中,切回即可看到进度`,children:[`● `,x,` 运行`]})]}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2`,children:[u.length===0&&(0,U.jsx)(`p`,{className:`px-3 py-2 text-[11px] leading-relaxed text-muted-foreground`,children:`在「助手大厅」完成上岗配置后,这里按助手分组,一键直达各自的工作台。`}),u.map(t=>{let r=n===t.agent_id,i=f===t.agent_id,a=e=>B(`flex items-center gap-2 rounded-md px-2.5 py-1.5 text-xs transition-colors`,e?`bg-primary/15 font-medium text-primary`:`text-muted-foreground hover:bg-accent hover:text-foreground`);return(0,U.jsxs)(`div`,{className:`mb-0.5`,children:[(0,U.jsxs)(`div`,{className:B(`group flex items-center gap-0.5 rounded-md pr-1 transition-colors`,r&&e!==`hub`?`bg-primary/10`:`hover:bg-accent`),children:[(0,U.jsx)(`button`,{onClick:()=>p(i?null:t.agent_id),className:`flex h-9 w-6 shrink-0 items-center justify-center text-muted-foreground hover:text-foreground`,title:i?`折叠`:`展开`,children:i?(0,U.jsx)(Mp,{className:`h-3.5 w-3.5`}):(0,U.jsx)(Pp,{className:`h-3.5 w-3.5`})}),(0,U.jsxs)(`button`,{onClick:()=>y(t.agent_id,t.name,`workbench`),title:t.running||t.pending?`${t.name} · ${t.statusText}`:t.name,className:B(`flex min-w-0 flex-1 items-center gap-1.5 py-2 pr-1 text-left text-sm`,r&&e!==`hub`?`font-medium text-primary`:`text-muted-foreground group-hover:text-foreground`),children:[(0,U.jsx)(p_,{id:t.agent_id,name:t.name,size:`sm`}),(t.running||t.pending)&&(0,U.jsx)(`span`,{className:B(`agent-h-bg h-1.5 w-1.5 shrink-0 rounded-full`,t.running&&`agent-glow`),style:d_(t.agent_id)}),(0,U.jsx)(`span`,{className:`truncate`,children:t.name})]})]}),i&&(0,U.jsxs)(`div`,{className:`ml-6 mt-0.5 flex flex-col gap-0.5 border-l border-border/60 pl-2`,children:[(0,U.jsxs)(`button`,{onClick:()=>y(t.agent_id,t.name,`workbench`),className:a(r&&e===`workbench`),children:[(0,U.jsx)(Qm,{className:`h-3.5 w-3.5`}),`工作台`]}),(0,U.jsxs)(`button`,{onClick:()=>y(t.agent_id,t.name,`editor`),className:a(r&&e===`editor`),children:[(0,U.jsx)(Ph,{className:`h-3.5 w-3.5`}),`定制工作台`]})]})]},t.agent_id)})]}),(0,U.jsxs)(`div`,{className:`mt-auto space-y-1.5 border-t border-sidebar-border px-4 pb-4 pt-3 text-[11px] text-muted-foreground`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,title:`界面主题:跟随系统 / 浅色 / 深色(选择保存在本机)`,children:[(0,U.jsx)(`span`,{children:`主题`}),(0,U.jsx)(`div`,{className:`flex items-center gap-0.5 rounded-md bg-secondary/60 p-0.5`,children:[[`light`,eg,`浅色`],[`system`,eh,`跟随系统`],[`dark`,nh,`深色`]].map(([e,t,n])=>(0,U.jsx)(`button`,{onClick:()=>_(e),"aria-label":n,title:n,className:B(`flex h-6 w-7 items-center justify-center rounded transition-colors`,g===e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:(0,U.jsx)(t,{className:`h-3.5 w-3.5`})},e))})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:B(`h-1.5 w-1.5 rounded-full`,o?`bg-success`:`bg-destructive`)}),`LLM `,o?.model||`未连接`,`(pi-ai)`]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:B(`h-1.5 w-1.5 rounded-full`,o?`bg-success`:`bg-destructive`)}),`ARM `,o?o.pat?`已连接·PAT`:`已连接·只读`:`未连接`]})]})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center gap-2 border-b bg-card px-2.5 lg:gap-3 lg:px-5`,children:[(0,U.jsx)(`button`,{onClick:()=>h(!0),className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground lg:hidden`,title:`菜单`,children:(0,U.jsx)(Jm,{className:`h-4 w-4`})}),n&&(0,U.jsx)(p_,{id:n,name:i||`助`}),n?(0,U.jsx)(`span`,{className:`text-sm font-semibold`,children:i}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(wp,{className:`h-4 w-4 text-primary`}),(0,U.jsx)(`span`,{className:`text-sm font-semibold`,children:`数字员工队伍`})]}),n&&(0,U.jsx)(`span`,{className:`agent-h-bg h-4 w-0.5 rounded-full`,style:d_(n)}),n&&(0,U.jsx)(J,{variant:`outline`,className:`text-[10px]`,children:`在岗`}),(0,U.jsxs)(`div`,{"data-slot":`app-header-right`,className:`ml-auto flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[e===`hub`&&(0,U.jsx)(`span`,{className:`truncate`,children:`从 ARM 员工库选择助手,或为未上岗助手完成上岗配置`}),e===`schedules`&&(0,U.jsx)(`span`,{className:`truncate`,children:`到点自动发消息 · 与人工发消息同构 · 错过不补跑`}),e===`settings`&&(0,U.jsx)(`span`,{className:`truncate`,children:`ARM 源 · 守护栏 · 自进化 · 插件中心 · 保存即生效`})]})]}),(0,U.jsxs)(`main`,{className:`min-h-0 flex-1 overflow-hidden`,children:[e===`hub`&&(0,U.jsx)(g_,{onOpen:y}),e===`workbench`&&n&&(0,U.jsx)(SO,{agentId:n,onName:a,onEdit:()=>t(`editor`)},n),e===`editor`&&n&&(0,U.jsx)(jO,{agentId:n},n),e===`schedules`&&(0,U.jsx)(NO,{}),e===`settings`&&(0,U.jsx)(IO,{}),(e===`workbench`||e===`editor`)&&!n&&(0,U.jsx)(`div`,{className:`flex h-full items-center justify-center text-sm text-muted-foreground`,children:`请先在助手大厅选择一名助手`})]})]})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,U.jsxs)(v.StrictMode,{children:[(0,U.jsx)(WO,{}),(0,U.jsx)(({...e})=>(0,U.jsx)(l_,{theme:`dark`,className:`toaster group`,icons:{success:(0,U.jsx)(Bp,{className:`size-4`}),info:(0,U.jsx)(Am,{className:`size-4`}),warning:(0,U.jsx)(og,{className:`size-4`}),error:(0,U.jsx)(oh,{className:`size-4`}),loading:(0,U.jsx)(Hm,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},...e}),{richColors:!0,position:`top-center`})]}));
|