@nekzus/liop-studio 1.0.0-alpha.2 → 1.0.0-alpha.20
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 +71 -28
- package/dist/cli/index.js +118 -28
- package/dist/cli/index.js.map +1 -1
- package/dist/{index-DLA-Sm4s.d.ts → index-Cl7IupN0.d.ts} +2 -0
- package/dist/index.d.ts +9 -3
- package/dist/index.js +97 -25
- package/dist/index.js.map +1 -1
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +87 -25
- package/dist/server/index.js.map +1 -1
- package/package.json +6 -6
- package/ui/README.md +45 -59
- package/ui/dist/assets/index-BjiNGEL8.js +306 -0
- package/ui/dist/assets/index-Cr1w0czW.css +1 -0
- package/ui/dist/favicon.svg +14 -0
- package/ui/dist/icons.svg +24 -0
- package/ui/dist/index.html +14 -0
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(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},l=(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},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var f=s((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.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var te=/\/+/g;function ne(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function k(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 re(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,re(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ne(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(te,`$&/`)+`/`),re(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(te,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ne(a,u),c+=re(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ne(a,u++),c+=re(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return re(k(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 ie(e,t,n){if(e==null)return e;var r=[],i=0;return re(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ae(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var A=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)},j={map:ie,forEach:function(e,t,n){ie(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ie(e,function(){t++}),t},toArray:function(e){return ie(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=j,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},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=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.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 E(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)T.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 E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ae}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,A)}catch(e){A(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.7`})),p=s(((e,t)=>{t.exports=f()})),m=s((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&&ne(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&&ne(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 ee=new MessageChannel,te=ee.port2;ee.port1.onmessage=D,O=function(){te.postMessage(null)}}else O=function(){_(D,0)};function ne(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,ne(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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();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`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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.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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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})}}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=c(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=c(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})}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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),_=s(((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=s((e=>{var t=h(),n=p(),r=_();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){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n: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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),te=Symbol.for(`react.memo_cache_sentinel`),ne=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=ne&&e[ne]||e[`@@iterator`],typeof e==`function`?e:null)}var re=Symbol.for(`react.client.reference`);function ie(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ie(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ie(e(t))}catch{}}return null}var ae=Array.isArray,A=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,oe={pending:!1,data:null,method:null,action:null},se=[],ce=-1;function M(e){return{current:e}}function N(e){0>ce||(e.current=se[ce],se[ce]=null,ce--)}function P(e,t){ce++,se[ce]=e.current,e.current=t}var le=M(null),ue=M(null),de=M(null),fe=M(null);function pe(e,t){switch(P(de,t),P(ue,e),P(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?W(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=W(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}N(le),P(le,e)}function me(){N(le),N(ue),N(de)}function he(e){e.memoizedState!==null&&P(fe,e);var t=le.current,n=Zd(t,e.type);t!==n&&(P(ue,e),P(le,n))}function ge(e){ue.current===e&&(N(le),N(ue)),fe.current===e&&(N(fe),op._currentValue=oe)}var _e,ve;function ye(e){if(_e===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);_e=t&&t[1]||``,ve=-1<e.stack.indexOf(`
|
|
2
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
3
|
+
`+_e+e+ve}var be=!1;function xe(e,t){if(!e||be)return``;be=!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}e.call(n.prototype)}}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{be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ye(n):``}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye(`Lazy`);case 13:return e.child!==t&&t!==null?ye(`Suspense Fallback`):ye(`Suspense`);case 19:return ye(`SuspenseList`);case 0:case 15:return xe(e.type,!1);case 11:return xe(e.type.render,!1);case 1:return xe(e.type,!0);case 31:return ye(`Activity`);default:return``}}function Ce(e){try{var t=``,n=null;do t+=Se(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
|
+
Error generating stack: `+e.message+`
|
|
8
|
+
`+e.stack}}var we=Object.prototype.hasOwnProperty,Te=t.unstable_scheduleCallback,Ee=t.unstable_cancelCallback,De=t.unstable_shouldYield,Oe=t.unstable_requestPaint,ke=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,je=t.unstable_ImmediatePriority,Me=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,F=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,Fe=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof Fe==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Je(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=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(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 Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(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-Be(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&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function rt(e,t){var n=t&-t;return n=n&42?1:it(n),(n&(e.suspendedLanes|t))===0?n:0}function it(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 at(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ot(){var e=j.p;return e===0?(e=window.event,e===void 0?32:Sp(e.type)):e}function st(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var ct=Math.random().toString(36).slice(2),lt=`__reactFiber$`+ct,ut=`__reactProps$`+ct,dt=`__reactContainer$`+ct,ft=`__reactEvents$`+ct,pt=`__reactListeners$`+ct,mt=`__reactHandles$`+ct,ht=`__reactResources$`+ct,gt=`__reactMarker$`+ct;function _t(e){delete e[lt],delete e[ut],delete e[ft],delete e[pt],delete e[mt]}function vt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[dt]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=yf(e);e!==null;){if(n=e[lt])return n;e=yf(e)}return t}e=n,n=e.parentNode}return null}function yt(e){if(e=e[lt]||e[dt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function bt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function xt(e){var t=e[ht];return t||=e[ht]={hoistableStyles:new Map,hoistableScripts:new Map},t}function St(e){e[gt]=!0}var Ct=new Set,wt={};function Tt(e,t){Et(e,t),Et(e+`Capture`,t)}function Et(e,t){for(wt[e]=t,e=0;e<t.length;e++)Ct.add(t[e])}var Dt=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]*$`),Ot={},kt={};function At(e){return we.call(kt,e)?!0:we.call(Ot,e)?!1:Dt.test(e)?kt[e]=!0:(Ot[e]=!0,!1)}function jt(e,t,n){if(At(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 Mt(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 Nt(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 Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(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 Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(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=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(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=``+Pt(s):e.removeAttribute(`name`)}function Ut(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)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(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),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(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=``+Pt(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 Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ae(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=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 Xt(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||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(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]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(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 $t=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),en=/^[\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 tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function I(e){var t=yt(e);if(t&&(e=t.stateNode)){var n=e[ut]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(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="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ut]||null;if(!a)throw Error(i(90));Ht(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&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(on!==null||sn!==null)&&(Au(),on&&(t=on,e=sn,sn=on=null,I(t),e)))for(t=0;t<e.length;t++)I(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ut]||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 dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.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 gn=i.slice(e,1<r?1-r:void 0)}function vn(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 yn(){return!0}function bn(){return!1}function xn(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)?yn:bn,this.isPropagationStopped=bn,this}return f(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=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=f({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=f({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,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!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(f({},kn,{dataTransfer:0})),Mn=xn(f({},wn,{relatedTarget:0})),Nn=xn(f({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(f({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(f({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={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`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(f({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(f({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(f({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(f({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(f({},kn,{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})),Kn=xn(f({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!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 Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={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 or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Id(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){kd(e,0)}function dr(e){if(Rt(bt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(dn){var mr;if(dn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,an(e)),ln(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(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(!we.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(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=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(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=zt(e.document)}return t}function Ar(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 jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==zt(r)||(r=Mr,`selectionStart`in r&&Ar(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}),Pr&&Tr(Pr,r)||(Pr=r,r=Id(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};dn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),Tt(t,[e])}var Qr=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)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[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&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(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-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(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 ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function pi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=Zf(e,n,le.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=ui(31,n,t,a),e.elementType=ee,e.lanes=o,e;case y:return hi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ui(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ui(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ui(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:Ce(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:Ce(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-Be(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,L=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[lt]=e,t[ut]=r,n){case`dialog`:H(`cancel`,t),H(`close`,t);break;case`iframe`:case`object`:case`embed`:H(`load`,t);break;case`video`:case`audio`:for(n=0;n<Dd.length;n++)H(Dd[n],t);break;case`source`:H(`error`,t);break;case`img`:case`image`:case`link`:H(`error`,t),H(`load`,t);break;case`details`:H(`toggle`,t);break;case`input`:H(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:H(`invalid`,t);break;case`textarea`:H(`invalid`,t),qt(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||Hd(t.textContent,n)?(r.popover!=null&&(H(`beforetoggle`,t),H(`toggle`,t)),r.onScroll!=null&&H(`scroll`,t),r.onScrollEnd!=null&&H(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Fi=Fi.return}}function Ui(e){if(e!==Fi)return!1;if(!L)return Hi(e),L=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Qd(e.type,e.memoizedProps)),n=!n),n&&Ii&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=vf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=vf(e)}else t===27?(t=Ii,of(e.type)?(e=_f,_f=null,Ii=e):Ii=t):Ii=Fi?gf(e.stateNode.nextSibling):null;return!0}function Wi(){Ii=Fi=null,L=!1}function Gi(){var e=Li;return e!==null&&(su===null?su=e:su.push.apply(su,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=M(null),Ji=null,Yi=null;function Xi(e,t,n){P(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,N(qi)}function Qi(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 $i(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),Qi(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),Qi(s,n,e),s=null}else 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 ea(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;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===fe.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[op]:e.push(op))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=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()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=Sd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(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 ya=A.S;A.S=function(e,t){uu=ke(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=M(null);function xa(){var e=ba.current;return e===null?ql.pooledCache:e}function Sa(e,t){t===null?P(ba,ba.current):P(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=ql,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,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(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=fi(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|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(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===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),La(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=vi(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=hi(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=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case g:return n=mi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case v:return t=vi(t,e.mode,n),t.return=e,t;case O:return t=Aa(t),f(e,t,n)}if(ae(t)||k(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===C)return f(e,ia(e,t),n);Ra(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 g:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Aa(n),p(e,t,n,r)}if(ae(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===C)return p(e,t,ia(e,n),r);Ra(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 g:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Aa(r),m(e,t,n,r,i)}if(ae(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===C)return m(e,t,n,ia(t,r),i);Ra(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),L&&Ai(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 L&&Ai(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(g.key===null?h:g.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)}),L&&Ai(i,h),l}function _(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),L&&Ai(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 L&&Ai(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(v.key===null?g:v.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)}),L&&Ai(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v: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}else{n(e,r);break}else t(e,r);r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Aa(o),b(e,r,o,c)}if(ae(o))return h(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),_(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===C)return b(e,r,ia(e,o),c);Ra(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=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function qa(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,nt(e,n)}}function Ja(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;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!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 p=s.lane&-536870913,m=p!==s.lane;if(m?(B&p)===p:(r&p)===p){p!==0&&p===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ha=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,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),tu|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=M(null),to=M(0);function no(e,t){e=$l,P(to,e),P(eo,t),$l=e|t.baseLanes}function ro(){P(to,$l),P(eo,eo.current)}function io(){$l=to.current,N(eo),N(to)}var ao=M(null),oo=null;function so(e){var t=e.alternate;P(po,po.current&1),P(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){P(po,po.current),P(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(P(po,po.current),P(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){P(po,po.current),P(ao,ao.current)}function fo(e){N(ao),oo===e&&(oo=null),N(po)}var po=M(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||pf(n)||mf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 ho=0,R=null,go=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return ho=a,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Ws:Gs,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){A.H=Us;var t=go!==null&&go.next!==null;if(ho=0,_o=go=R=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||cc||(e=e.dependencies,e!==null&&ta(e)&&(cc=!0))}function ko(e,t,n,r){R=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=Ks,o=t(n,r)}while(yo);return o}function Ao(){var e=A.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(go===null?null:go.memoizedState)!==e&&(R.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}ho=0,_o=go=R=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?R.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(go===null){var e=R.alternate;e=e===null?null:e.memoizedState}else e=go.next;var t=_o===null?R.memoizedState:_o.next;if(t!==null)_o=t,go=e;else{if(e===null)throw R.alternate===null?Error(i(467)):Error(i(310));go=e,e={memoizedState:go.memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},_o===null?R.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ka(Co,e,t),t=R,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===C)return ra(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=R.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=R.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=Io(),R.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]=te;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),go,e)}function Ho(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?(ho&f)===f:(B&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===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(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,R.lanes|=p,tu|=p;f=u.action,bo&&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,R.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(cc=!0,d&&(n=ha,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 Uo(e){var t=Fo(),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);wr(o,t.memoizedState)||(cc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=R,a=Fo(),o=L;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((go||a).memoizedState,n);if(s&&(a.memoizedState=n,cc=!0),a=a.queue,hs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||ho&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=R.updateQueue,t===null?(t=Io(),R.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Yo(e){var t=ai(e,2);t!==null&&Tu(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,go,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Bs(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)}};A.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=A.T,o={};A.T=o;try{var s=n(i,r),c=A.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),A.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(L){var n=ql.formState;if(n!==null){a:{var r=R;if(L){if(Ii){b:{for(var i=Ii,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=gf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=gf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,R,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,R,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,R,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Fo(),go,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(R.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Fo(),n=go;if(n!==null)return ss(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=R.updateQueue,t===null&&(t=Io(),R.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 ds(){return Fo().memoizedState}function fs(e,t,n,r){var i=Po();R.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;go!==null&&r!==null&&Eo(r,go.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(R.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){R.flags|=4;var t=R.updateQueue;if(t===null)t=Io(),R.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Fo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(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 xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||ho&1073741824&&!(B&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),R.lanes|=e,tu|=e,n)}function Es(e,t,n,r){return wr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(B&261930)?(cc=!0,e.memoizedState=n):(e=wu(),R.lanes|=e,tu|=e,t):(e=Ts(e,n,r),wr(e,t)||(cc=!0),e)}function Ds(e,t,n,r,i){var a=j.p;j.p=a!==0&&8>a?a:8;var o=A.T,s={};A.T=s,zs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,va(c,r),Cu(e)):Rs(e,t,r,Cu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,oe,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:oe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},Cu())}function Ms(){return ra(op)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Tu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=ii(e,t,n,r),n!==null&&(Tu(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,Cu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(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,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Tu(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Tu(t,e,2)}function Bs(e){var t=e.alternate;return e===R||t!==null&&t===R}function Vs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Us={readContext:ra,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Us.useEffectEvent=To;var Ws={readContext:ra,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){ze(!0);try{n(t)}finally{ze(!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=Is.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,R,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,a=Po();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));B&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=ql.identifierPrefix;if(L){var n=ki,r=Oi;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,R,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Fs.bind(null,R)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:ra,use:Ro,useCallback:Cs,useContext:ra,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(Fo(),go.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Fo(),go,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:ra,use:Ro,useCallback:Cs,useContext:ra,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Fo();return go===null?Ts(n,e,t):Es(n,go.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Fo();return go===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,go,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Tu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Tu(t,e,n),qa(t,e,n))}};function Ys(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?!Tr(n,r)||!Tr(i,a):!0}function Xs(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&&Js.enqueueReplaceState(t,t.state,null)}function Zs(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=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){Qr(e)}function $s(e){console.error(e)}function ec(e){Qr(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(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 rc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Ga(e),e.tag=3,e}function ac(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(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.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&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Lu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?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)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(L)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=rc(e.stateNode,r,a),Ja(e,a),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=rc(n.stateNode,r,e),Ja(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`&&(pu===null||!pu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ic(a),ac(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(i(461)),cc=!1;function lc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function uc(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 na(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(L&&s&&Mi(t),t.flags|=1,lc(e,t,r,i),t.child)}function dc(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,fc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref)if(cc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(cc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}return bc(e,t,n,r,i)}function pc(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 hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return lc(e,t,i,n),t.child}function mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function gc(e,t){return t=kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Ba(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(L){if(r.mode===`hidden`)return e=gc(t,r),t.lanes=536870912,mc(null,e);if(co(t),(e=Ii)?(e=ff(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a)if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(cc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,cc||a){if(r=ql,r!==null&&(s=rt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Tu(r,e,s),sc;Lu(),t=_c(e,t,n)}else e=o.treeContext,Ii=gf(s.nextSibling),Fi=t,L=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=gc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(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 bc(e,t,n,r,i){return na(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(L&&r&&Mi(t),t.flags|=1,lc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!cc?(Mo(e,t,a),Pc(e,t,a)):(L&&r&&Mi(t),t.flags|=1,lc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(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&&Js.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),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=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ra(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)&&Xs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=Ha||Ys(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,Wa(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ra(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)&&Xs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=Ha||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(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,yc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Cc(e,t,n,r){return Wi(),t.flags|=256,lc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:Ca()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function Dc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(po.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(L){if(a?so(t):uo(t),(e=Ii)?(e=ff(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Bi(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=kc({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(null,r)):(so(t),Oc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=Ac(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=kc({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=mc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),mf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=Ac(e,t,n)}else if(cc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,cc||s){if(s=ql,s!==null&&(r=rt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Tu(s,e,r),sc;pf(c)||Lu(),t=Ac(e,t,n)}else pf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=gf(c.nextSibling),Fi=t,L=!0,Li=null,Ri=!1,e!==null&&Pi(t,e),t=Oc(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,mc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Oc(e,t){return t=kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function kc(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function Ac(e,t,n){return Ba(t,e.child,null,n),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function Mc(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 Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,P(po,o),lc(e,t,r,n),r=L?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jc(e,n,t);else if(e.tag===19)jc(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`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mc(t,!0,n,null,a,r);break;case`together`:Mc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(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=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Ic(e,t,n){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:he(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Pc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(po,po.current),r)break;return null;case 22:return t.lanes=0,pc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)cc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return cc=!1,Ic(e,t,n);cc=!!(e.flags&131072)}else cc=!1,L&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Zs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=uc(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=dc(null,t,e,r,n);break a}}throw t=ie(e)||e,Error(i(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Zs(r,t.pendingProps),Sc(e,t,r,a,n);case 3:a:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),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=Cc(e,t,r,n);break a}else if(r!==a){a=bi(Error(i(424)),t),Ki(a),t=Cc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=gf(e.firstChild),Fi=t,L=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Pc(e,t,n);break a}lc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Lf(t.type,null,t.pendingProps,null))?t.memoizedState=n:L||(n=t.type,e=t.pendingProps,r=Xd(de.current).createElement(n),r[lt]=t,r[ut]=e,Wd(r,n,e),St(r),t.stateNode=r):t.memoizedState=Lf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return he(t),e===null&&L&&(r=t.stateNode=bf(t.type,t.pendingProps,de.current),Fi=t,Ri=!0,a=Ii,of(t.type)?(_f=a,Ii=gf(r.firstChild)):Ii=a),lc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((a=r=Ii)&&(r=uf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=gf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),he(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Qd(a,o)?r=null:s!==null&&Qd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),op._currentValue=a),yc(e,t),lc(e,t,r,n),t.child;case 6:return e===null&&L&&((e=n=Ii)&&(n=df(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Bi(t)),null;case 13:return Dc(e,t,n);case 4:return pe(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):lc(e,t,r,n),t.child;case 11:return uc(e,t,t.type,t.pendingProps,n);case 7:return lc(e,t,t.pendingProps,n),t.child;case 8:return lc(e,t,t.pendingProps.children,n),t.child;case 12:return lc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),lc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,lc(e,t,r,n),t.child;case 14:return dc(e,t,t.type,t.pendingProps,n);case 15:return fc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return vc(e,t,n);case 22:return pc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=ql,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),lc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qf(t))if(Pu())e.flags|=8192;else throw ja=Da,Ta}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,au|=t)}function Hc(e,t){if(!L)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var 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}}function Uc(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&65011712,r|=i.flags&65011712,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 Wc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),Uc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,a,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,a,e,r,n)),null;case 27:if(ge(t),n=de.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}e=le.current,Ui(t)?Vi(t,e):(e=bf(a,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(ge(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}if(o=le.current,Ui(t))Vi(t,o);else{var s=Xd(de.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[lt]=t,o[ut]=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(Wd(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&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[lt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Hd(e.nodeValue,n)),e||Bi(t,!0)}else e=Xd(e).createTextNode(r),e[lt]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(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[lt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(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[lt]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(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),Vc(t,t.updateQueue),Uc(t),null);case 4:return me(),e===null&&Md(t.stateNode.containerInfo),Uc(t),null;case 10:return Zi(t.type),Uc(t),null;case 19:if(N(po),r=t.memoizedState,r===null)return Uc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Hc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return P(po,po.current&1|2),L&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ke()>du&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}else{if(!a)if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!L)return Uc(t),null}else 2*ke()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Hc(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)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ke(),e.sibling=null,n=po.current,P(po,a?n&1|2:n&1),L&&Ai(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(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&&N(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return N(po),null;case 4:return me(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&N(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function Kc(e,t){switch(Ni(t),t.tag){case 3:Zi(la),me();break;case 26:case 27:case 5:ge(t);break;case 4:me();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:N(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&N(ba);break;case 24:Zi(la)}}function qc(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){td(t,t.return,e)}}function Jc(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){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){td(e,e.return,t)}}}function Xc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Zc(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:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(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){td(e,t,n)}else n.current=null}function $c(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){td(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[ut]=t}catch(t){td(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&of(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(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&&of(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 rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&of(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[lt]=e,t[ut]=n}catch(t){td(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Jd=hp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},hp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)lf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:lf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&qc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(Dl(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{$a(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),hf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&_t(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 ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:sl||Qc(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||Qc(n,t);var r=ml,i=hl;of(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),xf(n.stateNode),ml=r,hl=i;break;case 5:sl||Qc(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,sf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Bp(e)):sf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),sl||Jc(4,n,t),gl(e,t,n);break;case 1:sl||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bp(e)}catch(e){td(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bp(e)}catch(e){td(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(of(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[gt]||o[lt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[lt]=e,St(o),r=o;break a;case`link`:var s=Yf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Yf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[lt]=e,St(o),r=o}e.stateNode=r}else Xf(a,e.type,e.stateNode);else e.stateNode=Wf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Xf(a,e.type,e.stateNode):Wf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if(Jf=null,a=Cl,Cl=wf(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Bp(t.containerInfo)}catch(t){td(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=wf(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=ke()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?cf(m,!0):cf(l.stateNode,!1)}catch(e){td(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),Ol(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),Ol(t);break;case 27:xf(t.stateNode);case 26:case 5:Qc(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),qc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Zc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(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&&da(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&qc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){td(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!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:Pl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(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:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&$f(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=wf(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(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 Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:Jc(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:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,z=null,B=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,_u=0,vu=0,yu=null,bu=null,xu=0,Su=null;function Cu(){return Kl&2&&B!==0?B&-B:A.T===null?ot():Sd()}function wu(){if(iu===0)if(!(B&536870912)||L){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),iu=e}else iu=536870912;return e=ao.current,e!==null&&(e.flags|=32),iu}function Tu(e,t,n){(e===ql&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,B,iu,!1)),$e(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(nu|=n),eu===4&&ku(e,B,iu,!1)),md(e))}function Eu(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Zl&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(e,t,!1),o=!1;continue}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=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,a=4;break a}o=su,su=a,o!==null&&(su===null?su=o:su.push.apply(su,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(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)break;case 6:ku(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=lu+300-ke(),10<a)){if(ku(r,t,iu,!Xl),Je(r,0,!0)!==0)break a;_u=t,r.timeoutHandle=ef(Du.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),a);break a}Du(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}}break}while(1);md(e)}function Du(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},Rl(t,a,d);var m=(a&62914560)===a?lu-ke():(a&4194048)===a?uu-ke():0;if(m=tp(d,m),m!==null){_u=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(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(!wr(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 ku(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function Au(){return Kl&6?!0:(hd(0,!1),!1)}function ju(){if(z!==null){if(Jl===0)var e=z.return;else e=z,Yi=Ji=null,No(e),Pa=null,Fa=0,e=z;for(;e!==null;)Kc(e.alternate,e),e=e.return;z=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,tf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_u=0,ju(),ql=e,z=n=fi(e.current,null),B=t,Jl=0,Yl=null,Xl=!1,Zl=Ye(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ni(),n}function Nu(e,t){R=null,A.H=Us,t===wa||t===Ea?(t=Ma(),Jl=3):t===Ta?(t=Ma(),Jl=4):Jl=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,z===null&&(eu=1,tc(e,bi(t,e.current)))}function Pu(){var e=ao.current;return e===null?!0:(B&4194048)===B?oo===null:(B&62914560)===B||B&536870912?e===oo:!1}function Fu(){var e=A.H;return A.H=Us,e===null?Us:e}function Iu(){var e=A.A;return A.A=Wl,e}function Lu(){eu=4,Xl||(B&4194048)!==B&&ao.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||ql===null||ku(ql,B,iu,!1)}function Ru(e,t,n){var r=Kl;Kl|=2;var i=Fu(),a=Iu();(ql!==e||B!==t)&&(fu=null,Mu(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&z!==null){var s=z,c=Yl;switch(Jl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Wu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Wu(e,s,c,l)}}zu(),o=eu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,Kl=r,A.H=i,A.A=a,z===null&&(ql=null,B=0,ni()),o}function zu(){for(;z!==null;)Hu(z)}function Bu(e,t){var n=Kl;Kl|=2;var r=Fu(),a=Iu();ql!==e||B!==t?(fu=null,du=ke()+500,Mu(e,t)):Zl=Ye(e,t);a:do try{if(Jl!==0&&z!==null){t=z;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Wu(e,t,o,1);break;case 2:case 9:if(Oa(o)){Jl=0,Yl=null,Uu(t);break}t=function(){Jl!==2&&Jl!==9||ql!==e||(Jl=7),md(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:Oa(o)?(Jl=0,Yl=null,Uu(t)):(Jl=0,Yl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(z.tag){case 26:s=z.memoizedState;case 5:case 27:var c=z;if(s?Qf(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)z=l;else{var u=c.return;u===null?z=null:(z=u,Gu(u))}break b}}Jl=0,Yl=null,Wu(e,t,o,5);break;case 6:Jl=0,Yl=null,Wu(e,t,o,6);break;case 8:ju(),eu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return Yi=Ji=null,A.H=r,A.A=a,Kl=n,z===null?(ql=null,B=0,ni(),eu):0}function Vu(){for(;z!==null&&!De();)Hu(z)}function Hu(e){var t=Lc(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Gu(e):z=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,B);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,B);break;case 5:No(t);default:Kc(n,t),t=z=pi(t,$l),t=Lc(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Gu(e):z=t}function Wu(e,t,n,r){Yi=Ji=null,No(t),Pa=null,Fa=0;var i=t.return;try{if(oc(e,i,t,n,B)){eu=1,tc(e,bi(n,e.current)),z=null;return}}catch(t){if(i!==null)throw z=i,t;eu=1,tc(e,bi(n,e.current)),z=null;return}t.flags&32768?(L||r===1?e=!0:Zl||B&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Xl);return}e=t.return;var n=Wc(t.alternate,t,$l);if(n!==null){z=n;return}if(t=t.sibling,t!==null){z=t;return}z=t=e}while(t!==null);eu===0&&(eu=5)}function Ku(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,z=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){z=e;return}z=e=n}while(e!==null);eu=6,z=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(mu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,et(e,n,o,s,c,l),e===ql&&(z=ql=null,B=0),gu=t,hu=e,_u=n,vu=o,yu=a,bu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Ne,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=A.T,A.T=null,a=j.p,j.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,j.p=a,A.T=r}}mu=1,Ju(),Yu(),Xu()}}function Ju(){if(mu===1){mu=0;var e=hu,t=gu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=Yd,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(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 _=Dr(s,h),v=Dr(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}}hp=!!Jd,Yd=Jd=null}finally{Kl=i,j.p=r,A.T=n}}e.current=t,mu=2}}function Yu(){if(mu===2){mu=0;var e=hu,t=gu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=A.T,A.T=null;var r=j.p;j.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,j.p=r,A.T=n}}mu=3}}function Xu(){if(mu===4||mu===3){mu=0,Oe();var e=hu,t=gu,n=_u,r=bu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),at(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=A.T,i=j.p,j.p=2,A.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{A.T=t,j.p=i}}_u&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(mu!==5)return!1;var e=hu,t=vu;vu=0;var n=at(_u),r=A.T,a=j.p;try{j.p=32>n?32:n,A.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,hd(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{j.p=a,A.T=r,Zu(e,t)}}function ed(e,t,n){t=bi(n,t),t=rc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&($e(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=bi(n,e),n=ic(2),r=Ka(t,n,2),r!==null&&(ac(n,r,t,e),$e(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;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)||(Ql=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(B&n)===n&&(eu===4||eu===3&&(B&62914560)===B&&300>ke()-lu?!(Kl&2)&&Mu(e,0):ru|=n,au===B&&(au=0)),md(e)}function id(e,t){t===0&&(t=Ze()),e=ai(e,t),e!==null&&($e(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(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),id(e,n)}function sd(e,t){return Te(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;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-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=B,a=Je(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&$d()&&(e=pd);for(var t=ke(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=B,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ee(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ee(r),at(n)){case 2:case 8:n=Me;break;case 32:n=Ne;break;case 268435456:n=Pe;break;default:n=Ne}return r=yd.bind(null,e),n=Te(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ee(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=B;return r=Je(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,ke()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){rf(function(){Kl&6?Te(je,gd):_d()})}function Sd(){if(pd===0){var e=ma;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function wd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ut]||null).action),o=r.submitter;o&&(t=(t=o[ut]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Xr.length;Ed++){var V=Xr[Ed];Zr(V.toLowerCase(),`on`+(V[0].toUpperCase()+V.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Et(`onMouseEnter`,[`mouseout`,`mouseover`]),Et(`onMouseLeave`,[`mouseout`,`mouseover`]),Et(`onPointerEnter`,[`pointerout`,`pointerover`]),Et(`onPointerLeave`,[`pointerout`,`pointerover`]),Tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Dd=`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(` `),Od=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Dd));function kd(e,t){t=(t&4)!=0;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){Qr(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){Qr(e)}i.currentTarget=null,a=c}}}}function H(e,t){var n=t[ft];n===void 0&&(n=t[ft]=new Set);var r=e+`__bubble`;n.has(r)||(Nd(t,e,2,!1),n.add(r))}function Ad(e,t,n){var r=0;t&&(r|=4),Nd(n,e,r,t)}var jd=`_reactListening`+Math.random().toString(36).slice(2);function Md(e){if(!e[jd]){e[jd]=!0,Ct.forEach(function(t){t!==`selectionchange`&&(Od.has(t)||Ad(t,!1,e),Ad(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jd]||(t[jd]=!0,Ad(`selectionchange`,!1,t))}}function Nd(e,t,n,r){switch(Sp(t)){case 2:var i=gp;break;case 8:i=_p;break;default:i=vp}n=i.bind(null,t,n,e),i=void 0,!fn||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 Pd(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=vt(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}ln(function(){var r=a,i=an(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;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=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=(t&4)!=0,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=un(m,p),g!=null&&d.push(Fd(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(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(vt(u)||u[dt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?vt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:bt(l),h=u==null?c:bt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,vt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Ld,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Rd(s,c,l,d,!1),u!==null&&f!==null&&Rd(s,f,u,d,!0)}}a:{if(c=r?bt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c))if(pr)v=Sr;else{v=br;var y=yr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?bt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,nr=!0)),y=Id(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Id(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}kd(s,t)})}function Fd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Id(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=un(e,n),i!=null&&r.unshift(Fd(e,i,a)),i=un(e,t),i!=null&&r.push(Fd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Ld(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rd(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=un(n,a),l!=null&&o.unshift(Fd(n,l,c))):i||(l=un(n,a),l!=null&&o.push(Fd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var zd=/\r\n?/g,Bd=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==`string`?e:``+e).replace(zd,`
|
|
9
|
+
`).replace(Bd,``)}function Hd(e,t){return t=Vd(t),Vd(e)===t}function U(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+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}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&U(e,t,`name`,a.name,a,null),U(e,t,`formEncType`,a.formEncType,a,null),U(e,t,`formMethod`,a.formMethod,a,null),U(e,t,`formTarget`,a.formTarget,a,null)):(U(e,t,`encType`,a.encType,a,null),U(e,t,`method`,a.method,a,null),U(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&H(`scroll`,e);break;case`onScrollEnd`:r!=null&&H(`scrollend`,e);break;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));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=tn(``+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`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`:H(`beforetoggle`,e),H(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;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));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&H(`scroll`,e);break;case`onScrollEnd`:r!=null&&H(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!wt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ut]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:H(`error`,e),H(`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:U(e,t,o,s,n,null)}}a&&U(e,t,`srcSet`,n.srcSet,n,null),r&&U(e,t,`src`,n.src,n,null);return;case`input`:H(`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:U(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in H(`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:U(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in H(`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:U(e,t,s,c,n,null)}qt(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:U(e,t,l,r,n,null)}return;case`dialog`:H(`beforetoggle`,e),H(`toggle`,e),H(`cancel`,e),H(`close`,e);break;case`iframe`:case`object`:H(`load`,e);break;case`video`:case`audio`:for(r=0;r<Dd.length;r++)H(Dd[r],e);break;case`image`:H(`error`,e),H(`load`,e);break;case`details`:H(`toggle`,e);break;case`embed`:case`source`:case`link`:H(`error`,e),H(`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:U(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&U(e,t,c,r,n,null))}function Gd(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)||U(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`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&U(e,t,p,m,r,f)}}Ht(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)||U(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`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&U(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(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:U(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`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&U(e,t,s,a,r,o)}Kt(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:U(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`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:U(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)&&U(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:U(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(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||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&U(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||U(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){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&&Kd(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&&Kd(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 Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function W(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 Zd(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 Qd(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 G=null;function $d(){var e=window.event;return e&&e.type===`popstate`?e===G?!1:(G=e,!0):(G=null,!1)}var ef=typeof setTimeout==`function`?setTimeout:void 0,tf=typeof clearTimeout==`function`?clearTimeout:void 0,nf=typeof Promise==`function`?Promise:void 0,rf=typeof queueMicrotask==`function`?queueMicrotask:nf===void 0?ef:function(e){return nf.resolve(null).then(e).catch(af)};function af(e){setTimeout(function(){throw e})}function of(e){return e===`head`}function sf(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),Bp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)xf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,xf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[gt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&xf(e.ownerDocument.body);n=i}while(n);Bp(t)}function cf(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 lf(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`:lf(n),_t(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function uf(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[gt])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=gf(e.nextSibling),e===null)break}return null}function df(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=gf(e.nextSibling),e===null))return null;return e}function ff(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=gf(e.nextSibling),e===null))return null;return e}function pf(e){return e.data===`$?`||e.data===`$~`}function mf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function hf(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 gf(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 _f=null;function vf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return gf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function yf(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 bf(e,t,n){switch(t=Xd(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 xf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);_t(e)}var Sf=new Map,Cf=new Set;function wf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tf=j.d;j.d={f:Ef,r:Df,D:Af,C:jf,L:Mf,m:Nf,X:Ff,S:Pf,M:If};function Ef(){var e=Tf.f(),t=Au();return e||t}function Df(e){var t=yt(e);t!==null&&t.tag===5&&t.type===`form`?js(t):Tf.r(e)}var Of=typeof document>`u`?null:document;function kf(e,t,n){var r=Of;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Cf.has(i)||(Cf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Af(e){Tf.D(e),kf(`dns-prefetch`,e,null)}function jf(e,t){Tf.C(e,t),kf(`preconnect`,e,t)}function Mf(e,t,n){Tf.L(e,t,n);var r=Of;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Rf(e);break;case`script`:a=Hf(e)}Sf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Sf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(zf(a))||t===`script`&&r.querySelector(Uf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),St(t),r.head.appendChild(t)))}}function Nf(e,t){Tf.m(e,t);var n=Of;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Hf(e)}if(!Sf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Sf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Uf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),St(r),n.head.appendChild(r)}}}function Pf(e,t,n){Tf.S(e,t,n);var r=Of;if(r&&e){var i=xt(r).hoistableStyles,a=Rf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(zf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Sf.get(a))&&Kf(e,n);var c=o=r.createElement(`link`);St(c),Wd(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,Gf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Ff(e,t){Tf.X(e,t);var n=Of;if(n&&e){var r=xt(n).hoistableScripts,i=Hf(e),a=r.get(i);a||(a=n.querySelector(Uf(i)),a||(e=f({src:e,async:!0},t),(t=Sf.get(i))&&qf(e,t),a=n.createElement(`script`),St(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function If(e,t){Tf.M(e,t);var n=Of;if(n&&e){var r=xt(n).hoistableScripts,i=Hf(e),a=r.get(i);a||(a=n.querySelector(Uf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Sf.get(i))&&qf(e,t),a=n.createElement(`script`),St(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t,n,r){var a=(a=de.current)?wf(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`?(t=Rf(n.href),n=xt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,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=Rf(n.href);var o=xt(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(zf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Sf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Sf.set(e,n),o||Vf(a,e,n,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`?(t=Hf(n),n=xt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rf(e){return`href="`+Vt(e)+`"`}function zf(e){return`link[rel="stylesheet"][`+e+`]`}function Bf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Vf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),St(t),e.head.appendChild(t))}function Hf(e){return`[src="`+Vt(e)+`"]`}function Uf(e){return`script[async]`+e}function Wf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,St(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),St(r),Wd(r,`style`,a),Gf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Rf(n.href);var o=e.querySelector(zf(a));if(o)return t.state.loading|=4,t.instance=o,St(o),o;r=Bf(n),(a=Sf.get(a))&&Kf(r,a),o=(e.ownerDocument||e).createElement(`link`),St(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,Gf(o,n.precedence,e),t.instance=o;case`script`:return o=Hf(n.src),(a=e.querySelector(Uf(o)))?(t.instance=a,St(a),a):(r=n,(a=Sf.get(o))&&(r=f({},n),qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),St(a),Wd(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,Gf(r,n.precedence,e));return t.instance}function Gf(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 Kf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Jf=null;function Yf(e,t,n){if(Jf===null){var r=new Map,i=Jf=new Map;i.set(n,r)}else i=Jf,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[gt]||a[lt]||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 Xf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Zf(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 Qf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $f(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=Rf(r.href),a=t.querySelector(zf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=np.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,St(a);return}a=t.ownerDocument||t,r=Bf(r),(i=Sf.get(i))&&Kf(r,i),a=a.createElement(`link`),St(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(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=np.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ep=0;function tp(e,t){return e.stylesheets&&e.count===0&&ip(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ip(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ep===0&&(ep=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ip(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ep?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function np(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ip(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rp=null;function ip(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rp=new Map,t.forEach(ap,e),rp=null,np.call(e))}function ap(e,t){if(!(t.state.loading&4)){var n=rp.get(e);if(n)var r=n.get(null);else{n=new Map,rp.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=np.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 op={$$typeof:C,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function sp(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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function cp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new sp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function lp(e){return e?(e=ci,e):ci}function up(e,t,n,r,i,a){i=lp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Tu(n,e,t),qa(n,e,t))}function dp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fp(e,t){dp(e,t),(e=e.alternate)&&dp(e,t)}function pp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Tu(t,e,67108864),fp(e,67108864)}}function mp(e){if(e.tag===13||e.tag===31){var t=Cu();t=it(t);var n=ai(e,t);n!==null&&Tu(n,e,t),fp(e,t)}}var hp=!0;function gp(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=2,vp(e,t,n,r)}finally{j.p=a,A.T=i}}function _p(e,t,n,r){var i=A.T;A.T=null;var a=j.p;try{j.p=8,vp(e,t,n,r)}finally{j.p=a,A.T=i}}function vp(e,t,n,r){if(hp){var i=yp(r);if(i===null)Pd(e,t,r,bp,n),jp(e,r);else if(Np(i,e,t,n,r))r.stopPropagation();else if(jp(e,r),t&4&&-1<Ap.indexOf(e)){for(;i!==null;){var a=yt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}md(a),!(Kl&6)&&(du=ke()+500,hd(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Tu(s,a,2),Au(),fp(a,2)}if(a=yp(r),a===null&&Pd(e,t,r,bp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Pd(e,t,r,null,n)}}function yp(e){return e=an(e),xp(e)}var bp=null;function xp(e){if(bp=null,e=vt(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 bp=e,null}function Sp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Ae()){case je:return 2;case Me:return 8;case Ne:case F:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var Cp=!1,wp=null,Tp=null,Ep=null,Dp=new Map,Op=new Map,kp=[],Ap=`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 jp(e,t){switch(e){case`focusin`:case`focusout`:wp=null;break;case`dragenter`:case`dragleave`:Tp=null;break;case`mouseover`:case`mouseout`:Ep=null;break;case`pointerover`:case`pointerout`:Dp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Op.delete(t.pointerId)}}function Mp(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=yt(t),t!==null&&pp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Np(e,t,n,r,i){switch(t){case`focusin`:return wp=Mp(wp,e,t,n,r,i),!0;case`dragenter`:return Tp=Mp(Tp,e,t,n,r,i),!0;case`mouseover`:return Ep=Mp(Ep,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Dp.set(a,Mp(Dp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Op.set(a,Mp(Op.get(a)||null,e,t,n,r,i)),!0}return!1}function Pp(e){var t=vt(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,st(e.priority,function(){mp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,st(e.priority,function(){mp(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 Fp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=yt(n),t!==null&&pp(t),e.blockedOn=n,!1;t.shift()}return!0}function K(e,t,n){Fp(e)&&n.delete(t)}function Ip(){Cp=!1,wp!==null&&Fp(wp)&&(wp=null),Tp!==null&&Fp(Tp)&&(Tp=null),Ep!==null&&Fp(Ep)&&(Ep=null),Dp.forEach(K),Op.forEach(K)}function Lp(e,n){e.blockedOn===n&&(e.blockedOn=null,Cp||(Cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Ip)))}var Rp=null;function zp(e){Rp!==e&&(Rp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Rp===e&&(Rp=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(xp(r||n)===null)continue;break}var a=yt(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Bp(e){function t(t){return Lp(t,e)}wp!==null&&Lp(wp,e),Tp!==null&&Lp(Tp,e),Ep!==null&&Lp(Ep,e),Dp.forEach(t),Op.forEach(t);for(var n=0;n<kp.length;n++){var r=kp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<kp.length&&(n=kp[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&kp.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[ut]||null;if(typeof a==`function`)o||zp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ut]||null)s=o.formAction;else if(xp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),zp(n)}}}function Vp(){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 Hp(e){this._internalRoot=e}Up.prototype.render=Hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;up(n,Cu(),e,t,null,null)},Up.prototype.unmount=Hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;up(e.current,2,null,e,null,null),Au(),t[dt]=null}};function Up(e){this._internalRoot=e}Up.prototype.unstable_scheduleHydration=function(e){if(e){var t=ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kp.length&&t!==0&&t<kp[n].priority;n++);kp.splice(n,0,e),n===0&&Pp(e)}};var Wp=n.version;if(Wp!==`19.2.7`)throw Error(i(527,Wp,`19.2.7`));j.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:d(e),e=e===null?null:e.stateNode,e};var Gp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:A,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Kp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Kp.isDisabled&&Kp.supportsFiber)try{Le=Kp.inject(Gp),Re=Kp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Qs,s=$s,c=ec;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=cp(e,1,!1,null,null,n,r,null,o,s,c,Vp),e[dt]=t.current,Md(e),new Hp(t)}})),y=s(((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=v()})),b=u(p()),x=y(),S=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),C=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),w={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},T=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...w,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:C(`lucide`,i),...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),E=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(T,{ref:i,iconNode:t,className:C(`lucide-${S(e)}`,n),...r}));return n.displayName=`${e}`,n},D=E(`Activity`,[[`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`}]]),O=E(`ArrowDownRight`,[[`path`,{d:`m7 7 10 10`,key:`1fmybs`}],[`path`,{d:`M17 7v10H7`,key:`6fjiku`}]]),ee=E(`Bug`,[[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M9 7.13v-1a3.003 3.003 0 1 1 6 0v1`,key:`d7y7pr`}],[`path`,{d:`M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6`,key:`xs1cw7`}],[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M6.53 9C4.6 8.8 3 7.1 3 5`,key:`32zzws`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`M3 21c0-2.1 1.7-3.9 3.8-4`,key:`4p0ekp`}],[`path`,{d:`M20.97 5c0 2.1-1.6 3.8-3.5 4`,key:`18gb23`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M17.2 17c2.1.1 3.8 1.9 3.8 4`,key:`k3fwyw`}]]),te=E(`ChartNoAxesColumn`,[[`line`,{x1:`18`,x2:`18`,y1:`20`,y2:`10`,key:`1xfpm4`}],[`line`,{x1:`12`,x2:`12`,y1:`20`,y2:`4`,key:`be30l9`}],[`line`,{x1:`6`,x2:`6`,y1:`20`,y2:`14`,key:`1r4le6`}]]),ne=E(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),k=E(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),re=E(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ie=E(`Clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`polyline`,{points:`12 6 12 12 16 14`,key:`68esgv`}]]),ae=E(`CodeXml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),A=E(`Code`,[[`polyline`,{points:`16 18 22 12 16 6`,key:`z7tu5w`}],[`polyline`,{points:`8 6 2 12 8 18`,key:`1eg1df`}]]),j=E(`Copy`,[[`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`}]]),oe=E(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),se=E(`Database`,[[`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`}]]),ce=E(`FileCode`,[[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z`,key:`1mlx9k`}]]),M=E(`FileJson`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),N=E(`Fingerprint`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),P=E(`Fuel`,[[`line`,{x1:`3`,x2:`15`,y1:`22`,y2:`22`,key:`xegly4`}],[`line`,{x1:`4`,x2:`14`,y1:`9`,y2:`9`,key:`xcnuvu`}],[`path`,{d:`M14 22V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v18`,key:`16j0yd`}],[`path`,{d:`M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 2 2a2 2 0 0 0 2-2V9.83a2 2 0 0 0-.59-1.42L18 5`,key:`7cu91f`}]]),le=E(`Globe`,[[`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`}]]),ue=E(`History`,[[`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`}]]),de=E(`Info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),fe=E(`Layers`,[[`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`}]]),pe=E(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),me=E(`Lock`,[[`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`}]]),he=E(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),ge=E(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),_e=E(`RefreshCw`,[[`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`}]]),ve=E(`RotateCcw`,[[`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`}]]),ye=E(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),be=E(`Server`,[[`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`}]]),xe=E(`ShieldAlert`,[[`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`}]]),Se=E(`ShieldBan`,[[`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:`m4.243 5.21 14.39 12.472`,key:`1c9a7c`}]]),Ce=E(`ShieldCheck`,[[`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`}]]),we=E(`Sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),Te=E(`Terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),Ee=E(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),De=E(`TrendingUp`,[[`polyline`,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,key:`126l90`}],[`polyline`,{points:`16 7 22 7 22 13`,key:`kwv8wd`}]]),Oe=E(`TriangleAlert`,[[`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`}]]),ke=E(`Waypoints`,[[`circle`,{cx:`12`,cy:`4.5`,r:`2.5`,key:`r5ysbb`}],[`path`,{d:`m10.2 6.3-3.9 3.9`,key:`1nzqf6`}],[`circle`,{cx:`4.5`,cy:`12`,r:`2.5`,key:`jydg6v`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}],[`circle`,{cx:`19.5`,cy:`12`,r:`2.5`,key:`1piiel`}],[`path`,{d:`m13.8 17.7 3.9-3.9`,key:`1wyg1y`}],[`circle`,{cx:`12`,cy:`19.5`,r:`2.5`,key:`13o1pw`}]]),Ae=E(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),je=E(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);async function Me(e){try{if(navigator?.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0;let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.left=`-999999px`,t.style.top=`-999999px`,document.body.appendChild(t),t.focus(),t.select();let n=document.execCommand(`copy`);return document.body.removeChild(t),n}catch(e){return console.warn(`Clipboard write failed:`,e),!1}}var Ne=s((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})),F=s(((e,t)=>{t.exports=Ne()}))(),Pe={Analyze_Synthetic_Bank_Transactions:{recordType:`BankAccountRecord`,fields:[{name:`id`,type:`string`,description:`Unique account identifier`,example:`ACC-90412`},{name:`accountType`,type:`'checking' | 'savings' | 'investment'`,description:`Classification of deposit account`,example:`checking`},{name:`balance`,type:`number`,description:`Current cleared balance in account currency`,example:148500.5},{name:`currency`,type:`string`,description:`ISO 4217 three-letter currency code`,example:`USD`},{name:`status`,type:`'ACTIVE' | 'FROZEN' | 'DORMANT'`,description:`Operational status of account ledger`,example:`ACTIVE`}],sampleRecord:{id:`ACC-90412`,accountType:`checking`,balance:148500.5,currency:`USD`,status:`ACTIVE`}},Analyze_Synthetic_Medical_Records:{recordType:`ClinicalPatientRecord`,fields:[{name:`id`,type:`string`,description:`Confidential patient identifier (Protected Health Info)`,example:`PT-77120`},{name:`diagnosis`,type:`string`,description:`Clinical ICD-10 pathology description`,example:`Type 2 Diabetes Mellitus`},{name:`riskLevel`,type:`'LOW' | 'MED' | 'HIGH' | 'CRITICAL'`,description:`Triage risk assessment score`,example:`HIGH`},{name:`systolicBp`,type:`number`,description:`Systolic blood pressure (mmHg)`,example:142},{name:`diastolicBp`,type:`number`,description:`Diastolic blood pressure (mmHg)`,example:88}],sampleRecord:{id:`PT-77120`,diagnosis:`Type 2 Diabetes Mellitus`,riskLevel:`HIGH`,systolicBp:142,diastolicBp:88}},Analyze_HFT_Market_Data:{recordType:`MarketDepthTick`,fields:[{name:`symbol`,type:`string`,description:`Ticker trading instrument`,example:`BTC-USDT`},{name:`timestamp`,type:`number`,description:`Epoch millisecond of tick`,example:17887008e5},{name:`bestBid`,type:`number`,description:`Highest current buy order price`,example:64250},{name:`bestAsk`,type:`number`,description:`Lowest current sell order price`,example:64251.5},{name:`spreadBps`,type:`number`,description:`Calculated spread in basis points`,example:2.33},{name:`volume`,type:`number`,description:`Aggregated book volume in contracts`,example:14.82}],sampleRecord:{symbol:`BTC-USDT`,timestamp:17887008e5,bestBid:64250,bestAsk:64251.5,spreadBps:2.33,volume:14.82}},Analyze_IoT_Sensor_Data:{recordType:`IndustrialTelemetryRecord`,fields:[{name:`sensorId`,type:`string`,description:`Industrial IoT edge transducer ID`,example:`SENS-Turbine-04`},{name:`temperatureCelsius`,type:`number`,description:`Thermal reading in Celsius`,example:84.6},{name:`pressureHpa`,type:`number`,description:`Barometric chamber pressure`,example:1013.2},{name:`vibrationRms`,type:`number`,description:`RMS acceleration in mm/s`,example:4.8},{name:`alertStatus`,type:`boolean`,description:`Hardware trip latch boolean`,example:!1}],sampleRecord:{sensorId:`SENS-Turbine-04`,temperatureCelsius:84.6,pressureHpa:1013.2,vibrationRms:4.8,alertStatus:!1}},BLG_Inspect_Enclave_Perimeter:{recordType:`PerimeterSecurityEvent`,fields:[{name:`enclaveId`,type:`string`,description:`Isolated sovereign enclave identifier`,example:`enclave-vault-01`},{name:`tier`,type:`1 | 2 | 3`,description:`Classification tier boundary`,example:1},{name:`activeIsolation`,type:`string`,description:`Active cryptographic and network isolation`,example:`Strict Zero-Trust pnet`},{name:`pqcSuite`,type:`string`,description:`Negotiated post-quantum key exchange`,example:`ML-KEM-768`},{name:`egressPIIShield`,type:`string`,description:`Status of 4-stage data leak protection`,example:`Active (Strict)`},{name:`unauthorizedAttempts`,type:`number`,description:`Derivation attacks blocked at origin`,example:0}],sampleRecord:{enclaveId:`enclave-vault-01`,tier:1,activeIsolation:`Strict Zero-Trust pnet`,pqcSuite:`ML-KEM-768`,egressPIIShield:`Active (Strict)`,unauthorizedAttempts:0}},LiopMeshStatus:{recordType:`MeshTopologyState`,fields:[{name:`peerId`,type:`string`,description:`libp2p node identity string`,example:`12D3KooW9pZ...`},{name:`connectedPeers`,type:`number`,description:`Active swarm peer connections`,example:8},{name:`dhtProviders`,type:`number`,description:`Kademlia DHT provider records indexed`,example:12},{name:`consensusState`,type:`string`,description:`Distributed state sync condition`,example:`SYNCHRONIZED`}],sampleRecord:{peerId:`12D3KooW9pZ...`,connectedPeers:8,dhtProviders:12,consensusState:`SYNCHRONIZED`}}};Pe.BLG_Execute_Banking_Analytics=Pe.Analyze_Synthetic_Bank_Transactions,Pe.BLG_Execute_Healthcare_Analytics=Pe.Analyze_Synthetic_Medical_Records,Pe.get_account_balances=Pe.Analyze_Synthetic_Bank_Transactions,Pe.get_patient_records=Pe.Analyze_Synthetic_Medical_Records,Pe.get_market_depth=Pe.Analyze_HFT_Market_Data,Pe.read_telemetry_stream=Pe.Analyze_IoT_Sensor_Data;var Fe=[{category:`Array Transformations`,methods:`map, filter, reduce, forEach, find, some, every, slice, length`},{category:`Mathematical Primitives`,methods:`Math.max, Math.min, Math.round, Math.floor, Math.ceil, Math.abs, Math.sqrt`},{category:`Object Manipulation`,methods:`Object.keys, Object.values, Object.entries, Object.assign`},{category:`Serialization`,methods:`JSON.stringify, JSON.parse`},{category:`String & Numerical Primitives`,methods:`Number.isFinite, String.slice, String.includes, Number.toFixed`}],Ie=[{category:`Network Egress`,items:`fetch(), XMLHttpRequest, WebSocket, dgram, net`,reason:`Prevents exfiltration of confidential origin data`},{category:`Filesystem & OS`,items:`fs, process, child_process, __dirname, Deno, Bun`,reason:`Enforces V8 Isolate sandboxing with zero host access`},{category:`Dynamic Execution`,items:`eval(), Function(), WebAssembly.compileStreaming`,reason:`Guarantees deterministic AST compilation and fuel limits`},{category:`Timing & Asynchrony`,items:`setTimeout, setInterval, queueMicrotask`,reason:`Mitigates timing side-channel attacks and race conditions`}],Le=({isOpen:e,onClose:t,toolName:n,tool:r})=>{let[i,a]=(0,b.useState)(`fields`),[o,s]=(0,b.useState)(!1);if(!e)return null;let c=Pe[n];if(!c&&r?.inputSchema&&typeof r.inputSchema==`object`){let e=r.inputSchema,t=e.properties||{},n=new Set(Array.isArray(e.required)?e.required:[]),i=[],a={};for(let[e,r]of Object.entries(t)){let t=r||{},o=t.enum?t.enum.map(e=>JSON.stringify(e)).join(` | `):t.type||`unknown`,s=t.default===void 0?``:t.default;s===``&&(s=t.type===`number`||t.type===`integer`?0:t.type===`boolean`?!0:t.type===`array`?`[]`:t.enum&&t.enum.length>0?String(t.enum[0]):t.example===void 0?`sample_${e}`:String(t.example));let c=n.has(e);i.push({name:c?`${e} *`:e,type:o,description:t.description||(c?`Required parameter field`:`Optional parameter property`),example:s}),a[e]=s}i.length>0&&(c={recordType:`${r.name.replace(/[^a-zA-Z0-9_]/g,``)}Schema`,fields:i,sampleRecord:a})}return c||={recordType:`DynamicOriginRecord`,fields:[{name:`id`,type:`string`,description:`Unique entity record identifier`,example:`REC-001`},{name:`value`,type:`number | string | object`,description:`Payload data attribute`,example:100}],sampleRecord:{id:`REC-001`,value:100,timestamp:Date.now()}},(0,F.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4 animate-in fade-in duration-150`,children:(0,F.jsxs)(`div`,{className:`w-full max-w-3xl bg-card border border-border rounded-xl shadow-2xl overflow-hidden flex flex-col max-h-[85vh]`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3.5 border-b border-border bg-surface1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`p-1.5 rounded-md bg-secondary text-primary`,children:(0,F.jsx)(fe,{className:`h-4 w-4`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h3`,{className:`text-xs font-bold text-white tracking-wide uppercase font-mono`,children:`Runtime Environment & Schema Inspector`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-400`,children:[`Confidential dataset shape and WASI sandbox constraints for`,` `,(0,F.jsx)(`span`,{className:`font-mono text-cyan-300`,children:n})]})]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:t,className:`text-zinc-400 hover:text-white p-1 rounded-md transition-colors cursor-pointer`,title:`Close Inspector`,children:(0,F.jsx)(Ae,{className:`h-4 w-4`})})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-2.5 bg-background border-b border-border/60`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 p-0.5 bg-surface1 border border-border/80 rounded-lg`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>a(`fields`),className:`text-xs px-3 py-1 rounded-md font-medium transition-all cursor-pointer flex items-center gap-1.5 ${i===`fields`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(se,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`Record Schema`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>a(`sample`),className:`text-xs px-3 py-1 rounded-md font-medium transition-all cursor-pointer flex items-center gap-1.5 ${i===`sample`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(ae,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`Sample JSON Record`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>a(`sandbox`),className:`text-xs px-3 py-1 rounded-md font-medium transition-all cursor-pointer flex items-center gap-1.5 ${i===`sandbox`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(Ce,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`WASI Sandbox Rules`})]})]}),i===`sample`&&(0,F.jsxs)(`button`,{type:`button`,onClick:async()=>{await Me(JSON.stringify(c.sampleRecord,null,2))&&(s(!0),setTimeout(()=>s(!1),2e3))},className:`text-xs flex items-center gap-1.5 px-3 py-1 rounded-md font-medium border border-border bg-surface1 text-zinc-200 hover:text-white hover:bg-white/10 transition-colors cursor-pointer`,children:[(0,F.jsx)(j,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:o?`Copied`:`Copy Sample`})]})]}),(0,F.jsxs)(`div`,{className:`flex-1 min-h-[320px] overflow-auto p-5 bg-card`,children:[i===`fields`&&(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between pb-2 border-b border-border/50 text-xs`,children:[(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`Variable Injected in Sandbox:`,` `,(0,F.jsxs)(`code`,{className:`text-primary font-mono font-semibold`,children:[`env.records: `,c.recordType,`[]`]})]}),(0,F.jsxs)(`span`,{className:`text-zinc-500 font-mono`,children:[c.fields.length,` Available Properties`]})]}),(0,F.jsx)(`div`,{className:`border border-border rounded-lg overflow-hidden`,children:(0,F.jsxs)(`table`,{className:`w-full text-left text-xs font-mono`,children:[(0,F.jsx)(`thead`,{className:`bg-surface1 text-zinc-400 border-b border-border text-[11px] uppercase tracking-wider`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`px-3.5 py-2`,children:`Field`}),(0,F.jsx)(`th`,{className:`px-3.5 py-2`,children:`Type`}),(0,F.jsx)(`th`,{className:`px-3.5 py-2`,children:`Description`}),(0,F.jsx)(`th`,{className:`px-3.5 py-2`,children:`Sample`})]})}),(0,F.jsx)(`tbody`,{className:`divide-y divide-border/60 bg-background/50`,children:c.fields.map(e=>(0,F.jsxs)(`tr`,{className:`hover:bg-white/5 transition-colors`,children:[(0,F.jsx)(`td`,{className:`px-3.5 py-2 font-bold text-white`,children:e.name}),(0,F.jsx)(`td`,{className:`px-3.5 py-2 text-cyan-300`,children:e.type}),(0,F.jsx)(`td`,{className:`px-3.5 py-2 text-zinc-300 font-sans text-xs`,children:e.description}),(0,F.jsx)(`td`,{className:`px-3.5 py-2 text-amber-300`,children:JSON.stringify(e.example)})]},e.name))})]})}),(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border flex items-start gap-2.5 text-xs text-zinc-300`,children:[(0,F.jsx)(k,{className:`h-4 w-4 text-emerald-400 shrink-0 mt-0.5`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`font-semibold text-white`,children:`Aggregated Execution Tip:`}),` `,`Compute your statistical aggregates inside your logic module using`,` `,(0,F.jsx)(`code`,{className:`text-primary font-mono`,children:`env.records.reduce(...)`}),`. Avoid returning raw row collections to comply with the Egress PII Shield.`]})]})]}),i===`sample`&&(0,F.jsxs)(`div`,{className:`space-y-3`,children:[(0,F.jsx)(`div`,{className:`text-xs text-zinc-400`,children:`Simulated single record payload injected into origin memory:`}),(0,F.jsx)(`div`,{className:`bg-editor border border-border rounded-lg p-4 font-mono text-xs text-[#7dd3fc] overflow-auto`,children:(0,F.jsx)(`pre`,{children:JSON.stringify(c.sampleRecord,null,2)})})]}),i===`sandbox`&&(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h4`,{className:`text-xs font-bold text-emerald-400 uppercase tracking-wide font-mono flex items-center gap-1.5 mb-2`,children:[(0,F.jsx)(Ce,{className:`h-4 w-4`}),(0,F.jsx)(`span`,{children:`Authorized APIs (Layer 1 Guardian Allowlist)`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2`,children:Fe.map(e=>(0,F.jsxs)(`div`,{className:`p-2.5 rounded-md bg-surface1 border border-border/80 text-xs`,children:[(0,F.jsx)(`div`,{className:`font-semibold text-white mb-1`,children:e.category}),(0,F.jsx)(`div`,{className:`font-mono text-[11px] text-zinc-400`,children:e.methods})]},e.category))})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h4`,{className:`text-xs font-bold text-rose-400 uppercase tracking-wide font-mono flex items-center gap-1.5 mb-2`,children:[(0,F.jsx)(xe,{className:`h-4 w-4`}),(0,F.jsx)(`span`,{children:`Blocked Primitives (Enforced V8 Sandbox)`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2`,children:Ie.map(e=>(0,F.jsxs)(`div`,{className:`p-2.5 rounded-md bg-rose-500/5 border border-rose-500/20 text-xs`,children:[(0,F.jsxs)(`div`,{className:`font-semibold text-rose-200 mb-0.5 flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:e.category}),(0,F.jsx)(Oe,{className:`h-3 w-3 text-rose-400`})]}),(0,F.jsx)(`div`,{className:`font-mono text-[11px] text-rose-300/80 mb-1`,children:e.items}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 font-sans`,children:e.reason})]},e.category))})]})]})]}),(0,F.jsxs)(`div`,{className:`px-5 py-2.5 bg-surface1 border-t border-border flex items-center justify-between text-[11px] text-zinc-400 font-mono`,children:[(0,F.jsx)(`span`,{children:`PCI-DSS & HIPAA Enclave Isolation`}),(0,F.jsx)(`span`,{className:`text-primary`,children:`WASI Runtime: wasi_v1`})]})]})})},Re=(0,b.createContext)({});function ze(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Be=typeof window<`u`?b.useLayoutEffect:b.useEffect,Ve=(0,b.createContext)(null);function He(e,t){e.indexOf(t)===-1&&e.push(t)}function Ue(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var We=(e,t,n)=>n>t?t:n<e?e:n,Ge={},Ke=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qe=e=>typeof e==`object`&&!!e,Je=e=>/^0[^.\s]+$/u.test(e);function Ye(e){let t;return()=>(t===void 0&&(t=e()),t)}var Xe=e=>e,Ze=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Qe=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},$e=class{constructor(){this.subscriptions=[]}add(e){return He(this.subscriptions,e),()=>Ue(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},et=e=>e*1e3,tt=e=>e/1e3,nt=(e,t)=>t?1e3/t*e:0,rt=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,it=1e-7,at=12;function ot(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=rt(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>it&&++s<at);return o}function st(e,t,n,r){if(e===t&&n===r)return Xe;let i=t=>ot(t,0,1,e,n);return e=>e===0||e===1?e:rt(i(e),t,r)}var ct=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,lt=e=>t=>1-e(1-t),ut=st(.33,1.53,.69,.99),dt=lt(ut),ft=ct(dt),pt=e=>e>=1?1:(e*=2)<1?.5*dt(e):.5*(2-2**(-10*(e-1))),mt=e=>1-Math.sin(Math.acos(e)),ht=lt(mt),gt=ct(mt),_t=st(.42,0,1,1),vt=st(0,0,.58,1),yt=st(.42,0,.58,1),bt=e=>Array.isArray(e)&&typeof e[0]!=`number`,xt=e=>Array.isArray(e)&&typeof e[0]==`number`,St={linear:Xe,easeIn:_t,easeInOut:yt,easeOut:vt,circIn:mt,circInOut:gt,circOut:ht,backIn:dt,backInOut:ft,backOut:ut,anticipate:pt},Ct=e=>typeof e==`string`,wt=e=>{if(xt(e)){e.length;let[t,n,r,i]=e;return st(t,n,r,i)}else if(Ct(e))return St[e],`${e}`,St[e];return e},Tt=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],Et={value:null,addProjectionMetrics:null};function Dt(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&Et.value&&Et.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var Ot=40;function kt(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Tt.reduce((e,n)=>(e[n]=Dt(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Ge.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Ot),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Tt.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Tt.length;t++)o[Tt[t]].cancel(e)},state:i,steps:o}}var{schedule:At,cancel:jt,state:Mt,steps:Nt}=kt(typeof requestAnimationFrame<`u`?requestAnimationFrame:Xe,!0),Pt;function Ft(){Pt=void 0}var It={now:()=>(Pt===void 0&&It.set(Mt.isProcessing||Ge.useManualTiming?Mt.timestamp:performance.now()),Pt),set:e=>{Pt=e,queueMicrotask(Ft)}},Lt={layout:0,mainThread:0,waapi:0},Rt=e=>t=>typeof t==`string`&&t.startsWith(e),zt=Rt(`--`),Bt=Rt(`var(--`),Vt=e=>Bt(e)?Ht.test(e.split(`/*`)[0].trim()):!1,Ht=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ut(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Wt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Gt={...Wt,transform:e=>We(0,1,e)},Kt={...Wt,default:1},qt=e=>Math.round(e*1e5)/1e5,Jt=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Yt(e){return e==null}var Xt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zt=(e,t)=>n=>!!(typeof n==`string`&&Xt.test(n)&&n.startsWith(e)||t&&!Yt(n)&&Object.prototype.hasOwnProperty.call(n,t)),Qt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Jt);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},$t=e=>We(0,255,e),en={...Wt,transform:e=>Math.round($t(e))},tn={test:Zt(`rgb`,`red`),parse:Qt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+en.transform(e)+`, `+en.transform(t)+`, `+en.transform(n)+`, `+qt(Gt.transform(r))+`)`};function nn(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var rn={test:Zt(`#`),parse:nn,transform:tn.transform},an=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),on=an(`deg`),sn=an(`%`),I=an(`px`),cn=an(`vh`),ln=an(`vw`),un={...sn,parse:e=>sn.parse(e)/100,transform:e=>sn.transform(e*100)},dn={test:Zt(`hsl`,`hue`),parse:Qt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+sn.transform(qt(t))+`, `+sn.transform(qt(n))+`, `+qt(Gt.transform(r))+`)`},fn={test:e=>tn.test(e)||rn.test(e)||dn.test(e),parse:e=>tn.test(e)?tn.parse(e):dn.test(e)?dn.parse(e):rn.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?tn.transform(e):dn.transform(e),getAnimatableNone:e=>{let t=fn.parse(e);return t.alpha=0,fn.transform(t)}},pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mn(e){return isNaN(e)&&typeof e==`string`&&(e.match(Jt)?.length||0)+(e.match(pn)?.length||0)>0}var hn=`number`,gn=`color`,_n=`var`,vn=`var(`,yn="${}",bn=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xn(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(bn,e=>(fn.test(e)?(r.color.push(a),i.push(gn),n.push(fn.parse(e))):e.startsWith(vn)?(r.var.push(a),i.push(_n),n.push(e)):(r.number.push(a),i.push(hn),n.push(parseFloat(e))),++a,yn)).split(yn),indexes:r,types:i}}function Sn(e){return xn(e).values}function Cn({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===hn?i+=qt(r[a]):e===gn?i+=fn.transform(r[a]):i+=r[a]}return i}}function wn(e){return Cn(xn(e))}var Tn=e=>typeof e==`number`?0:fn.test(e)?fn.getAnimatableNone(e):e,En=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Tn(e);function Dn(e){let t=xn(e);return Cn(t)(t.values.map((e,n)=>En(e,t.split[n])))}var On={test:mn,parse:Sn,createTransformer:wn,getAnimatableNone:Dn};function kn(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function An({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=kn(s,r,e+1/3),a=kn(s,r,e),o=kn(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function jn(e,t){return n=>n>0?t:e}var Mn=(e,t,n)=>e+(t-e)*n,Nn=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Pn=[rn,tn,dn],Fn=e=>Pn.find(t=>t.test(e));function In(e){let t=Fn(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===dn&&(n=An(n)),n}var Ln=(e,t)=>{let n=In(e),r=In(t);if(!n||!r)return jn(e,t);let i={...n};return e=>(i.red=Nn(n.red,r.red,e),i.green=Nn(n.green,r.green,e),i.blue=Nn(n.blue,r.blue,e),i.alpha=Mn(n.alpha,r.alpha,e),tn.transform(i))},Rn=new Set([`none`,`hidden`]);function zn(e,t){return Rn.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bn(e,t){return n=>Mn(e,t,n)}function Vn(e){return typeof e==`number`?Bn:typeof e==`string`?Vt(e)?jn:fn.test(e)?Ln:Gn:Array.isArray(e)?Hn:typeof e==`object`?fn.test(e)?Ln:Un:jn}function Hn(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Vn(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Un(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vn(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Wn(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Gn=(e,t)=>{let n=On.createTransformer(t),r=xn(e),i=xn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Rn.has(e)&&!i.values.length||Rn.has(t)&&!r.values.length?zn(e,t):Ze(Hn(Wn(r,i),i.values),n):(`${e}${t}`,jn(e,t))};function Kn(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Mn(e,t,n):Vn(e)(e,t)}var qn=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>At.update(t,e),stop:()=>jt(t),now:()=>Mt.isProcessing?Mt.timestamp:It.now()}},Jn=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Yn=2e4;function Xn(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Zn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Xn(r),Yn);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:tt(i)}}var Qn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function $n(e,t){return e*Math.sqrt(1-t*t)}var er=12;function tr(e,t,n){let r=n;for(let n=1;n<er;n++)r-=e(r)/t(r);return r}var nr=.001;function rr({duration:e=Qn.duration,bounce:t=Qn.bounce,velocity:n=Qn.velocity,mass:r=Qn.mass}){let i,a;Qn.maxDuration;let o=1-t;o=We(Qn.minDamping,Qn.maxDamping,o),e=We(Qn.minDuration,Qn.maxDuration,tt(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=$n(t,o),c=Math.exp(-i);return nr-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=$n(t**2,o);return(-i(t)+nr>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=tr(i,a,s);if(e=et(e),isNaN(c))return{stiffness:Qn.stiffness,damping:Qn.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var ir=[`duration`,`bounce`],ar=[`stiffness`,`damping`,`mass`];function or(e,t){return t.some(t=>e[t]!==void 0)}function sr(e){let t={velocity:Qn.velocity,stiffness:Qn.stiffness,damping:Qn.damping,mass:Qn.mass,isResolvedFromDuration:!1,...e};if(!or(e,ar)&&or(e,ir))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*We(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Qn.mass,stiffness:i,damping:a}}else{let n=rr({...e,velocity:0});t={...t,...n,mass:Qn.mass},t.isResolvedFromDuration=!0}return t}function cr(e=Qn.visualDuration,t=Qn.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=sr({...n,velocity:-tt(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=tt(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Qn.restSpeed.granular:Qn.restSpeed.default,i||=v?Qn.restDelta.granular:Qn.restDelta.default;let y,b,x,S,C,w;if(h<1)x=$n(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>et(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=et(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=et(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(Xn(T),Yn),t=Jn(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}cr.applyToOptions=e=>{let t=Zn(e,100,cr);return e.ease=t.ease,e.duration=et(t.duration),e.type=`keyframes`,e};var lr=5;function ur(e,t,n){let r=Math.max(t-lr,0);return nt(n-e(r),t-r)}function dr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=cr({keyframes:[f.value,m(f.value)],velocity:ur(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function fr(e,t,n){let r=[],i=n||Ge.mix||Kn,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Ze(Array.isArray(t)?t[n]||Xe:t,a)),r.push(a)}return r}function pr(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=fr(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Qe(e[r],e[r+1],n);return s[r](i)};return n?t=>l(We(e[0],e[a-1],t)):l}function mr(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Qe(0,t,r);e.push(Mn(n,1,i))}}function hr(e){let t=[0];return mr(t,e.length-1),t}function gr(e,t){return e.map(e=>e*t)}function _r(e,t){return e.map(()=>t||yt).splice(0,e.length-1)}function vr({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=bt(r)?r.map(wt):wt(r),a={done:!1,value:t[0]},o=pr(gr(n&&n.length===t.length?n:hr(t),e),t,{ease:Array.isArray(i)?i:_r(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var yr=e=>e!==null;function br(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(yr),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var xr={decay:dr,inertia:dr,tween:vr,keyframes:vr,spring:cr};function Sr(e){typeof e.type==`string`&&(e.type=xr[e.type])}var Cr=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},wr=e=>e/100,Tr=class extends Cr{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==It.now()&&this.tick(It.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Lt.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Sr(e);let{type:t=vr,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||vr;s!==vr&&typeof o[0]!=`number`&&(this.mixKeyframes=Ze(wr,Kn(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Xn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=We(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==dr&&(b.value=br(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return tt(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(this.currentTime)}set time(e){e=et(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return ur(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(It.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=tt(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=qn,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(It.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Lt.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function Er(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Dr=e=>e*180/Math.PI,Or=e=>Ar(Dr(Math.atan2(e[1],e[0]))),kr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Or,rotateZ:Or,skewX:e=>Dr(Math.atan(e[1])),skewY:e=>Dr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ar=e=>(e%=360,e<0&&(e+=360),e),jr=Or,Mr=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Nr=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Pr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Mr,scaleY:Nr,scale:e=>(Mr(e)+Nr(e))/2,rotateX:e=>Ar(Dr(Math.atan2(e[6],e[5]))),rotateY:e=>Ar(Dr(Math.atan2(-e[2],e[0]))),rotateZ:jr,rotate:jr,skewX:e=>Dr(Math.atan(e[4])),skewY:e=>Dr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Fr(e){return+!!e.includes(`scale`)}function Ir(e,t){if(!e||e===`none`)return Fr(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Pr,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kr,i=t}if(!i)return Fr(t);let a=r[t],o=i[1].split(`,`).map(Rr);return typeof a==`function`?a(o):o[a]}var Lr=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Ir(n,t)};function Rr(e){return parseFloat(e.trim())}var zr=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Br=new Set([...zr,`pathRotation`]),Vr=e=>e===Wt||e===I,Hr=new Set([`x`,`y`,`z`]),Ur=zr.filter(e=>!Hr.has(e));function Wr(e){let t=[];return Ur.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Gr={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ir(t,`x`),y:(e,{transform:t})=>Ir(t,`y`)};Gr.translateX=Gr.x,Gr.translateY=Gr.y;var Kr=new Set,qr=!1,Jr=!1,Yr=!1;function Xr(){if(Jr){let e=Array.from(Kr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Wr(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Jr=!1,qr=!1,Kr.forEach(e=>e.complete(Yr)),Kr.clear()}function Zr(){Kr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Jr=!0)})}function Qr(){Yr=!0,Zr(),Xr(),Yr=!1}var $r=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Kr.add(this),qr||(qr=!0,At.read(Zr),At.resolveKeyframes(Xr))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Er(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Kr.delete(this)}cancel(){this.state===`scheduled`&&(Kr.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},ei=e=>e.startsWith(`--`);function ti(e,t,n){ei(t)?e.style.setProperty(t,n):e.style[t]=n}var ni={};function ri(e,t){let n=Ye(e);return()=>ni[t]??n()}var ii=ri(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),ai=ri(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),oi=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,si={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:oi([0,.65,.55,1]),circOut:oi([.55,0,1,.45]),backIn:oi([.31,.01,.66,-.59]),backOut:oi([.33,1.53,.69,.99])};function ci(e,t){if(e)return typeof e==`function`?ai()?Jn(e,t):`ease-out`:xt(e)?oi(e):Array.isArray(e)?e.map(e=>ci(e,t)||si.easeOut):si[e]}function li(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=ci(s,i);Array.isArray(d)&&(u.easing=d),Et.value&&Lt.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return Et.value&&p.finished.finally(()=>{Lt.waapi--}),p}function ui(e){return typeof e==`function`&&`applyToOptions`in e}function di({type:e,...t}){return ui(e)&&ai()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var fi=class extends Cr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=di(e);this.animation=li(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=br(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ti(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return tt(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+tt(e)}get time(){return tt(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=et(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&ii()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Xe):r(this)}},pi={anticipate:pt,backInOut:ft,circInOut:gt};function mi(e){return e in pi}function hi(e){typeof e.ease==`string`&&mi(e.ease)&&(e.ease=pi[e.ease])}var gi=10,_i=class extends fi{constructor(e){hi(e),Sr(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new Tr({...a,autoplay:!1}),s=Math.max(gi,It.now()-this.startTime),c=We(0,gi,s-gi),l=o.sample(s).value,{name:u}=this.options;i&&u&&ti(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},vi=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(On.test(e)||e===`0`)&&!e.startsWith(`url(`));function yi(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function bi(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=vi(i,t),s=vi(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:yi(e)||(n===`spring`||ui(n))&&r}function xi(e){e.duration=0,e.type=`keyframes`}var Si=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Ci=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wi(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Ci.test(e[t]))return!0;return!1}var Ti=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Ei=Ye(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Di(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return Ei()&&n&&(Si.has(n)||Ti.has(n)&&wi(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Oi=40,ki=class extends Cr{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=It.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||$r;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=It.now();let u=!0;bi(e,i,a,o)||(u=!1,(Ge.instantAnimations||!s)&&l?.(br(e,n,t)),e[0]=e[e.length-1],xi(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Oi?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&Di(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new _i({...d,element:p})}catch{m=new Tr(d)}else m=new Tr(d);m.finished.then(()=>{this.notifyFinished()}).catch(Xe),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Qr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Ai(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var ji=30,Mi=e=>!isNaN(parseFloat(e)),Ni={current:void 0},Pi=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=It.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=It.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Mi(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new $e);let n=this.events[e].add(t);return e===`change`?()=>{n(),At.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Ni.current&&Ni.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=It.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ji)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,ji);return nt(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Fi(e,t){return new Pi(e,t)}function Ii(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function L(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Ii(n,e)}var Li={type:`spring`,stiffness:500,damping:25,restSpeed:10},Ri=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zi={type:`keyframes`,duration:.8},Bi={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Vi=(e,{keyframes:t})=>t.length>2?zi:Br.has(e)?e.startsWith(`scale`)?Ri(t[1]):Li:Bi,Hi=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Ui(e){for(let t in e)if(!Hi.has(t))return!0;return!1}var Wi=(e,t,n,r={},i,a)=>o=>{let s=L(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=et(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Ui(s)||Object.assign(u,Vi(e,u)),u.duration&&=et(u.duration),u.repeatDelay&&=et(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(xi(u),u.delay===0&&(d=!0)),(Ge.instantAnimations||Ge.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,xi(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=br(u.keyframes,s);if(e!==void 0){At.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new Tr(u):new ki(u)},Gi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ki(e){let t=Gi.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function qi(e,t,n=1){`${e}`;let[r,i]=Ki(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Ke(e)?parseFloat(e):e}return Vt(i)?qi(i,t,n+1):i}function Ji(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Yi(e,t,n,r){if(typeof t==`function`){let[i,a]=Ji(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Ji(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Xi(e,t,n){let r=e.getProps();return Yi(r,t,n===void 0?r.custom:n,e)}var Zi=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...zr]),Qi=e=>Array.isArray(e);function $i(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fi(n))}function ea(e){return Qi(e)?e[e.length-1]||0:e}function ta(e,t){let{transitionEnd:n={},transition:r={},...i}=Xi(e,t)||{};i={...i,...n};for(let t in i)$i(e,t,ea(i[t]))}var na=e=>!!(e&&e.getVelocity);function ra(e){return!!(na(e)&&e.add)}function ia(e,t){let n=e.getValue(`willChange`);if(ra(n))return n.add(t);if(!n&&Ge.WillChange){let n=new Ge.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function aa(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var oa=`data-`+aa(`framerAppearId`);function sa(e){return e.props[oa]}function ca({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function la(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Ii(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&ca(f,t))continue;let o={delay:n,...L(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){At.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=sa(e);if(n){let e=window.MotionHandoffAnimation(n,t,At);e!==null&&(o.startTime=e,p=!0)}}ia(e,t);let m=l??e.shouldReduceMotion;r.start(Wi(t,r,i,m&&Zi.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>At.update(()=>{o&&ta(e,o)});d.length?Promise.all(d).then(t):t()}return d}function ua(e,t,n={}){let r=Xi(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(la(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return da(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function da(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(ua(c,t,{...o,delay:n+(typeof r==`function`?0:r)+Ai(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function fa(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>ua(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=ua(e,t,n);else{let i=typeof t==`function`?Xi(e,t,n.custom):t;r=Promise.all(la(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var pa={test:e=>e===`auto`,parse:e=>e},ma=e=>t=>t.test(e),ha=[Wt,I,sn,on,ln,cn,pa],ga=e=>ha.find(ma(e));function _a(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Je(e)}var va=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ya(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Jt)||[];if(!r)return e;let i=n.replace(r,``),a=+!!va.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ba=/\b([a-z-]*)\(.*?\)/gu,xa={...On,getAnimatableNone:e=>{let t=e.match(ba);return t?t.map(ya).join(` `):e}},Sa={...On,getAnimatableNone:e=>{let t=On.parse(e);return On.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Ca={...Wt,transform:Math.round},wa={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,fontSize:I,backgroundPositionX:I,backgroundPositionY:I,rotate:on,pathRotation:on,rotateX:on,rotateY:on,rotateZ:on,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:on,skewX:on,skewY:on,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:Gt,originX:un,originY:un,originZ:I,zIndex:Ca,fillOpacity:Gt,strokeOpacity:Gt,numOctaves:Ca},Ta={...wa,color:fn,backgroundColor:fn,outlineColor:fn,fill:fn,stroke:fn,borderColor:fn,borderTopColor:fn,borderRightColor:fn,borderBottomColor:fn,borderLeftColor:fn,filter:xa,WebkitFilter:xa,mask:Sa,WebkitMask:Sa},Ea=e=>Ta[e],Da=new Set([xa,Sa]);function Oa(e,t){let n=Ea(e);return Da.has(n)||(n=On),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var ka=new Set([`auto`,`none`,`0`]);function Aa(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!ka.has(t)&&xn(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Oa(n,i)}var ja=class extends $r{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Vt(r))){let i=qi(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Zi.has(n)||e.length!==2)return;let[r,i]=e,a=ga(r),o=ga(i);if(Ut(r)!==Ut(i)&&Gr[n]){this.needsMeasurement=!0;return}if(a!==o)if(Vr(a)&&Vr(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Gr[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||_a(e[t]))&&n.push(t);n.length&&Aa(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Gr[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function Ma(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Na=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Pa(e){return qe(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:Fa,cancel:Ia}=kt(queueMicrotask,!1),La={x:!1,y:!1};function Ra(){return La.x||La.y}function za(e){return e===`x`||e===`y`?La[e]?null:(La[e]=!0,()=>{La[e]=!1}):La.x||La.y?null:(La.x=La.y=!0,()=>{La.x=La.y=!1})}function Ba(e,t){let n=Ma(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Va(e){return!(e.pointerType===`touch`||Ra())}function Ha(e,t,n={}){let[r,i,a]=Ba(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!Va(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Ua=(e,t)=>t?e===t?!0:Ua(e,t.parentElement):!1,Wa=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ga=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ka(e){return Ga.has(e.tagName)||e.isContentEditable===!0}var qa=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ja(e){return qa.has(e.tagName)||e.isContentEditable===!0}var Ya=new WeakSet;function Xa(e){return t=>{t.key===`Enter`&&e(t)}}function Za(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Qa=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Xa(()=>{if(Ya.has(n))return;Za(n,`down`);let e=Xa(()=>{Za(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Za(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function $a(e){return Wa(e)&&!Ra()}var eo=new WeakSet;function to(e,t,n={}){let[r,i,a]=Ba(e,n),o=e=>{let r=e.currentTarget;if(!$a(e)||eo.has(e))return;Ya.add(r),n.stopPropagation&&eo.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Ya.has(r)&&Ya.delete(r),$a(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Ua(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Pa(e)&&(e.addEventListener(`focus`,e=>Qa(e,i)),!Ka(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function no(e){return qe(e)&&`ownerSVGElement`in e}var ro=new WeakMap,io,ao=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:no(r)&&`getBBox`in r?r.getBBox()[t]:r[n],oo=ao(`inline`,`width`,`offsetWidth`),so=ao(`block`,`height`,`offsetHeight`);function co({target:e,borderBoxSize:t}){ro.get(e)?.forEach(n=>{n(e,{get width(){return oo(e,t)},get height(){return so(e,t)}})})}function lo(e){e.forEach(co)}function uo(){typeof ResizeObserver>`u`||(io=new ResizeObserver(lo))}function fo(e,t){io||uo();let n=Ma(e);return n.forEach(e=>{let n=ro.get(e);n||(n=new Set,ro.set(e,n)),n.add(t),io?.observe(e)}),()=>{n.forEach(e=>{let n=ro.get(e);n?.delete(t),n?.size||io?.unobserve(e)})}}var po=new Set,mo;function ho(){mo=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};po.forEach(t=>t(e))},window.addEventListener(`resize`,mo)}function R(e){return po.add(e),mo||ho(),()=>{po.delete(e),!po.size&&typeof mo==`function`&&(window.removeEventListener(`resize`,mo),mo=void 0)}}function go(e,t){return typeof e==`function`?R(e):fo(e,t)}function _o(e){return no(e)&&e.tagName===`svg`}var vo=[...ha,fn,On],yo=e=>vo.find(ma(e)),bo=()=>({translate:0,scale:1,origin:0,originPoint:0}),xo=()=>({x:bo(),y:bo()}),So=()=>({min:0,max:0}),Co=()=>({x:So(),y:So()}),wo=new WeakMap;function To(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Eo(e){return typeof e==`string`||Array.isArray(e)}var Do=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Oo=[`initial`,...Do];function ko(e){return To(e.animate)||Oo.some(t=>Eo(e[t]))}function Ao(e){return!!(ko(e)||e.variants)}function jo(e,t,n){for(let r in t){let i=t[r],a=n[r];if(na(i))e.addValue(r,i);else if(na(a))e.addValue(r,Fi(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Fi(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Mo={current:null},No={current:!1},Po=typeof window<`u`;function Fo(){if(No.current=!0,Po)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Mo.current=e.matches;e.addEventListener(`change`,t),t()}else Mo.current=!1}var Io=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Lo={};function Ro(e){Lo=e}function zo(){return Lo}var Bo=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=$r,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=It.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,At.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=ko(t),this.isVariantNode=Ao(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&na(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,wo.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(No.current||Fo(),this.shouldReduceMotion=Mo.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),jt(this.notifyUpdate),jt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Si.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new fi({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:et(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Br.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&At.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Lo){let t=Lo[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Co()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Io.length;t++){let n=Io[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=jo(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Fi(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Ke(n)||Je(n))?n=parseFloat(n):!yo(n)&&On.test(t)&&(n=Oa(e,t)),this.setBaseTarget(e,na(n)?n.get():n)),na(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Yi(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!na(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new $e),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Fa.render(this.render)}},Vo=class extends Bo{constructor(){super(...arguments),this.KeyframeResolver=ja}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;na(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Ho=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Uo({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Wo({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Go(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ko(e){return e===void 0||e===1}function qo({scale:e,scaleX:t,scaleY:n}){return!Ko(e)||!Ko(t)||!Ko(n)}function Jo(e){return qo(e)||Yo(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yo(e){return Xo(e.x)||Xo(e.y)}function Xo(e){return e&&e!==`0%`}function Zo(e,t,n){return n+t*(e-n)}function Qo(e,t,n,r,i){return i!==void 0&&(e=Zo(e,i,r)),Zo(e,n,r)+t}function $o(e,t=0,n=1,r,i){e.min=Qo(e.min,t,n,r,i),e.max=Qo(e.max,t,n,r,i)}function es(e,{x:t,y:n}){$o(e.x,t.translate,t.scale,t.originPoint),$o(e.y,n.translate,n.scale,n.originPoint)}var ts=.999999999999,ns=1.0000000000001;function rs(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(is(e.x,-a.scroll.offset.x),is(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,es(e,o)),r&&Jo(a.latestValues)&&ss(e,a.latestValues,a.layout?.layoutBox))}t.x<ns&&t.x>ts&&(t.x=1),t.y<ns&&t.y>ts&&(t.y=1)}function is(e,t){e.min+=t,e.max+=t}function as(e,t,n,r,i=.5){$o(e,t,n,Mn(e.min,e.max,i),r)}function os(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function ss(e,t,n){let r=n??e;as(e.x,os(t.x,r.x),t.scaleX,t.scale,t.originX),as(e.y,os(t.y,r.y),t.scaleY,t.scale,t.originY)}function cs(e,t){return Uo(Go(e.getBoundingClientRect(),t))}function ls(e,t,n){let r=cs(e,n),{scroll:i}=t;return i&&(is(r.x,i.offset.x),is(r.y,i.offset.y)),r}var us={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ds=zr.length;function fs(e,t,n){let r=``,i=!0;for(let a=0;a<ds;a++){let o=zr[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Na(s,wa[o]);if(!c){i=!1;let t=us[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Na(a,wa.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function ps(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Br.has(e)){o=!0;continue}else if(zt(e)){i[e]=n;continue}else{let t=Na(n,wa[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=fs(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function ms(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function hs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var gs={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(I.test(e))e=parseFloat(e);else return e;return`${hs(e,t.target.x)}% ${hs(e,t.target.y)}%`}},_s={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=On.parse(e);if(i.length>5)return r;let a=On.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Mn(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},vs={borderRadius:{...gs,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:gs,borderTopRightRadius:gs,borderBottomLeftRadius:gs,borderBottomRightRadius:gs,boxShadow:_s};function ys(e,{layout:t,layoutId:n}){return Br.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!vs[e]||e===`opacity`)}function bs(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(na(r[t])||i&&na(i[t])||ys(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function xs(e){return window.getComputedStyle(e)}var Ss=class extends Vo{constructor(){super(...arguments),this.type=`html`,this.renderInstance=ms}readValueFromInstance(e,t){if(Br.has(t))return this.projection?.isProjecting?Fr(t):Lr(e,t);{let n=xs(e),r=(zt(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return cs(e,t)}build(e,t,n){ps(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return bs(e,t,n)}},Cs={offset:`stroke-dashoffset`,array:`stroke-dasharray`},ws={offset:`strokeDashoffset`,array:`strokeDasharray`};function Ts(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Cs:ws;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Es=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ds(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(ps(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of Es)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Ts(d,i,a,o,!1)}var Os=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),ks=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function As(e,t,n,r){ms(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Os.has(n)?n:aa(n),t.attrs[n])}function js(e,t,n){let r=bs(e,t,n);for(let n in e)if(na(e[n])||na(t[n])){let t=zr.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Ms=class extends Vo{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Co}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Br.has(t)){let e=Ea(t);return e&&e.default||0}return t=Os.has(t)?t:aa(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return js(e,t,n)}build(e,t,n){Ds(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){As(e,t,n,r)}mount(e){this.isSVGTag=ks(e.tagName),super.mount(e)}},Ns=Oo.length;function Ps(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Ps(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Ns;n++){let r=Oo[n],i=e.props[r];(Eo(i)||i===!1)&&(t[r]=i)}return t}function Fs(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Is=[...Do].reverse(),Ls=Do.length;function Rs(e){return t=>Promise.all(t.map(({animation:t,options:n})=>fa(e,t,n)))}function zs(e){let t=Rs(e),n=Hs(),r=!0,i=!1,a=t=>(n,r)=>{let i=Xi(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=Ps(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<Ls;t++){let p=Is[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Eo(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||To(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=Bs(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Qi(t)&&Qi(n)?!Fs(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Xi(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=Ai(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=Xi(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Hs(),i=!0}}}function Bs(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Fs(t,e):!1}function Vs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hs(){return{animate:Vs(!0),whileInView:Vs(),whileHover:Vs(),whileTap:Vs(),whileDrag:Vs(),whileFocus:Vs(),exit:Vs()}}function Us(e,t){e.min=t.min,e.max=t.max}function Ws(e,t){Us(e.x,t.x),Us(e.y,t.y)}function Gs(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ks=.9999,qs=1.0001,Js=-.01,Ys=.01;function Xs(e){return e.max-e.min}function Zs(e,t,n){return Math.abs(e-t)<=n}function Qs(e,t,n,r=.5){e.origin=r,e.originPoint=Mn(t.min,t.max,e.origin),e.scale=Xs(n)/Xs(t),e.translate=Mn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ks&&e.scale<=qs||isNaN(e.scale))&&(e.scale=1),(e.translate>=Js&&e.translate<=Ys||isNaN(e.translate))&&(e.translate=0)}function $s(e,t,n,r){Qs(e.x,t.x,n.x,r?r.originX:void 0),Qs(e.y,t.y,n.y,r?r.originY:void 0)}function ec(e,t,n,r=0){e.min=(r?Mn(n.min,n.max,r):n.min)+t.min,e.max=e.min+Xs(t)}function tc(e,t,n,r){ec(e.x,t.x,n.x,r?.x),ec(e.y,t.y,n.y,r?.y)}function nc(e,t,n,r=0){let i=r?Mn(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Xs(t)}function rc(e,t,n,r){nc(e.x,t.x,n.x,r?.x),nc(e.y,t.y,n.y,r?.y)}function ic(e,t,n,r,i){return e-=t,e=Zo(e,1/n,r),i!==void 0&&(e=Zo(e,1/i,r)),e}function ac(e,t=0,n=1,r=.5,i,a=e,o=e){if(sn.test(t)&&(t=parseFloat(t),t=Mn(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Mn(a.min,a.max,r);e===a&&(s-=t),e.min=ic(e.min,t,n,s,i),e.max=ic(e.max,t,n,s,i)}function oc(e,t,[n,r,i],a,o){ac(e,t[n],t[r],t[i],t.scale,a,o)}var sc=[`x`,`scaleX`,`originX`],cc=[`y`,`scaleY`,`originY`];function lc(e,t,n,r){oc(e.x,t,sc,n?n.x:void 0,r?r.x:void 0),oc(e.y,t,cc,n?n.y:void 0,r?r.y:void 0)}function uc(e){return e.translate===0&&e.scale===1}function dc(e){return uc(e.x)&&uc(e.y)}function fc(e,t){return e.min===t.min&&e.max===t.max}function pc(e,t){return fc(e.x,t.x)&&fc(e.y,t.y)}function mc(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function hc(e,t){return mc(e.x,t.x)&&mc(e.y,t.y)}function gc(e){return Xs(e.x)/Xs(e.y)}function _c(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function vc(e){return[e(`x`),e(`y`)]}function yc(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var bc=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],xc=bc.length,Sc=e=>typeof e==`string`?parseFloat(e):e,Cc=e=>typeof e==`number`||I.test(e);function wc(e,t,n,r,i,a){i?(e.opacity=Mn(0,n.opacity??1,Ec(r)),e.opacityExit=Mn(t.opacity??1,0,Dc(r))):a&&(e.opacity=Mn(t.opacity??1,n.opacity??1,r));for(let i=0;i<xc;i++){let a=bc[i],o=Tc(t,a),s=Tc(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||Cc(o)===Cc(s)?(e[a]=Math.max(Mn(Sc(o),Sc(s),r),0),(sn.test(s)||sn.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Mn(t.rotate||0,n.rotate||0,r))}function Tc(e,t){return e[t]===void 0?e.borderRadius:e[t]}var Ec=Oc(0,.5,ht),Dc=Oc(.5,.95,Xe);function Oc(e,t,n){return r=>r<e?0:r>t?1:n(Qe(e,t,r))}function kc(e,t,n){let r=na(e)?e:Fi(e);return r.start(Wi(``,r,t,n)),r.animation}function Ac(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var jc=(e,t)=>e.depth-t.depth,Mc=class{constructor(){this.children=[],this.isDirty=!1}add(e){He(this.children,e),this.isDirty=!0}remove(e){Ue(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(jc),this.isDirty=!1,this.children.forEach(e)}};function Nc(e,t){let n=It.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(jt(r),e(a-t))};return At.setup(r,!0),()=>jt(r)}function Pc(e){return na(e)?e.get():e}var Fc=class{constructor(){this.members=[]}add(e){He(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Ue(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Ue(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},Ic={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Lc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Rc=[``,`X`,`Y`,`Z`],zc=1e3,Bc=0;function Vc(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Hc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=sa(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,At,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Hc(r)}function Uc({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Bc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Et.value&&(Lc.nodes=Lc.calculatedTargetDeltas=Lc.calculatedProjections=0),this.nodes.forEach(Kc),this.nodes.forEach(tl),this.nodes.forEach(nl),this.nodes.forEach(qc),Et.addProjectionMetrics&&Et.addProjectionMetrics(Lc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Mc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new $e),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=no(t)&&!_o(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;At.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Nc(i,250),Ic.hasAnimatedSinceResize&&(Ic.hasAnimatedSinceResize=!1,this.nodes.forEach(el)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||ll,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!hc(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...L(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||el(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rl),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Hc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Xc),this.nodes.forEach(Yc);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Zc);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Qc),this.nodes.forEach($c),this.nodes.forEach(Wc),this.nodes.forEach(Gc)):this.nodes.forEach(Zc),this.clearAllSnapshots();let e=It.now();Mt.delta=We(0,1e3/60,e-Mt.timestamp),Mt.timestamp=e,Mt.isProcessing=!0,Nt.update.process(Mt),Nt.preRender.process(Mt),Nt.render.process(Mt),Mt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Jc),this.sharedNodes.forEach(il)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,At.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){At.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xs(this.snapshot.measuredBox.x)&&!Xs(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=Co(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!dc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Jo(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),pl(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Co();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(hl))){let{scroll:e}=this.root;e&&(is(t.x,e.offset.x),is(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Co();if(Ws(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ws(t,e),is(t.x,i.offset.x),is(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||Co();Ws(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(is(r.x,-n.scroll.offset.x),is(r.y,-n.scroll.offset.y)),Jo(n.latestValues)&&ss(r,n.latestValues,n.layout?.layoutBox)}return Jo(this.latestValues)&&ss(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=Co();Ws(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Jo(n.latestValues))continue;let r;n.instance&&(qo(n.latestValues)&&n.updateSnapshot(),r=Co(),Ws(r,n.measurePageBox())),lc(t,n.latestValues,n.snapshot?.layoutBox,r)}return Jo(this.latestValues)&&lc(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Mt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=Mt.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Co(),this.targetWithTransforms=Co()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),tc(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ws(this.target,this.layout.layoutBox),es(this.target,this.targetDelta)):Ws(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Et.value&&Lc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||qo(this.parent.latestValues)||Yo(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Co(),this.relativeTargetOrigin=Co(),rc(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ws(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Mt.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ws(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;rs(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Co());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Gs(this.prevProjectionDelta.x,this.projectionDelta.x),Gs(this.prevProjectionDelta.y,this.projectionDelta.y)),$s(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!_c(this.projectionDelta.x,this.prevProjectionDelta.x)||!_c(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Et.value&&Lc.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xo(),this.projectionDelta=xo(),this.projectionDeltaWithTransform=xo()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=xo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=Co(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(cl));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=Mn(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=Mn(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(al(o.x,e.x,n),al(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rc(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),sl(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&pc(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=Co(),Ws(f,this.relativeTarget)),c&&(this.animationValues=a,wc(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(jt(this.pendingAnimation),void 0),this.pendingAnimation=At.update(()=>{Ic.hasAnimatedSinceResize=!0,Lt.layout++,this.motionValue||=Fi(0),this.motionValue.jump(0,!1),this.currentAnimation=kc(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Lt.layout--},onComplete:()=>{Lt.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(zc),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&ml(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Co();let t=Xs(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Xs(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Ws(t,n),ss(t,i),$s(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Fc),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Vc(`z`,e,r,this.animationValues);for(let t=0;t<Rc.length;t++)Vc(`rotate${Rc[t]}`,e,r,this.animationValues),Vc(`skew${Rc[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Pc(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Pc(t?.pointerEvents)||``),this.hasProjected&&!Jo(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=yc(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in vs){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=vs[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Pc(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Yc),this.root.sharedNodes.clear()}}}function Wc(e){e.updateLayout()}function Gc(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)vc(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Xs(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Us(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else ml(i,t.layoutBox,n)&&vc(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Xs(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=xo();$s(o,n,t.layoutBox);let s=xo();a?$s(s,e.applyTransform(r,!0),t.measuredBox):$s(s,n,t.layoutBox);let c=!dc(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=Co();rc(s,t.layoutBox,i.layoutBox,o);let c=Co();rc(c,n,a.layoutBox,o),hc(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Kc(e){Et.value&&Lc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function qc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Jc(e){e.clearSnapshot()}function Yc(e){e.clearMeasurements()}function Xc(e){e.isLayoutDirty=!0,e.updateLayout()}function Zc(e){e.isLayoutDirty=!1}function Qc(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function $c(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function el(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tl(e){e.resolveTargetDelta()}function nl(e){e.calcProjection()}function rl(e){e.resetSkewAndRotation()}function il(e){e.removeLeadSnapshot()}function al(e,t,n){e.translate=Mn(t.translate,0,n),e.scale=Mn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ol(e,t,n,r){e.min=Mn(t.min,n.min,r),e.max=Mn(t.max,n.max,r)}function sl(e,t,n,r){ol(e.x,t.x,n.x,r),ol(e.y,t.y,n.y,r)}function cl(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var ll={duration:.45,ease:[.4,0,.1,1]},ul=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),dl=ul(`applewebkit/`)&&!ul(`chrome/`)?Math.round:Xe;function fl(e){e.min=dl(e.min),e.max=dl(e.max)}function pl(e){fl(e.x),fl(e.y)}function ml(e,t,n){return e===`position`||e===`preserve-aspect`&&!Zs(gc(t),gc(n),.2)}function hl(e){return e!==e.root&&e.scroll?.wasRoot}var gl=Uc({attachResizeListener:(e,t)=>Ac(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),_l={current:void 0},vl=Uc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!_l.current){let e=new gl({});e.mount(window),e.setOptions({layoutScroll:!0}),_l.current=e}return _l.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),yl=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function bl(e=!0){let t=(0,b.useContext)(Ve);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var xl=(0,b.createContext)({strict:!1}),Sl={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Cl=!1;function wl(){if(Cl)return;let e={};for(let t in Sl)e[t]={isEnabled:e=>Sl[t].some(t=>!!e[t])};Ro(e),Cl=!0}function Tl(){return wl(),zo()}function El(e){let t=Tl();for(let n in e)t[n]={...t[n],...e[n]};Ro(t)}var Dl=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Ol(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Dl.has(e)}var kl=c({default:()=>Al}),Al,jl=o((()=>{throw Al={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),Ml=e=>!Ol(e);function Nl(e){typeof e==`function`&&(Ml=t=>t.startsWith(`on`)?!Ol(t):e(t))}try{Nl((jl(),d(kl)).default)}catch{}function Pl(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||na(e[i])||(Ml(i)||n===!0&&Ol(i)||!t&&!Ol(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Fl=(0,b.createContext)({});function Il(e,t){if(ko(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Eo(t)?t:void 0,animate:Eo(n)?n:void 0}}return e.inherit===!1?{}:t}function Ll(e){let{initial:t,animate:n}=Il(e,(0,b.useContext)(Fl));return(0,b.useMemo)(()=>({initial:t,animate:n}),[Rl(t),Rl(n)])}function Rl(e){return Array.isArray(e)?e.join(` `):e}var zl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Bl(e,t,n){for(let r in t)!na(t[r])&&!ys(r,n)&&(e[r]=t[r])}function Vl({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=zl();return ps(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Hl(e,t){let n=e.style||{},r={};return Bl(r,n,e),Object.assign(r,Vl(e,t)),r}function Ul(e,t){let n={},r=Hl(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Wl=()=>({...zl(),attrs:{}});function Gl(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=Wl();return Ds(n,t,ks(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Bl(t,e.style,e),i.style={...t,...i.style}}return i}var Kl=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function ql(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Kl.indexOf(e)>-1||/[A-Z]/u.test(e))}function z(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??ql(e)?Gl:Ul)(t,r,i,e),c=Pl(t,typeof e==`string`,a),l=e===b.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,b.useMemo)(()=>na(u)?u.get():u,[u]);return(0,b.createElement)(e,{...l,children:d})}function B({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Jl(n,r,i,e),renderState:t()}}function Jl(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Pc(a[e]);let{initial:o,animate:s}=e,c=ko(e),l=Ao(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!To(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Yi(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Yl=e=>(t,n)=>{let r=(0,b.useContext)(Fl),i=(0,b.useContext)(Ve),a=()=>B(e,t,r,i);return n?a():ze(a)},Xl=Yl({scrapeMotionValuesFromProps:bs,createRenderState:zl}),Zl=Yl({scrapeMotionValuesFromProps:js,createRenderState:Wl}),Ql=Symbol.for(`motionComponentSymbol`);function $l(e,t,n){let r=(0,b.useRef)(n);(0,b.useInsertionEffect)(()=>{r.current=n});let i=(0,b.useRef)(null);return(0,b.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var eu=(0,b.createContext)({});function tu(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function nu(e,t,n,r,i,a){let{visualElement:o}=(0,b.useContext)(Fl),s=(0,b.useContext)(xl),c=(0,b.useContext)(Ve),l=(0,b.useContext)(yl),u=l.reducedMotion,d=l.skipAnimations,f=(0,b.useRef)(null),p=(0,b.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,b.useContext)(eu);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&ru(f.current,n,i,h);let g=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[oa],v=(0,b.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Be(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,b.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function ru(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:iu(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&tu(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function iu(e){if(e)return e.options.allowProjection===!1?iu(e.parent):e.projection}function au(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&El(r);let a=n?n===`svg`:ql(e),o=a?Zl:Xl;function s(n,s){let c,l={...(0,b.useContext)(yl),...n,layoutId:ou(n)},{isStatic:u}=l,d=Ll(n),f=o(n,u);if(!u&&typeof window<`u`){su(l,r);let t=cu(l);c=t.MeasureLayout,d.visualElement=nu(e,f,l,i,t.ProjectionNode,a)}return(0,F.jsxs)(Fl.Provider,{value:d,children:[c&&d.visualElement?(0,F.jsx)(c,{visualElement:d.visualElement,...l}):null,z(e,n,$l(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,b.forwardRef)(s);return c[Ql]=e,c}function ou({layoutId:e}){let t=(0,b.useContext)(Re).id;return t&&e!==void 0?t+`-`+e:e}function su(e,t){(0,b.useContext)(xl).strict}function cu(e){let{drag:t,layout:n}=Tl();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function lu(e,t){if(typeof Proxy>`u`)return au;let n=new Map,r=(n,r)=>au(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,au(a,void 0,e,t)),n.get(a))})}var uu=(e,t)=>t.isSVG??ql(e)?new Ms(t):new Ss(t,{allowProjection:e!==b.Fragment}),du=class extends Ho{constructor(e){super(e),e.animationState||=zs(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();To(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},fu=0,pu={animation:{Feature:du},exit:{Feature:class extends Ho{constructor(){super(...arguments),this.id=fu++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=Xi(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function mu(e){return{point:{x:e.pageX,y:e.pageY}}}var hu=e=>t=>Wa(t)&&e(t,mu(t));function gu(e,t,n,r){return Ac(e,t,hu(n),r)}var _u=({current:e})=>e?e.ownerDocument.defaultView:null,vu=(e,t)=>Math.abs(e-t);function yu(e,t){let n=vu(e.x,t.x),r=vu(e.y,t.y);return Math.sqrt(n**2+r**2)}var bu=new Set([`auto`,`scroll`]),xu=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Su(this.lastRawMoveEventInfo,this.transformPagePoint));let e=wu(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=yu(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Mt;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Su(t,this.transformPagePoint),At.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=wu(e.type===`pointercancel`?this.lastMoveEventInfo:Su(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Wa(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Su(mu(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Mt;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,wu(s,this.history)),this.removeListeners=Ze(gu(this.contextWindow,`pointermove`,this.handlePointerMove),gu(this.contextWindow,`pointerup`,this.handlePointerUp),gu(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(bu.has(e.overflowX)||bu.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),At.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jt(this.updatePoint)}};function Su(e,t){return t?{point:t(e.point)}:e}function Cu(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wu({point:e},t){return{point:e,delta:Cu(e,Eu(t)),offset:Cu(e,Tu(t)),velocity:Du(t,.1)}}function Tu(e){return e[0]}function Eu(e){return e[e.length-1]}function Du(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Eu(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>et(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>et(t)*2&&(r=e[1]);let a=tt(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Ou(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Mn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Mn(n,e,r.max):Math.min(e,n)),e}function ku(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Au(e,{top:t,left:n,bottom:r,right:i}){return{x:ku(e.x,n,i),y:ku(e.y,t,r)}}function ju(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Mu(e,t){return{x:ju(e.x,t.x),y:ju(e.y,t.y)}}function Nu(e,t){let n=.5,r=Xs(e),i=Xs(t);return i>r?n=Qe(t.min,t.max-r,e.min):r>i&&(n=Qe(e.min,e.max-i,t.min)),We(0,1,n)}function Pu(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Fu=.35;function Iu(e=Fu){return e===!1?e=0:e===!0&&(e=Fu),{x:Lu(e,`left`,`right`),y:Lu(e,`top`,`bottom`)}}function Lu(e,t,n){return{min:Ru(e,t),max:Ru(e,n)}}function Ru(e,t){return typeof e==`number`?e:e[t]||0}var zu=new WeakMap,Bu=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Co(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(mu(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=za(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),vc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(sn.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Xs(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&At.update(()=>i(e,t),!1,!0),ia(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Wu(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&At.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new xu(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:_u(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&At.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Uu(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Ou(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&tu(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Au(n.layoutBox,e):this.constraints=!1,this.elastic=Iu(t),r!==this.constraints&&!tu(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&vc(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Pu(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!tu(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=ls(n,r.root,this.visualElement.getTransformPagePoint()),a=Mu(r.layout.layoutBox,i);if(t){let e=t(Wo(a));this.hasMutatedConstraints=!!e,e&&(a=Uo(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=vc(o=>{if(!Uu(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ia(this.visualElement,e),n.start(Wi(e,n,0,t,this.visualElement,!1))}stopAnimation(){vc(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){vc(t=>{let{drag:n}=this.getProps();if(!Uu(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-Mn(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!tu(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};vc(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Nu({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),vc(t=>{if(!Uu(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Mn(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;zu.set(this.visualElement,this);let e=this.visualElement.current,t=gu(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ja(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();tu(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Hu(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),At.read(r);let o=Ac(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(vc(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Fu,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Vu(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Hu(e,t,n){let r=go(e,Vu(n)),i=go(t,Vu(n));return()=>{r(),i()}}function Uu(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Wu(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Gu=class extends Ho{constructor(e){super(e),this.removeGroupControls=Xe,this.removeListeners=Xe,this.controls=new Bu(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xe}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ku=e=>(t,n)=>{e&&At.update(()=>e(t,n),!1,!0)},qu=class extends Ho{constructor(){super(...arguments),this.removePointerDownListener=Xe}onPointerDown(e){this.session=new xu(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_u(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ku(e),onStart:Ku(t),onMove:Ku(n),onEnd:(e,t)=>{delete this.session,r&&At.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=gu(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Ju=!1,Yu=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Ju&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ic.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ju=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||At.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Fa.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ju=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Xu(e){let[t,n]=bl(),r=(0,b.useContext)(Re);return(0,F.jsx)(Yu,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(eu),isPresent:t,safeToRemove:n})}var Zu={pan:{Feature:qu},drag:{Feature:Gu,ProjectionNode:vl,MeasureLayout:Xu}};function Qu(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&At.postRender(()=>i(t,mu(t)))}var $u=class extends Ho{mount(){let{current:e}=this.node;e&&(this.unmount=Ha(e,(e,t)=>(Qu(this.node,t,`Start`),e=>Qu(this.node,e,`End`))))}unmount(){}},ed=class extends Ho{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Ze(Ac(this.node.current,`focus`,()=>this.onFocus()),Ac(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function td(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&At.postRender(()=>i(t,mu(t)))}var nd=class extends Ho{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=to(e,(e,t)=>(td(this.node,t,`Start`),(e,{success:t})=>td(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},rd=new WeakMap,id=new WeakMap,ad=e=>{let t=rd.get(e.target);t&&t(e)},od=e=>{e.forEach(ad)};function sd({root:e,...t}){let n=e||document;id.has(n)||id.set(n,{});let r=id.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(od,{root:e,...t})),r[i]}function cd(e,t,n){let r=sd(t);return rd.set(e,n),r.observe(e),()=>{rd.delete(e),r.unobserve(e)}}var ld={some:0,all:1},ud=class extends Ho{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:ld[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=cd(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(dd(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function dd({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var fd={inView:{Feature:ud},tap:{Feature:nd},focus:{Feature:ed},hover:{Feature:$u}},pd={layout:{ProjectionNode:vl,MeasureLayout:Xu}},md=lu({...pu,...fd,...Zu,...pd},uu),hd=[],gd=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,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).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?gd:hd).push(n+=e[t])})();function _d(e){if(e<768)return!1;for(let t=0,n=hd.length;;){let r=t+n>>1;if(e<hd[r])n=r;else if(e>=gd[r])t=r+1;else return!0;if(t==n)return!1}}function vd(e){return e>=127462&&e<=127487}var yd=8205;function bd(e,t,n=!0,r=!0){return(n?xd:Sd)(e,t,r)}function xd(e,t,n){if(t==e.length)return t;t&&wd(e.charCodeAt(t))&&Td(e.charCodeAt(t-1))&&t--;let r=Cd(e,t);for(t+=Ed(r);t<e.length;){let i=Cd(e,t);if(r==yd||i==yd||n&&_d(i))t+=Ed(i),r=i;else if(vd(i)){let n=0,r=t-2;for(;r>=0&&vd(Cd(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function Sd(e,t,n){for(;t>1;){let r=xd(e,t-2,n);if(r<t)return r;t--}return 0}function Cd(e,t){let n=e.charCodeAt(t);if(!Td(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return wd(r)?(n-55296<<10)+(r-56320)+65536:n}function wd(e){return e>=56320&&e<57344}function Td(e){return e>=55296&&e<56320}function Ed(e){return e<65536?1:2}var V=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=Fd(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),Od.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Fd(this,e,t);let n=[];return this.decompose(e,t,n,0),Od.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new jd(this),i=new jd(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new jd(this,e)}iterRange(e,t=this.length){return new Md(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Nd(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new Dd(t):Od.from(Dd.split(t,[]))}},Dd=class e extends V{constructor(e,t=kd(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new Pd(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(Ad(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=H(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=Fd(this,t,n);let i=H(this.text,H(r.text,Ad(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):Od.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
|
|
10
|
+
`){[e,t]=Fd(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},Od=class e extends V{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=Fd(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
|
|
11
|
+
`){[e,t]=Fd(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new Dd(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof Dd&&c&&(n=u[u.length-1])instanceof Dd&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new Dd(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};V.empty=new Dd([``],0);function kd(e){let t=-1;for(let n of e)t+=n.length+1;return t}function H(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function Ad(e,t,n){return H(e,[``],t,n)}var jd=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof Dd?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof Dd?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
12
|
+
`,this;e--}else if(r instanceof Dd){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Dd?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},Md=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new jd(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},Nd=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(V.prototype[Symbol.iterator]=function(){return this.iter()},jd.prototype[Symbol.iterator]=Md.prototype[Symbol.iterator]=Nd.prototype[Symbol.iterator]=function(){return this});var Pd=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function Fd(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Id(e,t,n=!0,r=!0){return bd(e,t,n,r)}function Ld(e){return e>=56320&&e<57344}function Rd(e){return e>=55296&&e<56320}function zd(e,t){let n=e.charCodeAt(t);if(!Rd(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return Ld(r)?(n-55296<<10)+(r-56320)+65536:n}function Bd(e){return e<65536?1:2}var Vd=/\r\n?|\n/,Hd=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(Hd||={}),U=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){Kd(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:Jd(this,e)}mapDesc(e,t=!1){return e.empty?this:qd(this,e,t)}mapPos(e,t=-1,n=Hd.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=Hd.Simple&&c>=e&&(n==Hd.TrackDel&&r<e&&c>e||n==Hd.TrackBefore&&r<e||n==Hd.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},Ud=class e extends U{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return Kd(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return qd(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(V.empty);r.push(a?t.slice(i,i+a):V.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:Jd(this,e,!0)}map(e,t=!1){return e.empty?this:qd(this,e,t,!0)}iterChanges(e,t=!1){Kd(this,e,t)}get desc(){return U.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new Yd(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);Wd(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;Wd(n,e,t),t>0&&Gd(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);Wd(n,e,-1),Wd(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:U.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&Wd(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?V.of(l.split(r||Vd)):l:V.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&Wd(i,e-o,-1),Wd(i,s-e,d),Gd(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(V.empty);r[e]=V.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function Wd(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function Gd(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(V.empty);e.push(n)}}function Kd(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=V.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function qd(e,t,n,r=!1){let i=[],a=r?[]:null,o=new Yd(e),s=new Yd(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);Wd(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(Wd(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(Wd(i,0,o.ins),a&&Gd(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;Wd(i,t,e<o.i?o.ins:0),a&&e<o.i&&Gd(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?Ud.createSet(i,a):U.create(i);else throw Error(`Mismatched change set lengths`)}function Jd(e,t,n=!1){let r=[],i=n?[]:null,a=new Yd(e),o=new Yd(t);for(let e=!1;;)if(a.done&&o.done)return i?Ud.createSet(r,i):U.create(r);else if(a.ins==0)Wd(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)Wd(r,0,o.ins,e),i&&Gd(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;Wd(r,t,n,e),i&&n&&Gd(i,r,o.text)}else o.ins==-1?(Wd(r,a.off?0:a.len,t,e),i&&Gd(i,r,a.textBit(t))):(Wd(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&Gd(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var Yd=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?V.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?V.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},Xd=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return W.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return W.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return W.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},W=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>Xd.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return Xd.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?Xd.create(t,e,a|32,n):Xd.create(e,t,a,n)}static undirectionalRange(e,t){return Xd.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function Zd(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var Qd=0,G=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=Qd++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:$d),!!t.static,t.enables)}of(e){return new ef([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ef(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ef(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function $d(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var ef=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=Qd++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||nf(e,c)){let r=t(e);if(a?!tf(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=gf(o,c);if(this.dependencies.every(t=>t instanceof G?o.facet(t)===e.facet(t):t instanceof of?o.field(t,!1)==e.field(t,!1):!0)||(a?tf(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function tf(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function nf(e,t){let n=!1;for(let r of t)hf(e,r)&1&&(n=!0);return n}function rf(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=gf(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)hf(e,t);return e.values[o]=s(e),1},update(e,n){if(!nf(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=nf(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&$d(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var af=G.define({static:!0}),of=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(Qd++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(af).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(af),i=n.facet(af),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,af.of({field:this,create:e})]}get extension(){return this}},sf={lowest:4,low:3,default:2,high:1,highest:0};function cf(e){return t=>new uf(t,e)}var lf={highest:cf(sf.highest),high:cf(sf.high),default:cf(sf.default),low:cf(sf.low),lowest:cf(sf.lowest)},uf=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},df=class e{of(e){return new ff(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},ff=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},pf=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of mf(t,n,o))e instanceof of?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0))if(s[n.id]=c.length<<1|1,$d(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>rf(e,n,t))}}return new e(t,o,l.map(e=>e(s)),s,c,a)}};function mf(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof ff&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof ff){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof uf)a(e.inner,e.prec);else if(e instanceof of)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof ef)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,sf.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,sf.default),r.reduce((e,t)=>e.concat(t))}function hf(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function gf(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var _f=G.define(),vf=G.define({combine:e=>e.some(e=>e),static:!0}),yf=G.define({combine:e=>e.length?e[0]:void 0,static:!0}),bf=G.define(),xf=G.define(),Sf=G.define(),Cf=G.define({combine:e=>e.length?e[0]:!1}),wf=class{constructor(e,t){this.type=e,this.value=t}static define(){return new Tf}},Tf=class{of(e){return new wf(this,e)}},Ef=class{constructor(e){this.map=e}of(e){return new Df(this,e)}},Df=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Ef(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Df.reconfigure=Df.define(),Df.appendConfig=Df.define();var Of=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&Zd(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Of.time=wf.define(),Of.userEvent=wf.define(),Of.addToHistory=wf.define(),Of.remote=wf.define();function kf(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function Af(e,t,n){let r,i,a;return n?(r=t.changes,i=Ud.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Df.mapEffects(e.effects,r).concat(Df.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function jf(e,t,n){let r=t.selection,i=If(t.annotations);return t.userEvent&&(i=i.concat(Of.userEvent.of(t.userEvent))),{changes:t.changes instanceof Ud?t.changes:Ud.of(t.changes||[],n,e.facet(yf)),selection:r&&(r instanceof W?r:W.single(r.anchor,r.head)),effects:If(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function Mf(e,t,n){let r=jf(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=Af(r,jf(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=Of.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Pf(n?Nf(i):i)}function Nf(e){let t=e.startState,n=!0;for(let r of t.facet(bf)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:kf(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=Ud.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Of.create(t,r,e.selection&&e.selection.map(i),Df.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(xf);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Of?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Of?i[0]:Mf(t,If(i),!1)}return e}function Pf(e){let t=e.startState,n=t.facet(Sf),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=Af(r,jf(t,a,e.changes.newLength),!0))}return r==e?e:Of.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Ff=[];function If(e){return e==null?Ff:Array.isArray(e)?e:[e]}var Lf=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(Lf||={}),Rf=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,zf;try{zf=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function Bf(e){if(zf)return zf.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>``&&(n.toUpperCase()!=n.toLowerCase()||Rf.test(n)))return!0}return!1}function Vf(e){return t=>{if(!/\S/.test(t))return Lf.Space;if(Bf(t))return Lf.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Lf.Word;return Lf.Other}}var Hf=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)hf(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return hf(this,n),gf(this,n)}update(...e){return Mf(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(df.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Df.reconfigure)?(n=null,r=e.value):e.is(Df.appendConfig)&&(n=null,r=If(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=pf.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(vf)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:W.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=If(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Df.mapEffects(a,c).concat(Df.mapEffects(If(o.effects),l))}return{changes:r,selection:W.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof Ud?t:Ud.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return V.of(t.split(this.facet(e.lineSeparator)||Vd))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(hf(this,t),gf(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof of&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:W.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=pf.resolve(t.extensions||[],new Map),r=t.doc instanceof V?t.doc:V.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||Vd)),i=t.selection?t.selection instanceof W?t.selection:W.single(t.selection.anchor,t.selection.head):W.single(0);return Zd(i,r.length),n.staticFacet(vf)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
|
|
13
|
+
`}get readOnly(){return this.facet(Cf)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(_f))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return Vf(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=Id(t,a,!1);if(i(t.slice(e,a))!=Lf.Word)break;a=e}for(;o<r;){let e=Id(t,o);if(i(t.slice(o,e))!=Lf.Word)break;o=e}return a==o?null:W.range(a+n,o+n)}};Hf.allowMultipleSelections=vf,Hf.tabSize=G.define({combine:e=>e.length?e[0]:4}),Hf.lineSeparator=yf,Hf.readOnly=Cf,Hf.phrases=G.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),Hf.languageData=_f,Hf.changeFilter=bf,Hf.transactionFilter=xf,Hf.transactionExtender=Sf,df.reconfigure=Df.define();function Uf(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(!(a===i||i===void 0))if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var Wf=class{eq(e){return this==e}range(e,t=e){return Kf.create(e,t,this)}};Wf.prototype.startSide=Wf.prototype.endSide=0,Wf.prototype.point=!1,Wf.prototype.mapMode=Hd.TrackDel;function Gf(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var Kf=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function qf(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var Jf=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return Xf(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0))if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},Yf=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(qf)),this.isEmpty)return n.length?e.of(n):this;let s=new ep(this,null,-1).goto(0),c=0,l=[],u=new Qf;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(Kf.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new Qf,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[Xf(r)+Xf(n).length,Xf(Xf(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return tp.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return tp.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=$f(a,o,n),c=new rp(a,s,i),l=new rp(o,s,i);n.iterGaps((e,t,n)=>ip(c,e,l,t,n,r)),n.empty&&n.length==0&&ip(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=999999999;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=$f(i,a),s=new rp(i,o,0).goto(n),c=new rp(a,o,0).goto(n);for(;;){if(s.to!=c.to||!ap(s.active,c.active)||s.point&&(!c.point||!Gf(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new rp(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new Qf;for(let r of e instanceof Kf?[e]:t?Zf(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=Xf(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};Yf.empty=new Yf([],[],null,-1);function Xf(e){return e[e.length-1]}function Zf(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(qf(t,r)>0)return e.slice().sort(qf);t=r}return e}Yf.empty.nextLayer=Yf.empty;var Qf=class e{finishChunk(e){this.chunks.push(new Jf(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Yf.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Yf.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function $f(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var ep=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},tp=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new ep(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)np(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)np(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),np(this.heap,0)}}};function np(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var rp=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=tp.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){op(this.active,e),op(this.activeTo,e),op(this.activeRank,e),this.minActive=cp(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;sp(this.active,t,n),sp(this.activeTo,t,r),sp(this.activeRank,t,i),e&&sp(e,t,this.cursor.from),this.minActive=cp(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&op(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function ip(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&Gf(e.point,n.point)&&ap(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&a.boundChange(s),d>s&&!ap(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function ap(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!Gf(e[n],t[n]))return!1;return!0}function op(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function sp(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function cp(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function lp(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=Id(e,i));return r}function up(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=Id(e,r)}return r===!0?-1:e.length}for(var dp=`ͼ`,fp=typeof Symbol>`u`?`__ͼ`:Symbol.for(dp),pp=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),mp=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},hp=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
|
|
14
|
+
`)}static newName(){let e=mp[fp]||1;return mp[fp]=e+1,dp+e.toString(36)}static mount(e,t,n){let r=e[pp],i=n&&n.nonce;r?i&&r.setNonce(i):r=new _p(e,i),r.mount(Array.isArray(t)?t:[t],e)}},gp=new Map,_p=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=gp.get(n);if(t)return e[pp]=t;this.sheet=new r.CSSStyleSheet,gp.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[pp]=this}mount(e,t){let n=this.sheet,r=0,i=0;for(let t=0;t<e.length;t++){let a=e[t],o=this.modules.indexOf(a);if(o<i&&o>-1&&(this.modules.splice(o,1),i--,o=-1),o==-1){if(this.modules.splice(i++,0,a),n)for(let e=0;e<a.rules.length;e++)n.insertRule(a.rules[e],r++)}else{for(;i<o;)r+=this.modules[i++].rules.length;r+=a.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
|
|
15
|
+
`;this.styleTag.textContent=e;let n=t.head||t;this.styleTag.parentNode!=n&&n.insertBefore(this.styleTag,n.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},vp={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},yp={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},bp=typeof navigator<`u`&&/Mac/.test(navigator.platform),xp=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Sp=0;Sp<10;Sp++)vp[48+Sp]=vp[96+Sp]=String(Sp);for(var Sp=1;Sp<=24;Sp++)vp[Sp+111]=`F`+Sp;for(var Sp=65;Sp<=90;Sp++)vp[Sp]=String.fromCharCode(Sp+32),yp[Sp]=String.fromCharCode(Sp);for(var Cp in vp)yp.hasOwnProperty(Cp)||(yp[Cp]=vp[Cp]);function wp(e){var t=!(bp&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||xp&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?yp:vp)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var Tp=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},Ep=typeof document<`u`?document:{documentElement:{style:{}}},Dp=/Edge\/(\d+)/.exec(Tp.userAgent),Op=/MSIE \d/.test(Tp.userAgent),kp=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Tp.userAgent),Ap=!!(Op||kp||Dp),jp=!Ap&&/gecko\/(\d+)/i.test(Tp.userAgent),Mp=!Ap&&/Chrome\/(\d+)/.exec(Tp.userAgent),Np=`webkitFontSmoothing`in Ep.documentElement.style,Pp=!Ap&&/Apple Computer/.test(Tp.vendor),Fp=Pp&&(/Mobile\/\w+/.test(Tp.userAgent)||Tp.maxTouchPoints>2),K={mac:Fp||/Mac/.test(Tp.platform),windows:/Win/.test(Tp.platform),linux:/Linux|X11/.test(Tp.platform),ie:Ap,ie_version:Op?Ep.documentMode||6:kp?+kp[1]:Dp?+Dp[1]:0,gecko:jp,gecko_version:jp?+(/Firefox\/(\d+)/.exec(Tp.userAgent)||[0,0])[1]:0,chrome:!!Mp,chrome_version:Mp?+Mp[1]:0,ios:Fp,android:/Android\b/.test(Tp.userAgent),webkit:Np,webkit_version:Np?+(/\bAppleWebKit\/(\d+)/.exec(Tp.userAgent)||[0,0])[1]:0,safari:Pp,safari_version:Pp?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Tp.userAgent)||[0,0])[1]:0,tabSize:Ep.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function Ip(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var Lp=Object.create(null);function Rp(e,t,n){if(e==t)return!0;e||=Lp,t||=Lp;let r=Object.keys(e),i=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function zp(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function Bp(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function Vp(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var Hp=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},Up=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(Up||={}),Wp=class extends Wf{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Gp(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new qp(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=Jp(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new qp(e,n,r,t,e.widget||null,!0)}static line(e){return new Kp(e)}static set(e,t=!1){return Yf.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};Wp.none=Yf.empty;var Gp=class e extends Wp{constructor(e){let{start:t,end:n}=Jp(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?Ip(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Lp}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&Rp(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};Gp.prototype.point=!1;var Kp=class e extends Wp{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&Rp(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};Kp.prototype.mapMode=Hd.TrackBefore,Kp.prototype.point=!0;var qp=class e extends Wp{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?Hd.TrackBefore:Hd.TrackAfter:Hd.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?Up.WidgetBefore:Up.WidgetAfter:Up.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&Yp(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};qp.prototype.point=!0;function Jp(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function Yp(e,t){return e==t||!!(e&&t&&e.compare(t))}function Xp(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var Zp=class e extends Wf{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&Rp(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||Lp,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return Yf.of(e,t)}};Zp.prototype.startSide=Zp.prototype.endSide=-1;function Qp(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function $p(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function em(e,t){if(!t.anchorNode)return!1;try{return $p(e,t.anchorNode)}catch{return!1}}function tm(e){return e.nodeType==3?vm(e,0,e.nodeValue.length).getClientRects():e.nodeType==1?e.getClientRects():[]}function nm(e,t,n,r){return n?am(e,t,n,r,-1)||am(e,t,n,r,1):!1}function rm(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function im(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function am(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:om(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||n.nodeType!=1)return!1;t=rm(e)+(i<0?0:1),e=n}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.nodeType==1&&e.contentEditable==`false`)return!1;t=i<0?om(e):0}else return!1}}function om(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function sm(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function cm(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function lm(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function um(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(u.nodeType==1){let e,f=u==c.body,p=1,m=1;if(f)e=cm(l);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();({scaleX:p,scaleY:m}=lm(u,t)),e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*m}}let h=0,g=0;if(i==`nearest`)t.top<e.top+o?(g=t.top-(e.top+o),n>0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(g=t.bottom-e.bottom+o,n<0&&t.top-g<e.top&&(g=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;g=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}if(r==`nearest`?t.left<e.left+a?(h=t.left-(e.left+a),n>0&&t.right>e.right+h&&(h=t.right-e.right+a)):t.right>e.right-a&&(h=t.right-e.right+a,n<0&&t.left<e.left+h&&(h=t.left-(e.left+a))):h=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left,h||g)if(f)l.scrollBy(h,g);else{let e=0,n=0;if(g){let e=u.scrollTop;u.scrollTop+=g/m,n=(u.scrollTop-e)*m}if(h){let t=u.scrollLeft;u.scrollLeft+=h/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-h)<1&&(r=`nearest`),n&&Math.abs(n-g)<1&&(i=`nearest`)}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function dm(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(a.nodeType==1)!i&&a.scrollHeight>a.clientHeight&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var fm=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?om(t):0),n,Math.min(e.focusOffset,n?om(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function pm(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)n.nodeType==1&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function mm(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var hm=null;K.safari&&K.safari_version>=26&&(hm=!1);function gm(e){if(e.setActive)return e.setActive();if(hm)return e.focus(hm);let t=pm(e);e.focus(hm==null?{get preventScroll(){return hm={preventScroll:!0},!0}}:void 0),hm||(hm=!1,mm(t))}var _m;function vm(e,t,n=t){let r=_m||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function ym(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function bm(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function xm(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,om(n));;)if(r){if(n.nodeType!=1)return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=om(n))}else if(n==e)return!0;else r=rm(n),n=n.parentNode}function Sm(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function Cm(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=om(n)}else if(n.parentNode&&!im(n))r=rm(n),n=n.parentNode;else return null}function wm(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!im(n))r=rm(n)+1,n=n.parentNode;else return null}var Tm=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,rm(t),n)}static after(t,n){return new e(t.parentNode,rm(t)+1,n)}},Em=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(Em||={}),Dm=Em.LTR,Om=Em.RTL;function km(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var Am=km(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),jm=km(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),Mm=Object.create(null),Nm=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);Mm[t]=n,Mm[n]=-t}function Pm(e){return e<=247?Am[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?jm[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var Fm=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,Im=class{get dir(){return this.level%2?Om:Dm}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function Lm(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Lm(r.inner,i.inner))return!1}return!0}var Rm=[];function zm(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=Pm(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),Rm[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=Rm[e];if(i==128)e<s-1&&t==Rm[e+1]&&t&24?i=Rm[e]=t:Rm[e]=256;else if(i==64){let i=e+1;for(;i<s&&Rm[i]==64;)i++;let a=e&&t==8||i<n&&Rm[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)Rm[t]=a;e=i-1}else i==8&&r==1&&(Rm[e]=1);t=i,i&7&&(r=i)}}}function Bm(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=Mm[n=e.charCodeAt(t)])if(r<0){for(let e=s-3;e>=0;e-=3)if(Nm[e+1]==-r){let n=Nm[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(Rm[t]=Rm[Nm[e]]=r),s=e;break}}else if(Nm.length==189)break;else Nm[s++]=t,Nm[s++]=n,Nm[s++]=c;else if((o=Rm[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=Nm[t+2];if(n&2)break;if(e)Nm[t+2]|=2;else{if(n&4)break;Nm[t+2]|=4}}}}}function Vm(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=Rm[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(Rm[o]==256)o++;else break;let l=a==1,u=l==((o<t?Rm[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),Rm[--t]=u;c=o}else a=o,c++}}}function Hm(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=Rm[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(Rm[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new Im(c,m.from,f)),Um(e,m.direction==Dm==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?Rm[p]!=s:Rm[p]==s))break;else p++;d?Hm(e,c,p,r+1,i,d,o):c<p&&o.push(new Im(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=Rm[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(Rm[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new Im(m.to,c,f)),Um(e,m.direction==Dm==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?Rm[p-1]!=s:Rm[p-1]==s))break;else p--;d?Hm(e,p,c,r+1,i,d,o):p<c&&o.push(new Im(p,c,f)),c=p}}function Um(e,t,n,r,i,a,o){let s=t%2?2:1;zm(e,i,a,r,s),Bm(e,i,a,r,s),Vm(i,a,r,s),Hm(e,i,a,t,n,r,o)}function Wm(e,t,n){if(!e)return[new Im(0,0,+(t==Om))];if(t==Dm&&!n.length&&!Fm.test(e))return Gm(e.length);if(n.length)for(;e.length>Rm.length;)Rm[Rm.length]=256;let r=[],i=t==Dm?0:1;return Um(e,i,i,n,0,e.length,r),r}function Gm(e){return[new Im(0,e,0)]}var Km=``;function qm(e,t,n,r,i){let a=r.head-e.from,o=Im.find(t,a,r.bidiLevel??-1,r.assoc),s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=Id(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),Km=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];return u&&l==c&&u.level+ +!i<s.level?W.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level):W.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function Jm(e,t,n){for(let r=t;r<n;r++){let t=Pm(e.charCodeAt(r));if(t==1)return Dm;if(t==2||t==4)return Om}return Dm}var Ym=G.define(),Xm=G.define(),Zm=G.define(),Qm=G.define(),$m=G.define(),eh=G.define(),th=G.define(),nh=G.define(),rh=G.define(),ih=G.define({combine:e=>e.some(e=>e)}),ah=G.define({combine:e=>e.some(e=>e)}),oh=G.define(),sh=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(W.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},ch=Df.define({map:(e,t)=>e.map(t)}),lh=Df.define();function uh(e,t,n){let r=e.facet(Qm);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var dh=G.define({combine:e=>e.length?e[0]:!0}),fh=0,ph=G.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),mh=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(ph.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(ph.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(fh++,t,r,i,e=>{let t=[];return o&&t.push(vh.of(t=>{let n=t.plugin(e);return n?o(n):Wp.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},hh=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){uh(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(uh(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){uh(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},gh=G.define(),_h=G.define(),vh=G.define(),yh=G.define(),bh=G.define(),xh=G.define(),Sh=G.define();function Ch(e,t){let n=e.state.facet(Sh);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return Yf.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let n=r[e].spec.bidiIsolate,i;if(n??=Jm(t.text,o,s),a>0&&c.length&&(i=c[c.length-1]).to==o&&i.direction==n)i.to=s,c=i.inner;else{let e={from:o,to:s,direction:n,inner:[]};c.push(e),c=e.inner}}}}),i}var wh=G.define();function Th(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(wh)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var Eh=G.define(),Dh=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},Oh=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Ud.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new Dh(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},kh=[],Ah=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return kh}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&zp(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=rm(this.dom),r=this.length?e>0:t>0;return new Tm(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Nh)return e;return null}static get(e){return e.cmTile}},jh=class extends Ah{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=Mh(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=Mh(r);this.length=a}};function Mh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var Nh=class extends jh{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=Ah.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof Ph)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},Ph=class e extends jh{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},Fh=class e extends jh{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||a.isHidden&&(t>0&&!(a.flags&32)||n&&Lh(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!d.isHidden&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):Ih(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new Tm(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new Tm(e.dom,0);e==n.tile&&(a=!0)}}return new Tm(this.dom,0)}};function Ih(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=tm(t);return n[n.length-1]||null}function Lh(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var Rh=class e extends jh{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},zh=class e extends Ah{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?K.chrome||K.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=vm(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return K.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:sm(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},Bh=class e extends Ah{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return sm(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return sm(n,!r)}}get overrideDOMText(){if(!this.length)return V.empty;let{root:e}=this;if(!e)return V.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},Vh=class extends Ah{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return V.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:sm(r,t>0==n)}},Hh=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},Uh=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},Wh=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new zh(a.dom,a.text+e);t.parent=i}else i.append(r||zh.of(e,this.cache.find(zh)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?eg(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof Rh&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(eg(n.dom)),r=i;else{if(this.cache.reused.get(n)){let e=Ah.get(n.dom);e&&e.setDOM(eg(n.dom))}let e=Rh.of(n.mark,n.dom);r.append(e),r=e}this.cache.reused.set(n,2)}let i=Ah.get(e.text);i&&this.cache.reused.set(i,2);let a=new zh(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=Zh;let n=Fh.start(e,t||this.cache.find(Fh)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof Rh&&a.mark.eq(i))n=a,t--;else{let e=Rh.of(i,this.cache.find(Rh,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Yh(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(K.ios&&Yh(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(ng,0,32)||new Bh(ng.toDOM(),0,ng,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new Uh(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof Ph&&n.wrapper.eq(t.wrapper))e=n;else{let n=Ph.of(t.wrapper,this.cache.find(Ph,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Vh,void 0,1);return n&&(n.flags=t),n||new Vh(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},Gh=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},Kh=[Bh,Fh,zh,Rh,Vh,Ph,Nh];for(let e=0;e<Kh.length;e++)Kh[e].bucket=e;var qh=class{constructor(e){this.view=e,this.buckets=Kh.map(()=>[]),this.index=Kh.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new Bh(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},Jh=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new qh(e),this.text=new Gh(e.state.doc),this.builder=new Wh(this.cache,new Nh(e,e.contentDOM),Yf.iter(n)),this.cache.reused.set(t,2),this.old=new Hh(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=$h(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget())if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?Bh.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof Vh)this.cache.add(e);else if(e instanceof Rh)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof Rh&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof Rh&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=Yf.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof qp){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?tg.block:tg.inline),c=Xh(a),l=this.cache.findWidget(i,t-e,c)||Bh.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=Qh(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=Ah.get(r);if(r==this.view.contentDOM)break;e instanceof Rh?t.push(e):e?.isLine()?n=e:e instanceof Ph||(r.nodeName==`DIV`&&!n&&r!=this.view.contentDOM?n=new Fh(r,Zh):n||t.push(Rh.of(new Gp({tagName:r.nodeName.toLowerCase(),attributes:Vp(r)}),r)))}return{line:n,marks:t}}};function Yh(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function Xh(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var Zh={class:`cm-line`};function Qh(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&Ip(n,e),r&&(e.class+=` `+r),e)}function $h(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof Rh&&t.push(r.mark)}return t}function eg(e){let t=Ah.get(e);return t&&t.setDOM(e.cloneNode()),e}var tg=class extends Hp{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};tg.inline=new tg(`span`),tg.block=new tg(`div`);var ng=new class extends Hp{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},rg=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Wp.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Nh(e,e.contentDOM),this.updateInner([new Dh(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!mg(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?sg(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new Dh(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(K.ie||K.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=ug(i,this.decorations,e.changes);o.length&&(t=Dh.extendWithRanges(t,o));let s=fg(a,this.blockWrappers,e.changes);return s.length&&(t=Dh.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new Jh(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Ah.get(t.text)&&r.cache.reused.set(Ah.get(t.text),2),this.tile=r.run(e,t),ig(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=K.chrome||K.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof hg&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(lh)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(dh)||n.tabIndex>-1)&&em(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),K.gecko&&s.empty&&!this.hasComposition&&ag(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new Tm(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!nm(c.node,c.offset,u.anchorNode,u.anchorOffset)||!nm(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{K.android&&K.chrome&&n.contains(u.focusNode)&&pg(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=Qp(this.view.root);if(e)if(s.empty){if(K.gecko){let e=cg(c.node,c.offset);if(e&&e!=3){let t=(e==1?Cm:wm)(c.node,c.offset);t&&(c=new Tm(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new Tm(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new Tm(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&nm(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Qp(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=om(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!Ah.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof hg?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=Id(e.text,t);if(n==t)return null;let r=vm(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==Em.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof Ph)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?tm(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?Em.RTL:Em.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=tm(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=tm(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Wp.replace({widget:new hg(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return Wp.set(e)}updateDeco(){let e=1,t=this.view.state.facet(vh).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(bh).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Yf.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(yh).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(oh))try{if(t(this.view,e.range,e))return!0}catch(e){uh(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=Th(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(um(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==Em.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=pm(e.dom);e.dom.scrollIntoView({block:`nearest`}),mm(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){ig(this.tile)}};function ig(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)ig(n,t)}}function ag(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function og(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=Cm(n.focusNode,n.focusOffset),i=wm(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=Ah.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=Ah.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function sg(e,t,n){let r=og(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new Dh(c.mapPos(a),c.mapPos(o),a,o),text:i}}function cg(e,t){return e.nodeType==1?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var lg=class{constructor(){this.changes=[]}compareRange(e,t){Xp(e,t,this.changes)}comparePoint(e,t){Xp(e,t,this.changes)}boundChange(e){Xp(e,e,this.changes)}};function ug(e,t,n){let r=new lg;return Yf.compare(e,t,n,r),r.changes}var dg=class{constructor(){this.changes=[]}compareRange(e,t){Xp(e,t,this.changes)}comparePoint(){}boundChange(e){Xp(e,e,this.changes)}};function fg(e,t,n){let r=new dg;return Yf.compare(e,t,n,r),r.changes}function pg(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable==`false`)return!0;return!1}function mg(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var hg=class extends Hp{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function gg(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return W.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=Id(i.text,a,!1):s=Id(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=Id(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=Id(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return W.undirectionalRange(o+i.from,s+i.from)}function _g(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+up(o,a,e.state.tabSize)}function vg(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==Up.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function yg(e,t,n,r){let i=vg(e,t.head,t.assoc||-1),a=!r||i.type!=Up.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAtCoords({x:n==(r==Em.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o!=null)return W.cursor(o,n?-1:1)}return W.cursor(n?i.to:i.from,n?-1:1)}function bg(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=qm(i,a,o,s,n),l=Km;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
|
|
16
|
+
`,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=e.visualLineSide(i,!n)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function xg(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==Lf.Space&&(i=t),i==t}}function Sg(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return W.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=Dg(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return W.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return W.cursor(i.pos,i.assoc,void 0,o)}}function Cg(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function wg(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=Cg(e,i.from,0);t!=i.from&&(a=W.cursor(t,-1))}else{let t=Cg(e,i.from,-1),n=Cg(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?W.undirectionalRange(i.from,i.to):W.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?W.create(n,t.mainIndex):t}function Tg(e,t,n){let r=Cg(e.state.facet(xh).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:W.cursor(r,r<n.from?1:-1)}var Eg=class{constructor(e,t){this.pos=e,this.assoc=t}};function Dg(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new Eg(0,1);if(c>e.viewState.docHeight)return new Eg(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==Up.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==Up.Text){let t=_g(e,i,l,o,s);return new Eg(t,t==l.from?1:-1)}}if(l.type!=Up.Text)return c<(l.top+l.bottom)/2?new Eg(l.from,1):new Eg(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new Og(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var Og=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Im.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[Im.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1))if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==Em.LTR)?-1:1)}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==Em.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=Id(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return vm(e.dom,i,a).getClientRects()});return r.after?new Eg(n[r.i+1],-1):new Eg(n[r.i],1)}scanTile(e,t){if(!e.length)return new Eg(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(n.dom.nodeType==1?n.dom:vm(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new Eg(n[r.i+1],-1):new Eg(a,1)}},kg=``,Ag=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(Hf.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=kg}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=Ah.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=Ah.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:im(r))||im(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!Mg(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=Ah.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(e.nodeType==3?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(jg(e,n.node,n.offset)?t:0))}};function jg(e,t,n){for(;;){if(!t||n<om(t))return!1;if(t==e)return!0;n=rm(t)+1,t=t.parentNode}}function Mg(e,t){let n;for(;!(e==t||!e);e=e.nextSibling){let t=Ah.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var Ng=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},Pg=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=Fg(e.docView.tile,t,n,0))){let t=i||a?[]:Bg(e),n=new Ag(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=Vg(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!$p(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!$p(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((K.ios||K.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(W.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=W.create([W.cursor(n,r)])}else this.newSel=W.single(r,n)}}};function Fg(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return Fg(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function Ig(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||K.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,kg),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:V.of(t.text.slice(a.from-e,u).split(kg))}:(d=zg(l,t.text,s-e,c))&&(K.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==``&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:V.of(t.text.slice(d.from,d.toB).split(kg))})}else r&&(!e.hasFocus&&i.facet(dh)||Hg(r,a))&&(r=null);if(!n&&!r)return!1;if((K.mac||K.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=W.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:V.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:K.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
|
|
17
|
+
`&&e.lineWrapping&&(r&&=W.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:V.of([` `])}),n)return Lg(e,n,r,o);if(r&&!Hg(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=wg(i.facet(xh).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}else return!1}function Lg(e,t,n,r=-1){if(K.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(K.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&ym(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&ym(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&ym(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=Rg(e,t,n);return e.state.facet(eh).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function Rg(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=Cg(i.facet(xh).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:W.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&og(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?W.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function zg(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function Bg(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new Ng(n,r)),(i!=n||a!=r)&&t.push(new Ng(i,a))),t}function Vg(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n>-1&&r>-1?W.single(n+t,r+t):null}function Hg(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var Ug=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,K.safari&&e.contentDOM.addEventListener(`input`,()=>null),K.gecko&&E_(e.contentDOM.ownerDocument)}handleEvent(e){!r_(this.view,e)||this.ignoreDuringComposition(e)||e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e)))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=Kg(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Yg.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),K.android&&K.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(K.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(qg.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||Jg.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};return t.shiftKey&&K.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&Wg(this.view.win)&&(t.shiftKey=!1),this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t},setTimeout(()=>this.flushIOSKey(),50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,ym(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:K.safari&&!K.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function Wg(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function Gg(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){uh(n.state,e)}}}function Kg(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(Gg(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(Gg(t.value,r))}}for(let e in i_)n(e).handlers.push(i_[e]);for(let e in a_)n(e).observers.push(a_[e]);return t}var qg=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],Jg=`dthko`,Yg=[16,17,18,20,91,92,224,225],Xg=6;function Zg(e){return Math.max(0,e)*.7+8}function Qg(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var $g=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=dm(e.contentDOM),this.atoms=e.state.facet(xh).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Hf.allowMultipleSelections)&&e_(e,t),this.dragging=n_(e,t)&&h_(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&Qg(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=Th(this.view);e.clientX-s.left<=r+Xg?t=-Zg(r-e.clientX):e.clientX+s.right>=a-Xg&&(t=Zg(e.clientX-a)),e.clientY-s.top<=i+Xg?n=-Zg(i-e.clientY):e.clientY+s.bottom>=o-Xg&&(n=Zg(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=wg(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function e_(e,t){let n=e.state.facet(Ym);return n.length?n[0](t):K.mac?t.metaKey:t.ctrlKey}function t_(e,t){let n=e.state.facet(Xm);return n.length?n[0](t):K.mac?!t.altKey:!t.ctrlKey}function n_(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Qp(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function r_(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Ah.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var i_=Object.create(null),a_=Object.create(null),o_=K.ie&&K.ie_version<15||K.ios&&K.webkit_version<604;function s_(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),l_(e,n.value)},50)}function c_(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function l_(e,t){t=c_(e.state,nh,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(x_!=null&&n.selection.ranges.every(e=>e.empty)&&x_==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:W.cursor(r.from+c.length)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:W.cursor(e.from+t.length)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}a_.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,K.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},a_.wheel=a_.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},i_.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),a_.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},a_.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},a_.touchend=(e,t)=>{e.inputState.touchActive=!1},i_.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(Zm))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=g_(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new $g(e,t,n,r)),r&&e.observer.ignore(()=>{gm(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function u_(e,t,n,r){if(r==1)return W.cursor(t,n);if(r==2)return gg(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,W.undirectionalRange(a,o)}}var d_=K.ie&&K.ie_version<=11,f_=null,p_=0,m_=0;function h_(e){if(!d_)return e.detail;let t=f_,n=m_;return f_=e,m_=Date.now(),p_=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(p_+1)%3:1}function g_(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=h_(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=u_(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=u_(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?W.range(i,a,l.assoc):W.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=__(i,s.pos))?c:o?i.addRange(l):W.create([l])}}}function __(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return W.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}i_.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=W.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,c_(e.state,rh,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},i_.dragend=e=>(e.inputState.draggedContent=null,!1);function v_(e,t,n,r){if(n=c_(e.state,nh,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&t_(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}i_.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&v_(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}else{let n=t.dataTransfer.getData(`Text`);if(n)return v_(e,t,n,!0),!0}return!1},i_.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=o_?null:t.clipboardData;return n?(l_(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(s_(e),!1)};function y_(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function b_(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:c_(e,rh,t.join(e.lineBreak)),ranges:n,linewise:r}}var x_=null;i_.copy=i_.cut=(e,t)=>{if(!em(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=b_(e.state);if(!n&&!i)return!1;x_=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=o_?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(y_(e,n),!1)};var S_=wf.define();function C_(e,t){let n=[];for(let r of e.facet(th)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:S_.of(!0)}):null}function w_(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=C_(e.state,t);n?e.dispatch(n):e.update([])}},10)}a_.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),w_(e)},a_.blur=e=>{e.observer.clearSelectionRange(),w_(e)},a_.compositionstart=a_.compositionupdate=e=>{e.observer.editContext||(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0))},a_.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,K.chrome&&K.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},a_.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},i_.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return Lg(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(K.chrome&&K.android&&(n=qg.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return K.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),K.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>a_.compositionend(e,t),20),!1};var T_=new Set;function E_(e){T_.has(e)||(T_.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var D_=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],O_=!1;function k_(){O_=!1}var A_=class{constructor(e){this.lineWrapping=e,this.doc=V.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return D_.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=D_.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},j_=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},M_=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?Up.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof qp?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},N_=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(N_||={}),P_=.001,F_=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>P_&&(O_=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,N_.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,N_.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,N_.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=W_.build(n.setDoc(a),e,l,u);i=I_(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new z_(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r)if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break;else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=0;return t[n-1]==null?(o=1,n--):t[n]??(o=1,r++),new V_(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function I_(e,t){return e==t?e:(e.constructor!=t.constructor&&(O_=!0),t)}F_.prototype.size=1;var L_=Wp.replace({}),R_=class extends F_{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new M_(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new M_(r,0,n,this.spaceAbove,L_):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,N_.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},z_=class e extends R_{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new M_(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof B_&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof B_?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):F_.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},B_=class e extends F_{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new M_(a.from,a.length,l,c,0)}else{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new M_(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==N_.ByHeight)return this.blockAt(e,n,r,i);if(t==N_.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new M_(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new M_(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new M_(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return F_.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=P_&&(s=-2);let c=new z_(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=F_.of(r);return(s<0||Math.abs(c.height-this.height)>=P_||Math.abs(s-this.heightMetrics(t,n).perLine)>=P_)&&(O_=!0),I_(this,c)}else (r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}},V_=class extends F_{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==N_.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==N_.ByPosNoHeight?N_.ByPosNoHeight:N_.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,N_.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,c.from-1,n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(c.to+1,t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&H_(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),H_(i,e)}return F_.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?F_.of(this.break?[e,null,t]:[e,t]):(this.left=I_(this.left,e),this.right=I_(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function H_(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof B_&&(r=e[t+1])instanceof B_&&e.splice(t-1,3,new B_(n.length+1+r.length))}var U_=5,W_=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof z_?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new z_(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new R_(a,r,n)):(a||i||r>=U_)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new z_(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new B_(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof z_)return e;let t=new z_(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof z_)&&!this.isCovered?this.nodes.push(new z_(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof z_&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return Yf.spans(n,r,i,a,0),a.finish(r)}};function G_(e,t,n){let r=new K_;return Yf.compare(e,t,n,r,0),r.changes}var K_=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&Xp(e,t,this.changes,5)}};function q_(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(t.nodeType==1){let n=t,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&r.overflow!=`visible`){let r=n.getBoundingClientRect();a=Math.max(a,r.left),o=Math.min(o,r.right),s=Math.max(s,r.top),c=Math.min(t==e.parentNode?i.innerHeight:c,r.bottom)}t=r.position==`absolute`||r.position==`fixed`?n.offsetParent:n.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function J_(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function Y_(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var X_=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return Wp.replace({widget:new Z_(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},Z_=class extends Hp{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},Q_=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=iv,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Em.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(_h).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new A_(n),this.stateDeco=av(t),this.heightMap=F_.empty().applyChanges(this.stateDeco,V.empty,this.heightOracle.setDoc(t.doc),[new Dh(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Wp.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new $_(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?iv:new ov(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(sv(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=av(this.state);let r=e.changedRanges,i=Dh.extendWithRanges(r,G_(n,this.stateDeco,e?e.changes:Ud.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);k_(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||O_)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(ah)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?Em.RTL:Em.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=lm(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=dm(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=Sm(this.scrollParent||e.win);let m=(this.printing?Y_:q_)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!J_(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),k_();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?F_.empty().applyChanges(this.stateDeco,V.empty,this.heightOracle,[new Dh(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new j_(n.from,i))}O_&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new $_(r.lineAt(a-n*1e3,N_.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,N_.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,N_.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new $_(r.lineAt(o-1e3/2,N_.ByHeight,i,0,0).from,r.lineAt(o+n+1e3/2,N_.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new $_(this.heightMap.lineAt(n,N_.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,N_.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,N_.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,N_.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2*1e3&&i<o+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new X_(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=Em.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=rv(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(W.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new X_(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=Up.Text)return;let i=ev(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=nv(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=tv(i,n),l=tv(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=nv(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=tv(i,f),l=tv(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=nv(r,n)-nv(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){X_.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Wp.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Yf.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||sv(this.heightMap.lineAt(e,N_.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||sv(this.heightMap.lineAt(this.scaler.fromDOM(e),N_.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return sv(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},$_=class{constructor(e,t){this.from=e,this.to=t}};function ev(e,t,n){let r=[],i=e,a=0;return Yf.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function tv({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function nv(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function rv(e,t){for(let n of e)if(t(n))return n}var iv={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function av(e){let t=e.facet(vh).filter(e=>typeof e!=`function`),n=e.facet(bh).filter(e=>typeof e!=`function`);return n.length&&t.push(Yf.join(n)),t}var ov=class e{constructor(e,t,n){let r=0,i=0,a=0;this.viewports=n.map(({from:n,to:i})=>{let a=t.lineAt(n,N_.ByPos,e,0,0).top,o=t.lineAt(i,N_.ByPos,e,0,0).bottom;return r+=o-a,{from:n,to:i,top:a,bottom:o,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=a+(e.top-i)*this.scale,a=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e?this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to):!1}};function sv(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new M_(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>sv(e,t)):e._content)}var cv=G.define({combine:e=>e.join(` `)}),lv=G.define({combine:e=>e.indexOf(!0)>-1}),uv=hp.newName(),dv=hp.newName(),fv=hp.newName(),pv={"&light":`.`+dv,"&dark":`.`+fv};function mv(e,t,n){return new hp(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var hv=mv(`.`+uv,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`text-top`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},pv),gv={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},_v=K.ie&&K.ie_version<=11,vv=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new fm,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(K.ie&&K.ie_version<=11||K.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&K.android&&e.constructor.EDIT_CONTEXT!==!1&&!(K.chrome&&K.chrome_version<126)&&(this.editContext=new Sv(e),e.state.facet(dh)&&(e.contentDOM.editContext=this.editContext.editContext)),_v&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type==`change`||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(dh)?n.root.activeElement!=this.dom:!em(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(K.ie&&K.ie_version<=11||K.android&&K.chrome)&&!n.state.selection.main.empty&&r.focusNode&&nm(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Qp(e.root);if(!t)return!1;let n=K.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&xv(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=em(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&xm(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,gv),_v&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),_v&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&ym(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&em(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Pg(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=Ig(this.view,t);return this.view.state==n&&(t.domChanged||t.newSel&&!Hg(this.view.state.selection,t.newSel.main))&&this.view.update([]),r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=yv(t,e.previousSibling||e.target.previousSibling,-1),r=yv(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type==`characterData`)return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(dh)!=e.state.facet(dh)&&(e.view.contentDOM.editContext=e.state.facet(dh)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function yv(e,t,n){for(;t;){let r=Ah.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function bv(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return nm(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function xv(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return bv(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?bv(e,n):null}var Sv=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=zg(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=W.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));Hg(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:V.of(n.text.slice(l.from,l.toB).split(`
|
|
18
|
+
`))};if((K.mac||K.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:V.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);Lg(e,u,W.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(Wp.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:lh.of(Wp.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=Qp(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to)if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}else r=null,this.revertPending(e.state);if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},q=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||bm(e.parent)||document,this.viewState=new Q_(this,e.state||Hf.create(e)),e.scrollTo&&e.scrollTo.is(ch)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ph).map(e=>new hh(e));for(let e of this.plugins)e.update(this);this.observer=new vv(this),this.inputState=new Ug(this),this.inputState.ensureHandlers(this.plugins),this.docView=new rg(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Of?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(S_))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=C_(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(Hf.phrases)!=this.state.facet(Hf.phrases))return this.setState(a);i=Oh.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new sh(t.empty?t:W.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(ch)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Tv.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(Eh)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(cv)!=i.state.facet(cv)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet($m))try{e(i)}catch(e){uh(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!Ig(this,u)&&l.force&&ym(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new Q_(this,e),this.plugins=e.facet(ph).map(e=>new hh(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new rg(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(ph),n=e.state.facet(ph);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new hh(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){uh(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(Sm(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return uh(this.state,e),wv}}),u=Oh.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=wv)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){uh(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(K.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet($m))e(t)}get themeClasses(){return uv+` `+(this.state.facet(lv)?fv:dv)+` `+this.state.facet(cv)}updateAttrs(){let e=Ev(this,gh,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(dh)?`true`:`false`,class:`cm-content`,style:`${K.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),Ev(this,_h,t);let n=this.observer.ignore(()=>{let n=Bp(this.contentDOM,this.contentAttrs,t),r=Bp(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&(this.announceDOM.textContent=``),n=!1;let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(Eh);let t=this.state.facet(e.cspNonce);hp.mount(this.root,this.styleModules.concat(hv).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return Tg(this,e,bg(this,e,t,n))}moveByGroup(e,t){return Tg(this,e,bg(this,e,t,t=>xg(this,e.head,t)))}visualLineSide(e,t){let n=this.bidiSpans(e),r=this.textDirectionAt(e.from),i=n[t?n.length-1:0];return W.cursor(i.side(t,r)+e.from,i.forward(!t,r)?1:-1)}moveToLineBoundary(e,t,n=!0){return yg(this,e,t,n)}moveVertically(e,t,n){return Tg(this,e,Sg(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=Dg(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Dg(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[Im.find(r,e-n.from,-1,t)];return this.docView.coordsAt(e,t,i.dir==Em.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(ih)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Cv)return Gm(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||Lm(r.isolates,n=Ch(this,e))))return r.order;n||=Ch(this,e);let r=Wm(e.text,t,n);return this.bidiCache.push(new Tv(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||K.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{gm(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return ch.of(new sh(typeof e==`number`?W.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return ch.of(new sh(W.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return mh.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return mh.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=hp.newName(),r=[cv.of(n),Eh.of(mv(`.${n}`,e))];return t&&t.dark&&r.push(lv.of(!0)),r}static baseTheme(e){return lf.lowest(Eh.of(mv(`.`+uv,e,pv)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&Ah.get(t)||Ah.get(e))?.root?.view||null}};q.styleModule=Eh,q.inputHandler=eh,q.clipboardInputFilter=nh,q.clipboardOutputFilter=rh,q.scrollHandler=oh,q.focusChangeEffect=th,q.perLineTextDirection=ih,q.exceptionSink=Qm,q.updateListener=$m,q.editable=dh,q.mouseSelectionStyle=Zm,q.dragMovesSelection=Xm,q.clickAddsSelectionRange=Ym,q.decorations=vh,q.blockWrappers=yh,q.outerDecorations=bh,q.atomicRanges=xh,q.bidiIsolatedRanges=Sh,q.cursorScrollMargin=G.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),q.scrollMargins=wh,q.darkTheme=lv,q.cspNonce=G.define({combine:e=>e.length?e[0]:``}),q.contentAttributes=_h,q.editorAttributes=gh,q.lineWrapping=q.contentAttributes.of({class:`cm-lineWrapping`}),q.announce=Df.define();var Cv=4096,wv={},Tv=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:Em.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function Ev(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&Ip(a,n)}return n}var Dv=K.mac?`mac`:K.windows?`win`:K.linux?`linux`:`key`;function Ov(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function kv(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var Av=lf.default(q.domEventHandlers({keydown(e,t){return Rv(Nv(t.state),e,t,`editor`)}})),jv=G.define({enables:Av}),Mv=new WeakMap;function Nv(e){let t=e.facet(jv),n=Mv.get(t);return n||Mv.set(t,n=Iv(t.reduce((e,t)=>e.concat(t),[]))),n}var Pv=null,Fv=4e3;function Iv(e,t=Dv){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>Ov(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=Pv={view:t,prefix:n,scope:e};return setTimeout(()=>{Pv==r&&(Pv=null)},Fv),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,Lv))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var Lv=null;function Rv(e,t,n,r){Lv=t;let i=wp(t),a=Bd(zd(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;Pv&&Pv.view==n&&Pv.scope==r&&(o=Pv.prefix+` `,Yg.indexOf(t.keyCode)<0&&(c=!0,Pv=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+kv(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(K.windows&&t.ctrlKey&&t.altKey)&&!(K.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=vp[t.keyCode])&&p!=i?(d(f[o+kv(p,t,!0)])||t.shiftKey&&(m=yp[t.keyCode])!=i&&m!=p&&d(f[o+kv(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+kv(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),Lv=null,s}K.gecko&&K.gecko_version,/x/.unicode;function zv(){return Vv}var Bv=Wp.line({class:`cm-activeLine`}),Vv=mh.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(Bv.range(i.from)),t=i.from)}return Wp.set(n)}},{decorations:e=>e.decorations}),Hv=class extends Wf{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};Hv.prototype.elementClass=``,Hv.prototype.toDOM=void 0,Hv.prototype.mapMode=Hd.TrackBefore,Hv.prototype.startSide=Hv.prototype.endSide=-1,Hv.prototype.point=!0;var Uv=G.define(),Wv=G.define(),Gv={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>Yf.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},Kv=G.define();function qv(e){return[Yv(),Kv.of({...Gv,...e})]}var Jv=G.define({combine:e=>e.some(e=>e)});function Yv(e){let t=[Xv];return e&&e.fixed===!1&&t.push(Jv.of(!0)),t}var Xv=mh.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(Kv).map(t=>new ey(e,t)),this.fixed=!e.state.facet(Jv);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Jv)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Yf.iter(this.view.state.facet(Uv),this.view.viewport.from),r=[],i=this.gutters.map(e=>new $v(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==Up.Text&&t){Qv(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==Up.Text){Qv(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(Kv),n=e.state.facet(Kv),r=e.docChanged||e.heightChanged||e.viewportChanged||!Yf.eq(e.startState.facet(Uv),e.state.facet(Uv),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new ey(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>q.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==Em.LTR?{left:r,right:i}:{right:r,left:i}})});function Zv(e){return Array.isArray(e)?e:[e]}function Qv(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var $v=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Yf.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new ty(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];Qv(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(Wv)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},ey=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=Zv(t.markers(e)),t.initialSpacer&&(this.spacer=new ty(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=Zv(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!Yf.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},ty=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),ny(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function ny(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var ry=G.define(),iy=G.define(),ay=G.define({combine(e){return Uf(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),oy=class extends Hv{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function sy(e,t){return e.state.facet(ay).formatNumber(t,e.state)}var cy=Kv.compute([ay],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(ry)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new oy(sy(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(iy)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(ay)!=e.state.facet(ay),initialSpacer(e){return new oy(sy(e,uy(e.state.doc.lines)))},updateSpacer(e,t){let n=sy(t.view,uy(t.view.state.doc.lines));return n==e.number?e:new oy(n)},domEventHandlers:e.facet(ay).domEventHandlers,side:`before`}));function ly(e={}){return[ay.of(e),Yv(),cy]}function uy(e){let t=9;for(;t<e;)t=t*10+9;return t}var dy=new class extends Hv{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},fy=Uv.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(dy.range(i)))}return Yf.of(t)});function py(){return fy}var my=1024,hy=0,gy=class{constructor(e,t){this.from=e,this.to=t}},J=class{constructor(e={}){this.id=hy++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=yy.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};J.closedBy=new J({deserialize:e=>e.split(` `)}),J.openedBy=new J({deserialize:e=>e.split(` `)}),J.group=new J({deserialize:e=>e.split(` `)}),J.isolate=new J({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),J.contextHash=new J({perNode:!0}),J.lookAhead=new J({perNode:!0}),J.mounted=new J({perNode:!0});var _y=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[J.mounted.id]}},vy=Object.create(null),yy=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):vy,r=!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(J.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(J.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};yy.none=new yy(``,Object.create(null),0,8);var by=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new yy(e.name,r,e.id,e.flags):e)}return new e(n)}},xy=new WeakMap,Sy=new WeakMap,Cy;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(Cy||={});var wy=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=_y.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new Ry(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new Ry(xy.get(this)||this.topNode);return r.moveTo(e,t),xy.set(this,r._tree),r}get topNode(){return new Ay(this,0,0,null)}resolve(e,t=0){let n=Oy(xy.get(this)||this.topNode,e,t,!1);return xy.set(this,n),n}resolveInner(e,t=0){let n=Oy(Sy.get(this)||this.topNode,e,t,!0);return Sy.set(this,n),n}resolveStack(e,t=0){return Ly(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&Cy.IncludeAnonymous)>0;for(let e=this.cursor(a|Cy.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Uy(yy.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(yy.none,t,n,r)))}static build(e){return By(e)}};wy.empty=new wy(yy.none,[],[],0);var Ty=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},Ey=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return yy.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(Dy(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function Dy(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function Oy(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof Ay&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:Cy.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof Ay&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var ky=class{cursor(e=0){return new Ry(this,e)}getChild(e,t=null,n=null){let r=jy(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return jy(this,e,t,n)}resolve(e,t=0){return Oy(this,e,t,!1)}resolveInner(e,t=0){return Oy(this,e,t,!0)}matchContext(e){return My(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},Ay=class e extends ky{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(!(!(a&Cy.EnterBracketed&&l instanceof wy&&(d=_y.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length)&&!Dy(i,r,u,u+l.length))){if(l instanceof Ey){if(a&Cy.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new Py(new Ny(o,l,t,u),null,e)}else if(a&Cy.IncludeAnonymous||!l.type.isAnonymous||zy(l)){let s;if(!(a&Cy.IgnoreMounts)&&(s=_y.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&Cy.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&Cy.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&Cy.IgnoreOverlays)&&(i=_y.get(this._tree))&&i.overlay){let a=t-this.from,o=r&Cy.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function jy(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function My(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var Ny=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Py=class e extends ky{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&Cy.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new wy(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Fy(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof Ay&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new Iy(i,n)}var Iy=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Fy(this.heads)}};function Ly(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof Ay?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=_y.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new Ay(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(Oy(o,t,n,!1))}}return i?Fy(i):r}var Ry=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Cy.EnterBracketed,e instanceof Ay)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof Ay?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&Cy.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Cy.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Cy.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else ({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&Cy.IncludeAnonymous||e instanceof Ey||!e.type.isAnonymous||zy(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Py(this.buffer,t,this.stack[e]);return this.bufferNode=new Py(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return My(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return My(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function zy(e){return e.children.some(e=>e instanceof Ey||!e.type.isAnonymous||zy(e))}function By(e){let{buffer:t,nodeSet:n,maxBufferLength:r=my,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new Ty(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0)if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}else if(w==-3){c=x;return}else if(w==-4){l=x;return}else throw RangeError(`Unrecognized record size: ${w}`);let D=s[x],O,ee,te=S-e;if(C-S<=r&&(ee=h(o.pos-t,y))){let t=new Uint16Array(ee.size-ee.skip),r=o.pos-ee.size,i=t.length;for(;o.pos>r;)i=g(ee.start,t,i);O=new Ey(t,C-ee.start,n),te=ee.start-e}else{let e=o.pos-w;o.next();let t=[],n=[],i=x>=a?x:-1,s=0,c=C;for(;o.pos>e;)i>=0&&o.id==i&&o.size>=0?(o.end<=c-r&&(p(t,n,S,s,o.end,c,i,T,E),s=t.length,c=o.end),o.next()):b>2500?d(S,e,t,n):u(S,e,t,n,i,b+1);if(i>=0&&s>0&&s<t.length&&p(t,n,S,s,S,c,i,T,E),t.reverse(),n.reverse(),i>-1&&s>0){let e=f(D,E);O=Uy(D,t,n,0,t.length,0,C-S,e,e)}else O=m(D,t,n,C-S,T-C,E)}_.push(O),v.push(te)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new Ey(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof wy){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(J.lookAhead))&&(a=r[o]+s.length+c)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[J.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[J.lookAhead,i];o=o?[e].concat(o):[e]}return new wy(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0)if(n.size==-3||n.size==-4)d+=4;else break scan;else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new wy(s[e.topID],_.reverse(),v.reverse(),y)}var Vy=new WeakMap;function Hy(e,t){if(!e.isAnonymous||t instanceof Ey||t.type!=e)return 1;let n=Vy.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof wy)){n=1;break}n+=Hy(e,r)}Vy.set(t,n)}return n}function Uy(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=Hy(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=Hy(e,t[s]);for(s++;s<i;s++){let n=Hy(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Uy(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Wy=class{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof Py?this.setBuffer(e.context.buffer,e.index,t):e instanceof Ay&&this.map.set(e.tree,t)}get(e){return e instanceof Py?this.getBuffer(e.context.buffer,e.index):e instanceof Ay?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}},Gy=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Ky=class{startParse(e,t,n){return typeof e==`string`&&(e=new qy(e)),n=n?n.length?n.map(e=>new gy(e.from,e.to)):[new gy(0,0)]:[new gy(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},qy=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new J({perNode:!0});var Jy=0,Yy=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Jy++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new Zy(e);return e=>e.modified.indexOf(t)>-1?e:Zy.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Xy=0,Zy=class e{constructor(e){this.name=e,this.instances=[],this.id=Xy++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Qy(n,e.modified));if(r)return r;let i=[],a=new Yy(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=$y(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Qy(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function $y(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function eb(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new nb(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return tb.add(t)}var tb=new J({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth>=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new nb(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),nb=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};nb.empty=new nb([],2,null);function rb(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function ib(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function ab(e,t,n,r=0,i=e.length){let a=new ob(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var ob=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=sb(e)||nb.empty,u=ib(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(J.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function sb(e){let t=e.type.prop(tb);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var Y=Yy.define,cb=Y(),lb=Y(),ub=Y(lb),db=Y(lb),fb=Y(),pb=Y(fb),mb=Y(fb),hb=Y(),gb=Y(hb),_b=Y(),vb=Y(),yb=Y(),bb=Y(yb),xb=Y(),X={comment:cb,lineComment:Y(cb),blockComment:Y(cb),docComment:Y(cb),name:lb,variableName:Y(lb),typeName:ub,tagName:Y(ub),propertyName:db,attributeName:Y(db),className:Y(lb),labelName:Y(lb),namespace:Y(lb),macroName:Y(lb),literal:fb,string:pb,docString:Y(pb),character:Y(pb),attributeValue:Y(pb),number:mb,integer:Y(mb),float:Y(mb),bool:Y(fb),regexp:Y(fb),escape:Y(fb),color:Y(fb),url:Y(fb),keyword:_b,self:Y(_b),null:Y(_b),atom:Y(_b),unit:Y(_b),modifier:Y(_b),operatorKeyword:Y(_b),controlKeyword:Y(_b),definitionKeyword:Y(_b),moduleKeyword:Y(_b),operator:vb,derefOperator:Y(vb),arithmeticOperator:Y(vb),logicOperator:Y(vb),bitwiseOperator:Y(vb),compareOperator:Y(vb),updateOperator:Y(vb),definitionOperator:Y(vb),typeOperator:Y(vb),controlOperator:Y(vb),punctuation:yb,separator:Y(yb),bracket:bb,angleBracket:Y(bb),squareBracket:Y(bb),paren:Y(bb),brace:Y(bb),content:hb,heading:gb,heading1:Y(gb),heading2:Y(gb),heading3:Y(gb),heading4:Y(gb),heading5:Y(gb),heading6:Y(gb),contentSeparator:Y(hb),list:Y(hb),quote:Y(hb),emphasis:Y(hb),strong:Y(hb),link:Y(hb),monospace:Y(hb),strikethrough:Y(hb),inserted:Y(),deleted:Y(),changed:Y(),invalid:Y(),meta:xb,documentMeta:Y(xb),annotation:Y(xb),processingInstruction:Y(xb),definition:Yy.defineModifier(`definition`),constant:Yy.defineModifier(`constant`),function:Yy.defineModifier(`function`),standard:Yy.defineModifier(`standard`),local:Yy.defineModifier(`local`),special:Yy.defineModifier(`special`)};for(let e in X){let t=X[e];t instanceof Yy&&(t.name=e)}rb([{tag:X.link,class:`tok-link`},{tag:X.heading,class:`tok-heading`},{tag:X.emphasis,class:`tok-emphasis`},{tag:X.strong,class:`tok-strong`},{tag:X.keyword,class:`tok-keyword`},{tag:X.atom,class:`tok-atom`},{tag:X.bool,class:`tok-bool`},{tag:X.url,class:`tok-url`},{tag:X.labelName,class:`tok-labelName`},{tag:X.inserted,class:`tok-inserted`},{tag:X.deleted,class:`tok-deleted`},{tag:X.literal,class:`tok-literal`},{tag:X.string,class:`tok-string`},{tag:X.number,class:`tok-number`},{tag:[X.regexp,X.escape,X.special(X.string)],class:`tok-string2`},{tag:X.variableName,class:`tok-variableName`},{tag:X.local(X.variableName),class:`tok-variableName tok-local`},{tag:X.definition(X.variableName),class:`tok-variableName tok-definition`},{tag:X.special(X.variableName),class:`tok-variableName2`},{tag:X.definition(X.propertyName),class:`tok-propertyName tok-definition`},{tag:X.typeName,class:`tok-typeName`},{tag:X.namespace,class:`tok-namespace`},{tag:X.className,class:`tok-className`},{tag:X.macroName,class:`tok-macroName`},{tag:X.propertyName,class:`tok-propertyName`},{tag:X.operator,class:`tok-operator`},{tag:X.comment,class:`tok-comment`},{tag:X.meta,class:`tok-meta`},{tag:X.invalid,class:`tok-invalid`},{tag:X.punctuation,class:`tok-punctuation`}]);var Sb=new J;function Cb(e){return G.define({combine:e?t=>t.concat(e):void 0})}var wb=new J,Tb=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,Hf.prototype.hasOwnProperty(`tree`)||Object.defineProperty(Hf.prototype,"tree",{get(){return Ob(this)}}),this.parser=t,this.extension=[Lb.of(this),Hf.languageData.of((e,t,n)=>{let r=Eb(e,t,n),i=r.type.prop(Sb);if(!i)return[];let a=e.facet(i),o=r.type.prop(wb);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return Eb(e,t,n).type.prop(Sb)==this.data}findRegions(e){let t=e.facet(Lb);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(Sb)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(J.mounted);if(i){if(i.tree.prop(Sb)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}else if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof wy&&r(i,e.positions[n]+t)}};return r(Ob(e),0),n}get allowsNesting(){return!0}};Tb.setState=Df.define();function Eb(e,t,n){let r=e.facet(Lb),i=Ob(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,Cy.ExcludeBuffers|Cy.EnterBracketed))e.type.isTop&&(i=e);return i}var Db=class e extends Tb{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=Cb(t.languageData);return new e(n,t.parser.configure({props:[Sb.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function Ob(e){let t=e.field(Tb.state,!1);return t?t.tree:wy.empty}var kb=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},Ab=null,jb=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],wy.empty,0,r,[],null)}startParse(){return this.parser.startParse(new kb(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=wy.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n)if(this.fragments=this.withoutTempSkipped(Gy.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Gy.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Ab;Ab=this;try{return e()}finally{Ab=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Mb(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Gy.applyChanges(r,e),i=wy.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=Mb(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Ky{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=Ab;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new wy(yy.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Ab}};function Mb(e,t,n){return Gy.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var Nb=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=jb.create(t.facet(Lb).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};Tb.state=of.define({create:Nb.init,update(e,t){for(let e of t.effects)if(e.is(Tb.setState))return e.value;return t.startState.facet(Lb)==t.state.facet(Lb)?e.apply(t):Nb.init(t.state)}});var Pb=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(Pb=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var Fb=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,Ib=mh.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Tb.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Tb.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Pb(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(Tb.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!Fb?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>Fb&&Fb()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:Tb.setState.of(new Nb(i.context))})),this.chunkBudget>0&&!(s&&!o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>uh(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Lb=G.define({combine(e){return e.length?e[0]:null},enables:e=>[Tb.state,Ib,q.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Rb=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},zb=G.define(),Bb=G.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function Vb(e){let t=e.facet(Bb);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Hb(e,t){let n=``,r=e.tabSize,i=e.facet(Bb)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function Ub(e,t){e instanceof Hf&&(e=new Wb(e));for(let n of e.state.facet(zb)){let r=n(e,t);if(r!==void 0)return r}let n=Ob(e.state);return n.length>=t?Kb(e,n,t):null}var Wb=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=Vb(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return lp(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},Gb=new J;function Kb(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return qb(r,e,n)}function qb(e,t,n){for(let r=e;r;r=r.next){let e=Yb(r.node);if(e)return e(Zb.create(t,n,r))}return 0}function Jb(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Yb(e){let t=e.type.prop(Gb);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(J.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>tx(e,!0,1,void 0,n&&!Jb(e)?t.from:void 0)}return e.parent==null?Xb:null}function Xb(){return 0}var Zb=class e extends Wb{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(Qb(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return qb(this.context.next,this.base,this.pos)}};function Qb(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function $b(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function ex({closing:e,align:t=!0,units:n=1}){return r=>tx(r,t,n,e)}function tx(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?$b(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}var nx=e=>e.baseIndent;function rx({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var ix=G.define(),ax=new J;function ox(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function sx(e,t,n){let r=Ob(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(ax);if(s&&(i.to<r.length-50||r.length==e.doc.length||!cx(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function cx(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function lx(e,t,n){for(let r of e.facet(ix)){let i=r(e,t,n);if(i)return i}return sx(e,t,n)}function ux(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var dx=Df.define({map:ux}),fx=Df.define({map:ux}),px=of.define({create(){return Wp.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=mx(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(dx)&&!gx(e,r.value.from,r.value.to)?n.push(r.value):r.is(fx)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(vx),i=n.map(e=>(r?Wp.replace({widget:new Sx(r(t.state,e))}):xx).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=mx(e,t.selection.main.head)),e},provide:e=>q.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(xx.range(r,i))}return Wp.set(t,!0)}});function mx(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function hx(e,t,n){var r;let i=null;return(r=e.field(px,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function gx(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}var _x={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},vx=G.define({combine(e){return Uf(e,_x)}});function yx(e){let t=[px,Ex];return e&&t.push(vx.of(e)),t}function bx(e,t){let{state:n}=e,r=n.facet(vx),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=hx(e.state,n.from,n.to);r&&e.dispatch({effects:fx.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var xx=Wp.replace({widget:new class extends Hp{toDOM(e){return bx(e,null)}}}),Sx=class extends Hp{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return bx(e,this.value)}},Cx={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},wx=class extends Hv{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function Tx(e={}){let t={...Cx,...e},n=new wx(t,!0),r=new wx(t,!1),i=mh.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(Lb)!=e.state.facet(Lb)||e.startState.field(px,!1)!=e.state.field(px,!1)||Ob(e.startState)!=Ob(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Qf;for(let i of e.viewportLineBlocks){let a=hx(e.state,i.from,i.to)?r:lx(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,qv({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||Yf.empty},initialSpacer(){return new wx(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=hx(e.state,t.from,t.to);if(r)return e.dispatch({effects:fx.of(r)}),!0;let i=lx(e.state,t.from,t.to);return i?(e.dispatch({effects:dx.of(i)}),!0):!1}}}),yx()]}var Ex=q.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),Dx=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=hp.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof Tb?e=>e.prop(Sb)==a.data:a?e=>e==a:void 0,this.style=rb(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new hp(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},Ox=G.define(),kx=G.define({combine(e){return e.length?[e[0]]:null}});function Ax(e){let t=e.facet(Ox);return t.length?t:e.facet(kx)}function jx(e,t){let n=[Nx],r;return e instanceof Dx&&(e.module&&n.push(q.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(kx.of(e)):r?n.push(Ox.computeN([q.darkTheme],t=>t.facet(q.darkTheme)==(r==`dark`)?[e]:[])):n.push(Ox.of(e)),n}var Mx=class{constructor(e){this.markCache=Object.create(null),this.tree=Ob(e.state),this.decorations=this.buildDeco(e,Ax(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ob(e.state),n=Ax(e.state),r=n!=Ax(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return Wp.none;let n=new Qf;for(let{from:r,to:i}of e.visibleRanges)ab(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=Wp.mark({class:r})))},r,i);return n.finish()}},Nx=lf.high(mh.fromClass(Mx,{decorations:e=>e.decorations}));X.meta,X.link,X.heading,X.emphasis,X.strong,X.strikethrough,X.keyword,X.atom,X.bool,X.url,X.contentSeparator,X.labelName,X.literal,X.inserted,X.string,X.deleted,X.regexp,X.escape,X.string,X.variableName,X.variableName,X.typeName,X.namespace,X.className,X.variableName,X.macroName,X.propertyName,X.comment,X.invalid;var Px=q.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),Fx=1e4,Ix=`()[]{}`,Lx=G.define({combine(e){return Uf(e,{afterCursor:!0,brackets:Ix,maxScanDistance:Fx,renderMatch:Bx})}}),Rx=Wp.mark({class:`cm-matchingBracket`}),zx=Wp.mark({class:`cm-nonmatchingBracket`});function Bx(e){let t=[],n=e.matched?Rx:zx;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function Vx(e){let t=[],n=e.facet(Lx);for(let r of e.selection.ranges){if(!r.empty)continue;let i=qx(e,r.head,-1,n)||r.head>0&&qx(e,r.head-1,1,n)||n.afterCursor&&(qx(e,r.head,1,n)||r.head<e.doc.length&&qx(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return Wp.set(t,!0)}var Hx=[mh.fromClass(class{constructor(e){this.paused=!1,this.decorations=Vx(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=Vx(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),Px];function Ux(e={}){return[Lx.of(e),Hx]}var Wx=new J;function Gx(e,t,n){let r=e.prop(t<0?J.openedBy:J.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function Kx(e){let t=e.type.prop(Wx);return t?t(e.node):e}function qx(e,t,n,r={}){let i=r.maxScanDistance||Fx,a=r.brackets||Ix,o=Ob(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=Gx(r.type,n,a);if(i&&r.from<r.to){let o=Kx(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return Jx(e,t,n,r,o,i,a)}}return Yx(e,t,n,o,s.type,i,a)}function Jx(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=Kx(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}else if(Gx(u.type,n,o))l++;else if(Gx(u.type,-n,o)){if(l==0){let e=Kx(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function Yx(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i))if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var Xx=Object.create(null),Zx=[yy.none],Qx=[],$x=Object.create(null),eS=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])eS[e]=nS(Xx,t);function tS(e,t){Qx.indexOf(e)>-1||(Qx.push(e),console.warn(t))}function nS(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||X[n];r?typeof r==`function`?t.length?t=t.map(r):tS(n,`Modifier ${n} used at start of tag`):t.length?tS(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:tS(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=$x[i];if(a)return a.id;let o=$x[i]=yy.define({id:Zx.length,name:r,props:[eb({[r]:n})]});return Zx.push(o),o.id}Em.RTL,Em.LTR;var rS=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=cS(e.state,n.from);return r.line?aS(e):r.block?sS(e):!1};function iS(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var aS=iS(pS,0),oS=iS(fS,0),sS=iS((e,t)=>fS(e,t,dS(t)),0);function cS(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var lS=50;function uS(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-lS,r),o=e.sliceDoc(i,i+lS),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*lS?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+lS),d=e.sliceDoc(i-lS,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function dS(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function fS(e,t,n=t.selection.ranges){let r=n.map(e=>cS(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>uS(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function pS(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=cS(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var mS=wf.define(),hS=wf.define(),gS=G.define(),_S=G.define({combine(e){return Uf(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),vS=of.define({create(){return LS.empty},update(e,t){let n=t.state.facet(_S),r=t.annotation(mS);if(r){let i=TS.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?ES(o,o.length,n.minDepth,i):MS(o,t.startState.selection),new LS(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(hS);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Of.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=TS.fromTransaction(t),o=t.annotation(Of.time),s=t.annotation(Of.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new LS(e.done.map(TS.fromJSON),e.undone.map(TS.fromJSON))}});function yS(e={}){return[vS,_S.of(e),q.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?xS:e.inputType==`historyRedo`?SS:null;return n?(e.preventDefault(),n(t)):!1}})]}function bS(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(vS,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var xS=bS(0,!1),SS=bS(1,!1),CS=bS(0,!0),wS=bS(1,!0),TS=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Ud.fromJSON(t.changes),[],t.mapped&&U.fromJSON(t.mapped),t.startSelection&&W.fromJSON(t.startSelection),t.selectionsAfter.map(W.fromJSON))}static fromTransaction(t,n){let r=AS;for(let e of t.startState.facet(gS)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,AS)}static selection(t){return new e(void 0,AS,void 0,void 0,t)}};function ES(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function DS(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function OS(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function kS(e,t){return e.length?t.length?e.concat(t):e:t}var AS=[],jS=200;function MS(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-jS));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),ES(e,e.length-1,1e9,n.setSelAfter(r)))}else return[TS.selection([t])]}function NS(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function PS(e,t){if(!e.length)return e;let n=e.length,r=AS;for(;n;){let i=FS(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[TS.selection(r)]:AS}function FS(e,t,n){let r=kS(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):AS,n);if(!e.changes)return TS.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new TS(i,Df.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var IS=/^(input\.type|delete)($|\.)/,LS=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||IS.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,DS(s.changes,t.changes))||r==`input.type.compose`)?ES(o,o.length-1,i.minDepth,new TS(t.changes.compose(s.changes),kS(Df.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,AS)):ES(o,o.length,i.minDepth,t),new e(o,AS,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:AS;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&OS(a[a.length-1],t)?this:new e(MS(this.done,t),this.undone,n,r)}addMapping(t){return new e(PS(this.done,t),PS(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:mS.of({side:e,rest:NS(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?AS:r.slice(0,r.length-1);return i.mapped&&(n=PS(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:mS.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};LS.empty=new LS(AS,AS);var RS=[{key:`Mod-z`,run:xS,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:SS,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:SS,preventDefault:!0},{key:`Mod-u`,run:CS,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:wS,preventDefault:!0}];function zS(e,t){return W.create(e.ranges.map(t),e.mainIndex)}function BS(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function VS({state:e,dispatch:t},n){let r=zS(e.selection,n);return r.eq(e.selection,!0)?!1:(t(BS(e,r)),!0)}function HS(e,t){return W.cursor(t?e.to:e.from)}function US(e,t){return VS(e,n=>n.empty?e.moveByChar(n,t):HS(n,t))}function WS(e){return e.textDirectionAt(e.state.selection.main.head)==Em.LTR}var GS=e=>US(e,!WS(e)),KS=e=>US(e,WS(e));function qS(e,t){return VS(e,n=>n.empty?e.moveByGroup(n,t):HS(n,t))}var JS=e=>qS(e,!WS(e)),YS=e=>qS(e,WS(e));typeof Intl<`u`&&Intl.Segmenter;function XS(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function ZS(e,t,n){let r=Ob(e).resolveInner(t.head),i=n?J.closedBy:J.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;XS(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?qx(e,r.from,1):qx(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,W.cursor(s,n?-1:1)}var QS=e=>VS(e,t=>ZS(e.state,t,!WS(e))),$S=e=>VS(e,t=>ZS(e.state,t,WS(e)));function eC(e,t){return VS(e,n=>{if(!n.empty)return HS(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var tC=e=>eC(e,!1),nC=e=>eC(e,!0);function rC(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(q.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function iC(e,t){let n=rC(e),{state:r}=e,i=zS(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):HS(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=q.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(BS(r,i),{effects:a}),!0}var aC=e=>iC(e,!1),oC=e=>iC(e,!0);function sC(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=W.cursor(r.from+n))}return i}var cC=e=>VS(e,t=>sC(e,t,!0)),lC=e=>VS(e,t=>sC(e,t,!1)),uC=e=>VS(e,t=>sC(e,t,!WS(e))),dC=e=>VS(e,t=>sC(e,t,WS(e))),fC=e=>VS(e,t=>e.moveToLineBoundary(t,!1,!1)),pC=e=>VS(e,t=>e.moveToLineBoundary(t,!0,!1));function mC(e,t,n){let r=!1,i=zS(e.selection,t=>{let i=qx(e,t.head,-1)||qx(e,t.head,1)||t.head>0&&qx(e,t.head-1,1)||t.head<e.doc.length&&qx(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?W.range(t.anchor,a):W.cursor(a)});return r?(t(BS(e,i)),!0):!1}var hC=({state:e,dispatch:t})=>mC(e,t,!1);function gC(e,t,n){let r=zS(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=W.range(e.head,e.anchor));let r=n(e);return W.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return r.eq(e.state.selection)?!1:(e.dispatch(BS(e.state,r)),!0)}function _C(e,t){return gC(e,t,n=>e.moveByChar(n,t))}var vC=e=>_C(e,!WS(e)),yC=e=>_C(e,WS(e));function bC(e,t){return gC(e,t,n=>e.moveByGroup(n,t))}var xC=e=>bC(e,!WS(e)),SC=e=>bC(e,WS(e)),CC=e=>{let t=!WS(e);return gC(e,t,n=>ZS(e.state,n,t))},wC=e=>{let t=WS(e);return gC(e,t,n=>ZS(e.state,n,t))};function TC(e,t){return gC(e,t,n=>e.moveVertically(n,t))}var EC=e=>TC(e,!1),DC=e=>TC(e,!0);function OC(e,t){return gC(e,t,n=>e.moveVertically(n,t,rC(e).height))}var kC=e=>OC(e,!1),AC=e=>OC(e,!0),jC=e=>gC(e,!0,t=>sC(e,t,!0)),MC=e=>gC(e,!1,t=>sC(e,t,!1)),NC=e=>{let t=!WS(e);return gC(e,t,n=>sC(e,n,t))},PC=e=>{let t=WS(e);return gC(e,t,n=>sC(e,n,t))},FC=e=>gC(e,!1,t=>W.cursor(e.lineBlockAt(t.head).from)),IC=e=>gC(e,!0,t=>W.cursor(e.lineBlockAt(t.head).to)),LC=({state:e,dispatch:t})=>(t(BS(e,{anchor:0})),!0),RC=({state:e,dispatch:t})=>(t(BS(e,{anchor:e.doc.length})),!0),zC=({state:e,dispatch:t})=>(t(BS(e,{anchor:e.selection.main.anchor,head:0})),!0),BC=({state:e,dispatch:t})=>(t(BS(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),VC=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),HC=({state:e,dispatch:t})=>{let n=sw(e).map(({from:t,to:n})=>W.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:W.create(n),userEvent:`select`})),!0},UC=({state:e,dispatch:t})=>{let n=zS(e.selection,t=>{let n=Ob(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return W.undirectionalRange(n.from,n.to)}return t});return n.eq(e.selection)?!1:(t(BS(e,n)),!0)};function WC(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(BS(n,W.create(i,i.length-1))),!0)}var GC=e=>WC(e,!1),KC=e=>WC(e,!0),qC=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=W.create([n.main]):n.main.empty||(r=W.create([W.cursor(n.main.head)])),r?(t(BS(e,r)),!0):!1};function JC(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=YC(e,o,!1)):o>i&&(n=`delete.forward`,o=YC(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=YC(e,i,!1),a=YC(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:W.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?q.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function YC(e,t,n){if(e instanceof q)for(let r of e.state.facet(q.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var XC=(e,t,n)=>JC(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=lp(s,a.tabSize)%Vb(a)||Vb(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=Id(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Id(o.text,c-o.from,!1,!1)+o.from);return c}),ZC=e=>XC(e,!1,!0),QC=e=>XC(e,!0,!1),$C=(e,t)=>JC(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Id(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),ew=e=>$C(e,!1),tw=e=>$C(e,!0),nw=e=>JC(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),rw=e=>JC(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),iw=e=>JC(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),aw=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:V.of([``,``])},range:W.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},ow=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Id(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:Id(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:W.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function sw(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function cw(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of sw(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(W.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(W.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:W.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var lw=({state:e,dispatch:t})=>cw(e,t,!1),uw=({state:e,dispatch:t})=>cw(e,t,!0);function dw(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of sw(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var fw=({state:e,dispatch:t})=>dw(e,t,!1),pw=({state:e,dispatch:t})=>dw(e,t,!0),mw=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(sw(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=zS(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function hw(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Ob(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(J.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var gw=vw(!1),_w=vw(!0);function vw(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&hw(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new Wb(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=Ub(s,r);for(c??=lp(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,Hb(t,c)];return o&&l.push(Hb(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:V.of(l)},range:W.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function yw(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:W.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var bw=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Wb(e,{overrideIndentation:e=>n[e]??-1}),i=yw(e,(t,i,a)=>{let o=Ub(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=Hb(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},xw=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(yw(e,(t,n)=>{n.push({from:t.from,insert:e.facet(Bb)})}),{userEvent:`input.indent`})),!0),Sw=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(yw(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=lp(r,e.tabSize),a=0,o=Hb(e,Math.max(0,i-Vb(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),Cw=e=>(e.setTabFocusMode(),!0),ww=[{key:`Ctrl-b`,run:GS,shift:vC,preventDefault:!0},{key:`Ctrl-f`,run:KS,shift:yC},{key:`Ctrl-p`,run:tC,shift:EC},{key:`Ctrl-n`,run:nC,shift:DC},{key:`Ctrl-a`,run:fC,shift:FC},{key:`Ctrl-e`,run:pC,shift:IC},{key:`Ctrl-d`,run:QC},{key:`Ctrl-h`,run:ZC},{key:`Ctrl-k`,run:nw},{key:`Ctrl-Alt-h`,run:ew},{key:`Ctrl-o`,run:aw},{key:`Ctrl-t`,run:ow},{key:`Ctrl-v`,run:oC}],Tw=[{key:`ArrowLeft`,run:GS,shift:vC,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:JS,shift:xC,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:uC,shift:NC,preventDefault:!0},{key:`ArrowRight`,run:KS,shift:yC,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:YS,shift:SC,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:dC,shift:PC,preventDefault:!0},{key:`ArrowUp`,run:tC,shift:EC,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:LC,shift:zC},{mac:`Ctrl-ArrowUp`,run:aC,shift:kC},{key:`ArrowDown`,run:nC,shift:DC,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:RC,shift:BC},{mac:`Ctrl-ArrowDown`,run:oC,shift:AC},{key:`PageUp`,run:aC,shift:kC},{key:`PageDown`,run:oC,shift:AC},{key:`Home`,run:lC,shift:MC,preventDefault:!0},{key:`Mod-Home`,run:LC,shift:zC},{key:`End`,run:cC,shift:jC,preventDefault:!0},{key:`Mod-End`,run:RC,shift:BC},{key:`Enter`,run:gw,shift:gw},{key:`Mod-a`,run:VC},{key:`Backspace`,run:ZC,shift:ZC,preventDefault:!0},{key:`Delete`,run:QC,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:ew,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:tw,preventDefault:!0},{mac:`Mod-Backspace`,run:rw,preventDefault:!0},{mac:`Mod-Delete`,run:iw,preventDefault:!0}].concat(ww.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Ew=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:QS,shift:CC},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:$S,shift:wC},{key:`Alt-ArrowUp`,run:lw},{key:`Shift-Alt-ArrowUp`,run:fw},{key:`Alt-ArrowDown`,run:uw},{key:`Shift-Alt-ArrowDown`,run:pw},{key:`Mod-Alt-ArrowUp`,run:GC},{key:`Mod-Alt-ArrowDown`,run:KC},{key:`Escape`,run:qC},{key:`Mod-Enter`,run:_w},{key:`Alt-l`,mac:`Ctrl-l`,run:HC},{key:`Mod-i`,run:UC,preventDefault:!0},{key:`Mod-[`,run:Sw},{key:`Mod-]`,run:xw},{key:`Mod-Alt-\\`,run:bw},{key:`Shift-Mod-k`,run:mw},{key:`Shift-Mod-\\`,run:hC},{key:`Mod-/`,run:rS},{key:`Alt-A`,mac:`Ctrl-A`,run:oS},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:Cw}].concat(Tw),Dw={key:`Tab`,run:xw,shift:Sw},Ow=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new kw(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new Aw(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216))if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new kw(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},kw=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},Aw=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},jw=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function Mw(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var Nw=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},Pw=new Nw,Fw=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=Pw,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=Pw,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},Iw=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;zw(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};Iw.prototype.contextual=Iw.prototype.fallback=Iw.prototype.extend=!1;var Lw=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?Mw(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(zw(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};Lw.prototype.contextual=Iw.prototype.fallback=Iw.prototype.extend=!1;var Rw=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function zw(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||Vw(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function Bw(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function Vw(e,t,n,r){let i=Bw(n,r,t);return i<0||Bw(n,r,e)<i}var Hw=typeof process<`u`&&/\bparse\b/.test({}.LOG),Uw=null;function Ww(e,t,n){let r=e.cursor(Cy.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var Gw=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Ww(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Ww(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof wy){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(J.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},Kw=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new Nw)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new Nw,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Nw,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535)if(o[s+1]==1)s=$w(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction($w(o,s+2),t,n,r));break}o[s]==t&&(r=this.putAction($w(o,s+1),t,n,r))}return r}},qw=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Fw(t,r),this.tokens=new Kw(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[Ow.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new Gw(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&eT(r);if(e)return Hw&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Hw&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return Hw&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500)if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=Hw?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(J.contextHash)||0)==n))return e.useNode(o,r),Hw&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof wy)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof wy&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),Hw&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),Hw&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Jw(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=Hw?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),Hw&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(Hw&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)Hw&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))Hw&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),Hw&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),Jw(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),wy.build({buffer:jw.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Uw||=new WeakMap).get(e);return t||Uw.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function Jw(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var Yw=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},Xw=e=>e,Zw=class{constructor(e){this.start=e.start,this.shift=e.shift||Xw,this.reduce=e.reduce||Xw,this.reuse=e.reuse||Xw,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},Qw=class e extends Ky{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=J[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new by(t.map((t,i)=>yy.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=my;let a=Mw(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(tT),this.states=Mw(e.states,Uint32Array),this.data=Mw(e.stateData),this.goto=Mw(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new Iw(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new qw(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535)if(n[i+1]==1)a=n[i=$w(n,i+2)];else if(n[i+1]==2)return $w(n,i+2);else break;if(a==t||a==0)return $w(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=$w(this.data,n+2);else break;r=t($w(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=$w(this.data,n+2);else break;if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=tT(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new Yw(e,n,r)}static deserialize(t){return new e(t)}};function $w(e,t){return e[t]|e[t+1]<<16}function eT(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function tT(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var nT=316,rT=317,iT=1,aT=2,oT=3,sT=4,cT=318,lT=320,uT=321,dT=5,fT=6,pT=0,mT=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],hT=125,gT=59,_T=47,vT=42,yT=43,bT=45,xT=60,ST=44,CT=63,wT=46,TT=91,ET=new Zw({start:!1,shift(e,t){return t==dT||t==fT||t==lT?e:t==uT},strict:!1}),DT=new Rw((e,t)=>{let{next:n}=e;(n==hT||n==-1||t.context)&&e.acceptToken(cT)},{contextual:!0,fallback:!0}),OT=new Rw((e,t)=>{let{next:n}=e,r;mT.indexOf(n)>-1||n==_T&&((r=e.peek(1))==_T||r==vT)||n!=hT&&n!=gT&&n!=-1&&!t.context&&e.acceptToken(nT)},{contextual:!0}),kT=new Rw((e,t)=>{e.next==TT&&!t.context&&e.acceptToken(rT)},{contextual:!0}),AT=new Rw((e,t)=>{let{next:n}=e;if(n==yT||n==bT){if(e.advance(),n==e.next){e.advance();let n=!t.context&&t.canShift(iT);e.acceptToken(n?iT:aT)}}else n==CT&&e.peek(1)==wT&&(e.advance(),e.advance(),(e.next<48||e.next>57)&&e.acceptToken(oT))},{contextual:!0});function jT(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var MT=new Rw((e,t)=>{if(e.next!=xT||!t.dialectEnabled(pT)||(e.advance(),e.next==_T))return;let n=0;for(;mT.indexOf(e.next)>-1;)e.advance(),n++;if(jT(e.next,!0)){for(e.advance(),n++;jT(e.next,!1);)e.advance(),n++;for(;mT.indexOf(e.next)>-1;)e.advance(),n++;if(e.next==ST)return;for(let t=0;;t++){if(t==7){if(!jT(e.next,!0))return;break}if(e.next!=`extends`.charCodeAt(t))break;e.advance(),n++}}e.acceptToken(sT,-n)}),NT=eb({"get set async static":X.modifier,"for while do if else switch try catch finally return throw break continue default case defer":X.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":X.operatorKeyword,"let var const using function class extends":X.definitionKeyword,"import export from":X.moduleKeyword,"with debugger new":X.keyword,TemplateString:X.special(X.string),super:X.atom,BooleanLiteral:X.bool,this:X.self,null:X.null,Star:X.modifier,VariableName:X.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":X.function(X.variableName),VariableDefinition:X.definition(X.variableName),Label:X.labelName,PropertyName:X.propertyName,PrivatePropertyName:X.special(X.propertyName),"CallExpression/MemberExpression/PropertyName":X.function(X.propertyName),"FunctionDeclaration/VariableDefinition":X.function(X.definition(X.variableName)),"ClassDeclaration/VariableDefinition":X.definition(X.className),"NewExpression/VariableName":X.className,PropertyDefinition:X.definition(X.propertyName),PrivatePropertyDefinition:X.definition(X.special(X.propertyName)),UpdateOp:X.updateOperator,"LineComment Hashbang":X.lineComment,BlockComment:X.blockComment,Number:X.number,String:X.string,Escape:X.escape,ArithOp:X.arithmeticOperator,LogicOp:X.logicOperator,BitOp:X.bitwiseOperator,CompareOp:X.compareOperator,RegExp:X.regexp,Equals:X.definitionOperator,Arrow:X.function(X.punctuation),": Spread":X.punctuation,"( )":X.paren,"[ ]":X.squareBracket,"{ }":X.brace,"InterpolationStart InterpolationEnd":X.special(X.brace),".":X.derefOperator,", ;":X.separator,"@":X.meta,TypeName:X.typeName,TypeDefinition:X.definition(X.typeName),"type enum interface implements namespace module declare":X.definitionKeyword,"abstract global Privacy readonly override":X.modifier,"is keyof unique infer asserts":X.operatorKeyword,JSXAttributeValue:X.attributeValue,JSXText:X.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":X.angleBracket,"JSXIdentifier JSXNameSpacedName":X.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":X.attributeName,"JSXBuiltin/JSXIdentifier":X.standard(X.tagName)}),PT={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},FT={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},IT={__proto__:null,"<":193},LT=Qw.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr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4v0[R4{0_R({#xQ!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:`⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem`,maxTerm:380,context:ET,nodeProps:[[`isolate`,-8,5,6,14,37,39,51,53,55,``],[`group`,-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,`Statement`,-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,`Expression`,-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,`Type`,-3,88,103,109,`ClassItem`],[`openedBy`,23,`<`,38,`InterpolationStart`,56,`[`,60,`{`,73,`(`,160,`JSXStartCloseTag`],[`closedBy`,-2,24,168,`>`,40,`InterpolationEnd`,50,`]`,61,`}`,74,`)`,165,`JSXEndTag`]],propSources:[NT],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}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#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new Lw(`j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~`,25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:e=>PT[e]||-1},{term:343,get:e=>FT[e]||-1},{term:95,get:e=>IT[e]||-1}],tokenPrec:15201});function RT(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function zT(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=RT(t)+RT(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function BT(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:zT(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function VT(e,t){return n=>{for(let t=Ob(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var HT=wf.define();typeof navigator==`object`&&navigator.platform;var UT=q.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),WT=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},GT=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,Hd.TrackDel),r=t.mapPos(this.to,1,Hd.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},KT=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(Bb);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new GT(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new WT(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},qT=Wp.widget({widget:new class extends Hp{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),JT=Wp.mark({class:`cm-snippetField`}),YT=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=Wp.set(e.map(e=>(e.from==e.to?qT:JT).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},XT=Df.define({map(e,t){return e&&e.map(t)}}),ZT=Df.define(),QT=of.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(XT))return n.value;if(n.is(ZT)&&e)return new YT(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>q.decorations.from(e,e=>e?e.deco:Wp.none)});function $T(e,t){return W.create(e.filter(e=>e.field==t).map(e=>W.range(e.from,e.to)))}function eE(e){let t=KT.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:V.of(a)},scrollIntoView:!0,annotations:n?[HT.of(n),Of.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=$T(o,0)),o.some(e=>e.field>0)){let t=new YT(o,0),n=c.effects=[XT.of(t)];e.state.field(QT,!1)===void 0&&n.push(Df.appendConfig.of([QT,iE,oE,UT]))}e.dispatch(e.state.update(c))}}function tE(e){return({state:t,dispatch:n})=>{let r=t.field(QT,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:$T(r.ranges,i),effects:XT.of(a?null:new YT(r.ranges,i)),scrollIntoView:!0})),!0}}var nE=[{key:`Tab`,run:tE(1),shift:tE(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(QT,!1)?(t(e.update({effects:XT.of(null)})),!0):!1}],rE=G.define({combine(e){return e.length?e[0]:nE}}),iE=lf.highest(jv.compute([rE],e=>e.facet(rE)));function aE(e,t){return{...t,apply:eE(e)}}var oE=q.domEventHandlers({mousedown(e,t){let n=t.state.field(QT,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:$T(n.ranges,i.field),effects:XT.of(n.ranges.some(e=>e.field>i.field)?new YT(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),sE=new class extends Wf{};sE.startSide=1,sE.endSide=-1,typeof navigator==`object`&&navigator.userAgent;var cE=[aE("function ${name}(${params}) {\n ${}\n}",{label:`function`,detail:`definition`,type:`keyword`}),aE("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:`for`,detail:`loop`,type:`keyword`}),aE("for (let ${name} of ${collection}) {\n ${}\n}",{label:`for`,detail:`of loop`,type:`keyword`}),aE(`do {
|
|
19
|
+
\${}
|
|
20
|
+
} while (\${})`,{label:`do`,detail:`loop`,type:`keyword`}),aE(`while (\${}) {
|
|
21
|
+
\${}
|
|
22
|
+
}`,{label:`while`,detail:`loop`,type:`keyword`}),aE(`try {
|
|
23
|
+
\${}
|
|
24
|
+
} catch (\${error}) {
|
|
25
|
+
\${}
|
|
26
|
+
}`,{label:`try`,detail:`/ catch block`,type:`keyword`}),aE(`if (\${}) {
|
|
27
|
+
\${}
|
|
28
|
+
}`,{label:`if`,detail:`block`,type:`keyword`}),aE(`if (\${}) {
|
|
29
|
+
\${}
|
|
30
|
+
} else {
|
|
31
|
+
\${}
|
|
32
|
+
}`,{label:`if`,detail:`/ else block`,type:`keyword`}),aE(`class \${name} {
|
|
33
|
+
constructor(\${params}) {
|
|
34
|
+
\${}
|
|
35
|
+
}
|
|
36
|
+
}`,{label:`class`,detail:`definition`,type:`keyword`}),aE('import {${names}} from "${module}"\n${}',{label:`import`,detail:`named`,type:`keyword`}),aE('import ${name} from "${module}"\n${}',{label:`import`,detail:`default`,type:`keyword`})],lE=cE.concat([aE(`interface \${name} {
|
|
37
|
+
\${}
|
|
38
|
+
}`,{label:`interface`,detail:`definition`,type:`keyword`}),aE("type ${name} = ${type}",{label:`type`,detail:`definition`,type:`keyword`}),aE(`enum \${name} {
|
|
39
|
+
\${}
|
|
40
|
+
}`,{label:`enum`,detail:`definition`,type:`keyword`})]),uE=new Wy,dE=new Set([`Script`,`Block`,`FunctionExpression`,`FunctionDeclaration`,`ArrowFunction`,`MethodDeclaration`,`ForStatement`]);function fE(e){return(t,n)=>{let r=t.node.getChild(`VariableDefinition`);return r&&n(r,e),!0}}var pE=[`FunctionDeclaration`],mE={FunctionDeclaration:fE(`function`),ClassDeclaration:fE(`class`),ClassExpression:()=>!0,EnumDeclaration:fE(`constant`),TypeAliasDeclaration:fE(`type`),NamespaceDeclaration:fE(`namespace`),VariableDefinition(e,t){e.matchContext(pE)||t(e,`variable`)},TypeDefinition(e,t){t(e,`type`)},__proto__:null};function hE(e,t){let n=uE.get(t);if(n)return n;let r=[],i=!0;function a(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(Cy.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=mE[t.name];if(e&&e(t,a)||dE.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of hE(e,t.node))r.push(n);return!1}}),uE.set(t,r),r}var gE=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,_E=[`TemplateString`,`String`,`RegExp`,`LineComment`,`BlockComment`,`VariableDefinition`,`TypeDefinition`,`Label`,`PropertyDefinition`,`PropertyName`,`PrivatePropertyDefinition`,`PrivatePropertyName`,`JSXText`,`JSXAttributeValue`,`JSXOpenTag`,`JSXCloseTag`,`JSXSelfClosingTag`,`.`,`?.`];function vE(e){let t=Ob(e.state).resolveInner(e.pos,-1);if(_E.indexOf(t.name)>-1)return null;let n=t.name==`VariableName`||t.to-t.from<20&&gE.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)dE.has(n.name)&&(r=r.concat(hE(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:gE}}var yE=Db.define({name:`javascript`,parser:LT.configure({props:[Gb.add({IfStatement:rx({except:/^\s*({|else\b)/}),TryStatement:rx({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:nx,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:ex({closing:`}`}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":rx({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),ax.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ox,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name==`JSXSelfClosingTag`)return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){let t=e.firstChild?.nextSibling,n=e.lastChild;return!t||t.type.isError?null:{from:t.to,to:n.type.isError?e.to:n.from}}})]}),languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]},commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:`$`}}),bE={test:e=>/^JSX/.test(e.name),facet:Cb({commentTokens:{block:{open:`{/*`,close:`*/}`}}})},xE=yE.configure({dialect:`ts`},`typescript`),SE=yE.configure({dialect:`jsx`,props:[wb.add(e=>e.isTop?[bE]:void 0)]}),CE=yE.configure({dialect:`jsx ts`,props:[wb.add(e=>e.isTop?[bE]:void 0)]},`typescript`),wE=e=>({label:e,type:`keyword`}),TE=`break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield`.split(` `).map(wE),EE=TE.concat([`declare`,`implements`,`private`,`protected`,`public`].map(wE));function DE(e={}){let t=e.jsx?e.typescript?CE:SE:e.typescript?xE:yE,n=e.typescript?lE.concat(EE):cE.concat(TE);return new Rb(t,[yE.data.of({autocomplete:VT(_E,BT(n))}),yE.data.of({autocomplete:vE}),e.jsx?jE:[]])}function OE(e){for(;;){if(e.name==`JSXOpenTag`||e.name==`JSXSelfClosingTag`||e.name==`JSXFragmentTag`)return e;if(e.name==`JSXEscape`||!e.parent)return null;e=e.parent}}function kE(e,t,n=e.length){for(let r=t?.firstChild;r;r=r.nextSibling)if(r.name==`JSXIdentifier`||r.name==`JSXBuiltin`||r.name==`JSXNamespacedName`||r.name==`JSXMemberExpression`)return e.sliceString(r.from,Math.min(r.to,n));return``}var AE=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),jE=q.inputHandler.of((e,t,n,r,i)=>{if((AE?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!yE.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=Ob(o).resolveInner(t-1,-1),i;if(n.name==`JSXStartTag`&&(n=n.parent),!(o.doc.sliceString(t-1,t)!=r||n.name==`JSXAttributeValue`&&n.to>t)){if(r==`>`&&n.name==`JSXFragmentTag`)return{range:e,changes:{from:t,insert:`</>`}};if(r==`/`&&n.name==`JSXStartCloseTag`){let e=n.parent,r=e.parent;if(r&&e.from==t-2&&((i=kE(o.doc,r.firstChild,t))||r.firstChild?.name==`JSXFragmentTag`)){let e=`${i}>`;return{range:W.cursor(t+e.length,-1),changes:{from:t,insert:e}}}}else if(r==`>`){let r=OE(n);if(r&&r.name==`JSXOpenTag`&&!/^\/?>|^<\//.test(o.doc.sliceString(t,t+2))&&(i=kE(o.doc,r,t)))return{range:e,changes:{from:t,insert:`</${i}>`}}}}return{range:e}});return s.changes.empty?!1:(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),ME=`#e5c07b`,NE=`#e06c75`,PE=`#56b6c2`,FE=`#ffffff`,IE=`#abb2bf`,LE=`#7d8799`,RE=`#61afef`,zE=`#98c379`,BE=`#d19a66`,VE=`#c678dd`,HE=`#21252b`,UE=`#2c313a`,WE=`#282c34`,GE=`#353a42`,KE=`#3E4451`,qE=`#528bff`,JE=[q.theme({"&":{color:IE,backgroundColor:WE},".cm-content":{caretColor:qE},".cm-cursor, .cm-dropCursor":{borderLeftColor:qE},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:KE},".cm-panels":{backgroundColor:HE,color:IE},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:WE,color:LE,border:`none`},".cm-activeLineGutter":{backgroundColor:UE},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:GE},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:GE,borderBottomColor:GE},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:UE,color:IE}}},{dark:!0}),jx(Dx.define([{tag:X.keyword,color:VE},{tag:[X.name,X.deleted,X.character,X.propertyName,X.macroName],color:NE},{tag:[X.function(X.variableName),X.labelName],color:RE},{tag:[X.color,X.constant(X.name),X.standard(X.name)],color:BE},{tag:[X.definition(X.name),X.separator],color:IE},{tag:[X.typeName,X.className,X.number,X.changed,X.annotation,X.modifier,X.self,X.namespace],color:ME},{tag:[X.operator,X.operatorKeyword,X.url,X.escape,X.regexp,X.link,X.special(X.string)],color:PE},{tag:[X.meta,X.comment],color:LE},{tag:X.strong,fontWeight:`bold`},{tag:X.emphasis,fontStyle:`italic`},{tag:X.strikethrough,textDecoration:`line-through`},{tag:X.link,color:LE,textDecoration:`underline`},{tag:X.heading,fontWeight:`bold`,color:NE},{tag:[X.atom,X.bool,X.special(X.variableName)],color:BE},{tag:[X.processingInstruction,X.string,X.inserted],color:zE},{tag:X.invalid,color:FE}]))],YE=q.theme({"&":{height:`100%`,fontSize:`12.5px`,fontFamily:`JetBrains Mono, Menlo, Monaco, Consolas, monospace`,backgroundColor:`transparent`},".cm-scroller":{overflow:`auto`,fontFamily:`inherit`},".cm-gutters":{backgroundColor:`transparent`,color:`rgba(255, 255, 255, 0.25)`,borderRight:`1px solid rgba(255, 255, 255, 0.08)`},".cm-activeLine":{backgroundColor:`rgba(255, 255, 255, 0.03)`},".cm-activeLineGutter":{backgroundColor:`transparent`,color:`#38bdf8`},"&.cm-focused .cm-cursor":{borderLeftColor:`#38bdf8`},"&.cm-focused .cm-selectionBackground, ::selection":{backgroundColor:`rgba(56, 189, 248, 0.25) !important`}});function XE({value:e,onChange:t,readOnly:n=!1,className:r=``}){let i=(0,b.useRef)(null),a=(0,b.useRef)(null),o=(0,b.useRef)(t);return o.current=t,(0,b.useEffect)(()=>{if(!i.current)return;let t=new q({state:Hf.create({doc:e,extensions:[ly(),py(),zv(),yS(),Tx(),Ux(),DE({typescript:!0}),JE,YE,jv.of([...Ew,...RS,Dw]),Hf.readOnly.of(n),q.updateListener.of(e=>{e.docChanged&&o.current(e.state.doc.toString())})]}),parent:i.current});return a.current=t,()=>{t.destroy(),a.current=null}},[n]),(0,b.useEffect)(()=>{let t=a.current;if(!t)return;let n=t.state.doc.toString();e!==n&&t.dispatch({changes:{from:0,to:n.length,insert:e}})},[e]),(0,F.jsx)(`div`,{ref:i,className:`w-full h-full overflow-hidden text-sm ${r}`})}var ZE=({toolName:e,schema:t,values:n,onChange:r,disabled:i=!1})=>{let a=t?.properties||{},o=t?.required||[],s=Object.keys(a);return s.length===0?(0,F.jsxs)(`div`,{className:`p-4 rounded-lg bg-surface1/60 border border-border text-center space-y-2`,children:[(0,F.jsx)(`div`,{className:`inline-flex p-2 rounded-full bg-cyan-500/10 text-cyan-400`,children:(0,F.jsx)(de,{className:`h-4 w-4`})}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-300 font-medium`,children:`No parameters required`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-400`,children:[`Tool `,(0,F.jsx)(`code`,{className:`font-mono text-cyan-300`,children:e}),` does not require arguments.`]})]}):(0,F.jsxs)(`div`,{className:`space-y-3.5 p-4 rounded-lg bg-surface1/40 border border-border`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between pb-2 border-b border-border/50 text-xs`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-200`,children:`Schema Parameters`}),(0,F.jsxs)(`span`,{className:`text-[10px] font-mono text-zinc-400`,children:[s.length,` inputs`]})]}),(0,F.jsx)(`div`,{className:`space-y-3`,children:s.map(e=>{let t=a[e]||{},s=o.includes(e),c=t.type||`string`,l=n[e]??``;return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`label`,{htmlFor:`field-${e}`,className:`text-xs font-mono font-medium text-zinc-200 flex items-center gap-1`,children:[e,s&&(0,F.jsx)(`span`,{className:`text-rose-400 font-bold`,children:`*`}),(0,F.jsxs)(`span`,{className:`text-[10px] font-mono text-zinc-500 font-normal`,children:[`(`,c,`)`]})]}),t.enum&&(0,F.jsxs)(`span`,{className:`text-[9px] font-mono px-1 py-0.2 rounded bg-secondary text-zinc-400`,children:[`enum: `,t.enum.length,` options`]})]}),t.description&&(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-400 leading-tight`,children:t.description}),t.enum&&Array.isArray(t.enum)?(0,F.jsxs)(`select`,{id:`field-${e}`,value:String(l),disabled:i,onChange:t=>r(e,t.target.value),className:`w-full h-8 px-2.5 rounded border border-border bg-surface1 text-white text-xs focus:outline-none focus:border-primary`,children:[(0,F.jsx)(`option`,{value:``,children:`-- Select option --`}),t.enum.map(e=>(0,F.jsx)(`option`,{value:e,children:e},e))]}):c===`boolean`?(0,F.jsxs)(`select`,{id:`field-${e}`,value:l===``?``:String(l),disabled:i,onChange:t=>r(e,t.target.value===`true`),className:`w-full h-8 px-2.5 rounded border border-border bg-surface1 text-white text-xs focus:outline-none focus:border-primary`,children:[(0,F.jsx)(`option`,{value:``,children:`-- Select boolean --`}),(0,F.jsx)(`option`,{value:`true`,children:`true`}),(0,F.jsx)(`option`,{value:`false`,children:`false`})]}):c===`number`||c===`integer`?(0,F.jsx)(`input`,{id:`field-${e}`,type:`number`,value:l,disabled:i,placeholder:t.description||`Enter ${e}`,onChange:t=>r(e,t.target.value===``?``:Number(t.target.value)),className:`w-full h-8 px-3 rounded border border-border bg-surface1 text-white text-xs placeholder:text-zinc-500 focus:outline-none focus:border-primary`}):(0,F.jsx)(`input`,{id:`field-${e}`,type:`text`,value:l,disabled:i,placeholder:t.description||`Enter ${e}`,onChange:t=>r(e,t.target.value),className:`w-full h-8 px-3 rounded border border-border bg-surface1 text-white text-xs placeholder:text-zinc-500 focus:outline-none focus:border-primary`})]},e)})})]})};function QE(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=QE(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function $E(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QE(e))&&(r&&(r+=` `),r+=t);return r}var eD=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,tD=$E,nD=(e,t)=>n=>{if(t?.variants==null)return tD(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=eD(t)||eD(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 tD(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)},rD=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},iD=(e,t)=>({classGroupId:e,validator:t}),aD=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),oD=`-`,sD=[],cD=`arbitrary..`,lD=e=>{let t=fD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return dD(e);let n=e.split(oD);return uD(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?rD(i,t):t:i||sD}return n[e]||sD}}},uD=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=uD(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(oD):e.slice(t).join(oD),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},dD=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?cD+r:void 0})(),fD=e=>{let{theme:t,classGroups:n}=e;return pD(n,t)},pD=(e,t)=>{let n=aD();for(let r in e){let i=e[r];mD(i,n,r,t)}return n},mD=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];hD(i,t,n,r)}},hD=(e,t,n,r)=>{if(typeof e==`string`){gD(e,t,n);return}if(typeof e==`function`){_D(e,t,n,r);return}vD(e,t,n,r)},gD=(e,t,n)=>{let r=e===``?t:yD(t,e);r.classGroupId=n},_D=(e,t,n,r)=>{if(bD(e)){mD(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(iD(n,e))},vD=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];mD(o,yD(t,a),n,r)}},yD=(e,t)=>{let n=e,r=t.split(oD),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=aD(),n.nextPart.set(t,i)),n=i}return n},bD=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,xD=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},SD=`!`,CD=`:`,wD=[],TD=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),ED=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===CD){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(SD)?(c=s.slice(0,-1),l=!0):s.startsWith(SD)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return TD(t,l,c,u)};if(t){let e=t+CD,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):TD(wD,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},DD=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},OD=e=>({cache:xD(e.cacheSize),parseClassName:ED(e),sortModifiers:DD(e),postfixLookupClassGroupIds:kD(e),...lD(e)}),kD=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},AD=/\s+/,jD=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(AD),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+SD:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},MD=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ND(n))&&(i&&(i+=` `),i+=r);return i},ND=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ND(e[r]))&&(n&&(n+=` `),n+=t);return n},PD=(e,...t)=>{let n,r,i,a,o=o=>(n=OD(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=jD(e,n);return i(e,a),a};return a=o,(...e)=>a(MD(...e))},FD=[],ID=e=>{let t=t=>t[e]||FD;return t.isThemeGetter=!0,t},LD=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RD=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zD=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VD=/\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$/,HD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,UD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,WD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,GD=e=>zD.test(e),Z=e=>!!e&&!Number.isNaN(Number(e)),KD=e=>!!e&&Number.isInteger(Number(e)),qD=e=>e.endsWith(`%`)&&Z(e.slice(0,-1)),JD=e=>BD.test(e),YD=()=>!0,XD=e=>VD.test(e)&&!HD.test(e),ZD=()=>!1,QD=e=>UD.test(e),$D=e=>WD.test(e),eO=e=>!Q(e)&&!$(e),tO=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),nO=e=>_O(e,xO,ZD),Q=e=>LD.test(e),rO=e=>_O(e,SO,XD),iO=e=>_O(e,CO,Z),aO=e=>_O(e,TO,YD),oO=e=>_O(e,wO,ZD),sO=e=>_O(e,yO,ZD),cO=e=>_O(e,bO,$D),lO=e=>_O(e,EO,QD),$=e=>RD.test(e),uO=e=>vO(e,SO),dO=e=>vO(e,wO),fO=e=>vO(e,yO),pO=e=>vO(e,xO),mO=e=>vO(e,bO),hO=e=>vO(e,EO,!0),gO=e=>vO(e,TO,!0),_O=(e,t,n)=>{let r=LD.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},vO=(e,t,n=!1)=>{let r=RD.exec(e);return r?r[1]?t(r[1]):n:!1},yO=e=>e===`position`||e===`percentage`,bO=e=>e===`image`||e===`url`,xO=e=>e===`length`||e===`size`||e===`bg-size`,SO=e=>e===`length`,CO=e=>e===`number`,wO=e=>e===`family-name`,TO=e=>e===`number`||e===`weight`,EO=e=>e===`shadow`,DO=PD(()=>{let e=ID(`color`),t=ID(`font`),n=ID(`text`),r=ID(`font-weight`),i=ID(`tracking`),a=ID(`leading`),o=ID(`breakpoint`),s=ID(`container`),c=ID(`spacing`),l=ID(`radius`),u=ID(`shadow`),d=ID(`inset-shadow`),f=ID(`text-shadow`),p=ID(`drop-shadow`),m=ID(`blur`),h=ID(`perspective`),g=ID(`aspect`),_=ID(`ease`),v=ID(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),$,Q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[$,Q,c],T=()=>[GD,`full`,`auto`,...w()],E=()=>[KD,`none`,`subgrid`,$,Q],D=()=>[`auto`,{span:[`full`,KD,$,Q]},KD,$,Q],O=()=>[KD,`auto`,$,Q],ee=()=>[`auto`,`min`,`max`,`fr`,$,Q],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],ne=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],re=()=>[GD,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ie=()=>[GD,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ae=()=>[GD,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],A=()=>[e,$,Q],j=()=>[...b(),fO,sO,{position:[$,Q]}],oe=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],se=()=>[`auto`,`cover`,`contain`,pO,nO,{size:[$,Q]}],ce=()=>[qD,uO,rO],M=()=>[``,`none`,`full`,l,$,Q],N=()=>[``,Z,uO,rO],P=()=>[`solid`,`dashed`,`dotted`,`double`],le=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ue=()=>[Z,qD,fO,sO],de=()=>[``,`none`,m,$,Q],fe=()=>[`none`,Z,$,Q],pe=()=>[`none`,Z,$,Q],me=()=>[Z,$,Q],he=()=>[GD,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[JD],breakpoint:[JD],color:[YD],container:[JD],"drop-shadow":[JD],ease:[`in`,`out`,`in-out`],font:[eO],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[JD],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[JD],shadow:[JD],spacing:[`px`,Z],text:[JD],"text-shadow":[JD],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,GD,Q,$,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,$,Q]}],"container-named":[tO],columns:[{columns:[Z,Q,$,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[KD,`auto`,$,Q]}],basis:[{basis:[GD,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Z,GD,`auto`,`initial`,`none`,Q]}],grow:[{grow:[``,Z,$,Q]}],shrink:[{shrink:[``,Z,$,Q]}],order:[{order:[KD,`first`,`last`,`none`,$,Q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...ne(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...ne()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...ne(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...ne(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ne(),`baseline`]}],"place-self":[{"place-self":[`auto`,...ne()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:re()}],"inline-size":[{inline:[`auto`,...ie()]}],"min-inline-size":[{"min-inline":[`auto`,...ie()]}],"max-inline-size":[{"max-inline":[`none`,...ie()]}],"block-size":[{block:[`auto`,...ae()]}],"min-block-size":[{"min-block":[`auto`,...ae()]}],"max-block-size":[{"max-block":[`none`,...ae()]}],w:[{w:[s,`screen`,...re()]}],"min-w":[{"min-w":[s,`screen`,`none`,...re()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...re()]}],h:[{h:[`screen`,`lh`,...re()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...re()]}],"max-h":[{"max-h":[`screen`,`lh`,...re()]}],"font-size":[{text:[`base`,n,uO,rO]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,gO,aO]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,qD,Q]}],"font-family":[{font:[dO,oO,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,$,Q]}],"line-clamp":[{"line-clamp":[Z,`none`,$,iO]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,$,Q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,$,Q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...P(),`wavy`]}],"text-decoration-thickness":[{decoration:[Z,`from-font`,`auto`,$,rO]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[Z,`auto`,$,Q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[KD,$,Q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,$,Q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,$,Q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:j()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:se()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},KD,$,Q],radial:[``,$,Q],conic:[KD,$,Q]},mO,cO]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:ce()}],"gradient-via-pos":[{via:ce()}],"gradient-to-pos":[{to:ce()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...P(),`hidden`,`none`]}],"divide-style":[{divide:[...P(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...P(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Z,$,Q]}],"outline-w":[{outline:[``,Z,uO,rO]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,hO,lO]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,hO,lO]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[Z,rO]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,hO,lO]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[Z,$,Q]}],"mix-blend":[{"mix-blend":[...le(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":le()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Z]}],"mask-image-linear-from-pos":[{"mask-linear-from":ue()}],"mask-image-linear-to-pos":[{"mask-linear-to":ue()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":ue()}],"mask-image-t-to-pos":[{"mask-t-to":ue()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":ue()}],"mask-image-r-to-pos":[{"mask-r-to":ue()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":ue()}],"mask-image-b-to-pos":[{"mask-b-to":ue()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":ue()}],"mask-image-l-to-pos":[{"mask-l-to":ue()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":ue()}],"mask-image-x-to-pos":[{"mask-x-to":ue()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":ue()}],"mask-image-y-to-pos":[{"mask-y-to":ue()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[$,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ue()}],"mask-image-radial-to-pos":[{"mask-radial-to":ue()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Z]}],"mask-image-conic-from-pos":[{"mask-conic-from":ue()}],"mask-image-conic-to-pos":[{"mask-conic-to":ue()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:j()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,$,Q]}],filter:[{filter:[``,`none`,$,Q]}],blur:[{blur:de()}],brightness:[{brightness:[Z,$,Q]}],contrast:[{contrast:[Z,$,Q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,hO,lO]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,Z,$,Q]}],"hue-rotate":[{"hue-rotate":[Z,$,Q]}],invert:[{invert:[``,Z,$,Q]}],saturate:[{saturate:[Z,$,Q]}],sepia:[{sepia:[``,Z,$,Q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,$,Q]}],"backdrop-blur":[{"backdrop-blur":de()}],"backdrop-brightness":[{"backdrop-brightness":[Z,$,Q]}],"backdrop-contrast":[{"backdrop-contrast":[Z,$,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Z,$,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Z,$,Q]}],"backdrop-invert":[{"backdrop-invert":[``,Z,$,Q]}],"backdrop-opacity":[{"backdrop-opacity":[Z,$,Q]}],"backdrop-saturate":[{"backdrop-saturate":[Z,$,Q]}],"backdrop-sepia":[{"backdrop-sepia":[``,Z,$,Q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,$,Q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Z,`initial`,$,Q]}],ease:[{ease:[`linear`,`initial`,_,$,Q]}],delay:[{delay:[Z,$,Q]}],animate:[{animate:[`none`,v,$,Q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,$,Q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":[`scale-3d`],skew:[{skew:me()}],"skew-x":[{"skew-x":me()}],"skew-y":[{"skew-y":me()}],transform:[{transform:[$,Q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":[`translate-none`],zoom:[{zoom:[KD,$,Q]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,$,Q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,$,Q]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[Z,uO,rO,iO]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function OO(...e){return DO($E(e))}var kO=nD(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary/20 text-primary border-primary/30`,secondary:`border-transparent bg-secondary text-secondary-foreground border-white/5`,destructive:`border-transparent bg-destructive/15 text-destructive border-destructive/30`,outline:`text-foreground border-border`,success:`border-transparent bg-success/15 text-success border-success/30`,warning:`border-transparent bg-warning/15 text-warning border-warning/30`}},defaultVariants:{variant:`default`}});function AO({className:e,variant:t,...n}){return(0,F.jsx)(`div`,{className:OO(kO({variant:t}),e),...n})}var jO=nD(`inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 active:scale-98 duration-200`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90 hover:shadow-[0_0_15px_rgba(56,189,248,0.3)]`,destructive:`bg-destructive text-destructive-foreground shadow hover:bg-destructive/90 hover:shadow-[0_0_15px_rgba(244,63,94,0.3)]`,outline:`border border-border bg-transparent shadow hover:bg-secondary/40 hover:text-white hover:border-white/20`,secondary:`bg-secondary text-secondary-foreground shadow hover:bg-secondary/80`,ghost:`hover:bg-accent/10 hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`,success:`bg-success text-success-foreground shadow hover:bg-success/90 hover:shadow-[0_0_15px_rgba(16,185,129,0.3)]`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),MO=b.forwardRef(({className:e,variant:t,size:n,...r},i)=>(0,F.jsx)(`button`,{className:OO(jO({variant:t,size:n,className:e})),ref:i,...r}));MO.displayName=`Button`;var NO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`div`,{ref:n,className:OO(`rounded-lg border border-border bg-card text-card-foreground shadow-card`,e),...t}));NO.displayName=`Card`;var PO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`div`,{ref:n,className:OO(`flex flex-col space-y-1.5 p-6`,e),...t}));PO.displayName=`CardHeader`;var FO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`h3`,{ref:n,className:OO(`text-lg font-semibold leading-none tracking-tight text-white`,e),...t}));FO.displayName=`CardTitle`;var IO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`p`,{ref:n,className:OO(`text-sm text-muted-foreground`,e),...t}));IO.displayName=`CardDescription`;var LO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`div`,{ref:n,className:OO(`p-6 pt-0`,e),...t}));LO.displayName=`CardContent`;var RO=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`div`,{ref:n,className:OO(`flex items-center p-6 pt-0`,e),...t}));RO.displayName=`CardFooter`;function zO({executionMode:e,onExecutionModeChange:t,availableTemplates:n,selectedTemplateId:r,onSelectTemplate:i,selectedToolName:a,onSelectTool:o,code:s,onCodeChange:c,isRunning:l,tools:u,isCurrentToolSupported:d,currentTemplate:f,currentToolObj:p,activeConnectedTarget:m,isNetworkHealthy:h,formArgs:g,onFormArgChange:_,onResetTemplate:v,onExecute:y,onCancel:x,onOpenExportTab:S,onOpenEnvModal:C}){let[w,T]=(0,b.useState)(null),[E,D]=(0,b.useState)(!1),O=async(e,t)=>{await Me(e)&&(T(t),setTimeout(()=>T(null),1500))},ee=()=>{v(),D(!0),setTimeout(()=>D(!1),1500)},te=(0,b.useMemo)(()=>({lines:s.split(`
|
|
41
|
+
`).length,bytes:new TextEncoder().encode(s).length,estTokens:Math.max(1,Math.ceil(s.trim().length/3.8))}),[s]),k=(0,b.useMemo)(()=>{let e=s.trim(),t=e.match(/^@LIOP\{([^}]+)\}\s*([\s\S]*?)\s*(?:@END)?$/),n=e,r=`wasi_v1`,i=!1;t&&(i=!0,r=t[1].split(`,`)[0]?.trim()||`wasi_v1`,n=t[2]);try{return Function(`env`,n),{valid:!0,error:null,runtime:r,hasEnvelope:i}}catch(e){return{valid:!1,error:e instanceof Error?e.message:String(e),runtime:r,hasEnvelope:i}}},[s]);return(0,F.jsxs)(NO,{className:`flex flex-col bg-card border-border shadow-card shrink-0`,children:[(0,F.jsxs)(PO,{className:`pb-3 flex flex-row items-center justify-between space-y-0`,children:[(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-1 p-0.5 bg-surface1 border border-white/10 rounded-lg`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`logic`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${e===`logic`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(A,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`Logic Studio (@LIOP)`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`form`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${e===`form`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(Te,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`MCP Tool Form`})]})]})}),e===`logic`&&n.length>0&&(0,F.jsx)(`div`,{className:`relative flex items-center bg-surface1 border border-white/15 p-0.5 rounded-lg flex-wrap gap-0.5`,children:n.map(e=>{let t=r===e.id;return(0,F.jsxs)(`button`,{type:`button`,onClick:()=>i(e.id),className:`relative z-10 text-[11px] px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5`,title:e.description,children:[t&&(0,F.jsx)(md.div,{layoutId:`templateActivePill`,className:`absolute inset-0 rounded-md shadow-sm bg-primary`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 flex items-center gap-1 ${t?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:(0,F.jsx)(`span`,{children:e.name})})]},e.id)})}),e===`logic`&&n.length===0&&(0,F.jsx)(`div`,{className:`text-[11px] text-zinc-400 font-mono px-2 py-1 bg-surface1/60 rounded border border-white/10`,children:h?`Scanning target capabilities...`:`Target Offline (0 Capabilities)`})]}),(0,F.jsxs)(LO,{className:`space-y-3`,children:[e===`logic`&&u.length===0&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-rose-950/20 border border-rose-500/30 text-rose-200 flex items-start gap-3 animate-in fade-in duration-200`,children:[(0,F.jsx)(Se,{className:`h-4 w-4 text-rose-400 shrink-0 mt-0.5`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h4`,{className:`text-xs font-semibold text-rose-300`,children:`Target Offline`}),(0,F.jsx)(`span`,{className:`text-[9px] px-1 py-0.2 rounded bg-rose-500/20 font-mono text-rose-200 border border-rose-500/30`,children:`ZERO-TRUST`})]}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-300 leading-relaxed`,children:[`Target endpoint`,` `,(0,F.jsx)(`span`,{className:`font-mono text-white font-medium`,children:m}),` `,`is unreachable. Zero computational enclaves detected. Connect to an active node or start your local mesh to dispatch logic.`]})]})]}),e===`logic`&&u.length>0&&!d&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-red-950/30 border border-red-500/40 text-red-200 flex items-start gap-3 animate-in fade-in duration-200`,children:[(0,F.jsx)(Se,{className:`h-4 w-4 text-red-400 shrink-0 mt-0.5`}),(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`h4`,{className:`text-xs font-semibold text-red-300`,children:`Target Mismatch`}),(0,F.jsx)(`span`,{className:`text-[9px] px-1 py-0.2 rounded bg-red-500/20 font-mono text-red-200 border border-red-500/30`,children:`ZERO-TRUST`})]}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-300 leading-relaxed`,children:[`Active logic targets capability`,` `,(0,F.jsx)(`span`,{className:`font-mono text-cyan-300 font-semibold`,children:f?.tool||a}),`, not exposed by target`,` `,(0,F.jsx)(`span`,{className:`font-mono text-white`,children:m}),`. Execution paused to protect origin runtime.`]}),(0,F.jsxs)(`div`,{className:`text-[10px] text-zinc-400 font-mono pt-0.5 flex items-center gap-1.5 flex-wrap`,children:[(0,F.jsx)(`span`,{children:`Available on target:`}),u.map(e=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>o(e.name),className:`px-1.5 py-0.5 rounded bg-emerald-500/15 border border-emerald-500/30 text-emerald-300 hover:bg-emerald-500/30 transition-colors cursor-pointer`,children:[`+ Switch to `,e.name]},e.name))]})]})]}),e===`form`?(0,F.jsx)(ZE,{toolName:a,schema:p?.inputSchema,values:g,onChange:_,disabled:l}):(0,F.jsxs)(`div`,{className:`relative border border-border rounded-lg bg-editor overflow-hidden`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 bg-secondary/40 border-b border-border/60 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-[10px] font-mono text-primary font-semibold`,children:`@LIOP`}),(0,F.jsx)(`span`,{className:`text-border-muted`,children:`•`}),(0,F.jsx)(`span`,{className:`text-[11px] text-zinc-400 font-mono`,children:`wasi_v1 sandbox`})]}),(0,F.jsxs)(`div`,{className:`flex items-center space-x-1.5`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:C,className:`text-[11px] flex items-center gap-1.5 transition-colors px-2.5 py-0.5 rounded shrink-0 font-medium border text-cyan-300 hover:text-white bg-cyan-500/10 hover:bg-cyan-500/20 border-cyan-500/30 cursor-pointer`,title:`Inspect confidential dataset schema and sandbox constraints`,children:[(0,F.jsx)(fe,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Env Schema`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:S,className:`text-[11px] flex items-center gap-1.5 transition-colors px-2.5 py-0.5 rounded shrink-0 font-medium border text-primary hover:text-white bg-secondary/80 hover:bg-white/10 border-border cursor-pointer`,title:`Export execution snippet to TypeScript, Python, or cURL`,children:[(0,F.jsx)(ce,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Export Code`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:ee,className:`text-[11px] flex items-center gap-1.5 transition-colors px-2.5 py-0.5 rounded shrink-0 font-medium border cursor-pointer ${E?`text-emerald-400 bg-emerald-500/15 border-emerald-500/30`:`text-zinc-300 hover:text-white bg-surface1/60 hover:bg-white/5 border-white/10`}`,title:`Reset to template original code`,children:[E?(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}):(0,F.jsx)(ve,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:E?`Reset Done`:`Reset`})]}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>O(s,`code`),className:`text-[11px] flex items-center gap-1.5 transition-colors px-2.5 py-0.5 rounded shrink-0 font-medium border cursor-pointer ${w===`code`?`text-emerald-400 bg-emerald-500/15 border-emerald-500/30`:`text-zinc-300 hover:text-white bg-surface1/60 hover:bg-white/5 border-white/10`}`,title:`Copy code payload`,children:w===`code`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}),(0,F.jsx)(`span`,{children:`Copied`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(j,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Copy`})]})})]})]}),(0,F.jsx)(`div`,{className:`w-full h-[220px] bg-surface1/30 border-y border-border/40 overflow-hidden`,children:(0,F.jsx)(XE,{value:s,onChange:c,readOnly:l,className:`h-full`})}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1 bg-secondary/30 border-t border-border/50 text-[10px] font-mono text-zinc-400`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,F.jsxs)(`span`,{children:[te.lines,` lines`]}),(0,F.jsxs)(`span`,{children:[te.bytes,` bytes`]}),(0,F.jsxs)(`span`,{className:`text-cyan-400 flex items-center gap-1`,children:[(0,F.jsx)(A,{className:`h-3 w-3`}),`~`,te.estTokens,` tok (input)`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3`,children:[k.valid?(0,F.jsxs)(`span`,{className:`text-emerald-400 flex items-center gap-1 font-semibold`,children:[(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}),`AST: Valid (`,k.runtime,`)`]}):(0,F.jsxs)(`span`,{className:`text-rose-400 flex items-center gap-1 truncate max-w-[240px] font-semibold`,title:k.error||`Syntax Error`,children:[(0,F.jsx)(Oe,{className:`h-3 w-3 text-rose-400 shrink-0`}),`AST Error: `,k.error]}),(0,F.jsx)(`span`,{children:`•`}),(0,F.jsxs)(`span`,{className:`text-zinc-300 flex items-center gap-1 font-mono`,children:[(0,F.jsx)(P,{className:`h-3 w-3 text-amber-400`}),`Quota: 1M Fuel`]}),(0,F.jsx)(`span`,{children:`•`}),(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`WASI Sandbox`})]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between pt-1`,children:[(0,F.jsxs)(`div`,{className:`text-xs text-zinc-400 flex items-center gap-1.5 flex-wrap`,children:[(0,F.jsx)(`span`,{children:`Target:`}),(0,F.jsx)(`span`,{className:`font-semibold font-mono text-[11px] ${d?`text-white`:`text-red-400 line-through`}`,children:a||`none`}),!d&&(0,F.jsx)(AO,{variant:`outline`,className:`text-[9px] py-0 px-1 font-mono border-red-500/40 text-red-400 bg-red-500/10`,children:`Unavailable on Target`}),p?.providerNode&&(0,F.jsx)(AO,{variant:`outline`,className:`text-[9px] py-0 px-1 font-mono border-cyan-500/40 text-cyan-300`,children:p.providerNode}),p?.tier&&(0,F.jsxs)(AO,{variant:`outline`,className:`text-[9px] py-0 px-1 font-mono border-white/15 text-zinc-300`,children:[`Tier `,p.tier]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&x&&(0,F.jsx)(MO,{type:`button`,variant:`outline`,onClick:x,className:`h-9 px-3 border-rose-500/40 text-rose-300 hover:bg-rose-500/10 hover:text-rose-200 text-xs font-mono`,title:`Cancel in-flight execution`,children:`Cancel`}),(0,F.jsx)(MO,{onClick:y,disabled:l||!a||u.length===0||!d||e===`logic`&&!k.valid,className:`h-9 px-6 font-bold tracking-wide shadow-md transition-all active:scale-[0.98] ${u.length===0||!d||e===`logic`&&!k.valid?`opacity-60 cursor-not-allowed bg-zinc-800 hover:bg-zinc-800 text-zinc-400 border border-zinc-700`:``}`,children:l?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(pe,{className:`mr-2 h-4 w-4 animate-spin`}),e===`logic`?`Injecting...`:`Calling...`]}):u.length===0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Se,{className:`mr-2 h-4 w-4 text-rose-400`}),`Target Offline`]}):d?e===`logic`&&!k.valid?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Oe,{className:`mr-2 h-4 w-4 text-rose-400`}),`Syntax Error`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ge,{className:`mr-2 h-4 w-4 fill-current`}),e===`logic`?`Execute Logic`:`Execute Tool`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Se,{className:`mr-2 h-4 w-4 text-red-400`}),`Blocked on Target`]})})]})]})]})]})}typeof window<`u`&&window.document&&window.document.createElement;function BO(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function VO(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,F.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,HO(i,...t)]}function HO(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function UO(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function WO(...e){return t=>{let n=!1,r=e.map(e=>{let r=UO(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():UO(e[t],null)}}}}function GO(...e){return b.useCallback(WO(...e),e)}function KO(e){let t=b.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];$O(r)&&typeof rk==`function`&&(r=rk(r._payload)),b.Children.forEach(r,e=>{if(ZO(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;$O(n)&&typeof rk==`function`&&(n=rk(n._payload)),a=JO(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=b.cloneElement(a,void 0,s):!o&&b.Children.count(r)===1&&b.isValidElement(r)&&(a=r);let c=a?XO(a):void 0,l=GO(n,c);if(!a){if(r||r===0)throw Error(o?nk(e):tk(e));return r}let u=YO(i,a.props??{});return a.type!==b.Fragment&&(u.ref=n?l:c),b.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var qO=Symbol.for(`radix.slottable`),JO=(e,t)=>{if(`child`in e.props){let t=e.props.child;return b.isValidElement(t)?b.cloneElement(t,void 0,e.props.children(t.props.children)):null}return b.isValidElement(t)?t:null};function YO(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(` `))}return{...e,...n}}function XO(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)}function ZO(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===qO}var QO=Symbol.for(`react.lazy`);function $O(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===QO&&`_payload`in e&&ek(e._payload)}function ek(e){return typeof e==`object`&&!!e&&`then`in e}var tk=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,nk=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,rk=b.use;function ik(e){let t=e+`CollectionProvider`,[n,r]=VO(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,F.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=KO(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,F.jsx)(c,{ref:GO(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=KO(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=GO(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,F.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.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[{Provider:o,Slot:l,ItemSlot:p},m,r]}var ak=globalThis?.document?b.useLayoutEffect:()=>{},ok=b.useId||(()=>void 0),sk=0;function ck(e){let[t,n]=b.useState(ok());return ak(()=>{e||n(e=>e??String(sk++))},[e]),e||(t?`radix-${t}`:``)}_();var lk=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=KO(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,F.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function uk(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>((...e)=>t.current?.(...e)),[])}var dk=b.useInsertionEffect||ak;function fk({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=pk({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=mk(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function pk({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return dk(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function mk(e){return typeof e==`function`}var hk=b.createContext(void 0);function gk(e){let t=b.useContext(hk);return e||t||`ltr`}var _k=`rovingFocusGroup.onEntryFocus`,vk={bubbles:!1,cancelable:!0},yk=`RovingFocusGroup`,[bk,xk,Sk]=ik(yk),[Ck,wk]=VO(yk,[Sk]),[Tk,Ek]=Ck(yk),Dk=b.forwardRef((e,t)=>(0,F.jsx)(bk.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(bk.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,F.jsx)(Ok,{...e,ref:t})})}));Dk.displayName=yk;var Ok=b.forwardRef((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=b.useRef(null),p=GO(t,f),m=gk(a),[h,g]=fk({prop:o,defaultProp:s??null,onChange:c,caller:yk}),[_,v]=b.useState(!1),y=uk(l),x=xk(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(_k,y),()=>e.removeEventListener(_k,y)},[y]),(0,F.jsx)(Tk,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,F.jsx)(lk.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:BO(e.onMouseDown,()=>{S.current=!0}),onFocus:BO(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(_k,vk);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);Pk([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:BO(e.onBlur,()=>v(!1))})})}),kk=`RovingFocusGroupItem`,Ak=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=ck(),l=a||c,u=Ek(kk,n),d=u.currentTabStopId===l,f=xk(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,F.jsx)(bk.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,F.jsx)(lk.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:BO(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:BO(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:BO(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Nk(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?Fk(n,r+1):n.slice(r+1)}setTimeout(()=>Pk(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Ak.displayName=kk;var jk={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Mk(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Nk(e,t,n){let r=Mk(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return jk[r]}function Pk(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ik=Dk,Lk=Ak;function Rk(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var zk=e=>{let{present:t,children:n}=e,r=Bk(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=Hk(r.ref,Wk(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};zk.displayName=`Presence`;function Bk(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=Rk(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=Uk(r.current);a.current=o===`mounted`?e:`none`},[o]),ak(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Uk(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),ak(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Uk(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Uk(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Vk(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Hk(...e){let t=b.useRef(e);return t.current=e,b.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Vk(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():Vk(n[e],null)}}},[])}function Uk(e){return e?.animationName||`none`}function Wk(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)}var Gk=`Tabs`,[Kk,qk]=VO(Gk,[wk]),Jk=wk(),[Yk,Xk]=Kk(Gk),Zk=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=gk(s),[d,f]=fk({prop:r,onChange:i,defaultProp:a??``,caller:Gk});return(0,F.jsx)(Yk,{scope:n,baseId:ck(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,F.jsx)(lk.div,{dir:u,"data-orientation":o,...l,ref:t})})});Zk.displayName=Gk;var Qk=`TabsList`,$k=b.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Xk(Qk,n),o=Jk(n);return(0,F.jsx)(Ik,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,F.jsx)(lk.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});$k.displayName=Qk;var eA=`TabsTrigger`,tA=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Xk(eA,n),s=Jk(n),c=iA(o.baseId,r),l=aA(o.baseId,r),u=r===o.value;return(0,F.jsx)(Lk,{asChild:!0,...s,focusable:!i,active:u,children:(0,F.jsx)(lk.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:BO(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:BO(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:BO(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});tA.displayName=eA;var nA=`TabsContent`,rA=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Xk(nA,n),c=iA(s.baseId,r),l=aA(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,F.jsx)(zk,{present:i||u,children:({present:n})=>(0,F.jsx)(lk.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})})});rA.displayName=nA;function iA(e,t){return`${e}-trigger-${t}`}function aA(e,t){return`${e}-content-${t}`}var oA=Zk,sA=$k,cA=tA,lA=rA,uA=oA,dA=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(sA,{ref:n,className:OO(`inline-flex h-9 items-center justify-center rounded-lg bg-secondary/30 p-1 text-muted-foreground border border-border/40`,e),...t}));dA.displayName=sA.displayName;var fA=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(cA,{ref:n,className:OO(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-primary/10 data-[state=active]:text-primary data-[state=active]:border-primary/20 border border-transparent data-[state=active]:shadow-sm duration-200`,e),...t}));fA.displayName=cA.displayName;var pA=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(lA,{ref:n,className:OO(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));pA.displayName=lA.displayName;function mA({timeline:e,targetType:t,meta:n}){return(0,F.jsx)(pA,{value:`debug`,className:`m-0 space-y-3 pb-5`,children:(0,F.jsxs)(`div`,{className:`space-y-3 pt-1 text-xs`,children:[(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`span`,{className:`font-semibold text-white text-[11px] flex items-center gap-1.5`,children:[(0,F.jsx)(ee,{className:`h-3.5 w-3.5 text-amber-400`}),`Pipeline Execution Phase Trace`]}),(0,F.jsxs)(`span`,{className:`font-mono text-[10px] text-zinc-400`,children:[`Target: `,t.toUpperCase()]})]}),(0,F.jsx)(`div`,{className:`border border-border/80 rounded-md overflow-hidden`,children:(0,F.jsxs)(`table`,{className:`w-full text-left font-mono text-[11px]`,children:[(0,F.jsx)(`thead`,{className:`bg-secondary/40 text-zinc-400 border-b border-border/80 text-[10px] uppercase`,children:(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{className:`px-2.5 py-1.5`,children:`Phase`}),(0,F.jsx)(`th`,{className:`px-2.5 py-1.5`,children:`Status`}),(0,F.jsx)(`th`,{className:`px-2.5 py-1.5`,children:`Latency`}),(0,F.jsx)(`th`,{className:`px-2.5 py-1.5`,children:`Detail`})]})}),(0,F.jsx)(`tbody`,{className:`divide-y divide-border/50 bg-background/40`,children:e.map(e=>(0,F.jsxs)(`tr`,{className:`hover:bg-white/5`,children:[(0,F.jsx)(`td`,{className:`px-2.5 py-1.5 font-semibold text-white`,children:e.label}),(0,F.jsx)(`td`,{className:`px-2.5 py-1.5`,children:(0,F.jsx)(`span`,{className:`inline-block px-1.5 py-0.2 rounded text-[10px] font-semibold ${e.status===`success`?`bg-emerald-500/15 text-emerald-400 border border-emerald-500/30`:e.status===`running`?`bg-amber-500/15 text-amber-400 border border-amber-500/30 animate-pulse`:e.status===`failed`?`bg-rose-500/15 text-rose-400 border border-rose-500/30`:`bg-zinc-800 text-zinc-500`}`,children:e.status.toUpperCase()})}),(0,F.jsx)(`td`,{className:`px-2.5 py-1.5 text-zinc-300`,children:e.durationMs===void 0?`—`:`${e.durationMs}ms`}),(0,F.jsx)(`td`,{className:`px-2.5 py-1.5 text-zinc-400 truncate max-w-[200px]`,children:e.detail})]},e.phase))})]})})]}),(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`span`,{className:`font-semibold text-white text-[11px] flex items-center gap-1.5`,children:[(0,F.jsx)(Ce,{className:`h-3.5 w-3.5 text-emerald-400`}),`Layer 4 Egress PII Shield Audit`]}),(0,F.jsx)(AO,{variant:n?.shieldBlocked?`destructive`:`success`,className:`font-mono text-[10px]`,children:n?.shieldBlocked?`INTERCEPTED`:`PASSED`})]}),(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-400 leading-relaxed`,children:n?.shieldBlocked?`Active defense triggered: Attempt to exfiltrate raw unaggregated rows intercepted by Zero-Trust Egress Shield. Data transfer was truncated before exiting origin host.`:`Zero-Trust egress verification confirmed. Logic module produced only compliant aggregates with zero PII side-channel exposure.`})]}),(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border flex items-center justify-between text-[11px] font-mono`,children:[(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`Sandbox:`,` `,(0,F.jsx)(`strong`,{className:`text-primary`,children:`V8 Isolate / wasi_v1`})]}),(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`PQC Session:`,` `,(0,F.jsx)(`strong`,{className:`text-emerald-400`,children:`ML-KEM-768`})]}),(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[`Protocol: `,(0,F.jsx)(`strong`,{className:`text-cyan-300`,children:`LIOP v1.0`})]})]})]})})}function hA({lang:e,toolName:t,logicCode:n,targetType:r,targetEndpoint:i}){let a=t||`Analyze_Synthetic_Bank_Transactions`,o=n.trim();switch(e){case`typescript`:return r===`grpc`?`import { LiopClient } from "@nekzus/liop";
|
|
42
|
+
|
|
43
|
+
async function main() {
|
|
44
|
+
// Connect to sovereign origin node via gRPC
|
|
45
|
+
const client = new LiopClient({
|
|
46
|
+
target: "${i||`127.0.0.1:15021`}",
|
|
47
|
+
timeoutMs: 10000,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
await client.connect();
|
|
51
|
+
|
|
52
|
+
// Inject logic micro-module to process in-situ on origin node
|
|
53
|
+
const response = await client.injectLogic({
|
|
54
|
+
tool: "${a}",
|
|
55
|
+
logic: \`${o}\`,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
console.log("Sovereign Execution Result:", response.result);
|
|
59
|
+
console.log("ZK-Receipt HMAC:", response.meta?.zkHash);
|
|
60
|
+
console.log("Tokens Consumed:", response.meta?.telemetry?.tokens?.totalTokens);
|
|
61
|
+
|
|
62
|
+
await client.close();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
main().catch(console.error);`:`import { LiopClient } from "@nekzus/liop";
|
|
66
|
+
|
|
67
|
+
async function main() {
|
|
68
|
+
// Connect to LIOP Gateway via HTTP / SSE
|
|
69
|
+
const client = new LiopClient({
|
|
70
|
+
httpUrl: "${i||`http://127.0.0.1:15014/mcp`}",
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await client.connect();
|
|
74
|
+
|
|
75
|
+
// In-situ confidential logic execution
|
|
76
|
+
const response = await client.injectLogic({
|
|
77
|
+
tool: "${a}",
|
|
78
|
+
logic: \`${o}\`,
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
console.log("Result:", response.result);
|
|
82
|
+
console.log("ZK-Receipt Proof:", response.meta?.zkHash);
|
|
83
|
+
|
|
84
|
+
await client.close();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
main().catch(console.error);`;case`python`:return`import json
|
|
88
|
+
import requests
|
|
89
|
+
|
|
90
|
+
# LIOP In-situ Logic Execution via Gateway
|
|
91
|
+
url = "http://127.0.0.1:16001/api/execute"
|
|
92
|
+
payload = {
|
|
93
|
+
"tool": "${a}",
|
|
94
|
+
"logic": """${o}"""
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
headers = {"Content-Type": "application/json"}
|
|
98
|
+
|
|
99
|
+
# SSE stream receiving confidential execution phases and output
|
|
100
|
+
response = requests.post(url, json=payload, headers=headers, stream=True)
|
|
101
|
+
|
|
102
|
+
for line in response.iter_lines():
|
|
103
|
+
if line:
|
|
104
|
+
decoded = line.decode("utf-8")
|
|
105
|
+
if decoded.startswith("data: "):
|
|
106
|
+
event = json.loads(decoded[6:])
|
|
107
|
+
if event.get("type") == "result":
|
|
108
|
+
print("Result:", json.dumps(event.get("payload"), indent=2))
|
|
109
|
+
print("ZK-Receipt HMAC:", event.get("meta", {}).get("zkHash"))
|
|
110
|
+
elif event.get("type") == "error":
|
|
111
|
+
print("Execution Error:", event.get("payload"))`;case`curl`:return`# Run in-situ logic execution against LIOP Studio Gateway
|
|
112
|
+
curl -X POST http://127.0.0.1:16001/api/execute \\
|
|
113
|
+
-H "Content-Type: application/json" \\
|
|
114
|
+
-d '${JSON.stringify({tool:a,logic:o},null,2).replace(/'/g,`'\\''`)}'`;case`grpc`:{let e=``;try{e=btoa(unescape(encodeURIComponent(o)))}catch{e=`<base64_payload>`}return`// gRPC Payload for liop.protocol.v1.MeshExecutionService/ExecuteLogic
|
|
115
|
+
// Target: ${i||`127.0.0.1:15021`}
|
|
116
|
+
{
|
|
117
|
+
"header": {
|
|
118
|
+
"protocol_version": "2026-07-28",
|
|
119
|
+
"clearance_tier": 1,
|
|
120
|
+
"pqc_suite": "ML-KEM-768",
|
|
121
|
+
"sealing_cipher": "AES-256-GCM"
|
|
122
|
+
},
|
|
123
|
+
"tool_name": "${a}",
|
|
124
|
+
"logic_envelope": {
|
|
125
|
+
"runtime": "wasi_v1",
|
|
126
|
+
"script_payload": "${e}"
|
|
127
|
+
}
|
|
128
|
+
}`}}}function gA({toolName:e,code:t,targetType:n,grpcTarget:r,httpUrl:i,stdioCmd:a}){let[o,s]=(0,b.useState)(`typescript`),[c,l]=(0,b.useState)(!1),u=n===`grpc`?r:n===`http`?i:a,d=hA({lang:o,toolName:e,logicCode:t,targetType:n,targetEndpoint:u});return(0,F.jsx)(pA,{value:`export`,className:`m-0 space-y-3 pb-5`,children:(0,F.jsxs)(`div`,{className:`space-y-3 pt-1 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 p-0.5 bg-surface1 border border-border rounded-lg`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>s(`typescript`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all cursor-pointer ${o===`typescript`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:`TypeScript (SDK)`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>s(`python`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all cursor-pointer ${o===`python`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:`Python`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>s(`curl`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all cursor-pointer ${o===`curl`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:`cURL / CLI`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>s(`grpc`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all cursor-pointer ${o===`grpc`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:`gRPC JSON`})]}),(0,F.jsx)(`button`,{type:`button`,onClick:async()=>{await Me(d)&&(l(!0),setTimeout(()=>l(!1),2e3))},className:`text-xs flex items-center gap-1.5 px-3 py-1 rounded-md font-medium border transition-all cursor-pointer ${c?`bg-emerald-500/20 text-emerald-400 border-emerald-500/40`:`bg-surface1 text-zinc-200 border-border hover:bg-white/10 hover:text-white`}`,children:c?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ne,{className:`h-3.5 w-3.5 text-emerald-400`}),(0,F.jsx)(`span`,{children:`Copied`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(j,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`Copy Code`})]})})]}),(0,F.jsx)(`div`,{className:`rounded-lg bg-editor border border-border p-3.5 font-mono text-xs text-[#7dd3fc] overflow-auto max-h-[250px] leading-relaxed select-all shadow-inner`,children:(0,F.jsx)(`pre`,{children:d})}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] text-zinc-400 font-mono`,children:[(0,F.jsxs)(`span`,{children:[`Target Tool:`,` `,(0,F.jsx)(`strong`,{className:`text-white`,children:e||`Analyze_Synthetic_Bank_Transactions`})]}),(0,F.jsxs)(`span`,{children:[`Endpoint: `,u||`127.0.0.1:15021`]})]})]})})}function _A({history:e,onSelectEntry:t,onClearHistory:n}){return e.length===0?(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-center text-zinc-500`,children:[(0,F.jsx)(ie,{className:`h-8 w-8 mb-2 stroke-1 opacity-50`}),(0,F.jsx)(`p`,{className:`text-xs font-mono`,children:`No execution history recorded in this session.`}),(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-600 mt-1`,children:`Executed operations and their cryptographic receipts will be preserved here.`})]}):(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border pb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`span`,{className:`text-xs font-mono text-zinc-300`,children:[e.length,` Execution`,e.length>1?`s`:``,` Recorded`]}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-500 font-mono`,children:`(Max 20 preserved in memory)`})]}),(0,F.jsxs)(MO,{size:`sm`,variant:`outline`,onClick:n,className:`h-6 px-2 text-[10px] font-mono border-white/10 text-zinc-400 hover:text-rose-300 hover:bg-rose-500/10`,children:[(0,F.jsx)(Ee,{className:`h-3 w-3 mr-1`}),`Clear`]})]}),(0,F.jsx)(`div`,{className:`divide-y divide-border/60`,children:e.map(e=>{let n=new Date(e.timestamp).toLocaleTimeString(),r=e.status===`success`,i=e.status===`cancelled`;return(0,F.jsxs)(`div`,{className:`py-2.5 flex items-center justify-between gap-4 hover:bg-surface1/30 px-2 rounded-md transition-colors`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[r?(0,F.jsx)(k,{className:`h-4 w-4 text-emerald-400 shrink-0`}):i?(0,F.jsx)(ie,{className:`h-4 w-4 text-amber-400 shrink-0`}):(0,F.jsx)(re,{className:`h-4 w-4 text-rose-400 shrink-0`}),(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`span`,{className:`text-xs font-mono text-white truncate font-medium`,children:e.tool}),(0,F.jsx)(AO,{variant:`outline`,className:`text-[9px] py-0 px-1 font-mono border-white/10 text-zinc-400 uppercase`,children:e.mode})]}),(0,F.jsxs)(`div`,{className:`text-[10px] font-mono text-zinc-500 flex items-center gap-2 mt-0.5`,children:[(0,F.jsx)(`span`,{children:n}),e.durationMs!==void 0&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{children:`•`}),(0,F.jsxs)(`span`,{children:[e.durationMs,`ms`]})]}),e.meta?.telemetry?.fuel&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{children:`•`}),(0,F.jsxs)(`span`,{children:[e.meta.telemetry.fuel.consumed,` Fuel`]})]})]})]})]}),(0,F.jsxs)(MO,{size:`sm`,variant:`ghost`,onClick:()=>t(e),className:`h-7 px-2.5 text-xs font-mono text-cyan-400 hover:text-cyan-300 hover:bg-cyan-500/10 shrink-0`,title:`Inspect this execution result`,children:[(0,F.jsx)(ve,{className:`h-3 w-3 mr-1`}),`Inspect`]})]},e.id)})})]})}var vA=nD(`relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7`,{variants:{variant:{default:`bg-background text-foreground border-border`,destructive:`border-destructive/50 bg-destructive/10 text-destructive dark:border-destructive [&>svg]:text-destructive`,success:`border-success/50 bg-success/10 text-success dark:border-success [&>svg]:text-success`,warning:`border-warning/50 bg-warning/10 text-warning dark:border-warning [&>svg]:text-warning`}},defaultVariants:{variant:`default`}}),yA=b.forwardRef(({className:e,variant:t,...n},r)=>(0,F.jsx)(`div`,{ref:r,role:`alert`,className:OO(vA({variant:t}),e),...n}));yA.displayName=`Alert`;var bA=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`h5`,{ref:n,className:OO(`mb-1 font-medium leading-none tracking-tight text-white`,e),...t}));bA.displayName=`AlertTitle`;var xA=b.forwardRef(({className:e,...t},n)=>(0,F.jsx)(`div`,{ref:n,className:OO(`text-xs [&_p]:leading-relaxed text-muted-foreground`,e),...t}));xA.displayName=`AlertDescription`;function SA({result:e,meta:t}){let[n,r]=(0,b.useState)(`visual`),[i,a]=(0,b.useState)(!1),o=async()=>{await Me(JSON.stringify(e,null,2))&&(a(!0),setTimeout(()=>a(!1),1500))},s=(0,b.useMemo)(()=>e.totalBalance!==void 0||e.totalAccounts!==void 0?`banking`:e.totalPatients!==void 0||e.diagnosesDistribution!==void 0?`healthcare`:e.ticksProcessed!==void 0||e.vwap!==void 0?`hft`:e.totalSamples!==void 0||e.avgTemperature!==void 0?`iot`:e.layerAudit!==void 0||e.protocol!==void 0?`perimeter`:`generic`,[e]),c=e=>new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,maximumFractionDigits:0}).format(e);return(0,F.jsxs)(`div`,{className:`space-y-4`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-b border-border/60 pb-3`,children:[(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-medium`,children:[(0,F.jsx)(Ce,{className:`h-3.5 w-3.5`}),(0,F.jsxs)(`span`,{children:[s===`banking`&&`Core Banking Enclave • Verified Aggregation`,s===`healthcare`&&`Healthcare EHR Enclave • HIPAA Protected`,s===`hft`&&`HFT Market Oracle • Ultra Low Latency`,s===`iot`&&`Industrial Edge Telemetry • Hostile WAN Protected`,s===`perimeter`&&`Border LIO Gateway • Zero-Trust Perimeter`,s===`generic`&&`Origin Compute • Zero-Trust Execution`]})]})}),(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center bg-surface1 p-0.5 rounded-lg border border-white/10 text-[11px]`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(`visual`),className:`px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${n===`visual`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(te,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Visual Analytics`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>r(`json`),className:`px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${n===`json`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(M,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Raw JSON`})]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:o,className:`text-[11px] flex items-center gap-1.5 transition-colors px-2.5 py-1 rounded-md font-medium border cursor-pointer ${i?`text-emerald-400 bg-emerald-500/15 border-emerald-500/30`:`text-zinc-300 hover:text-white bg-surface1 hover:bg-white/5 border-white/10`}`,title:`Copy JSON Payload`,children:i?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}),(0,F.jsx)(`span`,{children:`Copied`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(j,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Copy`})]})})]})]}),n===`visual`?(0,F.jsxs)(`div`,{className:`space-y-4`,children:[s===`banking`&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-emerald-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Total Accounts In-Situ`}),(0,F.jsx)(se,{className:`h-3.5 w-3.5 text-emerald-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:(e.totalAccounts??0).toLocaleString()}),(0,F.jsxs)(`div`,{className:`text-[10px] text-emerald-400/80 mt-1 flex items-center gap-1`,children:[(0,F.jsx)(k,{className:`h-2.5 w-2.5`}),(0,F.jsx)(`span`,{children:`100% Retained at origin`})]})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-emerald-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Aggregated Balance`}),(0,F.jsx)(De,{className:`h-3.5 w-3.5 text-emerald-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-emerald-400 mt-1 font-mono`,children:c(e.totalBalance??0)}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Computed inside V8 Sandbox`})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-white/10 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Mean Account Balance`}),(0,F.jsx)(D,{className:`h-3.5 w-3.5 text-cyan-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:c(e.averageBalance??0)}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Statistical variance preserved`})]})]}),s===`healthcare`&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-cyan-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Audited Patients`}),(0,F.jsx)(se,{className:`h-3.5 w-3.5 text-cyan-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:(e.totalPatients??0).toLocaleString()}),(0,F.jsxs)(`div`,{className:`text-[10px] text-cyan-400/80 mt-1 flex items-center gap-1`,children:[(0,F.jsx)(me,{className:`h-2.5 w-2.5`}),(0,F.jsx)(`span`,{children:`Zero HIPAA records leaked`})]})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-cyan-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Mean Population Age`}),(0,F.jsx)(D,{className:`h-3.5 w-3.5 text-cyan-400`})]}),(0,F.jsxs)(`div`,{className:`text-xl font-bold text-cyan-300 mt-1 font-mono`,children:[e.averageAge??0,` yrs`]}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Aggregated demographic mean`})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-white/10 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Diagnostic Classes`}),(0,F.jsx)(fe,{className:`h-3.5 w-3.5 text-purple-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:Object.keys(e.diagnosesDistribution||{}).length}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Differential privacy preserved`})]})]}),s===`hft`&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-purple-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Orderbook Ticks`}),(0,F.jsx)(je,{className:`h-3.5 w-3.5 text-purple-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:(e.ticksProcessed??0).toLocaleString()}),(0,F.jsx)(`div`,{className:`text-[10px] text-purple-400/80 mt-1`,children:`Sub-millisecond processing`})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-purple-500/20 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Volume-Weighted Price (VWAP)`}),(0,F.jsx)(De,{className:`h-3.5 w-3.5 text-emerald-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-emerald-400 mt-1 font-mono`,children:e.vwap?`$${e.vwap.toFixed(4)}`:`Computed`}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Real-time orderbook weighting`})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-white/10 shadow-sm`,children:[(0,F.jsxs)(`div`,{className:`text-[11px] text-zinc-400 font-medium flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Avg Spread (bps)`}),(0,F.jsx)(D,{className:`h-3.5 w-3.5 text-amber-400`})]}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:e.avgSpreadBps?`${Number(e.avgSpreadBps).toFixed(1)} bps`:`0 bps`}),(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 mt-1`,children:`Microstructure liquidity metric`})]})]}),s===`iot`&&(0,F.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-4 gap-3`,children:[(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-white/10`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-zinc-400 font-medium`,children:`Sensor Samples`}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-white mt-1 font-mono`,children:(e.totalSamples??0).toLocaleString()})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-cyan-500/20`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-zinc-400 font-medium`,children:`Avg Temperature`}),(0,F.jsxs)(`div`,{className:`text-xl font-bold text-cyan-300 mt-1 font-mono`,children:[e.avgTemperature??0,`°C`]})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-amber-500/20`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-zinc-400 font-medium`,children:`Max Temp Peak`}),(0,F.jsxs)(`div`,{className:`text-xl font-bold text-amber-400 mt-1 font-mono`,children:[e.maxTemperature??0,`°C`]})]}),(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/80 border border-rose-500/20`,children:[(0,F.jsx)(`div`,{className:`text-[11px] text-zinc-400 font-medium`,children:`Critical Alerts`}),(0,F.jsx)(`div`,{className:`text-xl font-bold text-rose-400 mt-1 font-mono`,children:e.criticalCount??0})]})]}),s===`perimeter`&&e.layerAudit&&Array.isArray(e.layerAudit)&&(0,F.jsxs)(`div`,{className:`p-4 rounded-lg bg-surface1/60 border border-emerald-500/20 space-y-2`,children:[(0,F.jsxs)(`div`,{className:`text-xs font-semibold text-emerald-400 flex items-center gap-1.5`,children:[(0,F.jsx)(Ce,{className:`h-4 w-4`}),(0,F.jsx)(`span`,{children:`Zero-Trust 6-Layer Security Audit Confirmed`})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2 pt-1`,children:e.layerAudit.map(e=>(0,F.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-mono text-zinc-300 bg-surface1 px-2.5 py-1.5 rounded border border-white/5`,children:[(0,F.jsx)(k,{className:`h-3.5 w-3.5 text-emerald-400 shrink-0`}),(0,F.jsx)(`span`,{children:e})]},e))})]}),(e.distribution||e.diagnosesDistribution||e.statusDistribution)&&(0,F.jsxs)(`div`,{className:`p-3.5 rounded-lg bg-surface1/60 border border-white/10 space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-zinc-200`,children:`Distribution Breakdown (In-Situ Grouping)`}),(0,F.jsx)(`span`,{className:`text-[10px] font-mono text-zinc-400`,children:`Aggregated at Origin`})]}),(0,F.jsx)(`div`,{className:`space-y-2`,children:Object.entries(e.distribution||e.diagnosesDistribution||e.statusDistribution||{}).map(([t,n])=>{let r=Number(n)||0,i=e.totalAccounts||e.totalPatients||e.totalSamples||1,a=Math.min(100,Math.round(r/i*100));return(0,F.jsxs)(`div`,{className:`space-y-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-mono`,children:[(0,F.jsx)(`span`,{className:`text-zinc-300`,children:t}),(0,F.jsxs)(`span`,{className:`text-zinc-400`,children:[r.toLocaleString(),` (`,a,`%)`]})]}),(0,F.jsx)(`div`,{className:`h-1.5 w-full bg-white/5 rounded-full overflow-hidden`,children:(0,F.jsx)(`div`,{className:`h-full bg-emerald-500 rounded-full transition-all duration-500`,style:{width:`${a}%`}})})]},t)})})]}),(0,F.jsxs)(`div`,{className:`p-4 rounded-lg bg-gradient-to-br from-emerald-950/20 via-surface1/80 to-surface1/40 border border-emerald-500/30 space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(we,{className:`h-4 w-4 text-emerald-400`}),(0,F.jsx)(`h4`,{className:`text-xs font-bold text-white uppercase tracking-wider`,children:`Protocol Value Differential: LIOP vs Traditional MCP`})]}),(0,F.jsx)(`span`,{className:`text-[10px] font-mono px-2 py-0.5 rounded bg-emerald-500/20 text-emerald-300 border border-emerald-500/30`,children:`SOVEREIGNTY CERTIFIED`})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3 pt-1 text-xs`,children:[(0,F.jsxs)(`div`,{className:`space-y-1 bg-surface1/60 p-2.5 rounded border border-white/5`,children:[(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 font-medium`,children:`LLM Context Tokens`}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,F.jsxs)(`span`,{className:`text-sm font-bold text-emerald-400 font-mono`,children:[`~`,t?.telemetry?.tokens?.totalTokens??197,` tok`]}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-500 line-through font-mono`,children:`~48,000 tok`})]}),(0,F.jsxs)(`div`,{className:`text-[10px] text-emerald-400/90 flex items-center gap-0.5`,children:[(0,F.jsx)(O,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`99.6% context reduction`})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1 bg-surface1/60 p-2.5 rounded border border-white/5`,children:[(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 font-medium`,children:`Wire Egress Payload`}),(0,F.jsxs)(`div`,{className:`flex items-baseline gap-1.5`,children:[(0,F.jsx)(`span`,{className:`text-sm font-bold text-emerald-400 font-mono`,children:t?.telemetry?.bandwidth?.payloadBytes?`${(t.telemetry.bandwidth.payloadBytes/1024).toFixed(2)} KB`:`0.72 KB`}),(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-500 line-through font-mono`,children:`195.2 KB`})]}),(0,F.jsxs)(`div`,{className:`text-[10px] text-emerald-400/90 flex items-center gap-0.5`,children:[(0,F.jsx)(O,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`99.6% network reduction`})]})]}),(0,F.jsxs)(`div`,{className:`space-y-1 bg-surface1/60 p-2.5 rounded border border-white/5`,children:[(0,F.jsx)(`div`,{className:`text-[10px] text-zinc-400 font-medium`,children:`PII Exposure Boundary`}),(0,F.jsx)(`div`,{className:`flex items-baseline gap-1.5`,children:(0,F.jsx)(`span`,{className:`text-sm font-bold text-emerald-400 font-mono`,children:`0 Leaked Records`})}),(0,F.jsxs)(`div`,{className:`text-[10px] text-emerald-400/90 flex items-center gap-0.5`,children:[(0,F.jsx)(k,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Enclave & PQC Kyber-768 sealed`})]})]})]})]})]}):(0,F.jsx)(`div`,{className:`rounded-lg bg-editor border border-border p-3.5 font-mono text-[11px] text-[#86efac] overflow-x-auto leading-relaxed shadow-inner`,children:(0,F.jsx)(`pre`,{children:JSON.stringify(e,null,2)})})]})}function CA({result:e,errorAlert:t,isRunning:n,meta:r}){return(0,F.jsxs)(pA,{value:`output`,className:`m-0 space-y-3 pb-5`,children:[t&&(0,F.jsx)(`div`,{className:`mb-3 pt-1`,children:(0,F.jsxs)(yA,{variant:`destructive`,className:`border-destructive/40 bg-destructive/10`,children:[(0,F.jsx)(bA,{className:`text-xs font-semibold`,children:t.title}),(0,F.jsx)(xA,{className:`text-xs leading-relaxed mt-1`,children:t.desc})]})}),e?(0,F.jsx)(SA,{result:e,meta:r}):!t&&!n?(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-14 text-zinc-400 text-center space-y-2`,children:[(0,F.jsx)(Te,{className:`h-6 w-6 text-zinc-500`}),(0,F.jsx)(`p`,{className:`text-xs font-medium text-zinc-200`,children:`Awaiting Execution`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-400 max-w-[240px]`,children:[`Select a template, inspect the runtime schema with`,` `,(0,F.jsx)(`strong`,{children:`Env Schema`}),`, or click `,(0,F.jsx)(`strong`,{children:`Execute Logic`}),`.`]})]}):n?(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-14 text-zinc-400 text-center space-y-2.5`,children:[(0,F.jsx)(pe,{className:`h-6 w-6 animate-spin text-primary`}),(0,F.jsx)(`p`,{className:`text-xs text-zinc-300`,children:`Injecting logic and enforcing Zero-Trust policies...`})]}):null]})}function wA({meta:e}){let[t,n]=(0,b.useState)(!1),r=async()=>{e?.zkHash&&await Me(e.zkHash)&&(n(!0),setTimeout(()=>n(!1),1500))};if(!e?.telemetry)return(0,F.jsx)(pA,{value:`telemetry`,className:`m-0 space-y-3 pb-5`,children:(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-14 text-zinc-400 text-center space-y-2`,children:[(0,F.jsx)(P,{className:`h-6 w-6 text-zinc-500`}),(0,F.jsx)(`p`,{className:`text-xs font-medium text-zinc-200`,children:`No Live Telemetry Recorded`}),(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-400 max-w-[240px]`,children:`Execute a capability to measure live network RTT, BPE tokens, wire egress, and WASI instruction fuel.`})]})});let{tokens:i,fuel:a,bandwidth:o,phases:s}=e.telemetry;return(0,F.jsx)(pA,{value:`telemetry`,className:`m-0 space-y-3 pb-5`,children:(0,F.jsxs)(`div`,{className:`space-y-3 pt-1 text-xs`,children:[i&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(`div`,{className:`p-1.5 rounded-md bg-secondary text-primary`,children:(0,F.jsx)(Te,{className:`h-4 w-4`})}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`font-semibold text-white text-[11px]`,children:`Context Token Telemetry (BPE)`}),(0,F.jsxs)(`p`,{className:`text-[10px] text-zinc-400`,children:[`Tokenizer: `,i.estimatorName||`o200k_base`]})]})]}),i.savingsPercent!==void 0&&i.traditionalContextTokens!==void 0&&i.traditionalContextTokens>0&&(0,F.jsxs)(AO,{className:`bg-emerald-500 text-black font-mono font-bold text-xs px-2 py-0.5 shadow-sm`,children:[`-`,i.savingsPercent,`% Tokens`]})]}),i.traditionalContextTokens&&i.traditionalContextTokens>0?(0,F.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 pt-1 border-t border-border/60`,children:[(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`In-Situ Module`}),(0,F.jsxs)(`p`,{className:`text-sm font-bold font-mono text-emerald-400`,children:[i.totalTokens??0,` `,(0,F.jsx)(`span`,{className:`text-[10px] font-normal text-zinc-400`,children:`tok`})]}),(0,F.jsxs)(`p`,{className:`text-[9px] text-zinc-400 mt-0.5 font-mono`,children:[i.inputTokens??0,` in / `,i.outputTokens??0,` `,`out`]})]}),(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Raw Origin Dataset`}),(0,F.jsxs)(`p`,{className:`text-sm font-bold font-mono text-zinc-300`,children:[i.traditionalContextTokens.toLocaleString(),` `,(0,F.jsx)(`span`,{className:`text-[10px] font-normal text-zinc-400`,children:`tok`})]}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 mt-0.5`,children:`Unfiltered context`})]}),(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Context Saved`}),(0,F.jsxs)(`p`,{className:`text-sm font-bold font-mono text-primary`,children:[(i.traditionalContextTokens-(i.totalTokens??0)).toLocaleString(),` `,(0,F.jsx)(`span`,{className:`text-[10px] font-normal text-zinc-400`,children:`tok`})]}),(0,F.jsx)(`p`,{className:`text-[9px] text-zinc-400 mt-0.5`,children:`Kept in origin enclave`})]})]}):(0,F.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 pt-1 border-t border-border/60`,children:[(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Input Tokens`}),(0,F.jsx)(`p`,{className:`text-sm font-bold font-mono text-cyan-300`,children:i.inputTokens??0})]}),(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Output Tokens`}),(0,F.jsx)(`p`,{className:`text-sm font-bold font-mono text-emerald-400`,children:i.outputTokens??0})]}),(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border`,children:[(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Total Tokens`}),(0,F.jsx)(`p`,{className:`text-sm font-bold font-mono text-white`,children:i.totalTokens??0})]})]})]}),a&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(P,{className:`h-4 w-4 text-primary`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`font-semibold text-white text-[11px]`,children:`WASI Instruction Fuel (AST Deterministic)`}),(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Execution quota enforced by origin runtime`})]})]}),(0,F.jsxs)(`div`,{className:`text-right font-mono`,children:[(0,F.jsx)(`span`,{className:`text-xs font-bold text-white`,children:(a.consumed??0).toLocaleString()}),(0,F.jsxs)(`span`,{className:`text-[10px] text-zinc-400`,children:[` `,`/ `,(a.maxLimit??1e6).toLocaleString(),` u`]})]})]}),(0,F.jsx)(`div`,{className:`w-full bg-secondary/80 rounded-full h-2 overflow-hidden border border-border`,children:(0,F.jsx)(`div`,{className:`bg-primary h-2 rounded-full transition-all duration-300`,style:{width:`${Math.min(100,Math.max(2,a.percentUsed??0))}%`}})}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] text-zinc-400 font-mono`,children:[(0,F.jsxs)(`span`,{children:[`Fuel Used:`,` `,(0,F.jsxs)(`strong`,{className:`text-primary font-semibold`,children:[a.percentUsed??0,`%`]})]}),(0,F.jsx)(`span`,{children:`Quantization: 100-Fuel-Bucket`})]})]}),o&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(le,{className:`h-4 w-4 text-primary`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`font-semibold text-white text-[11px]`,children:`Wire Payload & Egress Traffic`}),(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`Physical socket egress measured at runtime`})]})]}),o.egressReductionPercent!==void 0&&o.rawDatasetProtectedBytes!==void 0&&o.rawDatasetProtectedBytes>0&&(0,F.jsxs)(AO,{variant:`outline`,className:`border-emerald-500/40 text-emerald-400 font-mono text-[10px]`,children:[`-`,o.egressReductionPercent,`% Wire Reduction`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-xs`,children:[(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border font-mono`,children:[(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 block font-sans`,children:`Wire Payload (Envelope + Output):`}),(0,F.jsx)(`strong`,{className:`text-white text-xs`,children:o.payloadBytes===void 0?`Measured in socket`:`${(o.payloadBytes/1024).toFixed(2)} KB`})]}),(0,F.jsxs)(`div`,{className:`p-2 rounded bg-secondary/40 border border-border font-mono`,children:[(0,F.jsx)(`span`,{className:`text-[10px] text-zinc-400 block font-sans`,children:`Origin Dataset Retained:`}),(0,F.jsx)(`strong`,{className:`text-emerald-400 text-xs`,children:o.rawDatasetProtectedBytes&&o.rawDatasetProtectedBytes>0?`${(o.rawDatasetProtectedBytes/1024).toFixed(1)} KB`:`Zero egress leakage`})]})]})]}),s&&(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-1.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-white text-[11px] block`,children:`Phase Latency Breakdown`}),(0,F.jsxs)(`span`,{className:`text-[10px] font-mono text-zinc-400`,children:[`Total: `,s.totalLatencyMs??e.latencyMs??0,` ms`]})]}),(0,F.jsxs)(`div`,{className:`grid grid-cols-5 gap-1.5 text-center font-mono text-[10px]`,children:[(0,F.jsxs)(`div`,{className:`p-1.5 rounded bg-secondary/50 border border-border`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400 block text-[9px] font-sans`,children:`Route`}),(0,F.jsxs)(`span`,{className:`text-zinc-200 font-semibold`,children:[s.discoveryMs??0,` ms`]})]}),(0,F.jsxs)(`div`,{className:`p-1.5 rounded bg-secondary/50 border border-border`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400 block text-[9px] font-sans`,children:`Kyber`}),(0,F.jsxs)(`span`,{className:`text-primary font-semibold`,children:[s.pqcMs??0,` ms`]})]}),(0,F.jsxs)(`div`,{className:`p-1.5 rounded bg-secondary/50 border border-border`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400 block text-[9px] font-sans`,children:`Seal`}),(0,F.jsxs)(`span`,{className:`text-zinc-200 font-semibold`,children:[s.sealingMs??0,` ms`]})]}),(0,F.jsxs)(`div`,{className:`p-1.5 rounded bg-secondary/50 border border-border`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400 block text-[9px] font-sans`,children:`Sandbox`}),(0,F.jsxs)(`span`,{className:`text-emerald-400 font-semibold`,children:[s.wasiSandboxMs??0,` ms`]})]}),(0,F.jsxs)(`div`,{className:`p-1.5 rounded bg-secondary/50 border border-border`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400 block text-[9px] font-sans`,children:`ZK-Proof`}),(0,F.jsxs)(`span`,{className:`text-primary font-semibold`,children:[s.zkVerificationMs??0,` ms`]})]})]})]}),(0,F.jsxs)(`div`,{className:`p-3 rounded-lg bg-surface1 border border-border space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsx)(N,{className:`h-4 w-4 text-emerald-400`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`font-semibold text-white text-[11px]`,children:`ZK-Receipt Proof & PQC Suite`}),(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400`,children:`ML-KEM-768 • AES-256-GCM • HMAC SHA-256`})]})]}),(0,F.jsx)(AO,{variant:`success`,className:`font-mono text-[10px]`,children:`VERIFIED`})]}),e.zkHash&&(0,F.jsxs)(`div`,{className:`flex items-center justify-between bg-editor p-2 rounded border border-border font-mono text-[10px] text-zinc-300`,children:[(0,F.jsx)(`span`,{className:`truncate mr-2 select-all font-mono text-emerald-300`,children:e.zkHash}),(0,F.jsx)(`button`,{type:`button`,onClick:r,className:`text-[10px] flex items-center gap-1 text-zinc-400 hover:text-white shrink-0 px-1.5 py-0.5 rounded bg-surface1 border border-border transition-colors cursor-pointer`,title:`Copy ZK-Receipt Hash`,children:t?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}),(0,F.jsx)(`span`,{className:`text-emerald-400`,children:`Copied`})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(j,{className:`h-3 w-3`}),(0,F.jsx)(`span`,{children:`Copy`})]})})]})]})]})})}function TA(e,[t,n]){return Math.min(n,Math.max(t,e))}function EA(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var DA=`ScrollArea`,[OA,kA]=VO(DA),[AA,jA]=OA(DA),MA=b.forwardRef((e,t)=>{let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=b.useState(null),[l,u]=b.useState(null),[d,f]=b.useState(null),[p,m]=b.useState(null),[h,g]=b.useState(null),[_,v]=b.useState(0),[y,x]=b.useState(0),[S,C]=b.useState(!1),[w,T]=b.useState(!1),E=GO(t,e=>c(e)),D=gk(i);return(0,F.jsx)(AA,{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:v,onCornerHeightChange:x,children:(0,F.jsx)(lk.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})});MA.displayName=DA;var NA=`ScrollAreaViewport`,PA=b.forwardRef((e,t)=>{let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=jA(NA,n),s=GO(t,b.useRef(null),o.onViewportChange);return(0,F.jsxs)(F.Fragment,{children:[(0,F.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:i}),(0,F.jsx)(lk.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,F.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})});PA.displayName=NA;var FA=`ScrollAreaScrollbar`,IA=b.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=jA(FA,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return b.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,F.jsx)(LA,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,F.jsx)(RA,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,F.jsx)(zA,{...r,ref:t,forceMount:n}):i.type===`always`?(0,F.jsx)(BA,{...r,ref:t,"data-state":`visible`}):null});IA.displayName=FA;var LA=b.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=jA(FA,e.__scopeScrollArea),[a,o]=b.useState(!1);return b.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=()=>{window.clearTimeout(t),o(!0)},r=()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)};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,F.jsx)(zk,{present:n||a,children:(0,F.jsx)(zA,{"data-state":a?`visible`:`hidden`,...r,ref:t})})}),RA=b.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=jA(FA,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=oj(()=>c(`SCROLL_END`),100),[s,c]=EA(`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 b.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),b.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,F.jsx)(zk,{present:n||s!==`hidden`,children:(0,F.jsx)(BA,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:BO(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:BO(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})}),zA=b.forwardRef((e,t)=>{let n=jA(FA,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=b.useState(!1),s=e.orientation===`horizontal`,c=oj(()=>{if(n.viewport){let e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;o(s?e:t)}},10);return sj(n.viewport,c),sj(n.content,c),(0,F.jsx)(zk,{present:r||a,children:(0,F.jsx)(BA,{"data-state":a?`visible`:`hidden`,...i,ref:t})})}),BA=b.forwardRef((e,t)=>{let{orientation:n=`vertical`,...r}=e,i=jA(FA,e.__scopeScrollArea),a=b.useRef(null),o=b.useRef(0),[s,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=$A(s.viewport,s.content),u={...r,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>a.current=e,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:e=>o.current=e};function d(e,t){return tj(e,o.current,s,t)}return n===`horizontal`?(0,F.jsx)(VA,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=nj(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===`vertical`?(0,F.jsx)(HA,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=nj(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}),VA=b.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=jA(FA,e.__scopeScrollArea),[o,s]=b.useState(),c=b.useRef(null),l=GO(t,c,a.onScrollbarXChange);return b.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,F.jsx)(GA,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":ej(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),ij(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:QA(o.paddingLeft),paddingEnd:QA(o.paddingRight)}})}})}),HA=b.forwardRef((e,t)=>{let{sizes:n,onSizesChange:r,...i}=e,a=jA(FA,e.__scopeScrollArea),[o,s]=b.useState(),c=b.useRef(null),l=GO(t,c,a.onScrollbarYChange);return b.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,F.jsx)(GA,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":ej(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),ij(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:QA(o.paddingTop),paddingEnd:QA(o.paddingBottom)}})}})}),[UA,WA]=OA(FA),GA=b.forwardRef((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=jA(FA,n),[m,h]=b.useState(null),g=GO(t,e=>h(e)),_=b.useRef(null),v=b.useRef(``),y=p.viewport,x=r.content-r.viewport,S=uk(u),C=uk(c),w=oj(d,10);function T(e){_.current&&l({x:e.clientX-_.current.left,y:e.clientY-_.current.top})}return b.useEffect(()=>{let e=e=>{let t=e.target;m?.contains(t)&&S(e,x)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,x,S]),b.useEffect(C,[r,C]),sj(m,w),sj(p.content,w),(0,F.jsx)(UA,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:uk(a),onThumbPointerUp:uk(o),onThumbPositionChange:C,onThumbPointerDown:uk(s),children:(0,F.jsx)(lk.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:BO(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:BO(e.onPointerMove,T),onPointerUp:BO(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})}),KA=`ScrollAreaThumb`,qA=b.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=WA(KA,e.__scopeScrollArea);return(0,F.jsx)(zk,{present:n||i.hasThumb,children:(0,F.jsx)(JA,{ref:t,...r})})}),JA=b.forwardRef((e,t)=>{let{__scopeScrollArea:n,style:r,...i}=e,a=jA(KA,n),o=WA(KA,n),{onThumbPositionChange:s}=o,c=GO(t,e=>o.onThumbChange(e)),l=b.useRef(void 0),u=oj(()=>{l.current&&=(l.current(),void 0)},100);return b.useEffect(()=>{let e=a.viewport;if(e){let t=()=>{u(),l.current||(l.current=aj(e,s),s())};return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,F.jsx)(lk.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:BO(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:BO(e.onPointerUp,o.onThumbPointerUp)})});qA.displayName=KA;var YA=`ScrollAreaCorner`,XA=b.forwardRef((e,t)=>{let n=jA(YA,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,F.jsx)(ZA,{...e,ref:t}):null});XA.displayName=YA;var ZA=b.forwardRef((e,t)=>{let{__scopeScrollArea:n,...r}=e,i=jA(YA,n),[a,o]=b.useState(0),[s,c]=b.useState(0),l=!!(a&&s);return sj(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),sj(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),l?(0,F.jsx)(lk.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null});function QA(e){return e?parseInt(e,10):0}function $A(e,t){let n=e/t;return isNaN(n)?0:n}function ej(e){let t=$A(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function tj(e,t,n,r=`ltr`){let i=ej(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===`ltr`?[0,u]:[u*-1,0];return rj([c,l],d)(e)}function nj(e,t,n=`ltr`){let r=ej(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=TA(e,n===`ltr`?[0,o]:[o*-1,0]);return rj([0,o],[0,s])(c)}function rj(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])}}function ij(e,t){return e>0&&e<t}var aj=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(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)})(),()=>window.cancelAnimationFrame(r)};function oj(e,t){let n=uk(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function sj(e,t){let n=uk(t);ak(()=>{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])}var cj=MA,lj=PA,uj=IA,dj=XA,fj=b.forwardRef(({className:e,children:t,...n},r)=>(0,F.jsxs)(cj,{ref:r,className:OO(`relative overflow-hidden`,e),...n,children:[(0,F.jsx)(lj,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,F.jsx)(pj,{}),(0,F.jsx)(dj,{})]}));fj.displayName=cj.displayName;var pj=b.forwardRef(({className:e,orientation:t=`vertical`,...n},r)=>(0,F.jsx)(uj,{ref:r,orientation:t,className:OO(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2 border-l border-l-transparent p-[1px]`,t===`horizontal`&&`h-2 flex-col border-t border-t-transparent p-[1px]`,e),...n,children:(0,F.jsx)(qA,{className:`relative flex-1 rounded-full bg-border/40 hover:bg-border/70 transition-colors`})}));pj.displayName=uj.displayName;function mj({timeline:e,result:t,meta:n,errorAlert:r,isRunning:i,code:a,selectedToolName:o,targetType:s,grpcTarget:c,httpUrl:l,stdioCmd:u,history:d=[],onSelectHistoryEntry:f,onClearHistory:p,activeTab:m,onTabChange:h}){let[g,_]=(0,b.useState)(`output`),v=m??g,y=e=>{h?h(e):_(e)};return(0,F.jsxs)(`div`,{className:`flex flex-col gap-3 min-h-0 flex-1`,children:[(0,F.jsxs)(NO,{className:`p-3 bg-card border-border shadow-card shrink-0`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsxs)(`span`,{className:`text-xs font-semibold text-white flex items-center gap-1.5`,children:[(0,F.jsx)(D,{className:`h-3.5 w-3.5 text-primary`}),`Execution Timeline & Cryptographic Pipeline`]}),i?(0,F.jsxs)(AO,{variant:`warning`,className:`text-[10px] font-mono flex items-center gap-1`,children:[(0,F.jsx)(pe,{className:`h-2.5 w-2.5 animate-spin`}),` In-Situ Processing`]}):(0,F.jsxs)(`span`,{className:`text-[10px] text-zinc-400 font-mono`,children:[e.filter(e=>e.status===`success`).length,` /`,` `,e.length,` Steps`]})]}),(0,F.jsx)(`div`,{className:`grid grid-cols-5 gap-2`,children:e.map(e=>{let t=e.status===`success`,n=e.status===`running`,r=e.status===`failed`;return(0,F.jsxs)(`div`,{className:`p-2 rounded-lg border transition-all text-xs ${t?`bg-emerald-950/20 border-emerald-500/30 text-emerald-400`:n?`bg-amber-950/20 border-amber-500/40 text-amber-400 animate-pulse`:r?`bg-rose-950/20 border-rose-500/40 text-rose-400`:`bg-surface1/40 border-border/50 text-zinc-500`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-[11px] truncate`,children:e.label}),t&&(0,F.jsx)(k,{className:`h-3 w-3 text-emerald-400 shrink-0`}),n&&(0,F.jsx)(pe,{className:`h-3 w-3 text-amber-400 animate-spin shrink-0`}),r&&(0,F.jsx)(re,{className:`h-3 w-3 text-rose-400 shrink-0`})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[10px] font-mono`,children:[(0,F.jsx)(`span`,{className:`truncate text-zinc-400`,title:e.detail,children:e.detail}),e.durationMs!==void 0&&(0,F.jsxs)(`span`,{className:`shrink-0 ml-1 text-zinc-300`,children:[e.durationMs,`ms`]})]})]},e.phase)})})]}),(0,F.jsx)(NO,{className:`flex-1 min-h-0 bg-card border-border shadow-card flex flex-col overflow-hidden`,children:(0,F.jsxs)(uA,{value:v,onValueChange:e=>y(e),className:`flex-1 flex flex-col min-h-0`,children:[(0,F.jsxs)(PO,{className:`py-2.5 px-5 border-b border-border bg-surface1/60 shrink-0 flex flex-row items-center justify-between`,children:[(0,F.jsx)(`div`,{className:`flex items-center gap-3`,children:(0,F.jsxs)(`div`,{className:`flex items-center gap-1 p-0.5 bg-surface1 border border-border rounded-lg relative`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>y(`output`),className:`relative z-10 text-xs px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5 cursor-pointer`,children:[v===`output`&&(0,F.jsx)(md.div,{layoutId:`resultsTabPill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(Te,{className:`h-3.5 w-3.5 relative z-20 ${v===`output`?`text-black`:`text-zinc-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${v===`output`?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:`Output`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>y(`debug`),className:`relative z-10 text-xs px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5 cursor-pointer`,children:[v===`debug`&&(0,F.jsx)(md.div,{layoutId:`resultsTabPill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(ee,{className:`h-3.5 w-3.5 relative z-20 ${v===`debug`?`text-black`:`text-amber-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${v===`debug`?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:`Debug`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>y(`export`),className:`relative z-10 text-xs px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5 cursor-pointer`,children:[v===`export`&&(0,F.jsx)(md.div,{layoutId:`resultsTabPill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(ce,{className:`h-3.5 w-3.5 relative z-20 ${v===`export`?`text-black`:`text-cyan-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${v===`export`?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:`Export Code`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>y(`telemetry`),className:`relative z-10 text-xs px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5 cursor-pointer`,children:[v===`telemetry`&&(0,F.jsx)(md.div,{layoutId:`resultsTabPill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(D,{className:`h-3.5 w-3.5 relative z-20 ${v===`telemetry`?`text-black`:`text-emerald-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${v===`telemetry`?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:`Live Telemetry`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>y(`history`),className:`relative z-10 text-xs px-2.5 py-1 font-medium transition-colors duration-200 flex items-center gap-1.5 cursor-pointer`,children:[v===`history`&&(0,F.jsx)(md.div,{layoutId:`resultsTabPill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(ue,{className:`h-3.5 w-3.5 relative z-20 ${v===`history`?`text-black`:`text-amber-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${v===`history`?`text-black font-semibold`:`text-zinc-300 hover:text-white`}`,children:`History`}),d.length>0&&(0,F.jsx)(`span`,{className:`relative z-20 text-[9px] font-mono px-1 py-0 rounded ${v===`history`?`bg-black/20 text-black font-bold`:`bg-white/10 text-zinc-400`}`,children:d.length})]})]})}),n?.latencyMs!==void 0&&(0,F.jsxs)(AO,{variant:`outline`,className:`text-[10px] font-mono flex items-center gap-1 border-white/15 bg-secondary/60 text-zinc-300`,children:[(0,F.jsx)(D,{className:`h-3 w-3 text-primary`}),n.latencyMs,`ms total`]})]}),(0,F.jsx)(LO,{className:`flex-1 min-h-0 overflow-hidden p-0`,children:(0,F.jsxs)(fj,{className:`h-full px-5`,children:[(0,F.jsx)(CA,{result:t,errorAlert:r,isRunning:i,meta:n}),(0,F.jsx)(mA,{timeline:e,targetType:s,meta:n}),(0,F.jsx)(gA,{toolName:o,code:a,targetType:s,grpcTarget:c,httpUrl:l,stdioCmd:u}),(0,F.jsx)(wA,{meta:n}),v===`history`&&(0,F.jsx)(`div`,{className:`py-4`,children:(0,F.jsx)(_A,{history:d,onSelectEntry:e=>{f?.(e),y(`output`)},onClearHistory:()=>p?.()})})]})})]})})]})}function hj({node:e,isConnected:t,onSwitchTarget:n,onSelectTool:r}){let i=e.status===`offline`,a=e.tier,o=e.transportType===`stdio`,s=e.transportType===`grpc`||!!e.ports?.grpc,c=e.transportType===`http`||!!e.ports?.http,l=a===1?{bgActive:`bg-tier1 border-emerald-500/60 ring-1 ring-emerald-500/30`,bgInactive:`bg-tier1 border-emerald-500/30 hover:brightness-110`,textAccent:`text-emerald-400`,badgeBorder:`border-emerald-500/30`,badgeBg:`bg-emerald-500/15`,badgeText:`text-emerald-300`,icon:Ce}:a===2?{bgActive:`bg-tier2 border-cyan-500/60 ring-1 ring-cyan-500/30`,bgInactive:`bg-tier2 border-cyan-500/30 hover:brightness-110`,textAccent:`text-cyan-400`,badgeBorder:`border-cyan-500/30`,badgeBg:`bg-cyan-500/15`,badgeText:`text-cyan-200`,icon:le}:a===3?{bgActive:`bg-tier3 border-cyan-500/60 ring-1 ring-cyan-500/30`,bgInactive:`bg-tier3 border-purple-500/30 hover:brightness-110`,textAccent:`text-purple-400`,badgeBorder:`border-purple-500/30`,badgeBg:`bg-purple-500/15`,badgeText:`text-purple-200`,icon:oe}:{bgActive:`bg-surface1 border-cyan-500/60 ring-1 ring-cyan-500/30`,bgInactive:`bg-surface1/60 border-border hover:border-border/80 hover:brightness-110`,textAccent:o?`text-amber-400`:s?`text-cyan-400`:`text-sky-400`,badgeBorder:`border-white/15`,badgeBg:`bg-white/10`,badgeText:`text-zinc-200`,icon:o?Te:s?oe:c?le:be},u=l.icon,d=()=>{let t=e.ports?.grpc??e.ports?.http,r=e.ports?.grpc?`grpc`:`http`;n(r===`grpc`?`${e.host}:${t}`:`http://${e.host}:${t}/mcp`,r)},f=i=>{if(r(i),!t){let t=e.ports?.grpc??e.ports?.http,r=e.ports?.grpc?`grpc`:`http`;n(r===`grpc`?`${e.host}:${t}`:`http://${e.host}:${t}/mcp`,r,i)}},p=o?`stdio (local pipeline)`:e.ports?.grpc?`${e.host}:${e.ports.grpc}`:e.ports?.http?`${e.host}:${e.ports.http}`:e.host;return(0,F.jsxs)(`div`,{className:`p-2.5 rounded-md border transition-all ${i?`border-border/40 bg-surface1/20 opacity-60`:t?`${l.bgActive} shadow-sm`:l.bgInactive}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(u,{className:`h-3 w-3 ${i?`text-zinc-500`:l.textAccent}`}),(0,F.jsx)(`span`,{className:`text-xs font-semibold ${i?`text-zinc-400`:`text-zinc-100`}`,children:e.name}),t&&(0,F.jsxs)(`span`,{className:`text-[8px] font-mono px-1.5 py-0.2 rounded bg-cyan-500/25 border border-cyan-500/40 text-cyan-200 font-bold flex items-center gap-1`,children:[(0,F.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-cyan-400 animate-ping`}),`ACTIVE TARGET`]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[!t&&!i&&(0,F.jsxs)(`button`,{type:`button`,onClick:d,className:`text-[9px] font-mono px-1.5 py-0.2 rounded bg-surface1 hover:bg-primary hover:text-black border border-white/10 text-zinc-300 transition-colors flex items-center gap-1 cursor-pointer`,title:`Connect to ${e.name}`,children:[(0,F.jsx)(je,{className:`h-2.5 w-2.5 text-cyan-400`}),(0,F.jsx)(`span`,{children:`Connect`})]}),(0,F.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full ${i?`bg-rose-500`:l.textAccent.replace(`text-`,`bg-`)}`}),(0,F.jsx)(`span`,{className:`text-[10px] font-mono ${i?`text-zinc-500 font-medium`:l.textAccent}`,children:i?`OFFLINE`:`${e.rttMs}ms`})]})]}),(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400 mb-1`,children:e.role}),(0,F.jsxs)(`div`,{className:`text-[10px] font-mono text-zinc-400 flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:p}),(0,F.jsx)(`span`,{className:`text-[9px] ${i?`text-zinc-500`:l.textAccent}`,children:e.isolation?.split(`+`)[0]||e.tierLabel?.split(`:`)[0]||(a===1?`Sovereign Node`:a===2?`Consortium Node`:a===3?`Client Edge`:`Direct Target`)})]}),!i&&e.tools.length>0&&(0,F.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1`,children:e.tools.map(n=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>f(n),className:`text-[9px] px-1.5 py-0.5 rounded ${l.badgeBg} hover:opacity-80 border ${l.badgeBorder} ${l.badgeText} transition-colors cursor-pointer`,title:t?`Load ${n} in Logic Studio`:`Connect to ${e.name} and load ${n}`,children:[`+ `,n]},n))})]})}function gj({tools:e,nodes:t,scanSummary:n,onlineNodes:r,totalNodes:i,hasNodeStats:a,isScanning:o,loadingTools:s,targetType:c,activeConnectedTarget:l,selectedToolName:u,onSelectTool:d,onSwitchTarget:f}){let[p,m]=(0,b.useState)(`nodes`),[h,g]=(0,b.useState)(``),[_,v]=(0,b.useState)(`all`),[y,x]=(0,b.useState)(null),S=async(e,t)=>{await Me(e)&&(x(t),setTimeout(()=>x(null),1500))},C=(0,b.useMemo)(()=>{let e=new Set;for(let n of t)(n.tier===1||n.tier===2||n.tier===3)&&e.add(n.tier);return Array.from(e).sort()},[t]),w=(0,b.useMemo)(()=>t.some(e=>e.tier===void 0||e.tier===null),[t]),T=C.length>0,E=(0,b.useMemo)(()=>{if(!h.trim())return e;let t=h.toLowerCase();return e.filter(e=>e.name.toLowerCase().includes(t)||e.description?.toLowerCase().includes(t)||e.domain?.toLowerCase().includes(t)||e.taxonomy?.domain?.toLowerCase().includes(t))},[e,h]),D=(0,b.useMemo)(()=>_===`all`?t:_===`standalone`?t.filter(e=>e.tier===void 0||e.tier===null):t.filter(e=>e.tier===_),[t,_]),O=(0,b.useMemo)(()=>D.filter(e=>e.tier===void 0||e.tier===null),[D]),ee=(0,b.useMemo)(()=>D.filter(e=>e.tier===1),[D]),te=(0,b.useMemo)(()=>D.filter(e=>e.tier===2),[D]),k=(0,b.useMemo)(()=>D.filter(e=>e.tier===3),[D]),re=e=>{if(!l)return!1;if(c===`grpc`){let t=l.split(`:`)[1]||``;return!!(e.ports?.grpc&&String(e.ports.grpc)===t||e.host&&l.includes(e.host)&&t===String(e.ports?.grpc)||l?.toLowerCase().includes(e.id.toLowerCase()))}if(c===`http`){let t=l.match(/:(\d+)/)?.[1]||``;return!!(e.ports?.http&&String(e.ports.http)===t||l?.toLowerCase().includes(e.id.toLowerCase()))}return e.status===`online`&&l.toLowerCase().includes(e.id.toLowerCase())};return(0,F.jsxs)(`section`,{className:`lg:col-span-4 flex flex-col space-y-6`,children:[(0,F.jsxs)(NO,{className:`flex flex-col h-[560px] overflow-hidden bg-card border-border shadow-card`,children:[(0,F.jsxs)(PO,{className:`pb-2.5 shrink-0 border-b border-border/40`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 p-0.5 bg-surface1 border border-white/10 rounded-lg`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>m(`nodes`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${p===`nodes`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(be,{className:`h-3.5 w-3.5`}),`Server Scan`,` `,a?`(${r}/${i})`:``]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>m(`capabilities`),className:`text-xs px-2.5 py-1 rounded-md font-medium transition-all flex items-center gap-1.5 ${p===`capabilities`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(ke,{className:`h-3.5 w-3.5`}),`Capabilities (`,e.length,`)`]})]}),(0,F.jsx)(AO,{variant:`outline`,className:`text-[10px] font-mono border-white/15 text-zinc-300`,children:p===`capabilities`?`${e.length} tools`:T?`${C.length} Active Layer${C.length>1?`s`:``}`:`${i} Targets`})]}),p===`capabilities`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(IO,{className:`text-xs text-zinc-400`,children:`Discovered runtime capabilities ready for secure in-situ execution.`}),(0,F.jsxs)(`div`,{className:`relative mt-2`,children:[(0,F.jsx)(ye,{className:`h-3.5 w-3.5 absolute left-2.5 top-2.5 text-zinc-400`}),(0,F.jsx)(`input`,{type:`text`,value:h,onChange:e=>g(e.target.value),placeholder:`Filter by capability or domain...`,spellCheck:!1,autoComplete:`off`,autoCorrect:`off`,className:`w-full h-8 pl-8 pr-7 bg-surface1 border border-white/15 rounded text-xs text-white placeholder:text-zinc-500 focus:outline-none focus:border-cyan-500/60 focus:ring-1 focus:ring-cyan-500/30 transition-all`}),h&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>g(``),className:`absolute right-2 top-2 text-zinc-400 hover:text-white p-0.5 rounded transition-colors`,title:`Clear filter`,children:(0,F.jsx)(Ae,{className:`h-3.5 w-3.5`})})]})]}):(0,F.jsxs)(`div`,{className:`flex items-center justify-between mt-1`,children:[(0,F.jsx)(`span`,{className:`text-[11px] text-zinc-400`,children:T?`Live scan across network layers:`:`Discovered network targets:`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>v(`all`),className:`text-[10px] px-1.5 py-0.5 rounded font-mono transition-colors ${_===`all`?`bg-primary/20 text-cyan-400 border border-cyan-500/40`:`text-zinc-400 hover:text-zinc-200 border border-transparent`}`,children:`All`}),w&&(0,F.jsx)(`button`,{type:`button`,onClick:()=>v(`standalone`),className:`text-[10px] px-1.5 py-0.5 rounded font-mono transition-colors ${_===`standalone`?`bg-primary/20 text-cyan-400 border border-cyan-500/40`:`text-zinc-400 hover:text-zinc-200 border border-transparent`}`,children:`Direct`}),C.map(e=>(0,F.jsxs)(`button`,{type:`button`,onClick:()=>v(e),className:`text-[10px] px-1.5 py-0.5 rounded font-mono transition-colors ${_===e?`bg-primary/20 text-cyan-400 border border-cyan-500/40`:`text-zinc-400 hover:text-zinc-200 border border-transparent`}`,children:[`T`,e]},e))]})]})]}),(0,F.jsx)(LO,{className:`flex-1 min-h-0 overflow-hidden p-0`,children:(0,F.jsx)(fj,{className:`h-full px-4 py-2`,children:p===`capabilities`?s?(0,F.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 text-zinc-400 space-y-2`,children:[(0,F.jsx)(pe,{className:`h-5 w-5 animate-spin text-primary`}),(0,F.jsx)(`span`,{className:`text-xs text-zinc-300`,children:`Discovering capabilities across tiers...`})]}):E.length===0?(0,F.jsxs)(`div`,{className:`text-center py-12 text-zinc-400 space-y-2`,children:[(0,F.jsx)(Oe,{className:`h-6 w-6 mx-auto text-warning`}),(0,F.jsx)(`p`,{className:`text-xs font-medium text-zinc-200`,children:`No capabilities found`}),(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-400 max-w-[200px] mx-auto`,children:`Try adjusting your search query.`})]}):(0,F.jsx)(`div`,{className:`space-y-2.5 pb-4`,children:E.map(e=>{let t=u===e.name,n=e.tier||(e.taxonomy?.clearanceTier===1?1:e.taxonomy?.clearanceTier===3?3:2);return(0,F.jsxs)(`button`,{type:`button`,onClick:()=>d(e.name),className:`w-full text-left p-3 rounded-md border transition-all cursor-pointer ${t?`bg-primary/10 border-primary/60 text-white shadow-sm ring-1 ring-primary/30`:`bg-secondary/40 border-border/70 hover:bg-secondary/80 hover:border-border`}`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,F.jsx)(`span`,{className:`font-semibold text-xs text-zinc-100 truncate max-w-[190px]`,children:e.name}),(0,F.jsxs)(AO,{variant:n===1?`success`:n===2?`warning`:`default`,className:`text-[10px] py-0 px-1.5 font-normal`,children:[`Tier `,n]})]}),(0,F.jsx)(`p`,{className:`text-[11px] text-zinc-300 line-clamp-2 leading-relaxed`,children:e.description||`No description available.`}),(0,F.jsxs)(`div`,{className:`mt-1.5 flex items-center justify-between text-[10px] text-zinc-400`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1 truncate max-w-[180px]`,children:[(0,F.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full ${n===1?`bg-emerald-400`:n===2?`bg-cyan-400`:`bg-purple-400`}`}),e.providerNode||e.taxonomy?.domain||`Mesh Node`]}),(0,F.jsx)(`span`,{className:`font-mono text-[9px] opacity-75 shrink-0`,children:`WASI In-situ`})]})]},e.name)})}):(0,F.jsx)(`div`,{className:`space-y-4 pb-4`,children:t.length===0?(0,F.jsxs)(`div`,{className:`text-center py-10 px-4 bg-surface1/20 rounded-lg border border-white/5 space-y-2`,children:[(0,F.jsx)(be,{className:`h-7 w-7 text-cyan-400 mx-auto opacity-70 animate-pulse`}),(0,F.jsx)(`p`,{className:`text-xs font-semibold text-zinc-200`,children:`Scanning Network Nodes...`}),(0,F.jsxs)(`p`,{className:`text-[11px] text-zinc-400 font-mono`,children:[`Querying `,l]})]}):(0,F.jsxs)(F.Fragment,{children:[(_===`all`||_===`standalone`)&&O.length>0&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-semibold text-sky-400 border-b border-sky-500/20 pb-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(be,{className:`h-3.5 w-3.5 text-sky-400`}),`Direct Connection & Standalone Targets`]}),(0,F.jsx)(`span`,{className:`text-[9px] font-mono px-1 py-0.2 rounded bg-sky-500/10 border border-sky-500/30 text-sky-300`,children:`Direct Compute`})]}),O.map(e=>(0,F.jsx)(hj,{node:e,isConnected:re(e)&&e.status===`online`,onSwitchTarget:f,onSelectTool:d},e.id))]}),T&&(_===`all`||_===1)&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-semibold text-emerald-400 border-b border-emerald-500/20 pb-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(Ce,{className:`h-3.5 w-3.5 text-emerald-400`}),`Tier 1: Sovereign Core Enclaves`]}),(0,F.jsx)(`span`,{className:`text-[9px] font-mono px-1 py-0.2 rounded bg-emerald-500/10 border border-emerald-500/30 text-emerald-300`,children:`Zero-Trust • PSK`})]}),ee.length===0?(0,F.jsxs)(`div`,{className:`text-[10px] text-zinc-500 italic py-2 px-2.5 bg-surface1/30 rounded border border-white/5 flex items-center gap-1.5`,children:[(0,F.jsx)(Oe,{className:`h-3 w-3 text-zinc-500`}),`No Tier 1 nodes detected on scanned target`]}):ee.map(e=>(0,F.jsx)(hj,{node:e,isConnected:re(e)&&e.status===`online`,onSwitchTarget:f,onSelectTool:d},e.id))]}),T&&(_===`all`||_===2)&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-semibold text-cyan-400 border-b border-cyan-500/20 pb-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(le,{className:`h-3.5 w-3.5 text-cyan-400`}),`Tier 2: Consortium Relays & Gateways`]}),(0,F.jsx)(`span`,{className:`text-[9px] font-mono px-1 py-0.2 rounded bg-cyan-500/10 border border-cyan-500/30 text-cyan-300`,children:`BLG • mTLS`})]}),te.length===0?(0,F.jsxs)(`div`,{className:`text-[10px] text-zinc-500 italic py-2 px-2.5 bg-surface1/30 rounded border border-white/5 flex items-center gap-1.5`,children:[(0,F.jsx)(Oe,{className:`h-3 w-3 text-zinc-500`}),`No Tier 2 nodes detected on scanned target`]}):te.map(e=>(0,F.jsx)(hj,{node:e,isConnected:re(e)&&e.status===`online`,onSwitchTarget:f,onSelectTool:d},e.id))]}),T&&(_===`all`||_===3)&&(0,F.jsxs)(`div`,{className:`space-y-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between text-[11px] font-semibold text-purple-400 border-b border-purple-500/20 pb-1`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(oe,{className:`h-3.5 w-3.5 text-purple-400`}),`Tier 3: Public Backbone & Client Edge`]}),(0,F.jsx)(`span`,{className:`text-[9px] font-mono px-1 py-0.2 rounded bg-purple-500/10 border border-purple-500/30 text-purple-300`,children:`AutoNAT / WAN`})]}),k.length===0?(0,F.jsxs)(`div`,{className:`text-[10px] text-zinc-500 italic py-2 px-2.5 bg-surface1/30 rounded border border-white/5 flex items-center gap-1.5`,children:[(0,F.jsx)(Oe,{className:`h-3 w-3 text-zinc-500`}),`No Tier 3 edge nodes active on scanned target`]}):k.map(e=>(0,F.jsx)(hj,{node:e,isConnected:re(e)&&e.status===`online`,onSwitchTarget:f,onSelectTool:d},e.id))]})]})})})})]}),(0,F.jsxs)(NO,{className:`p-4 bg-card border-border shadow-card shrink-0`,children:[(0,F.jsxs)(`h3`,{className:`text-xs font-semibold text-white mb-3 flex items-center justify-between`,children:[(0,F.jsx)(`span`,{children:`Mesh Discovery Telemetry`}),(0,F.jsxs)(`span`,{className:`font-mono text-[10px] text-zinc-400 font-normal flex items-center gap-1`,children:[o&&(0,F.jsx)(pe,{className:`h-2.5 w-2.5 animate-spin text-primary`}),c.toUpperCase(),` / WASI`]})]}),(0,F.jsxs)(`div`,{className:`space-y-2.5 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/50 pb-2`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`Mesh Topology:`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`h-2 w-2 rounded-full ${r>0?`bg-emerald-400`:`bg-rose-500`}`}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] font-medium ${r>0?`text-white`:`text-zinc-500`}`,children:r>0?`${r}/${i} Nodes Online`:`0 Nodes Online (Offline)`})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/50 pb-2`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`Architecture Mode:`}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] ${r>0?`text-cyan-400`:`text-zinc-500`}`,children:r>0?T?`${C.length} Active Layer${C.length>1?`s`:``}`:`Direct Standalone Node`:`Offline`})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/50 pb-2`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`Discovered Tools:`}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] ${e.length>0?`text-emerald-400`:`text-zinc-500`}`,children:e.length>0?`${e.length} Capabilities`:`0 Available`})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border/50 pb-2`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`Avg Round-Trip Time:`}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] ${r>0?`text-white font-semibold`:`text-zinc-500`}`,children:r>0?n?.avgLatencyMs!==void 0&&n.avgLatencyMs>0?`${n.avgLatencyMs} ms`:t.some(e=>e.rttMs>0&&e.status===`online`)?`${Math.round(t.filter(e=>e.status===`online`&&e.rttMs>0).reduce((e,t)=>e+t.rttMs,0)/Math.max(1,t.filter(e=>e.status===`online`&&e.rttMs>0).length))} ms`:`—`:`—`})]}),(0,F.jsxs)(`div`,{className:`flex items-center justify-between pt-0.5`,children:[(0,F.jsx)(`span`,{className:`text-zinc-400`,children:`Active Target:`}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,F.jsx)(`span`,{className:`font-mono text-[11px] text-zinc-300 truncate max-w-[130px]`,title:l,children:l}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>S(l,`target`),className:`text-zinc-400 hover:text-white transition-colors p-0.5 rounded cursor-pointer`,title:`Copy Target Address`,children:y===`target`?(0,F.jsx)(ne,{className:`h-3 w-3 text-emerald-400`}):(0,F.jsx)(j,{className:`h-3 w-3`})})]})]})]})]})]})}function _j({telemetry:e}){if(!e||e.totalOperations===0)return null;let t=e=>e.toLocaleString();return(0,F.jsx)(`aside`,{"aria-label":`Session Telemetry Overview`,className:`border-b border-border bg-surface1/60 px-4 py-1.5 transition-colors`,children:(0,F.jsxs)(`div`,{className:`max-w-7xl mx-auto flex flex-wrap items-center justify-between gap-3 text-[11px] font-mono`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-4 text-zinc-400`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1.5 text-zinc-300 font-semibold`,children:[(0,F.jsx)(D,{className:`h-3 w-3 text-cyan-400`}),`Session Telemetry`]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(oe,{className:`h-3 w-3 text-zinc-500`}),(0,F.jsx)(`span`,{children:`Invocations:`}),(0,F.jsx)(`span`,{className:`text-white font-medium`,children:t(e.totalOperations)})]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,F.jsx)(se,{className:`h-3 w-3 text-zinc-500`}),(0,F.jsx)(`span`,{children:`Context Tokens:`}),(0,F.jsxs)(`span`,{className:`text-cyan-300 font-medium`,children:[t(e.totalInputTokens),` in`]}),(0,F.jsx)(`span`,{className:`text-zinc-500`,children:`/`}),(0,F.jsxs)(`span`,{className:`text-emerald-300 font-medium`,children:[t(e.totalOutputTokens),` out`]})]})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-3 text-zinc-500`,children:[(0,F.jsxs)(`span`,{className:`border border-white/10 px-1.5 py-0.2 rounded text-[10px] text-zinc-400`,children:[`Tokenizer: `,e.estimatorName]}),(0,F.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px]`,children:[(0,F.jsx)(ie,{className:`h-2.5 w-2.5`}),`Uptime: `,(e=>{let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60),r=t%60;return n<60?`${n}m ${r}s`:`${Math.floor(n/60)}h ${n%60}m`})(e.sessionUptimeMs)]})]})]})})}function vj({className:e=`h-8 w-8 text-primary`}){return(0,F.jsxs)(`svg`,{className:e,viewBox:`0 0 120 120`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,F.jsx)(`title`,{children:`LIOP Protocol Logo`}),(0,F.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`,children:[(0,F.jsx)(`polygon`,{points:`100,76.57 76.57,100 43.43,100 20,76.57 20,43.43 43.43,20 76.57,20 100,43.43`}),(0,F.jsx)(`circle`,{cx:`60`,cy:`60`,r:`10`,fill:`currentColor`,stroke:`none`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(45 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(90 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(135 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(180 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(225 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(270 60 60)`}),(0,F.jsx)(`path`,{d:`M 60 60 C 60 45, 100 75, 100 60`,transform:`rotate(315 60 60)`})]})]})}function yj({onlineNodes:e,totalNodes:t,hasNodeStats:n,isScanning:r,secondsAgo:i,theme:a,version:o,activeTiersCount:s,onThemeChange:c,onRescan:l}){return(0,F.jsx)(`header`,{className:`border-b border-border bg-card/90 backdrop-blur-sm sticky top-0 z-50 transition-colors`,children:(0,F.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 h-14 flex items-center justify-between`,children:[(0,F.jsxs)(`div`,{className:`flex items-center space-x-3`,children:[(0,F.jsx)(vj,{className:`h-8 w-8 text-primary shrink-0 transition-transform duration-200 hover:scale-105`}),(0,F.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h1`,{className:`text-base font-bold tracking-tight text-white flex items-center gap-2`,children:[(0,F.jsx)(`span`,{children:`LIOP Studio`}),(0,F.jsx)(`span`,{className:`text-[10px] font-mono font-medium px-1.5 py-0.2 text-cyan-300 border border-cyan-500/30 rounded bg-cyan-500/10`,children:o?`v${o}`:`v1.0.0-alpha.5`})]}),(0,F.jsx)(`p`,{className:`text-[10px] text-zinc-400 -mt-0.5 hidden sm:block`,children:`Sovereign Logic & MCP Multi-Transport Inspector`})]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center space-x-2.5`,children:[(0,F.jsxs)(`div`,{className:`flex items-center space-x-2 bg-secondary/80 border border-white/10 px-3 py-1 rounded-md text-xs`,children:[(0,F.jsx)(`span`,{className:`relative flex h-2 w-2`,children:e>0?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75`}),(0,F.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-emerald-500`})]}):(0,F.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-rose-500`})}),(0,F.jsx)(`span`,{className:`font-medium ${e>0?`text-white`:`text-rose-400`}`,children:n?e>0?`${e}/${t} Nodes Online`:`0 Nodes Online (Offline)`:r?`Scanning Mesh Nodes...`:`Topology Offline`}),s!==void 0&&s>0&&(0,F.jsxs)(`span`,{className:`text-cyan-400 font-mono text-[10px] hidden sm:inline`,children:[`(`,s,` `,s===1?`Tier`:`Tiers`,`)`]}),(0,F.jsx)(`span`,{className:`text-zinc-400 font-mono text-[10px] border-l border-white/15 pl-1.5 hidden md:inline`,children:i===0?`live`:`${i}s ago`})]}),(0,F.jsxs)(MO,{size:`sm`,variant:`outline`,onClick:l,disabled:r,className:`h-8 px-2.5 border-white/15 bg-surface1 text-zinc-300 hover:text-white hover:bg-white/5 flex items-center gap-1.5 text-xs`,title:`Re-scan mesh topology across all layers`,children:[(0,F.jsx)(_e,{className:`h-3.5 w-3.5 text-cyan-400 ${r?`animate-spin`:``}`}),(0,F.jsx)(`span`,{className:`hidden md:inline font-mono text-[11px]`,children:`Scan`})]}),(0,F.jsxs)(`div`,{className:`relative flex items-center bg-surface1 border border-white/15 p-0.5 rounded-md`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>c(`obsidian`),className:`relative z-10 text-[11px] px-2.5 py-1 font-medium flex items-center gap-1.5 transition-colors duration-200`,title:`OLED Obsidian Theme`,children:[a===`obsidian`&&(0,F.jsx)(md.div,{layoutId:`themeActivePill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(he,{className:`relative z-20 h-3.5 w-3.5 transition-colors duration-200 ${a===`obsidian`?`text-black`:`text-zinc-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${a===`obsidian`?`text-black`:`text-zinc-300 hover:text-white`}`,children:`Obsidian`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>c(`slate`),className:`relative z-10 text-[11px] px-2.5 py-1 font-medium flex items-center gap-1.5 transition-colors duration-200`,title:`Slate Dark Theme`,children:[a===`slate`&&(0,F.jsx)(md.div,{layoutId:`themeActivePill`,className:`absolute inset-0 bg-primary rounded shadow-sm`,transition:{type:`spring`,stiffness:450,damping:35}}),(0,F.jsx)(fe,{className:`relative z-20 h-3.5 w-3.5 transition-colors duration-200 ${a===`slate`?`text-black`:`text-zinc-400`}`}),(0,F.jsx)(`span`,{className:`relative z-20 font-medium transition-colors duration-200 ${a===`slate`?`text-black`:`text-zinc-300 hover:text-white`}`,children:`Slate`})]})]})]})]})})}var bj=b.forwardRef(({className:e,type:t,...n},r)=>(0,F.jsx)(`input`,{type:t,className:OO(`flex h-9 w-full rounded-md border border-border bg-surface1 px-3 py-1 text-xs text-white placeholder:text-zinc-500 shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary disabled:cursor-not-allowed disabled:opacity-50`,e),ref:r,...n}));bj.displayName=`Input`;var xj=({targetType:e,onTargetTypeChange:t,stdioCmd:n,onStdioCmdChange:r,httpUrl:i,onHttpUrlChange:a,grpcTarget:o,onGrpcTargetChange:s,onConnect:c,isConnecting:l,activeConnectedTarget:u,connected:d})=>(0,F.jsx)(`div`,{className:`w-full bg-surface1/90 border-b border-border px-4 py-2.5 backdrop-blur-sm transition-colors`,children:(0,F.jsxs)(`div`,{className:`max-w-7xl mx-auto flex flex-col md:flex-row items-stretch md:items-center justify-between gap-3 text-xs`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 p-0.5 bg-background/80 border border-white/10 rounded-lg shrink-0`,children:[(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`stdio`),className:`px-2.5 py-1 rounded-md font-medium flex items-center gap-1.5 transition-all ${e===`stdio`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(Te,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`Stdio`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`http`),className:`px-2.5 py-1 rounded-md font-medium flex items-center gap-1.5 transition-all ${e===`http`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(le,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`HTTP / SSE`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`grpc`),className:`px-2.5 py-1 rounded-md font-medium flex items-center gap-1.5 transition-all ${e===`grpc`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(oe,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`gRPC`})]}),(0,F.jsxs)(`button`,{type:`button`,onClick:()=>t(`mesh`),className:`px-2.5 py-1 rounded-md font-medium flex items-center gap-1.5 transition-all ${e===`mesh`?`bg-primary text-black font-semibold shadow-sm`:`text-zinc-400 hover:text-white`}`,children:[(0,F.jsx)(ke,{className:`h-3.5 w-3.5`}),(0,F.jsx)(`span`,{children:`LIOP Mesh`})]})]}),(0,F.jsxs)(`div`,{className:`flex-1 flex items-center gap-2`,children:[e===`stdio`&&(0,F.jsx)(`div`,{className:`flex-1 relative`,children:(0,F.jsx)(bj,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`Command and arguments, e.g.: npx -y @modelcontextprotocol/server-filesystem /tmp`,className:`font-mono text-[11px] h-8 bg-background/90`})}),e===`http`&&(0,F.jsx)(`div`,{className:`flex-1 relative`,children:(0,F.jsx)(bj,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:`MCP Server Endpoint URL, e.g.: http://127.0.0.1:15000/mcp`,className:`font-mono text-[11px] h-8 bg-background/90`})}),e===`grpc`&&(0,F.jsx)(`div`,{className:`flex-1 relative`,children:(0,F.jsx)(bj,{type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Tonic gRPC Host:Port, e.g.: 127.0.0.1:13011`,className:`font-mono text-[11px] h-8 bg-background/90`})}),e===`mesh`&&(0,F.jsxs)(`div`,{className:`flex-1 flex items-center px-3 py-1 bg-background/80 border border-white/10 rounded-md font-mono text-[11px] text-zinc-300`,children:[(0,F.jsx)(`span`,{className:`text-cyan-400 mr-2`,children:`Preset Topology:`}),(0,F.jsx)(`span`,{children:`8 Sovereign Origin Nodes across 3 Tiers (Kademlia DHT + Swarm PSK)`})]}),(0,F.jsx)(MO,{size:`sm`,onClick:c,disabled:l,className:`h-8 px-4 text-xs font-semibold shrink-0`,children:l?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(pe,{className:`h-3.5 w-3.5 animate-spin mr-1.5`}),`Connecting...`]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(ge,{className:`h-3 w-3 fill-current mr-1.5`}),`Connect / Probe`]})})]}),(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1 bg-background/90 border border-white/10 rounded-md shrink-0`,children:[(0,F.jsx)(`span`,{className:`relative flex h-2 w-2`,children:d?(0,F.jsx)(`span`,{className:`inline-flex rounded-full h-2 w-2 bg-emerald-500`}):(0,F.jsx)(`span`,{className:`inline-flex rounded-full h-2 w-2 bg-rose-500`})}),(0,F.jsx)(`span`,{className:`font-mono text-[11px] truncate max-w-[220px] ${d?`text-zinc-300`:`text-rose-400 font-medium`}`,title:u,children:d?u||`Ready to connect`:u?`${u} (Offline)`:`Target Offline`})]})]})}),Sj=[{phase:`bootstrap`,label:`P2P Mesh Bootstrap`,detail:`Node synchronized`,status:`pending`},{phase:`discovery`,label:`Resource Discovery`,detail:`Multi-tier route resolution`,status:`pending`},{phase:`pqc`,label:`Kyber-768 Handshake`,detail:`ML-KEM key exchange`,status:`pending`},{phase:`sealing`,label:`AES-256-GCM Sealing`,detail:`Envelope cipher & sign`,status:`pending`},{phase:`execution`,label:`WASI Sandbox Run`,detail:`Logic injection on origin`,status:`pending`},{phase:`zk_verify`,label:`ZK-Receipt HMAC Seal`,detail:`Computational integrity proof`,status:`pending`}];function Cj(){let[e,t]=(0,b.useState)(!1),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(null),[c,l]=(0,b.useState)(Sj),[u,d]=(0,b.useState)([]),f=(0,b.useRef)(null),p=(0,b.useCallback)((e,t,n,r)=>{l(i=>{let a=!1;return i.map(i=>i.phase===e?(a=!0,{...i,status:n,detail:t,durationMs:r??i.durationMs}):a&&i.status!==`success`&&i.status!==`failed`?{...i,status:`pending`}:!a&&(i.status===`pending`||i.status===`running`)?{...i,status:`success`}:i)})},[]),m=(0,b.useCallback)(()=>{f.current&&=(f.current.abort(),null)},[]),h=(0,b.useCallback)(async n=>{let{targetTool:i,executionMode:o,code:c,formArgs:u,targetType:m}=n;if(!i||e)return;f.current&&f.current.abort();let h=new AbortController;f.current=h,t(!0),r(null),a(null),s(null);let g=Date.now(),_=`exec-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,v=[{phase:`bootstrap`,label:`Channel Bootstrap`,detail:`Target transport: ${m.toUpperCase()}`,status:`running`},{phase:`discovery`,label:`Resource Discovery`,detail:`Targeting tool ${i}...`,status:`pending`},{phase:`pqc`,label:`Kyber-768 / Channel Security`,detail:`Securing transport session...`,status:`pending`},{phase:`sealing`,label:`Payload Sealing`,detail:`Encrypting parameters & payload...`,status:`pending`},{phase:`execution`,label:`Origin / Sandbox Execution`,detail:`Executing inside target environment...`,status:`pending`},{phase:`zk_verify`,label:`ZK-Receipt HMAC Seal`,detail:`Cryptographic proof validation...`,status:`pending`}];l(v);let y=null,b=null,x=null,S=`success`;try{let e=await fetch(`/api/execute`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o===`form`?{tool:i,args:u}:{tool:i,logic:c}),signal:h.signal});if(!e.ok)throw Error(`Gateway error: ${e.statusText}`);let n=e.body?.getReader();if(!n)throw Error(`Unable to initialize SSE stream reader`);let l=new TextDecoder,d=``;for(;;){let{value:e,done:i}=await n.read();if(i)break;d+=l.decode(e,{stream:!0});let o=d.split(`
|
|
129
|
+
`);d=o.pop()||``;for(let e of o)if(e.trim()&&e.startsWith(`data: `)){let n=e.slice(6);try{let e=JSON.parse(n);e.type===`step`?p(e.phase,e.detail,e.status,e.durationMs):e.type===`result`?(y=e.payload,b=e.meta||null,S=`success`,r(y),a(b),t(!1)):e.type===`error`&&(x={title:e.payload.title||`Execution Error`,desc:e.payload.desc||`A sandbox failure occurred on origin node`},b=e.meta||null,S=`error`,s(x),a(b),t(!1))}catch(t){console.error(`Error parsing SSE line:`,t,e)}}}}catch(e){h.signal.aborted||e instanceof Error&&e.name===`AbortError`?(S=`cancelled`,x={title:`Execution Cancelled`,desc:`The in-flight origin execution was terminated by user request.`},s(x),l(e=>e.map(e=>e.status===`running`?{...e,status:`failed`,detail:`Cancelled by user abort`}:e))):(S=`error`,x={title:`Connection Error`,desc:(e instanceof Error?e.message:String(e))||`Failed to communicate with Studio Gateway`},s(x),l(e=>e.map(e=>e.status===`running`?{...e,status:`failed`,detail:`Connection interrupted`}:e))),t(!1)}finally{f.current=null,d(e=>[{id:_,tool:i,mode:o,timestamp:g,durationMs:Date.now()-g,status:S,result:y,meta:b,errorAlert:x,timeline:v},...e.slice(0,19)])}},[e,p]);return{isRunning:e,result:n,meta:i,errorAlert:o,setErrorAlert:s,timeline:c,executionHistory:u,selectHistoryEntry:(0,b.useCallback)(e=>{r(e.result||null),a(e.meta||null),s(e.errorAlert||null),e.timeline&&e.timeline.length>0&&l(e.timeline)},[]),clearHistory:(0,b.useCallback)(()=>{d([])},[]),handleExecute:h,cancelExecution:m,resetExecution:(0,b.useCallback)(()=>{r(null),a(null),s(null),l(Sj)},[]),updateTimelineStep:p}}function wj(e={}){let{onTargetSwitched:t,onError:n}=e,r=(0,b.useRef)(t);r.current=t;let i=(0,b.useRef)(n);i.current=n;let[a,o]=(0,b.useState)(null),[s,c]=(0,b.useState)([]),[l,u]=(0,b.useState)([]),[d,f]=(0,b.useState)(null),[p,m]=(0,b.useState)(null),[h,g]=(0,b.useState)(`http`),_=(0,b.useRef)(h);_.current=h;let[v,y]=(0,b.useState)(`npx -y @modelcontextprotocol/server-filesystem /tmp`),[x,S]=(0,b.useState)(`http://127.0.0.1:15000/mcp`),[C,w]=(0,b.useState)(`127.0.0.1:13011`),[T,E]=(0,b.useState)(!1),[D,O]=(0,b.useState)(!1),[ee,te]=(0,b.useState)(!1),[ne,k]=(0,b.useState)(`http://127.0.0.1:15000/mcp`),[re,ie]=(0,b.useState)(Date.now()),[ae,A]=(0,b.useState)(0),j=d?.totalNodes??a?.totalNodes??l.length,oe=d?.onlineNodes??a?.nodesOnline??l.filter(e=>e.status===`online`).length,se=j>0,ce=(0,b.useRef)(!1),M=(0,b.useCallback)(async()=>{try{let e=await fetch(`/api/health`);e.ok&&o(await e.json())}catch(e){console.error(`Error fetching network health:`,e)}},[]),N=(0,b.useCallback)(async()=>{te(!0);try{let e=await fetch(`/api/tools`);e.ok&&c((await e.json()).tools||[])}catch(e){console.error(`Error fetching tools:`,e)}finally{te(!1)}},[]),P=(0,b.useCallback)(async()=>{try{let e=await fetch(`/api/telemetry`);if(e.ok){let t=await e.json();t.session&&m({sessionId:t.session.sessionId||`unknown`,totalInputTokens:t.session.totalInputTokens||0,totalOutputTokens:t.session.totalOutputTokens||0,totalOperations:Array.isArray(t.session.operations)?t.session.operations.length:0,sessionUptimeMs:t.session.sessionUptimeMs||0,estimatorName:t.session.estimatorName||`o200k_base`})}}catch(e){console.error(`Error fetching session telemetry:`,e)}},[]),le=(0,b.useCallback)(async(e,t=_.current||`http`,n)=>{E(!0);try{if(t===`grpc`){w(e),g(`grpc`);let t=await fetch(`/api/connect`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({type:`grpc`,grpc:{target:e}})});if(!t.ok){let e=await t.json();throw Error(e.error||`Failed to connect to target`)}k(e)}else if(t===`http`){S(e),g(`http`);let t=await fetch(`/api/connect`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({type:`http`,http:{url:e}})});if(!t.ok){let e=await t.json();throw Error(e.error||`Failed to connect to target`)}k(e)}await M(),await N(),r.current&&n&&r.current(n)}catch(e){let t=e instanceof Error?e.message:String(e);i.current?.({title:`Target Switch Failed`,desc:t})}finally{E(!1)}},[M,N]),ue=(0,b.useCallback)(async(e=!1,t=!1)=>{t||O(!0);try{let t=await fetch(`/api/nodes?force=${e}`);if(t.ok){let e=await t.json(),n=e.nodes||[];if(u(n),f(e.summary||null),ie(Date.now()),A(0),!ce.current&&n.length>0){let e=n.find(e=>e.status===`online`&&e.tools&&e.tools.length>0);if(e){ce.current=!0;let t=e.ports?.grpc??e.ports?.http,n=e.ports?.grpc?`grpc`:`http`,r=n===`grpc`?`${e.host}:${t}`:`http://${e.host}:${t}/mcp`,i=e.tools[0];le(r,n,i)}}}}catch(e){console.error(`Error scanning mesh nodes:`,e)}finally{t||O(!1)}},[le]),de=(0,b.useCallback)(async()=>{E(!0);try{let e={type:h};if(h===`stdio`){let t=v.trim().split(/\s+/);e.stdio={command:t[0],args:t.slice(1)}}else h===`http`?e.http={url:x.trim()}:h===`grpc`?e.grpc={target:C.trim()}:h===`mesh`&&(e.mesh={});let t=await fetch(`/api/connect`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw Error(n.error||`Failed to connect to target`);k(h===`stdio`?v:h===`http`?x:h===`grpc`?C:`Audit Mesh (8 Nodes Swarm)`),await M(),await N(),await ue(!0)}catch(e){let t=e instanceof Error?e.message:String(e);i.current?.({title:`Connection Failed`,desc:t})}finally{E(!1)}},[h,v,x,C,M,N,ue]);return(0,b.useEffect)(()=>{M(),N(),ue(!0),P()},[M,N,ue,P]),(0,b.useEffect)(()=>{let e=setInterval(()=>{M(),ue(!1,!0),P()},5e3);return()=>clearInterval(e)},[M,ue,P]),(0,b.useEffect)(()=>{let e=setInterval(()=>{A(Math.floor((Date.now()-re)/1e3))},1e3);return()=>clearInterval(e)},[re]),{network:a,version:a?.version||`1.0.0-alpha.5`,tools:s,nodes:l,scanSummary:d,sessionTelemetry:p,targetType:h,setTargetType:g,stdioCmd:v,setStdioCmd:y,httpUrl:x,setHttpUrl:S,grpcTarget:C,setGrpcTarget:w,isConnecting:T,isScanning:D,loadingTools:ee,activeConnectedTarget:ne,lastScanTimestamp:re,secondsAgo:ae,totalNodes:j,onlineNodes:oe,hasNodeStats:se,fetchHealth:M,fetchTools:N,fetchNodes:ue,fetchTelemetry:P,handleSwitchTarget:le,handleConnectTarget:de}}var Tj=[{id:`hft`,name:`Market Analysis`,tool:`Analyze_HFT_Market_Data`,domain:`Financial HFT`,clearanceTier:`Tier 2`,description:`Computes VWAP and average HFT spreads with differential privacy utility preservation.`,code:`@LIOP{wasi_v1, HftAnalysis}
|
|
130
|
+
const ticks = env.records;
|
|
131
|
+
// Calculate VWAP and average bid/ask spreads
|
|
132
|
+
let sumPriceVol = 0;
|
|
133
|
+
let sumVol = 0;
|
|
134
|
+
let sumSpread = 0;
|
|
135
|
+
|
|
136
|
+
for (let i = 0; i < ticks.length; i++) {
|
|
137
|
+
const t = ticks[i];
|
|
138
|
+
const price = (t.bestBid + t.bestAsk) / 2;
|
|
139
|
+
sumPriceVol += price * t.volume;
|
|
140
|
+
sumVol += t.volume;
|
|
141
|
+
sumSpread += (t.bestAsk - t.bestBid);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return {
|
|
145
|
+
ticksProcessed: ticks.length,
|
|
146
|
+
vwap: sumVol > 0 ? sumPriceVol / sumVol : 0,
|
|
147
|
+
avgSpreadBps: ticks.length > 0 ? (sumSpread / ticks.length) * 10000 : 0
|
|
148
|
+
};
|
|
149
|
+
@END`},{id:`bank`,name:`Bank Aggregation`,tool:`Analyze_Synthetic_Bank_Transactions`,domain:`Core Banking`,clearanceTier:`Tier 1`,description:`Aggregates balances and account type distributions under zero-trust data sovereignty.`,code:`@LIOP{wasi_v1, BankAnalysis}
|
|
150
|
+
const records = env.records || [];
|
|
151
|
+
// Interactive filter: customize minimum balance threshold (try 0, 50000, or 100000)
|
|
152
|
+
const MIN_BALANCE = 0;
|
|
153
|
+
|
|
154
|
+
const filtered = records.filter(r => (r.balance || 0) >= MIN_BALANCE);
|
|
155
|
+
// Sum balances and count account types with data sovereignty
|
|
156
|
+
const stats = filtered.reduce((acc, row) => {
|
|
157
|
+
acc.totalBalance += (row.balance || 0);
|
|
158
|
+
acc.accountsByType[row.accountType] = (acc.accountsByType[row.accountType] || 0) + 1;
|
|
159
|
+
return acc;
|
|
160
|
+
}, { totalBalance: 0, accountsByType: {} });
|
|
161
|
+
|
|
162
|
+
return {
|
|
163
|
+
totalAccounts: filtered.length,
|
|
164
|
+
totalBalance: Number(stats.totalBalance.toFixed(2)),
|
|
165
|
+
averageBalance: filtered.length > 0 ? Number((stats.totalBalance / filtered.length).toFixed(2)) : 0,
|
|
166
|
+
distribution: stats.accountsByType
|
|
167
|
+
};
|
|
168
|
+
@END`},{id:`vault`,name:`Medical Stats`,tool:`Analyze_Synthetic_Medical_Records`,domain:`Healthcare`,clearanceTier:`Tier 1`,description:`Anonymized diagnostic distributions and mean patient age calculation.`,code:`@LIOP{wasi_v1, MedicalStats}
|
|
169
|
+
const patients = env.records || [];
|
|
170
|
+
// Interactive filter: customize minimum patient age (try 0, 40, or 60)
|
|
171
|
+
const MIN_AGE = 0;
|
|
172
|
+
|
|
173
|
+
const filtered = patients.filter(p => (p.age || 0) >= MIN_AGE);
|
|
174
|
+
// Analyze diagnosis distribution and mean patient age
|
|
175
|
+
const stats = filtered.reduce((acc, p) => {
|
|
176
|
+
acc.diagnoses[p.diagnosis] = (acc.diagnoses[p.diagnosis] || 0) + 1;
|
|
177
|
+
acc.totalAge += (p.age || 0);
|
|
178
|
+
return acc;
|
|
179
|
+
}, { diagnoses: {}, totalAge: 0 });
|
|
180
|
+
|
|
181
|
+
return {
|
|
182
|
+
totalPatients: filtered.length,
|
|
183
|
+
averageAge: filtered.length > 0 ? Number((stats.totalAge / filtered.length).toFixed(1)) : 0,
|
|
184
|
+
diagnosesDistribution: stats.diagnoses
|
|
185
|
+
};
|
|
186
|
+
@END`},{id:`blg_perimeter`,name:`Enclave Perimeter`,tool:`BLG_Inspect_Enclave_Perimeter`,domain:`Perimeter Security`,clearanceTier:`Tier 2`,description:`Audits the physical subnets, pnet PSK isolation, and 6-layer zero-trust defense of Tier 1.`,code:`@LIOP{wasi_v1, PerimeterAudit}
|
|
187
|
+
// Audits physical subnet boundaries and cryptographic isolation status
|
|
188
|
+
return {
|
|
189
|
+
target: "Tier 1 Sovereign Enclave",
|
|
190
|
+
protocol: "LIOP Multi-Tier Zero-Trust",
|
|
191
|
+
layerAudit: [
|
|
192
|
+
"Layer 1: Guardian AST",
|
|
193
|
+
"Layer 2: WASI Sandbox",
|
|
194
|
+
"Layer 3: Taint Analyzer (IFC)",
|
|
195
|
+
"Layer 4: Egress PII Shield",
|
|
196
|
+
"Layer 5: Aggregation-First Policy",
|
|
197
|
+
"Layer 6: ZK-Receipt (HMAC-SHA256)",
|
|
198
|
+
"Transport: pnet Swarm Key (PSK)"
|
|
199
|
+
]
|
|
200
|
+
};
|
|
201
|
+
@END`},{id:`pii_attack`,name:`PII Attack`,tool:`Analyze_Synthetic_Bank_Transactions`,domain:`Adversarial`,clearanceTier:`Exfiltration Trap`,description:`Adversarial attempt to exfiltrate individual raw rows (Intercepted by Egress Shield).`,code:`@LIOP{wasi_v1, PiiAttack}
|
|
202
|
+
const records = env.records;
|
|
203
|
+
// Attempt to exfiltrate individual raw records
|
|
204
|
+
// This will be intercepted and blocked by the Egress PII Shield
|
|
205
|
+
return {
|
|
206
|
+
confidentialData: records.map(r => ({
|
|
207
|
+
name: r.accountHolder || r.ownerName,
|
|
208
|
+
id: r.id || r.ownerId,
|
|
209
|
+
balance: r.balance
|
|
210
|
+
}))
|
|
211
|
+
};
|
|
212
|
+
@END`},{id:`iot`,name:`IoT Telemetry`,tool:`Analyze_IoT_Sensor_Data`,domain:`Industrial IoT`,clearanceTier:`Tier 2`,description:`Aggregates edge sensor metrics (temperature, vibration, status) under hostile WAN/3G latency.`,code:`@LIOP{wasi_v1, IoTTelemetry}
|
|
213
|
+
const records = env.records;
|
|
214
|
+
// Aggregate industrial sensor telemetry on edge node
|
|
215
|
+
let sumTemp = 0;
|
|
216
|
+
let maxTemp = -999;
|
|
217
|
+
let criticalAlerts = 0;
|
|
218
|
+
const distribution = {};
|
|
219
|
+
|
|
220
|
+
for (let i = 0; i < records.length; i++) {
|
|
221
|
+
const r = records[i];
|
|
222
|
+
sumTemp += (r.temperatureCelsius || 0);
|
|
223
|
+
if (r.temperatureCelsius > maxTemp) maxTemp = r.temperatureCelsius;
|
|
224
|
+
if (r.status === "CRITICAL") criticalAlerts++;
|
|
225
|
+
distribution[r.status] = (distribution[r.status] || 0) + 1;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
return {
|
|
229
|
+
totalSamples: records.length,
|
|
230
|
+
avgTemperature: records.length > 0 ? Number((sumTemp / records.length).toFixed(1)) : 0,
|
|
231
|
+
maxTemperature: Number(maxTemp.toFixed(1)),
|
|
232
|
+
criticalCount: criticalAlerts,
|
|
233
|
+
statusDistribution: distribution
|
|
234
|
+
};
|
|
235
|
+
@END`},{id:`blg_bank`,name:`BLG Banking Analytics`,tool:`BLG_Execute_Banking_Analytics`,domain:`Perimeter Routing`,clearanceTier:`Tier 1 Gateway`,description:`Securely routes banking analytical logic into the Tier 1 Enclave via Border LIO Gateway.`,code:`@LIOP{wasi_v1, BankViaBLG}
|
|
236
|
+
const records = env.records || [];
|
|
237
|
+
// Aggregate banking transactions across the secure enclave boundary
|
|
238
|
+
let totalBalance = 0;
|
|
239
|
+
const accountsByType = {};
|
|
240
|
+
|
|
241
|
+
for (let i = 0; i < records.length; i++) {
|
|
242
|
+
const r = records[i];
|
|
243
|
+
totalBalance += (r.balance || 0);
|
|
244
|
+
const type = r.accountType || "STANDARD";
|
|
245
|
+
accountsByType[type] = (accountsByType[type] || 0) + 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return {
|
|
249
|
+
enclave: "Tier 1 Sovereign Core",
|
|
250
|
+
totalAccounts: records.length,
|
|
251
|
+
totalBalance: Number(totalBalance.toFixed(2)),
|
|
252
|
+
distribution: accountsByType,
|
|
253
|
+
gatewayVerified: true
|
|
254
|
+
};
|
|
255
|
+
@END`},{id:`blg_healthcare`,name:`BLG Healthcare Analytics`,tool:`BLG_Execute_Healthcare_Analytics`,domain:`Perimeter Routing`,clearanceTier:`Tier 1 Gateway`,description:`Securely routes clinical health metrics into the Tier 1 Enclave via Border LIO Gateway.`,code:`@LIOP{wasi_v1, HealthcareViaBLG}
|
|
256
|
+
const records = env.records || [];
|
|
257
|
+
// Aggregate clinical records across the secure enclave boundary
|
|
258
|
+
let totalAge = 0;
|
|
259
|
+
const diagnoses = {};
|
|
260
|
+
|
|
261
|
+
for (let i = 0; i < records.length; i++) {
|
|
262
|
+
const p = records[i];
|
|
263
|
+
totalAge += (p.age || 0);
|
|
264
|
+
const diag = p.diagnosis || "UNCATEGORIZED";
|
|
265
|
+
diagnoses[diag] = (diagnoses[diag] || 0) + 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
return {
|
|
269
|
+
enclave: "Tier 1 Healthcare Core",
|
|
270
|
+
totalPatients: records.length,
|
|
271
|
+
averageAge: records.length > 0 ? Number((totalAge / records.length).toFixed(1)) : 0,
|
|
272
|
+
distribution: diagnoses,
|
|
273
|
+
gatewayVerified: true
|
|
274
|
+
};
|
|
275
|
+
@END`},{id:`mesh_status`,name:`Mesh Telemetry`,tool:`LiopMeshStatus`,domain:`Mesh Protocol`,clearanceTier:`Tier 2`,description:`Queries internal peer telemetry, routing table health, and active Kademlia DHT state.`,code:`@LIOP{wasi_v1, MeshTelemetry}
|
|
276
|
+
// Query local mesh telemetry and routing status
|
|
277
|
+
return {
|
|
278
|
+
protocol: "LIOP/2026",
|
|
279
|
+
nodeRole: env.role || "Consortium Node",
|
|
280
|
+
status: "ACTIVE_IN_SITU",
|
|
281
|
+
verifiedDataSovereignty: true
|
|
282
|
+
};
|
|
283
|
+
@END`},{id:`universal_compute`,name:`Universal In-Situ Compute`,tool:`Execute_WASI_Logic`,domain:`Universal / Any Target`,clearanceTier:`Agnostic`,description:`General-purpose logic injection template adaptable to any tool, schema, or origin dataset.`,code:`@LIOP{wasi_v1, UniversalCompute}
|
|
284
|
+
// Safe in-situ computation over injected dataset or arguments
|
|
285
|
+
const records = env.records || [];
|
|
286
|
+
const args = params.arguments || {};
|
|
287
|
+
|
|
288
|
+
// Process records or input arguments deterministically
|
|
289
|
+
const count = Array.isArray(records) ? records.length : (records ? 1 : 0);
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
status: "COMPUTED_IN_SITU",
|
|
293
|
+
datasetSize: count,
|
|
294
|
+
providedArgs: Object.keys(args),
|
|
295
|
+
summary: "Logic executed directly at data origin under Zero-Trust WASI sandbox",
|
|
296
|
+
verifiedInSitu: true
|
|
297
|
+
};
|
|
298
|
+
@END`}],Ej=(e,t)=>{try{let t=localStorage.getItem(`liop_studio_custom_code_${e}`);if(t?.trim())return t}catch{}return t},Dj=(e,t)=>{try{localStorage.setItem(`liop_studio_custom_code_${e}`,t)}catch{}},Oj=e=>{try{localStorage.removeItem(`liop_studio_custom_code_${e}`)}catch{}};function kj(){let[e,t]=(0,b.useState)(()=>localStorage.getItem(`liop_playground_theme`)||`obsidian`);(0,b.useEffect)(()=>{document.documentElement.setAttribute(`data-theme`,e),document.documentElement.classList.remove(`theme-obsidian`,`theme-slate`),document.documentElement.classList.add(`theme-${e}`),localStorage.setItem(`liop_playground_theme`,e)},[e]);let[n,r]=(0,b.useState)(`output`),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(`logic`),[c,l]=(0,b.useState)({}),{isRunning:u,result:d,meta:f,errorAlert:p,setErrorAlert:m,timeline:h,executionHistory:g,selectHistoryEntry:_,clearHistory:v,handleExecute:y,cancelExecution:x}=Cj(),{network:S,version:C,sessionTelemetry:w,tools:T,nodes:E,scanSummary:D,targetType:O,setTargetType:ee,stdioCmd:te,setStdioCmd:ne,httpUrl:k,setHttpUrl:re,grpcTarget:ie,setGrpcTarget:ae,isConnecting:A,isScanning:j,loadingTools:oe,activeConnectedTarget:se,secondsAgo:ce,totalNodes:M,onlineNodes:N,hasNodeStats:P,fetchHealth:le,fetchTools:ue,fetchNodes:de,handleSwitchTarget:fe,handleConnectTarget:pe}=wj({onError:e=>m(e),onTargetSwitched:e=>{e&&_e(e)}}),[me,he]=(0,b.useState)(null),[ge,_e]=(0,b.useState)(null),[ve,ye]=(0,b.useState)(Tj[0].id),[be,xe]=(0,b.useState)(Tj[0].tool),[Se,Ce]=(0,b.useState)(()=>Ej(Tj[0].id,Tj[0].code)),we=(0,b.useCallback)(e=>{Ce(e),Dj(ve,e)},[ve]),Te=(0,b.useMemo)(()=>{let e=[];for(let t of Tj){let n=t.tool.toLowerCase().replace(/_/g,``),r=T.some(e=>e.name.toLowerCase()===t.tool.toLowerCase()||e.name.toLowerCase().replace(/_/g,``)===n),i=E.some(e=>e.status===`online`&&e.tools&&e.tools.some(e=>e.toLowerCase()===t.tool.toLowerCase()||e.toLowerCase().replace(/_/g,``)===n));(r||i)&&e.push(t)}for(let t of T)if(!e.some(e=>e.tool.toLowerCase()===t.name.toLowerCase())){let n=t.name.replace(/[^a-zA-Z0-9]/g,``)||`OriginAnalysis`;e.push({id:`dyn-${t.name}`,name:t.name.replace(/_/g,` `),tool:t.name,domain:t.domain||`Dynamic Origin Capability`,clearanceTier:`Tier ${t.tier||1}`,description:t.description||`Dynamic Logic-on-Origin capability discovered on target node.`,code:`@LIOP{wasi_v1, ${n}}
|
|
299
|
+
const records = env.records || [];
|
|
300
|
+
// Return aggregated telemetry under zero-trust privacy
|
|
301
|
+
return {
|
|
302
|
+
totalRecords: Array.isArray(records) ? records.length : (records ? 1 : 0),
|
|
303
|
+
executionStatus: "PROCESSED_ON_ORIGIN",
|
|
304
|
+
verifiedInSitu: true
|
|
305
|
+
};
|
|
306
|
+
@END`})}return e.length>0?e:Tj},[T,E]);(0,b.useEffect)(()=>{if(Te.length>0){if(me){let e=Te.find(e=>e.id===me);if(e){ye(e.id),xe(e.tool),Ce(e.code),he(null),_e(null);return}}if(ge){let e=Te.find(e=>e.tool.toLowerCase()===ge.toLowerCase()||e.tool.toLowerCase().replace(/_/g,``)===ge.toLowerCase().replace(/_/g,``));if(e){ye(e.id),xe(e.tool),Ce(e.code),_e(null);return}}if(!Te.find(e=>e.id===ve)){let e=Te[0];ye(e.id),xe(e.tool),Ce(e.code)}}},[Te,ve,ge,me]);let Ee=(0,b.useCallback)(e=>{let t=Te.find(t=>t.id===e)||Tj.find(t=>t.id===e);if(!t)return;let n=t.tool.toLowerCase().replace(/_/g,``),r=E.find(e=>e.status===`online`&&(e.tools?.some(e=>e.toLowerCase()===t.tool.toLowerCase()||e.toLowerCase().replace(/_/g,``)===n)||t.id===`perimeter`&&e.id===`blg`||t.id===`blg_banking`&&e.id===`blg`||t.id===`blg_healthcare`&&e.id===`blg`||t.id===`bank`&&e.id===`bank`||t.id===`vault`&&e.id===`vault`||t.id===`market`&&e.id===`oracle`||t.id===`iot`&&e.id===`edge`||t.id===`pii_attack`&&e.id===`bank`||t.id===`mesh`&&(e.id===`relay`||e.id===`oracle`)));if(r){let e=r.ports?.grpc??r.ports?.http,n=r.ports?.grpc?`grpc`:`http`,i=n===`grpc`?`${r.host}:${e}`:`http://${r.host}:${e}/mcp`;if(se!==i){let e=Ej(t.id,t.code);he(t.id),_e(t.tool),ye(t.id),Ce(e),xe(t.tool),fe(i,n,t.tool);return}}let i=Ej(t.id,t.code);ye(t.id),Ce(i),xe(t.tool)},[Te,E,se,fe]),De=(0,b.useCallback)(e=>{xe(e);let t=Te.find(t=>t.tool.toLowerCase()===e.toLowerCase()||t.tool.toLowerCase().replace(/_/g,``)===e.toLowerCase().replace(/_/g,``))||Tj.find(t=>t.tool.toLowerCase()===e.toLowerCase()||t.tool.toLowerCase().replace(/_/g,``)===e.toLowerCase().replace(/_/g,``));t&&(ye(t.id),Ce(Ej(t.id,t.code)))},[Te]),Oe=(0,b.useCallback)(()=>{let e=Te.find(e=>e.id===ve);e&&(Oj(ve),Ce(e.code))},[Te,ve]),ke=(0,b.useCallback)(e=>{if(!e||T.length===0)return!1;let t=e.toLowerCase().replace(/_/g,``);return T.some(n=>n.name.toLowerCase()===e.toLowerCase()||n.name.toLowerCase().replace(/_/g,``)===t)},[T]),Ae=(0,b.useMemo)(()=>Te.find(e=>e.id===ve),[Te,ve]),je=(0,b.useMemo)(()=>ke(o===`form`?be:Ae?.tool||be),[o,be,Ae,ke]),Me=(0,b.useMemo)(()=>T.find(e=>e.name===be),[T,be]),Ne=()=>{y({targetTool:be||Ae?.tool||Te[0]?.tool||``,executionMode:o,code:Se,formArgs:c,targetType:O})},Pe=(0,b.useMemo)(()=>{let e=new Set;for(let t of E)t.status===`online`&&(t.tier===1||t.tier===2||t.tier===3)&&e.add(t.tier);return e},[E]),Fe=Pe.size>0;return(0,F.jsxs)(`div`,{className:`min-h-screen bg-background flex flex-col font-sans antialiased text-foreground selection:bg-primary/20 selection:text-primary`,children:[(0,F.jsx)(yj,{onlineNodes:N,totalNodes:M,hasNodeStats:P,isScanning:j,secondsAgo:ce,theme:e,version:C,activeTiersCount:Pe.size,onThemeChange:t,onRescan:()=>{de(!0,!1),ue(),le()}}),(0,F.jsx)(xj,{targetType:O,onTargetTypeChange:ee,stdioCmd:te,onStdioCmdChange:ne,httpUrl:k,onHttpUrlChange:re,grpcTarget:ie,onGrpcTargetChange:ae,onConnect:pe,isConnecting:A,activeConnectedTarget:se,connected:S?.status===`healthy`}),(0,F.jsx)(_j,{telemetry:w}),(0,F.jsx)(`main`,{className:`flex-1 max-w-7xl w-full mx-auto p-4 md:p-6 flex flex-col gap-6`,children:(0,F.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-12 gap-6 items-start`,children:[(0,F.jsx)(gj,{tools:T,nodes:E,scanSummary:D,onlineNodes:N,totalNodes:M,hasNodeStats:P,isScanning:j,loadingTools:oe,targetType:O,activeConnectedTarget:se,selectedToolName:be,onSelectTool:De,onSwitchTarget:fe}),(0,F.jsxs)(`section`,{className:`lg:col-span-8 flex flex-col space-y-6`,children:[(0,F.jsx)(zO,{executionMode:o,onExecutionModeChange:s,availableTemplates:Te,selectedTemplateId:ve,onSelectTemplate:Ee,selectedToolName:be,onSelectTool:De,code:Se,onCodeChange:we,isRunning:u,onCancel:x,tools:T,isCurrentToolSupported:je,currentTemplate:Ae,currentToolObj:Me,activeConnectedTarget:se,isNetworkHealthy:S?.status===`healthy`,formArgs:c,onFormArgChange:(e,t)=>l(n=>({...n,[e]:t})),onResetTemplate:Oe,onExecute:Ne,onOpenExportTab:()=>r(`export`),onOpenEnvModal:()=>a(!0)}),(0,F.jsx)(mj,{timeline:h,result:d,meta:f,errorAlert:p,isRunning:u,code:Se,selectedToolName:be,targetType:O,grpcTarget:ie,httpUrl:k,stdioCmd:te,history:g,onSelectHistoryEntry:_,onClearHistory:v,activeTab:n,onTabChange:r})]})]})}),(0,F.jsx)(Le,{isOpen:i,onClose:()=>a(!1),toolName:be||`Analyze_Synthetic_Bank_Transactions`,tool:Me}),(0,F.jsx)(`footer`,{className:`border-t border-border bg-card/60 py-3 mt-auto transition-colors`,children:(0,F.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 flex flex-col sm:flex-row items-center justify-between text-[11px] text-zinc-400 gap-2`,children:[(0,F.jsx)(`div`,{children:`© 2026 Nekzus Solutions. Logic-Injection-on-Origin Protocol (LIOP).`}),(0,F.jsxs)(`div`,{className:`flex items-center space-x-4`,children:[(0,F.jsxs)(`span`,{className:`flex items-center gap-1 font-mono`,children:[(0,F.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full ${N>0?`bg-success`:`bg-rose-500`}`}),(0,F.jsx)(`span`,{className:`text-zinc-300`,children:Fe?`P2P Mesh: Multi-Tier Zero-Trust`:`Runtime: Direct Origin Execution`})]}),(0,F.jsx)(`span`,{className:`font-mono text-zinc-300`,children:N>0?Fe?`${N} Nodes Verified Across ${Pe.size} Layers`:`${N} Target Node${N>1?`s`:``} Online & Verified`:`Target Inactive (Offline)`})]})]})})]})}var Aj=document.getElementById(`root`);Aj&&(0,x.createRoot)(Aj).render((0,F.jsx)(b.StrictMode,{children:(0,F.jsx)(kj,{})}));
|